amazonka-ec2-0.2.0: Amazon Elastic Compute Cloud SDK.

Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.DetachVolume

Contents

Description

Detaches an Amazon EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so results in the volume being stuck in a busy state while detaching.

If an Amazon EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the AWS Marketplace product codes from that volume are no longer associated with the instance.

For more information, see Detaching an Amazon EBS Volume in the AmazonElastic Compute Cloud User Guide.

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DetachVolume.html

Synopsis

Request

Request constructor

detachVolume Source

DetachVolume constructor.

The fields accessible through corresponding lenses are:

Request lenses

dvForce :: Lens' DetachVolume (Maybe Bool) Source

Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

dvInstanceId :: Lens' DetachVolume (Maybe Text) Source

The ID of the instance.

dvVolumeId :: Lens' DetachVolume Text Source

The ID of the volume.

Response

Response constructor

Response lenses

dvrAttachTime :: Lens' DetachVolumeResponse (Maybe UTCTime) Source

The time stamp when the attachment initiated.

dvrDeleteOnTermination :: Lens' DetachVolumeResponse (Maybe Bool) Source

Indicates whether the Amazon EBS volume is deleted on instance termination.

dvrState :: Lens' DetachVolumeResponse (Maybe VolumeAttachmentState) Source

The attachment state of the volume.