amazonka-ebs-2.0: Amazon Elastic Block Store SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EBS.GetSnapshotBlock

Description

Returns the data in a block in an Amazon Elastic Block Store snapshot.

Synopsis

Creating a Request

data GetSnapshotBlock Source #

See: newGetSnapshotBlock smart constructor.

Constructors

GetSnapshotBlock' 

Fields

  • snapshotId :: Text

    The ID of the snapshot containing the block from which to get data.

    If the specified snapshot is encrypted, you must have permission to use the KMS key that was used to encrypt the snapshot. For more information, see Using encryption in the Amazon Elastic Compute Cloud User Guide.

  • blockIndex :: Natural

    The block index of the block in which to read the data. A block index is a logical index in units of 512 KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/524288). The logical offset of the data must be 512 KiB aligned.

  • blockToken :: Text

    The block token of the block from which to get data. You can obtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks operations.

Instances

Instances details
ToHeaders GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

ToPath GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

ToQuery GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

AWSRequest GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

Associated Types

type AWSResponse GetSnapshotBlock #

Generic GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

Associated Types

type Rep GetSnapshotBlock :: Type -> Type #

Read GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

Show GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

NFData GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

Methods

rnf :: GetSnapshotBlock -> () #

Eq GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

Hashable GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

type AWSResponse GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

type Rep GetSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.GetSnapshotBlock

type Rep GetSnapshotBlock = D1 ('MetaData "GetSnapshotBlock" "Amazonka.EBS.GetSnapshotBlock" "amazonka-ebs-2.0-64shgDr10jT2ab25iSOcZ1" 'False) (C1 ('MetaCons "GetSnapshotBlock'" 'PrefixI 'True) (S1 ('MetaSel ('Just "snapshotId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "blockIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "blockToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetSnapshotBlock Source #

Create a value of GetSnapshotBlock 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:snapshotId:GetSnapshotBlock', getSnapshotBlock_snapshotId - The ID of the snapshot containing the block from which to get data.

If the specified snapshot is encrypted, you must have permission to use the KMS key that was used to encrypt the snapshot. For more information, see Using encryption in the Amazon Elastic Compute Cloud User Guide.

GetSnapshotBlock, getSnapshotBlock_blockIndex - The block index of the block in which to read the data. A block index is a logical index in units of 512 KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/524288). The logical offset of the data must be 512 KiB aligned.

GetSnapshotBlock, getSnapshotBlock_blockToken - The block token of the block from which to get data. You can obtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks operations.

Request Lenses

getSnapshotBlock_snapshotId :: Lens' GetSnapshotBlock Text Source #

The ID of the snapshot containing the block from which to get data.

If the specified snapshot is encrypted, you must have permission to use the KMS key that was used to encrypt the snapshot. For more information, see Using encryption in the Amazon Elastic Compute Cloud User Guide.

getSnapshotBlock_blockIndex :: Lens' GetSnapshotBlock Natural Source #

The block index of the block in which to read the data. A block index is a logical index in units of 512 KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/524288). The logical offset of the data must be 512 KiB aligned.

getSnapshotBlock_blockToken :: Lens' GetSnapshotBlock Text Source #

The block token of the block from which to get data. You can obtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks operations.

Destructuring the Response

data GetSnapshotBlockResponse Source #

See: newGetSnapshotBlockResponse smart constructor.

Constructors

GetSnapshotBlockResponse' 

Fields

newGetSnapshotBlockResponse Source #

Create a value of GetSnapshotBlockResponse 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:checksum:GetSnapshotBlockResponse', getSnapshotBlockResponse_checksum - The checksum generated for the block, which is Base64 encoded.

$sel:checksumAlgorithm:GetSnapshotBlockResponse', getSnapshotBlockResponse_checksumAlgorithm - The algorithm used to generate the checksum for the block, such as SHA256.

$sel:dataLength:GetSnapshotBlockResponse', getSnapshotBlockResponse_dataLength - The size of the data in the block.

$sel:httpStatus:GetSnapshotBlockResponse', getSnapshotBlockResponse_httpStatus - The response's http status code.

$sel:blockData:GetSnapshotBlockResponse', getSnapshotBlockResponse_blockData - The data content of the block.

Response Lenses

getSnapshotBlockResponse_checksum :: Lens' GetSnapshotBlockResponse (Maybe Text) Source #

The checksum generated for the block, which is Base64 encoded.

getSnapshotBlockResponse_checksumAlgorithm :: Lens' GetSnapshotBlockResponse (Maybe ChecksumAlgorithm) Source #

The algorithm used to generate the checksum for the block, such as SHA256.