Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class StartSnapshotCommandProtected

Creates a new Amazon EBS snapshot. The new snapshot enters the pending state after the request completes.

After creating the snapshot, use PutSnapshotBlock to write blocks of data to the snapshot.

Example

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

import { EBSClient, StartSnapshotCommand } from "@aws-sdk/client-ebs"; // ES Modules import
// const { EBSClient, StartSnapshotCommand } = require("@aws-sdk/client-ebs"); // CommonJS import
const client = new EBSClient(config);
const input = { // StartSnapshotRequest
VolumeSize: Number("long"), // required
ParentSnapshotId: "STRING_VALUE",
Tags: [ // Tags
{ // Tag
Key: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
Description: "STRING_VALUE",
ClientToken: "STRING_VALUE",
Encrypted: true || false,
KmsKeyArn: "STRING_VALUE",
Timeout: Number("int"),
};
const command = new StartSnapshotCommand(input);
const response = await client.send(command);
// { // StartSnapshotResponse
// Description: "STRING_VALUE",
// SnapshotId: "STRING_VALUE",
// OwnerId: "STRING_VALUE",
// Status: "STRING_VALUE",
// StartTime: new Date("TIMESTAMP"),
// VolumeSize: Number("long"),
// BlockSize: Number("int"),
// Tags: [ // Tags
// { // Tag
// Key: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ],
// ParentSnapshotId: "STRING_VALUE",
// KmsKeyArn: "STRING_VALUE",
// };

Param

StartSnapshotCommandInput

Returns

StartSnapshotCommandOutput

See

Throws

AccessDeniedException (client fault)

You do not have sufficient access to perform this action.

Throws

ConcurrentLimitExceededException (client fault)

You have reached the limit for concurrent API requests. For more information, see Optimizing performance of the EBS direct APIs in the Amazon Elastic Compute Cloud User Guide.

Throws

ConflictException (client fault)

The request uses the same client token as a previous, but non-identical request.

Throws

InternalServerException (server fault)

An internal error has occurred.

Throws

RequestThrottledException (client fault)

The number of API requests has exceed the maximum allowed API request throttling limit.

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

middlewareStack: MiddlewareStack<StartSnapshotCommandInput, StartSnapshotCommandOutput>

Methods