Amazon Redshift
API Reference (API Version 2012-12-01)

CreateClusterSnapshot

Creates a manual snapshot of the specified cluster. The cluster must be in the available state.

For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.

Request Parameters

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

ClusterIdentifier

The cluster identifier for which you want a snapshot.

Type: String

Required: Yes

SnapshotIdentifier

A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.

Constraints:

  • Cannot be null, empty, or blank

  • Must contain from 1 to 255 alphanumeric characters or hyphens

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

Type: String

Required: Yes

ManualSnapshotRetentionPeriod

The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.

The value must be either -1 or an integer between 1 and 3,653.

The default value is -1.

Type: Integer

Required: No

Tags.Tag.N

A list of tag instances.

Type: Array of Tag objects

Required: No

Response Elements

The following element is returned by the service.

Snapshot

Describes a snapshot.

Type: Snapshot object

Errors

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

ClusterNotFound

The ClusterIdentifier parameter does not refer to an existing cluster.

HTTP Status Code: 404

ClusterSnapshotAlreadyExists

The value specified as a snapshot identifier is already used by an existing snapshot.

HTTP Status Code: 400

ClusterSnapshotQuotaExceeded

The request would result in the user exceeding the allowed number of cluster snapshots.

HTTP Status Code: 400

InvalidClusterState

The specified cluster is not in the available state.

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

InvalidTagFault

The tag is invalid.

HTTP Status Code: 400

TagLimitExceededFault

You have exceeded the number of tags allowed.

HTTP Status Code: 400

Example

Sample Request

https://redshift.us-east-1.amazonaws.com/ ?Action=CreateClusterSnapshot &ClusterIdentifier=examplecluster &SnapshotIdentifier=snapshot-1234 &Version=2012-12-01 &x-amz-algorithm=AWS4-HMAC-SHA256 &x-amz-credential=AKIAIOSFODNN7EXAMPLE/20130123/us-east-1/redshift/aws4_request &x-amz-date=20130123T010824Z &x-amz-signedheaders=content-type;host;x-amz-date

Sample Response

<CreateClusterSnapshotResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <CreateClusterSnapshotResult> <Snapshot> <Port>5439</Port> <SnapshotIdentifier>my-snapshot-123</SnapshotIdentifier> <Status>creating</Status> <SnapshotType>manual</SnapshotType> <ClusterVersion>1.0</ClusterVersion> <SnapshotCreateTime>2013-01-23T01:08:29.142Z</SnapshotCreateTime> <NumberOfNodes>2</NumberOfNodes> <DBName>dev</DBName> <ClusterCreateTime>2013-01-22T19:23:59.368Z</ClusterCreateTime> <AvailabilityZone>us-east-1c</AvailabilityZone> <NodeType>ds2.xlarge</NodeType> <ClusterIdentifier>examplecluster</ClusterIdentifier> <MasterUsername>adminuser</MasterUsername> </Snapshot> </CreateClusterSnapshotResult> <ResponseMetadata> <RequestId>65baef14-64f9-11e2-bea9-49e0ce183f07</RequestId> </ResponseMetadata> </CreateClusterSnapshotResponse>

See Also

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