- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CopyClusterSnapshotCommand
Copies a snapshot of an elastic cluster.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DocDBElasticClient, CopyClusterSnapshotCommand } from "@aws-sdk/client-docdb-elastic"; // ES Modules import
// const { DocDBElasticClient, CopyClusterSnapshotCommand } = require("@aws-sdk/client-docdb-elastic"); // CommonJS import
const client = new DocDBElasticClient(config);
const input = { // CopyClusterSnapshotInput
snapshotArn: "STRING_VALUE", // required
targetSnapshotName: "STRING_VALUE", // required
kmsKeyId: "STRING_VALUE",
copyTags: true || false,
tags: { // TagMap
"<keys>": "STRING_VALUE",
},
};
const command = new CopyClusterSnapshotCommand(input);
const response = await client.send(command);
// { // CopyClusterSnapshotOutput
// snapshot: { // ClusterSnapshot
// subnetIds: [ // StringList // required
// "STRING_VALUE",
// ],
// snapshotName: "STRING_VALUE", // required
// snapshotArn: "STRING_VALUE", // required
// snapshotCreationTime: "STRING_VALUE", // required
// clusterArn: "STRING_VALUE", // required
// clusterCreationTime: "STRING_VALUE", // required
// status: "STRING_VALUE", // required
// vpcSecurityGroupIds: [ // required
// "STRING_VALUE",
// ],
// adminUserName: "STRING_VALUE", // required
// kmsKeyId: "STRING_VALUE", // required
// snapshotType: "STRING_VALUE",
// },
// };
Example Usage
CopyClusterSnapshotCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
snapshotArn Required | string | undefined | The Amazon Resource Name (ARN) identifier of the elastic cluster snapshot. |
targetSnapshotName Required | string | undefined | The identifier of the new elastic cluster snapshot to create from the source cluster snapshot. This parameter is not case sensitive. Constraints:
Example: |
copyTags | boolean | undefined | Set to |
kmsKeyId | string | undefined | The Amazon Web Services KMS key ID for an encrypted elastic cluster snapshot. The Amazon Web Services KMS key ID is the Amazon Resource Name (ARN), Amazon Web Services KMS key identifier, or the Amazon Web Services KMS key alias for the Amazon Web Services KMS encryption key. If you copy an encrypted elastic cluster snapshot from your Amazon Web Services account, you can specify a value for To copy an encrypted elastic cluster snapshot to another Amazon Web Services region, set If you copy an unencrypted elastic cluster snapshot and specify a value for the |
tags | Record<string, string> | undefined | The tags to be assigned to the elastic cluster snapshot. |
CopyClusterSnapshotCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
snapshot Required | ClusterSnapshot | undefined | Returns information about a specific elastic cluster snapshot. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | An exception that occurs when there are not sufficient permissions to perform an action. |
ConflictException | client | There was an access conflict. |
InternalServerException | server | There was an internal server error. |
ResourceNotFoundException | client | The specified resource could not be located. |
ServiceQuotaExceededException | client | The service quota for the action was exceeded. |
ThrottlingException | client | ThrottlingException will be thrown when request was denied due to request throttling. |
ValidationException | client | A structure defining a validation exception. |
DocDBElasticServiceException | Base exception class for all service exceptions from DocDBElastic service. |