List of usage examples for com.amazonaws.services.ec2.model AttachVolumeRequest AttachVolumeRequest
public AttachVolumeRequest(String volumeId, String instanceId, String device)
From source file:org.openinfinity.cloud.service.administrator.EC2Wrapper.java
License:Apache License
public void attachVolume(String volumeId, String instanceId, String deviceName) { try {/*from w ww. j a v a2s . c o m*/ AttachVolumeRequest request = new AttachVolumeRequest(volumeId, instanceId, deviceName); ec2.attachVolume(request); } catch (Exception e) { String message = e.getMessage(); LOG.error("Error attaching volume to instance: " + message); ExceptionUtil.throwSystemException(message, e); } }