Example usage for com.amazonaws.services.ec2.model AttachVolumeRequest getVolumeId

List of usage examples for com.amazonaws.services.ec2.model AttachVolumeRequest getVolumeId

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model AttachVolumeRequest getVolumeId.

Prototype


public String getVolumeId() 

Source Link

Document

The ID of the EBS volume.

Usage

From source file:jp.primecloud.auto.aws.typica.EucaEc2Client.java

License:Open Source License

@Override
public AttachVolumeResult attachVolume(AttachVolumeRequest attachVolumeRequest) {
    try {/*from w  w w  . ja  v  a  2 s. c  o m*/
        AttachmentInfo info = jec2.attachVolume(attachVolumeRequest.getVolumeId(),
                attachVolumeRequest.getInstanceId(), attachVolumeRequest.getDevice());
        VolumeAttachment attachment = new VolumeAttachmentConverter().convert(info);
        return new AttachVolumeResult().withAttachment(attachment);
    } catch (EC2Exception e) {
        throw new AmazonClientException(e);
    }
}