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 |
Returns the data in a block in an Amazon Elastic Block Store snapshot.
Synopsis
- data GetSnapshotBlock = GetSnapshotBlock' {
- snapshotId :: Text
- blockIndex :: Natural
- blockToken :: Text
- newGetSnapshotBlock :: Text -> Natural -> Text -> GetSnapshotBlock
- getSnapshotBlock_snapshotId :: Lens' GetSnapshotBlock Text
- getSnapshotBlock_blockIndex :: Lens' GetSnapshotBlock Natural
- getSnapshotBlock_blockToken :: Lens' GetSnapshotBlock Text
- data GetSnapshotBlockResponse = GetSnapshotBlockResponse' {}
- newGetSnapshotBlockResponse :: Int -> ResponseBody -> GetSnapshotBlockResponse
- getSnapshotBlockResponse_checksum :: Lens' GetSnapshotBlockResponse (Maybe Text)
- getSnapshotBlockResponse_checksumAlgorithm :: Lens' GetSnapshotBlockResponse (Maybe ChecksumAlgorithm)
- getSnapshotBlockResponse_dataLength :: Lens' GetSnapshotBlockResponse (Maybe Int)
- getSnapshotBlockResponse_httpStatus :: Lens' GetSnapshotBlockResponse Int
- getSnapshotBlockResponse_blockData :: Lens' GetSnapshotBlockResponse ResponseBody
Creating a Request
data GetSnapshotBlock Source #
See: newGetSnapshotBlock
smart constructor.
GetSnapshotBlock' | |
|
Instances
:: Text | |
-> Natural | |
-> Text | |
-> GetSnapshotBlock |
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.
GetSnapshotBlockResponse' | |
|
Instances
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.
getSnapshotBlockResponse_dataLength :: Lens' GetSnapshotBlockResponse (Maybe Int) Source #
The size of the data in the block.
getSnapshotBlockResponse_httpStatus :: Lens' GetSnapshotBlockResponse Int Source #
The response's http status code.
getSnapshotBlockResponse_blockData :: Lens' GetSnapshotBlockResponse ResponseBody Source #
The data content of the block.