Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Connects a volume to an iSCSI connection and then attaches the volume to the specified gateway. Detaching and attaching a volume enables you to recover your data from one gateway to a different gateway without creating a snapshot. It also makes it easier to move your volumes from an on-premises gateway to a gateway hosted on an Amazon EC2 instance.
Synopsis
- data AttachVolume = AttachVolume' {
- diskId :: Maybe Text
- targetName :: Maybe Text
- gatewayARN :: Text
- volumeARN :: Text
- networkInterfaceId :: Text
- newAttachVolume :: Text -> Text -> Text -> AttachVolume
- attachVolume_diskId :: Lens' AttachVolume (Maybe Text)
- attachVolume_targetName :: Lens' AttachVolume (Maybe Text)
- attachVolume_gatewayARN :: Lens' AttachVolume Text
- attachVolume_volumeARN :: Lens' AttachVolume Text
- attachVolume_networkInterfaceId :: Lens' AttachVolume Text
- data AttachVolumeResponse = AttachVolumeResponse' {}
- newAttachVolumeResponse :: Int -> AttachVolumeResponse
- attachVolumeResponse_targetARN :: Lens' AttachVolumeResponse (Maybe Text)
- attachVolumeResponse_volumeARN :: Lens' AttachVolumeResponse (Maybe Text)
- attachVolumeResponse_httpStatus :: Lens' AttachVolumeResponse Int
Creating a Request
data AttachVolume Source #
AttachVolumeInput
See: newAttachVolume
smart constructor.
AttachVolume' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> AttachVolume |
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:diskId:AttachVolume'
, attachVolume_diskId
- The unique device ID or other distinguishing data that identifies the
local disk used to create the volume. This value is only required when
you are attaching a stored volume.
$sel:targetName:AttachVolume'
, attachVolume_targetName
- The name of the iSCSI target used by an initiator to connect to a volume
and used as a suffix for the target ARN. For example, specifying
TargetName
as myvolume results in the target ARN of
arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume
.
The target name must be unique across all volumes on a gateway.
If you don't specify a value, Storage Gateway uses the value that was previously used for this volume as the new target name.
$sel:gatewayARN:AttachVolume'
, attachVolume_gatewayARN
- The Amazon Resource Name (ARN) of the gateway that you want to attach
the volume to.
$sel:volumeARN:AttachVolume'
, attachVolume_volumeARN
- The Amazon Resource Name (ARN) of the volume to attach to the specified
gateway.
$sel:networkInterfaceId:AttachVolume'
, attachVolume_networkInterfaceId
- The network interface of the gateway on which to expose the iSCSI
target. Only IPv4 addresses are accepted. Use DescribeGatewayInformation
to get a list of the network interfaces available on a gateway.
Valid Values: A valid IP address.
Request Lenses
attachVolume_diskId :: Lens' AttachVolume (Maybe Text) Source #
The unique device ID or other distinguishing data that identifies the local disk used to create the volume. This value is only required when you are attaching a stored volume.
attachVolume_targetName :: Lens' AttachVolume (Maybe Text) Source #
The name of the iSCSI target used by an initiator to connect to a volume
and used as a suffix for the target ARN. For example, specifying
TargetName
as myvolume results in the target ARN of
arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume
.
The target name must be unique across all volumes on a gateway.
If you don't specify a value, Storage Gateway uses the value that was previously used for this volume as the new target name.
attachVolume_gatewayARN :: Lens' AttachVolume Text Source #
The Amazon Resource Name (ARN) of the gateway that you want to attach the volume to.
attachVolume_volumeARN :: Lens' AttachVolume Text Source #
The Amazon Resource Name (ARN) of the volume to attach to the specified gateway.
attachVolume_networkInterfaceId :: Lens' AttachVolume Text Source #
The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a list of the network interfaces available on a gateway.
Valid Values: A valid IP address.
Destructuring the Response
data AttachVolumeResponse Source #
AttachVolumeOutput
See: newAttachVolumeResponse
smart constructor.
AttachVolumeResponse' | |
|
Instances
newAttachVolumeResponse Source #
Create a value of AttachVolumeResponse
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:targetARN:AttachVolumeResponse'
, attachVolumeResponse_targetARN
- The Amazon Resource Name (ARN) of the volume target, which includes the
iSCSI name for the initiator that was used to connect to the target.
$sel:volumeARN:AttachVolume'
, attachVolumeResponse_volumeARN
- The Amazon Resource Name (ARN) of the volume that was attached to the
gateway.
$sel:httpStatus:AttachVolumeResponse'
, attachVolumeResponse_httpStatus
- The response's http status code.
Response Lenses
attachVolumeResponse_targetARN :: Lens' AttachVolumeResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI name for the initiator that was used to connect to the target.
attachVolumeResponse_volumeARN :: Lens' AttachVolumeResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the volume that was attached to the gateway.
attachVolumeResponse_httpStatus :: Lens' AttachVolumeResponse Int Source #
The response's http status code.