CompleteSnapshot - EBS direct APIs

CompleteSnapshot

Seals and completes the snapshot after all of the required blocks of data have been written to it. Completing the snapshot changes the status to completed. You cannot write new blocks to a snapshot after it has been completed.

Note

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

Request Syntax

POST /snapshots/completion/snapshotId HTTP/1.1 x-amz-ChangedBlocksCount: ChangedBlocksCount x-amz-Checksum: Checksum x-amz-Checksum-Algorithm: ChecksumAlgorithm x-amz-Checksum-Aggregation-Method: ChecksumAggregationMethod

URI Request Parameters

The request uses the following URI parameters.

ChangedBlocksCount

The number of blocks that were written to the snapshot.

Valid Range: Minimum value of 0.

Required: Yes

Checksum

An aggregated Base-64 SHA256 checksum based on the checksums of each written block.

To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.

Length Constraints: Maximum length of 64.

Pattern: ^[A-Za-z0-9+/=]+$

ChecksumAggregationMethod

The aggregation method used to generate the checksum. Currently, the only supported aggregation method is LINEAR.

Length Constraints: Maximum length of 32.

Pattern: ^[A-Za-z0-9]+$

Valid Values: LINEAR

ChecksumAlgorithm

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

snapshotId

The ID of the snapshot.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^snap-[0-9a-f]+$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 202 Content-type: application/json { "Status": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 202 response.

The following data is returned in JSON format by the service.

Status

The status of the snapshot.

Type: String

Length Constraints: Maximum length of 32.

Valid Values: completed | pending | error

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

An internal error has occurred. For more information see Error retries.

HTTP Status Code: 500

RequestThrottledException

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

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404

ServiceQuotaExceededException

Your current service quotas do not allow you to perform this action.

HTTP Status Code: 402

ValidationException

The input fails to satisfy the constraints of the EBS direct APIs.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: