Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class ListSnapshotBlocksCommandProtected

Returns information about the blocks in an Amazon Elastic Block Store snapshot.

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.

Example

Use a bare-bones client and the command you need to make an API call.

import { EBSClient, ListSnapshotBlocksCommand } from "@aws-sdk/client-ebs"; // ES Modules import
// const { EBSClient, ListSnapshotBlocksCommand } = require("@aws-sdk/client-ebs"); // CommonJS import
const client = new EBSClient(config);
const input = { // ListSnapshotBlocksRequest
SnapshotId: "STRING_VALUE", // required
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
StartingBlockIndex: Number("int"),
};
const command = new ListSnapshotBlocksCommand(input);
const response = await client.send(command);
// { // ListSnapshotBlocksResponse
// Blocks: [ // Blocks
// { // Block
// BlockIndex: Number("int"),
// BlockToken: "STRING_VALUE",
// },
// ],
// ExpiryTime: new Date("TIMESTAMP"),
// VolumeSize: Number("long"),
// BlockSize: Number("int"),
// NextToken: "STRING_VALUE",
// };

Param

ListSnapshotBlocksCommandInput

Returns

ListSnapshotBlocksCommandOutput

See

Throws

AccessDeniedException (client fault)

You do not have sufficient access to perform this action.

Throws

InternalServerException (server fault)

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

Throws

RequestThrottledException (client fault)

The number of API requests has exceeded the maximum allowed API request throttling limit for the snapshot. For more information see Error retries.

Throws

ResourceNotFoundException (client fault)

The specified resource does not exist.

Throws

ServiceQuotaExceededException (client fault)

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

Throws

ValidationException (client fault)

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

Throws

EBSServiceException

Base exception class for all service exceptions from EBS service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods