libZSservicesZSamazonka-ebsZSamazonka-ebs
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.EBS.PutSnapshotBlock

Description

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

Creating a Request

data PutSnapshotBlock Source #

See: newPutSnapshotBlock smart constructor.

Constructors

PutSnapshotBlock' 

Fields

  • progress :: Maybe Natural

    The progress of the write process, as a percentage.

  • snapshotId :: Text

    The ID of the snapshot.

  • blockIndex :: Natural

    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.

  • dataLength :: Int

    The size of the data to write to the block, in bytes. Currently, the only supported size is 524288 bytes.

    Valid values: 524288

  • checksum :: Text

    A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.

  • checksumAlgorithm :: ChecksumAlgorithm

    The algorithm used to generate the checksum. Currently, the only supported algorithm is SHA256.

  • blockData :: HashedBody

    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.

Instances

Instances details
Show PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Generic PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Associated Types

type Rep PutSnapshotBlock :: Type -> Type #

AWSRequest PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Associated Types

type AWSResponse PutSnapshotBlock #

ToBody PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

ToHeaders PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

ToPath PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

ToQuery PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

type Rep PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

type AWSResponse PutSnapshotBlock Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

newPutSnapshotBlock Source #

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_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.

Constructors

PutSnapshotBlockResponse' 

Fields

Instances

Instances details
Eq PutSnapshotBlockResponse Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Read PutSnapshotBlockResponse Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Show PutSnapshotBlockResponse Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Generic PutSnapshotBlockResponse Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

Associated Types

type Rep PutSnapshotBlockResponse :: Type -> Type #

NFData PutSnapshotBlockResponse Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

type Rep PutSnapshotBlockResponse Source # 
Instance details

Defined in Amazonka.EBS.PutSnapshotBlock

type Rep PutSnapshotBlockResponse = D1 ('MetaData "PutSnapshotBlockResponse" "Amazonka.EBS.PutSnapshotBlock" "libZSservicesZSamazonka-ebsZSamazonka-ebs" 'False) (C1 ('MetaCons "PutSnapshotBlockResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "checksumAlgorithm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ChecksumAlgorithm)) :*: (S1 ('MetaSel ('Just "checksum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.