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 DescribeBackupsCommandProtected

Gets information about backups of AWS CloudHSM clusters.

This is a paginated operation, which means that each response might contain only a subset of all the backups. When the response contains only a subset of backups, it includes a NextToken value. Use this value in a subsequent DescribeBackups request to get more backups. When you receive a response with no NextToken (or an empty or null value), that means there are no more backups to get.

Example

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

import { CloudHSMV2Client, DescribeBackupsCommand } from "@aws-sdk/client-cloudhsm-v2"; // ES Modules import
// const { CloudHSMV2Client, DescribeBackupsCommand } = require("@aws-sdk/client-cloudhsm-v2"); // CommonJS import
const client = new CloudHSMV2Client(config);
const input = { // DescribeBackupsRequest
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
Filters: { // Filters
"<keys>": [ // Strings
"STRING_VALUE",
],
},
SortAscending: true || false,
};
const command = new DescribeBackupsCommand(input);
const response = await client.send(command);
// { // DescribeBackupsResponse
// Backups: [ // Backups
// { // Backup
// BackupId: "STRING_VALUE", // required
// BackupState: "STRING_VALUE",
// ClusterId: "STRING_VALUE",
// CreateTimestamp: new Date("TIMESTAMP"),
// CopyTimestamp: new Date("TIMESTAMP"),
// NeverExpires: true || false,
// SourceRegion: "STRING_VALUE",
// SourceBackup: "STRING_VALUE",
// SourceCluster: "STRING_VALUE",
// DeleteTimestamp: new Date("TIMESTAMP"),
// TagList: [ // TagList
// { // Tag
// Key: "STRING_VALUE", // required
// Value: "STRING_VALUE", // required
// },
// ],
// },
// ],
// NextToken: "STRING_VALUE",
// };

Param

DescribeBackupsCommandInput

Returns

DescribeBackupsCommandOutput

See

Throws

CloudHsmAccessDeniedException (client fault)

The request was rejected because the requester does not have permission to perform the requested operation.

Throws

CloudHsmInternalFailureException (server fault)

The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

Throws

CloudHsmInvalidRequestException (client fault)

The request was rejected because it is not a valid request.

Throws

CloudHsmResourceNotFoundException (client fault)

The request was rejected because it refers to a resource that cannot be found.

Throws

CloudHsmServiceException (client fault)

The request was rejected because an error occurred.

Throws

CloudHsmTagException (client fault)

The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.

Throws

CloudHSMV2ServiceException

Base exception class for all service exceptions from CloudHSMV2 service.

Hierarchy

Constructors

Properties

Methods