ListClusterSnapshotsCommand

Returns information about snapshots for a specified elastic cluster.

Example Syntax

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

import { DocDBElasticClient, ListClusterSnapshotsCommand } from "@aws-sdk/client-docdb-elastic"; // ES Modules import
// const { DocDBElasticClient, ListClusterSnapshotsCommand } = require("@aws-sdk/client-docdb-elastic"); // CommonJS import
const client = new DocDBElasticClient(config);
const input = { // ListClusterSnapshotsInput
  clusterArn: "STRING_VALUE",
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  snapshotType: "STRING_VALUE",
};
const command = new ListClusterSnapshotsCommand(input);
const response = await client.send(command);
// { // ListClusterSnapshotsOutput
//   snapshots: [ // ClusterSnapshotList
//     { // ClusterSnapshotInList
//       snapshotName: "STRING_VALUE", // required
//       snapshotArn: "STRING_VALUE", // required
//       clusterArn: "STRING_VALUE", // required
//       status: "STRING_VALUE", // required
//       snapshotCreationTime: "STRING_VALUE", // required
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListClusterSnapshotsCommand Input

Parameter
Type
Description
clusterArn
string | undefined

The ARN identifier of the elastic cluster.

maxResults
number | undefined

The maximum number of elastic cluster snapshot results to receive in the response.

nextToken
string | undefined

A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by max-results.

If there is no more data in the responce, the nextToken will not be returned.

snapshotType
string | undefined

The type of cluster snapshots to be returned. You can specify one of the following values:

  • automated - Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account.

  • manual - Return all cluster snapshots that you have manually created for your Amazon Web Services account.

ListClusterSnapshotsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
nextToken
string | undefined

A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by max-results.

If there is no more data in the responce, the nextToken will not be returned.

snapshots
ClusterSnapshotInList[] | undefined

A list of snapshots for a specified elastic cluster.

Throws

Name
Fault
Details
AccessDeniedException
client

An exception that occurs when there are not sufficient permissions to perform an action.

InternalServerException
server

There was an internal server error.

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.