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

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

Introduction

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

Prototype


public String getDevice() 

Source Link

Document

The device name (for example, /dev/sdh or xvdh).

Usage

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

License:Open Source License

@Override
public AttachVolumeResult attachVolume(AttachVolumeRequest attachVolumeRequest) {
    try {// w ww. ja v a2 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);
    }
}