Example usage for com.amazonaws.services.ec2.model AttachVolumeResult AttachVolumeResult

List of usage examples for com.amazonaws.services.ec2.model AttachVolumeResult AttachVolumeResult

Introduction

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

Prototype

AttachVolumeResult

Source Link

Usage

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

License:Open Source License

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