DeleteDBCluster
The DeleteDBCluster action deletes a previously provisioned DB cluster. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified DB cluster are not deleted.
If you're deleting a Multi-AZ DB cluster with read replicas, all cluster members are terminated and read replicas are promoted to standalone instances.
For more information on Amazon Aurora, see What is Amazon Aurora? in the Amazon Aurora User Guide.
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- DBClusterIdentifier
-
The DB cluster identifier for the DB cluster to be deleted. This parameter isn't case-sensitive.
Constraints:
-
Must match an existing DBClusterIdentifier.
Type: String
Required: Yes
-
- DeleteAutomatedBackups
-
Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the AWS Backup policy specifies a point-in-time restore rule.
Type: Boolean
Required: No
- FinalDBSnapshotIdentifier
-
The DB cluster snapshot identifier of the new DB cluster snapshot created when
SkipFinalSnapshotis disabled.Note
If you specify this parameter and also skip the creation of a final DB cluster snapshot with the
SkipFinalShapshotparameter, the request results in an error.Constraints:
-
Must be 1 to 255 letters, numbers, or hyphens.
-
First character must be a letter
-
Can't end with a hyphen or contain two consecutive hyphens
Type: String
Required: No
-
- SkipFinalSnapshot
-
Specifies whether to skip the creation of a final DB cluster snapshot before RDS deletes the DB cluster. If you set this value to
true, RDS doesn't create a final DB cluster snapshot. If you set this value tofalseor don't specify it, RDS creates a DB cluster snapshot before it deletes the DB cluster. By default, this parameter is disabled, so RDS creates a final DB cluster snapshot.Note
If
SkipFinalSnapshotis disabled, you must specify a value for theFinalDBSnapshotIdentifierparameter.Type: Boolean
Required: No
Response Elements
The following element is returned by the service.
- DBCluster
-
Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster.
For an Amazon Aurora DB cluster, this data type is used as a response element in the operations
CreateDBCluster,DeleteDBCluster,DescribeDBClusters,FailoverDBCluster,ModifyDBCluster,PromoteReadReplicaDBCluster,RestoreDBClusterFromS3,RestoreDBClusterFromSnapshot,RestoreDBClusterToPointInTime,StartDBCluster, andStopDBCluster.For a Multi-AZ DB cluster, this data type is used as a response element in the operations
CreateDBCluster,DeleteDBCluster,DescribeDBClusters,FailoverDBCluster,ModifyDBCluster,RebootDBCluster,RestoreDBClusterFromSnapshot, andRestoreDBClusterToPointInTime.For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.
For more information on Multi-AZ DB clusters, see Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.
Type: DBCluster object
Errors
For information about the errors that are common to all actions, see Common Error Types.
- DBClusterAutomatedBackupQuotaExceededFault
-
The quota for retained automated backups was exceeded. This prevents you from retaining any additional automated backups. The retained automated backups quota is the same as your DB cluster quota.
HTTP Status Code: 400
- DBClusterNotFoundFault
-
DBClusterIdentifierdoesn't refer to an existing DB cluster.HTTP Status Code: 404
- DBClusterSnapshotAlreadyExistsFault
-
The user already has a DB cluster snapshot with the given identifier.
HTTP Status Code: 400
- InvalidDBClusterSnapshotStateFault
-
The supplied value isn't a valid DB cluster snapshot state.
HTTP Status Code: 400
- InvalidDBClusterStateFault
-
The requested operation can't be performed while the cluster is in this state.
HTTP Status Code: 400
- InvalidGlobalClusterStateFault
-
The global cluster is in an invalid state and can't perform the requested operation.
HTTP Status Code: 400
- KMSKeyNotAccessibleFault
-
An error occurred accessing an AWS KMS key.
HTTP Status Code: 400
- SnapshotQuotaExceeded
-
The request would result in the user exceeding the allowed number of DB snapshots.
HTTP Status Code: 400
Examples
Deleting an Aurora DB cluster
This example illustrates one usage of DeleteDBCluster.
Sample Request
https://rds.us-east-1.amazonaws.com/
?Action=DeleteDBCluster
&DBClusterIdentifier=sample-cluster2
&SignatureMethod=HmacSHA256
&SignatureVersion=4
&Version=2014-10-31
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIADQKE4SARGYLE/20140725/us-east-1/rds/aws4_request
&X-Amz-Date=20140725T162148Z
&X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
&X-Amz-Signature=815910f78c5a9813e1c15300fcf206e04da071b3586770169765292dc6aa2ed4
Sample Response
aurora5.6
available
0
my-subgroup
5.6.10a
sample-cluster2.cluster-cbfvmgb0y5fy.us-east-1.rds.amazonaws.com
sample-cluster2
04:45-05:15
sat:05:56-sat:06:26
15
awsuser
c72118dc-1417-11e4-8c7b-931a6c1fef28
Deleting a Multi-AZ DB cluster
This example illustrates one usage of DeleteDBCluster.
Sample Request
https://rds.us-west-2.amazonaws.com/
?Action=DeleteDBCluster
&DBClusterIdentifier=my-multi-az-cluster
&SkipFinalSnapshot=true
&SignatureMethod=HmacSHA256
&SignatureVersion=4
&Version=2014-10-31
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIADQKE4SARGYLE/20140725/us-west-2/rds/aws4_request
&X-Amz-Date=20211027T000821Z
&X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
&X-Amz-Signature=815910f78c5a9813e1c15300fcf206e04da071b3586770169765292dc6aa2ed4
Sample Response
false
1000
8.0.26
admin
false
3066
0
1
my-multi-az-cluster
cluster-XDHARXDLDCRL2VZZXKBCFN3RQI
2021-08-17T23:15:00Z
available
22:02-22:32
false
my-multi-az-cluster.cluster-123456789012.us-west-2.rds.amazonaws.com
provisioned
mysql
my-multi-az-cluster.cluster-ro-123456789012.us-west-2.rds.amazonaws.com
true
false
2021-08-16T23:15:00Z
2021-08-10T23:02:10.460Z
false
false
false
subnetgroup1
sg-6921cc28
active
Z3GZ3VYA3PGHTQ
mon:23:02-mon:23:32
default.mysql8.0
io1
db.r6gd.xlarge
false
true
arn:aws:rds:us-west-2:123456789012:cluster:my-multi-az-cluster
08b84e67-7e89-4302-8563-642b34026159
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: