- 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.
BatchModifyClusterSnapshotsCommand
Modifies the settings for a set of cluster snapshots.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { RedshiftClient, BatchModifyClusterSnapshotsCommand } from "@aws-sdk/client-redshift"; // ES Modules import
// const { RedshiftClient, BatchModifyClusterSnapshotsCommand } = require("@aws-sdk/client-redshift"); // CommonJS import
const client = new RedshiftClient(config);
const input = { // BatchModifyClusterSnapshotsMessage
SnapshotIdentifierList: [ // SnapshotIdentifierList // required
"STRING_VALUE",
],
ManualSnapshotRetentionPeriod: Number("int"),
Force: true || false,
};
const command = new BatchModifyClusterSnapshotsCommand(input);
const response = await client.send(command);
// { // BatchModifyClusterSnapshotsOutputMessage
// Resources: [ // SnapshotIdentifierList
// "STRING_VALUE",
// ],
// Errors: [ // BatchSnapshotOperationErrors
// { // SnapshotErrorMessage
// SnapshotIdentifier: "STRING_VALUE",
// SnapshotClusterIdentifier: "STRING_VALUE",
// FailureCode: "STRING_VALUE",
// FailureReason: "STRING_VALUE",
// },
// ],
// };
BatchModifyClusterSnapshotsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
SnapshotIdentifierList Required | string[] | undefined | A list of snapshot identifiers you want to modify. |
Force | boolean | undefined | A boolean value indicating whether to override an exception if the retention period has passed. |
ManualSnapshotRetentionPeriod | number | undefined | The number of days that a manual snapshot is retained. If you specify the value -1, the manual snapshot is retained indefinitely. The number must be either -1 or an integer between 1 and 3,653. If you decrease the manual snapshot retention period from its current value, existing manual snapshots that fall outside of the new retention period will return an error. If you want to suppress the errors and delete the snapshots, use the force option. |
BatchModifyClusterSnapshotsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Errors | SnapshotErrorMessage[] | undefined | A list of any errors returned. |
Resources | string[] | undefined | A list of the snapshots that were modified. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BatchModifyClusterSnapshotsLimitExceededFault | client | The maximum number for snapshot identifiers has been reached. The limit is 100. |
InvalidRetentionPeriodFault | client | The retention period specified is either in the past or is not a valid value. The value must be either -1 or an integer between 1 and 3,653. |
RedshiftServiceException | Base exception class for all service exceptions from Redshift service. |