Search in sources :

Example 1 with DetachVolumeResult

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);
}
Also used : DetachVolumeRequest(com.amazonaws.services.ec2.model.DetachVolumeRequest) DetachVolumeResult(com.amazonaws.services.ec2.model.DetachVolumeResult)

Aggregations

DetachVolumeRequest (com.amazonaws.services.ec2.model.DetachVolumeRequest)1 DetachVolumeResult (com.amazonaws.services.ec2.model.DetachVolumeResult)1