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

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

Introduction

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

Prototype


public String getInstanceId() 

Source Link

Document

The ID of the instance.

Usage

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

License:Open Source License

@Override
public AttachVolumeResult attachVolume(AttachVolumeRequest attachVolumeRequest) {
    try {/* w w w.j a  va2 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);
    }
}