I'm using the below code part to create a volume in ec2 using jclouds api.
EC2Api ec2Api = computeServiceContext.unwrapApi(EC2Api.class);
LOG.info("initialized ec2 api for volume creation");
org.jclouds.ec2.domain.Volume volume = ec2Api
.getElasticBlockStoreApi()
.get()
.createVolumeInAvailabilityZone("ap-southeast-1b", size);
responseTemplate.setJobId(volume.getId());
responseTemplate.setCreationTime(volume.getCreateTime());
responseTemplate.setZoneId(volume.getAvailabilityZone());
Now there is no option to pass the name of the volume while creating. But I want to list the volumes with respect to volume name. Please let me know if there is anyway to pass the volume name while creating volume and get the volume name in volume details while using describeVolume.
In AWS EC2, Assigning a name to a volume is nothing but creating a tag called Name.
This is not a feature of CreateVolume API
: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html
However, there is a dedicated CreateTags
API which assigns tags to the resources: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateTags.html
So, in jcloud as well, you need to figure how the method/function/api which will call CreateTags
Per: https://groups.google.com/forum/#!topic/jclouds/Wr83TmOX6Rw, jCloud does not have this feature. However, you may want to check what is the current status.