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 |
Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.
Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.
After you attach an EBS volume, you must make it available. For more information, see Make an EBS volume available for use.
If a volume has an Amazon Web Services Marketplace product code:
- The volume can be attached only to a stopped instance.
- Amazon Web Services Marketplace product codes are copied from the volume to the instance.
- You must be subscribed to the product.
- The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.
For more information, see Attach an Amazon EBS volume to an instance in the Amazon Elastic Compute Cloud User Guide.
Synopsis
- data AttachVolume = AttachVolume' {}
- newAttachVolume :: Text -> Text -> Text -> AttachVolume
- attachVolume_dryRun :: Lens' AttachVolume (Maybe Bool)
- attachVolume_device :: Lens' AttachVolume Text
- attachVolume_instanceId :: Lens' AttachVolume Text
- attachVolume_volumeId :: Lens' AttachVolume 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 AttachVolume Source #
See: newAttachVolume
smart constructor.
AttachVolume' | |
|
Instances
Create a value of AttachVolume
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:dryRun:AttachVolume'
, attachVolume_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
.
AttachVolume
, attachVolume_device
- The device name (for example, /dev/sdh
or xvdh
).
AttachVolume
, attachVolume_instanceId
- The ID of the instance.
AttachVolume
, attachVolume_volumeId
- The ID of the EBS volume. The volume and instance must be within the
same Availability Zone.
Request Lenses
attachVolume_dryRun :: Lens' AttachVolume (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
.
attachVolume_device :: Lens' AttachVolume Text Source #
The device name (for example, /dev/sdh
or xvdh
).
attachVolume_instanceId :: Lens' AttachVolume Text Source #
The ID of the instance.
attachVolume_volumeId :: Lens' AttachVolume Text Source #
The ID of the EBS volume. The volume and instance must be within the same Availability Zone.
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.