Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance.
For more information, see Detach an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide.
Synopsis
- data DetachVolume = DetachVolume' {}
- newDetachVolume :: Text -> DetachVolume
- detachVolume_device :: Lens' DetachVolume (Maybe Text)
- detachVolume_dryRun :: Lens' DetachVolume (Maybe Bool)
- detachVolume_force :: Lens' DetachVolume (Maybe Bool)
- detachVolume_instanceId :: Lens' DetachVolume (Maybe Text)
- detachVolume_volumeId :: Lens' DetachVolume Text
- data VolumeAttachment = VolumeAttachment' {}
- newVolumeAttachment :: VolumeAttachment
- volumeAttachment_attachTime :: Lens' VolumeAttachment (Maybe UTCTime)
- volumeAttachment_deleteOnTermination :: Lens' VolumeAttachment (Maybe Bool)
- volumeAttachment_device :: Lens' VolumeAttachment (Maybe Text)
- volumeAttachment_instanceId :: Lens' VolumeAttachment (Maybe Text)
- volumeAttachment_state :: Lens' VolumeAttachment (Maybe VolumeAttachmentState)
- volumeAttachment_volumeId :: Lens' VolumeAttachment (Maybe Text)
Creating a Request
data DetachVolume Source #
See: newDetachVolume
smart constructor.
DetachVolume' | |
|
Instances
Create a value of DetachVolume
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
DetachVolume
, detachVolume_device
- The device name.
$sel:dryRun:DetachVolume'
, detachVolume_dryRun
- 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
.
$sel:force:DetachVolume'
, detachVolume_force
- 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.
DetachVolume
, detachVolume_instanceId
- The ID of the instance. If you are detaching a Multi-Attach enabled
volume, you must specify an instance ID.
DetachVolume
, detachVolume_volumeId
- The ID of the volume.
Request Lenses
detachVolume_device :: Lens' DetachVolume (Maybe Text) Source #
The device name.
detachVolume_dryRun :: 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
.
detachVolume_force :: 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.
detachVolume_instanceId :: Lens' DetachVolume (Maybe Text) Source #
The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.
detachVolume_volumeId :: Lens' DetachVolume Text Source #
The ID of the volume.
Destructuring the Response
data VolumeAttachment Source #
Describes volume attachment details.
See: newVolumeAttachment
smart constructor.
VolumeAttachment' | |
|
Instances
newVolumeAttachment :: VolumeAttachment Source #
Create a value of VolumeAttachment
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:attachTime:VolumeAttachment'
, volumeAttachment_attachTime
- The time stamp when the attachment initiated.
$sel:deleteOnTermination:VolumeAttachment'
, volumeAttachment_deleteOnTermination
- Indicates whether the EBS volume is deleted on instance termination.
$sel:device:VolumeAttachment'
, volumeAttachment_device
- The device name.
$sel:instanceId:VolumeAttachment'
, volumeAttachment_instanceId
- The ID of the instance.
$sel:state:VolumeAttachment'
, volumeAttachment_state
- The attachment state of the volume.
$sel:volumeId:VolumeAttachment'
, volumeAttachment_volumeId
- The ID of the volume.
Response Lenses
volumeAttachment_attachTime :: Lens' VolumeAttachment (Maybe UTCTime) Source #
The time stamp when the attachment initiated.
volumeAttachment_deleteOnTermination :: Lens' VolumeAttachment (Maybe Bool) Source #
Indicates whether the EBS volume is deleted on instance termination.
volumeAttachment_device :: Lens' VolumeAttachment (Maybe Text) Source #
The device name.
volumeAttachment_instanceId :: Lens' VolumeAttachment (Maybe Text) Source #
The ID of the instance.
volumeAttachment_state :: Lens' VolumeAttachment (Maybe VolumeAttachmentState) Source #
The attachment state of the volume.
volumeAttachment_volumeId :: Lens' VolumeAttachment (Maybe Text) Source #
The ID of the volume.