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

DeleteCluster

Deletes a previously provisioned cluster. A successful response from the web service indicates that the request was received correctly. Use DescribeClusters to monitor the status of the deletion. The delete operation cannot be canceled or reverted once submitted. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide.

If you want to shut down the cluster and retain it for future use, set SkipFinalClusterSnapshot to false and specify a name for FinalClusterSnapshotIdentifier. You can later restore this snapshot to resume using the cluster. If a final cluster snapshot is requested, the status of the cluster will be "final-snapshot" while the snapshot is being taken, then it's "deleting" once Amazon Redshift begins deleting the cluster.

For more information about managing clusters, go to Amazon Redshift Clusters 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 identifier of the cluster to be deleted.

Constraints:

  • Must contain lowercase characters.

  • Must contain from 1 to 63 alphanumeric characters or hyphens.

  • First character must be a letter.

  • Cannot end with a hyphen or contain two consecutive hyphens.

Type: String

Required: Yes

FinalClusterSnapshotIdentifier

The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, SkipFinalClusterSnapshot must be false.

Constraints:

  • Must be 1 to 255 alphanumeric characters.

  • First character must be a letter.

  • Cannot end with a hyphen or contain two consecutive hyphens.

Type: String

Required: No

SkipFinalClusterSnapshot

Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If true, a final cluster snapshot is not created. If false, a final cluster snapshot is created before the cluster is deleted.

Note

The FinalClusterSnapshotIdentifier parameter must be specified if SkipFinalClusterSnapshot is false.

Default: false

Type: Boolean

Required: No

Response Elements

The following element is returned by the service.

Cluster

Describes a cluster.

Type: Cluster 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

Example

Sample Request

https://redshift.us-east-1.amazonaws.com/ ?Action=DeleteCluster &ClusterIdentifier=examplecluster2 &SkipFinalClusterSnapshot=true &Version=2012-12-01 &x-amz-algorithm=AWS4-HMAC-SHA256 &x-amz-credential=AKIAIOSFODNN7EXAMPLE/20130123/us-east-1/redshift/aws4_request &x-amz-date=20130123T022400Z &x-amz-signedheaders=content-type;host;x-amz-date

Sample Response

<DeleteClusterResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <DeleteClusterResult> <Cluster> <PendingModifiedValues/> <ClusterVersion>1.0</ClusterVersion> <VpcSecurityGroups/> <Endpoint> <Port>5439</Port> <Address>examplecluster2.cobbanlpscsn.us-east-1.redshift.amazonaws.com</Address> </Endpoint> <ClusterStatus>deleting</ClusterStatus> <NumberOfNodes>2</NumberOfNodes> <AutomatedSnapshotRetentionPeriod>1</AutomatedSnapshotRetentionPeriod> <PubliclyAccessible>true</PubliclyAccessible> <Encrypted>true</Encrypted> <DBName>dev</DBName> <PreferredMaintenanceWindow>sun:10:30-sun:11:00</PreferredMaintenanceWindow> <ClusterParameterGroups> <ClusterParameterGroup> <ParameterApplyStatus>in-sync</ParameterApplyStatus> <ParameterGroupName>default.redshift-1.0</ParameterGroupName> </ClusterParameterGroup> </ClusterParameterGroups> <ClusterCreateTime>2013-01-23T00:11:32.804Z</ClusterCreateTime> <ClusterSecurityGroups> <ClusterSecurityGroup> <Status>active</Status> <ClusterSecurityGroupName>default</ClusterSecurityGroupName> </ClusterSecurityGroup> </ClusterSecurityGroups> <AvailabilityZone>us-east-1a</AvailabilityZone> <NodeType>ds2.xlarge</NodeType> <ClusterIdentifier>examplecluster2</ClusterIdentifier> <AllowVersionUpgrade>true</AllowVersionUpgrade> <MasterUsername>masteruser</MasterUsername> </Cluster> </DeleteClusterResult> <ResponseMetadata> <RequestId>f2e6b87e-6503-11e2-b343-393adc3f0a21</RequestId> </ResponseMetadata> </DeleteClusterResponse>

See Also

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