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

Amazonka.StorageGateway.AttachVolume

Description

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

Creating a Request

data AttachVolume Source #

AttachVolumeInput

See: newAttachVolume smart constructor.

Constructors

AttachVolume' 

Fields

  • diskId :: Maybe Text

    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.

  • targetName :: Maybe Text

    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.

  • gatewayARN :: Text

    The Amazon Resource Name (ARN) of the gateway that you want to attach the volume to.

  • volumeARN :: Text

    The Amazon Resource Name (ARN) of the volume to attach to the specified gateway.

  • networkInterfaceId :: Text

    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.

Instances

Instances details
Eq AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Read AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Show AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Generic AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Associated Types

type Rep AttachVolume :: Type -> Type #

NFData AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Methods

rnf :: AttachVolume -> () #

Hashable AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

ToJSON AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

AWSRequest AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Associated Types

type AWSResponse AttachVolume #

ToHeaders AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

ToPath AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

ToQuery AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

type Rep AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

type Rep AttachVolume = D1 ('MetaData "AttachVolume" "Amazonka.StorageGateway.AttachVolume" "libZSservicesZSamazonka-storagegatewayZSamazonka-storagegateway" 'False) (C1 ('MetaCons "AttachVolume'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "diskId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "targetName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "gatewayARN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "volumeARN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "networkInterfaceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse AttachVolume Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

newAttachVolume Source #

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.

Constructors

AttachVolumeResponse' 

Fields

  • targetARN :: Maybe Text

    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.

  • volumeARN :: Maybe Text

    The Amazon Resource Name (ARN) of the volume that was attached to the gateway.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq AttachVolumeResponse Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Read AttachVolumeResponse Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Show AttachVolumeResponse Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Generic AttachVolumeResponse Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Associated Types

type Rep AttachVolumeResponse :: Type -> Type #

NFData AttachVolumeResponse Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

Methods

rnf :: AttachVolumeResponse -> () #

type Rep AttachVolumeResponse Source # 
Instance details

Defined in Amazonka.StorageGateway.AttachVolume

type Rep AttachVolumeResponse = D1 ('MetaData "AttachVolumeResponse" "Amazonka.StorageGateway.AttachVolume" "libZSservicesZSamazonka-storagegatewayZSamazonka-storagegateway" 'False) (C1 ('MetaCons "AttachVolumeResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "targetARN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "volumeARN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.