BatchModifyClusterSnapshots - Amazon Redshift

BatchModifyClusterSnapshots

Modifies the settings for a set of cluster snapshots.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

SnapshotIdentifierList.String.N

A list of snapshot identifiers you want to modify.

Type: Array of strings

Length Constraints: Maximum length of 2147483647.

Required: Yes

Force

A boolean value indicating whether to override an exception if the retention period has passed.

Type: Boolean

Required: No

ManualSnapshotRetentionPeriod

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.

Type: Integer

Required: No

Response Elements

The following elements are returned by the service.

Errors.SnapshotErrorMessage.N

A list of any errors returned.

Type: Array of SnapshotErrorMessage objects

Resources.String.N

A list of the snapshots that were modified.

Type: Array of strings

Length Constraints: Maximum length of 2147483647.

Errors

For information about the errors that are common to all actions, see Common Errors.

BatchModifyClusterSnapshotsLimitExceededFault

The maximum number for snapshot identifiers has been reached. The limit is 100.

HTTP Status Code: 400

InvalidRetentionPeriodFault

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.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of BatchModifyClusterSnapshots.

Sample Request

https://redshift.us-east-2.amazonaws.com/ ?Action=BatchModifyClusterSnapshots &SnapshotIdentifierList.String.1=mysnapshotid1 &SnapshotIdentifierList.String.2=mysnapshotid2 &ManualSnapshotRetentionPeriod=30 &SignatureMethod=HmacSHA256&SignatureVersion=4 &Version=2012-12-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20190817/us-east-2/redshift/aws4_request &X-Amz-Date=20190825T160000Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=0aa1234bb5cc678ddddd901ee2ff3aa45678b90c12d345e6ff789012345a6b7b

Sample Response

<BatchModifyClusterSnapshotsResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <BatchModifyClusterSnapshotsResult> <Resources> <String>mysnapshotid1</String> <String>mysnapshotid2</String> </Resources> <Errors/> </BatchModifyClusterSnapshotsResult> <ResponseMetadata> <RequestId>c10326d1-282d-11ea-8314-974e2ba81189</RequestId> </ResponseMetadata> </BatchModifyClusterSnapshotsResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: