List of usage examples for com.amazonaws.services.ec2.model CreateVolumeRequest getSize
public Integer getSize()
The size of the volume, in GiBs.
From source file:jp.primecloud.auto.aws.typica.EucaEc2Client.java
License:Open Source License
@Override public CreateVolumeResult createVolume(CreateVolumeRequest createVolumeRequest) { String size = createVolumeRequest.getSize() != null ? createVolumeRequest.getSize().toString() : null; try {/* www . j a va 2 s .com*/ VolumeInfo info = jec2.createVolume(size, createVolumeRequest.getSnapshotId(), createVolumeRequest.getAvailabilityZone()); Volume volume = new VolumeConverter().convert(info); return new CreateVolumeResult().withVolume(volume); } catch (EC2Exception e) { throw new AmazonClientException(e); } }