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.
NoteYou should always retry requests that receive server (5xx
) error responses, and ThrottlingException
and RequestThrottledException
client error responses. For more information see Error retries in the Amazon Elastic Compute Cloud User Guide.
PUT /snapshots/snapshotId
/blocks/blockIndex
HTTP/1.1
x-amz-Data-Length: DataLength
x-amz-Progress: Progress
x-amz-Checksum: Checksum
x-amz-Checksum-Algorithm: ChecksumAlgorithm
BlockData
URI Request Parameters
The request uses the following URI parameters.
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.
Valid Range: Minimum value of 0.
Required: Yes
A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.
Length Constraints: Maximum length of 64.
Pattern: ^[A-Za-z0-9+/=]+$
Required: Yes
The algorithm used to generate the checksum. Currently, the only supported algorithm is SHA256
.
Length Constraints: Maximum length of 32.
Pattern: ^[A-Za-z0-9]+$
Valid Values: SHA256
Required: Yes
The size of the data to write to the block, in bytes. Currently, the only supported size is 524288
bytes.
Valid values: 524288
Required: Yes
The progress of the write process, as a percentage.
Valid Range: Minimum value of 0. Maximum value of 100.
The ID of the snapshot.
ImportantIf 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..
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern: ^snap-[0-9a-f]+$
Required: Yes
The request accepts the following binary data.
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.
Required: Yes
HTTP/1.1 201
x-amz-Checksum: Checksum
x-amz-Checksum-Algorithm: ChecksumAlgorithm
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The response returns the following HTTP headers.
The SHA256 checksum generated for the block data by Amazon EBS.
Length Constraints: Maximum length of 64.
Pattern: ^[A-Za-z0-9+/=]+$
The algorithm used by Amazon EBS to generate the checksum.
Length Constraints: Maximum length of 32.
Pattern: ^[A-Za-z0-9]+$
Valid Values: SHA256
For information about the errors that are common to all actions, see Common Errors.
You do not have sufficient access to perform this action.
HTTP Status Code: 403
An internal error has occurred. For more information see Error retries.
HTTP Status Code: 500
The number of API requests has exceeded the maximum allowed API request throttling limit for the snapshot. For more information see Error retries.
HTTP Status Code: 400
The specified resource does not exist.
HTTP Status Code: 404
Your current service quotas do not allow you to perform this action.
HTTP Status Code: 402
The input fails to satisfy the constraints of the EBS direct APIs.
HTTP Status Code: 400
For more information about using this API in one of the language-specific AWS SDKs, see the following:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4