use of com.amazonaws.services.ec2.model.DetachVolumeResult in project photon-model by vmware.
the class AWSComputeDiskDay2Service method detachVolume.
/**
* Send detach request to aws using amazon ec2 client.
*/
private void detachVolume(DiskContext context, DeferredResult<DiskContext> dr, String instanceId, String diskId, boolean startInstance) {
DetachVolumeRequest detachVolumeRequest = new DetachVolumeRequest().withInstanceId(instanceId).withVolumeId(diskId);
AWSAsyncHandler<DetachVolumeRequest, DetachVolumeResult> detachDiskHandler = new AWSDetachDiskHandler(this, dr, context, startInstance);
context.amazonEC2Client.detachVolumeAsync(detachVolumeRequest, detachDiskHandler);
}
Aggregations