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 |
Writes a block of data to a snapshot. If the specified block contains
data, the existing data is overwritten. The target snapshot must be in
the pending
state.
Data written to a snapshot must be aligned with 512-KiB sectors.
Synopsis
- data PutSnapshotBlock = PutSnapshotBlock' {}
- newPutSnapshotBlock :: Text -> Natural -> Int -> Text -> ChecksumAlgorithm -> HashedBody -> PutSnapshotBlock
- putSnapshotBlock_progress :: Lens' PutSnapshotBlock (Maybe Natural)
- putSnapshotBlock_snapshotId :: Lens' PutSnapshotBlock Text
- putSnapshotBlock_blockIndex :: Lens' PutSnapshotBlock Natural
- putSnapshotBlock_dataLength :: Lens' PutSnapshotBlock Int
- putSnapshotBlock_checksum :: Lens' PutSnapshotBlock Text
- putSnapshotBlock_checksumAlgorithm :: Lens' PutSnapshotBlock ChecksumAlgorithm
- putSnapshotBlock_blockData :: Lens' PutSnapshotBlock HashedBody
- data PutSnapshotBlockResponse = PutSnapshotBlockResponse' {}
- newPutSnapshotBlockResponse :: Int -> PutSnapshotBlockResponse
- putSnapshotBlockResponse_checksumAlgorithm :: Lens' PutSnapshotBlockResponse (Maybe ChecksumAlgorithm)
- putSnapshotBlockResponse_checksum :: Lens' PutSnapshotBlockResponse (Maybe Text)
- putSnapshotBlockResponse_httpStatus :: Lens' PutSnapshotBlockResponse Int
Creating a Request
data PutSnapshotBlock Source #
See: newPutSnapshotBlock
smart constructor.
PutSnapshotBlock' | |
|
Instances
:: Text | |
-> Natural | |
-> Int | |
-> Text | |
-> ChecksumAlgorithm | |
-> HashedBody | |
-> PutSnapshotBlock |
Create a value of PutSnapshotBlock
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:progress:PutSnapshotBlock'
, putSnapshotBlock_progress
- The progress of the write process, as a percentage.
$sel:snapshotId:PutSnapshotBlock'
, putSnapshotBlock_snapshotId
- The ID of the snapshot.
$sel:blockIndex:PutSnapshotBlock'
, putSnapshotBlock_blockIndex
- The block index of the block in which to write 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.
$sel:dataLength:PutSnapshotBlock'
, putSnapshotBlock_dataLength
- The size of the data to write to the block, in bytes. Currently, the
only supported size is 524288
bytes.
Valid values: 524288
$sel:checksum:PutSnapshotBlock'
, putSnapshotBlock_checksum
- A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are
supported.
$sel:checksumAlgorithm:PutSnapshotBlock'
, putSnapshotBlock_checksumAlgorithm
- The algorithm used to generate the checksum. Currently, the only
supported algorithm is SHA256
.
$sel:blockData:PutSnapshotBlock'
, putSnapshotBlock_blockData
- The data to write to the block.
The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the x-amz-Checksum header. Also, you must specify the checksum algorithm using the x-amz-Checksum-Algorithm header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see Using checksums with the EBS direct APIs in the Amazon Elastic Compute Cloud User Guide.
Request Lenses
putSnapshotBlock_progress :: Lens' PutSnapshotBlock (Maybe Natural) Source #
The progress of the write process, as a percentage.
putSnapshotBlock_snapshotId :: Lens' PutSnapshotBlock Text Source #
The ID of the snapshot.
putSnapshotBlock_blockIndex :: Lens' PutSnapshotBlock Natural Source #
The block index of the block in which to write 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.
putSnapshotBlock_dataLength :: Lens' PutSnapshotBlock Int Source #
The size of the data to write to the block, in bytes. Currently, the
only supported size is 524288
bytes.
Valid values: 524288
putSnapshotBlock_checksum :: Lens' PutSnapshotBlock Text Source #
A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.
putSnapshotBlock_checksumAlgorithm :: Lens' PutSnapshotBlock ChecksumAlgorithm Source #
The algorithm used to generate the checksum. Currently, the only
supported algorithm is SHA256
.
putSnapshotBlock_blockData :: Lens' PutSnapshotBlock HashedBody Source #
The data to write to the block.
The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the x-amz-Checksum header. Also, you must specify the checksum algorithm using the x-amz-Checksum-Algorithm header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see Using checksums with the EBS direct APIs in the Amazon Elastic Compute Cloud User Guide.
Destructuring the Response
data PutSnapshotBlockResponse Source #
See: newPutSnapshotBlockResponse
smart constructor.
PutSnapshotBlockResponse' | |
|
Instances
newPutSnapshotBlockResponse Source #
Create a value of PutSnapshotBlockResponse
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:checksumAlgorithm:PutSnapshotBlock'
, putSnapshotBlockResponse_checksumAlgorithm
- The algorithm used by Amazon EBS to generate the checksum.
$sel:checksum:PutSnapshotBlock'
, putSnapshotBlockResponse_checksum
- The SHA256 checksum generated for the block data by Amazon EBS.
$sel:httpStatus:PutSnapshotBlockResponse'
, putSnapshotBlockResponse_httpStatus
- The response's http status code.
Response Lenses
putSnapshotBlockResponse_checksumAlgorithm :: Lens' PutSnapshotBlockResponse (Maybe ChecksumAlgorithm) Source #
The algorithm used by Amazon EBS to generate the checksum.
putSnapshotBlockResponse_checksum :: Lens' PutSnapshotBlockResponse (Maybe Text) Source #
The SHA256 checksum generated for the block data by Amazon EBS.
putSnapshotBlockResponse_httpStatus :: Lens' PutSnapshotBlockResponse Int Source #
The response's http status code.