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

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.DetachVolume

Contents

Description

Detaches an 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 can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an 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.

When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

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

Synopsis

Creating a Request

detachVolume Source #

Creates a value of DetachVolume with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data DetachVolume Source #

Contains the parameters for DetachVolume.

See: detachVolume smart constructor.

Instances

Eq DetachVolume Source # 
Data DetachVolume Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetachVolume -> c DetachVolume #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetachVolume #

toConstr :: DetachVolume -> Constr #

dataTypeOf :: DetachVolume -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DetachVolume) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetachVolume) #

gmapT :: (forall b. Data b => b -> b) -> DetachVolume -> DetachVolume #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetachVolume -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetachVolume -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetachVolume -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetachVolume -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetachVolume -> m DetachVolume #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetachVolume -> m DetachVolume #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetachVolume -> m DetachVolume #

Read DetachVolume Source # 
Show DetachVolume Source # 
Generic DetachVolume Source # 

Associated Types

type Rep DetachVolume :: * -> * #

Hashable DetachVolume Source # 
NFData DetachVolume Source # 

Methods

rnf :: DetachVolume -> () #

AWSRequest DetachVolume Source # 
ToPath DetachVolume Source # 
ToHeaders DetachVolume Source # 
ToQuery DetachVolume Source # 
type Rep DetachVolume Source # 
type Rep DetachVolume = D1 (MetaData "DetachVolume" "Network.AWS.EC2.DetachVolume" "amazonka-ec2-1.4.4-4aYNmHv73MpJXVQjlVKYjQ" False) (C1 (MetaCons "DetachVolume'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_dvInstanceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_dvForce") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)))) ((:*:) (S1 (MetaSel (Just Symbol "_dvDevice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_dvDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_dvVolumeId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))))
type Rs DetachVolume Source # 

Request Lenses

dvInstanceId :: Lens' DetachVolume (Maybe Text) Source #

The ID of the instance.

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.

dvDryRun :: Lens' DetachVolume (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

dvVolumeId :: Lens' DetachVolume Text Source #

The ID of the volume.

Destructuring the Response

volumeAttachment :: VolumeAttachment Source #

Creates a value of VolumeAttachment with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data VolumeAttachment Source #

Describes volume attachment details.

See: volumeAttachment smart constructor.

Instances

Eq VolumeAttachment Source # 
Data VolumeAttachment Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VolumeAttachment -> c VolumeAttachment #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c VolumeAttachment #

toConstr :: VolumeAttachment -> Constr #

dataTypeOf :: VolumeAttachment -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c VolumeAttachment) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VolumeAttachment) #

gmapT :: (forall b. Data b => b -> b) -> VolumeAttachment -> VolumeAttachment #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VolumeAttachment -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VolumeAttachment -> r #

gmapQ :: (forall d. Data d => d -> u) -> VolumeAttachment -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> VolumeAttachment -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> VolumeAttachment -> m VolumeAttachment #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VolumeAttachment -> m VolumeAttachment #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VolumeAttachment -> m VolumeAttachment #

Read VolumeAttachment Source # 
Show VolumeAttachment Source # 
Generic VolumeAttachment Source # 
Hashable VolumeAttachment Source # 
NFData VolumeAttachment Source # 

Methods

rnf :: VolumeAttachment -> () #

FromXML VolumeAttachment Source # 
type Rep VolumeAttachment Source # 

Response Lenses

volInstanceId :: Lens' VolumeAttachment (Maybe Text) Source #

The ID of the instance.

volDeleteOnTermination :: Lens' VolumeAttachment (Maybe Bool) Source #

Indicates whether the EBS volume is deleted on instance termination.

volState :: Lens' VolumeAttachment (Maybe VolumeAttachmentState) Source #

The attachment state of the volume.

volVolumeId :: Lens' VolumeAttachment (Maybe Text) Source #

The ID of the volume.

volAttachTime :: Lens' VolumeAttachment (Maybe UTCTime) Source #

The time stamp when the attachment initiated.