AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DeleteDBInstance operation. Deletes a previously provisioned DB instance. When you delete a DB instance, all automated backups for that instance are deleted and can't be recovered. However, manual DB snapshots of the DB instance aren't deleted.
If you request a final DB snapshot, the status of the Amazon RDS DB instance is deleting
until the DB snapshot is created. This operation can't be canceled or reverted after
it begins. To monitor the status of this operation, use DescribeDBInstance
.
When a DB instance is in a failure state and has a status of failed
, incompatible-restore
,
or incompatible-network
, you can only delete it when you skip creation of the
final snapshot with the SkipFinalSnapshot
parameter.
If the specified DB instance is part of an Amazon Aurora DB cluster, you can't delete the DB instance if both of the following conditions are true:
The DB cluster is a read replica of another Amazon Aurora DB cluster.
The DB instance is the only instance in the DB cluster.
To delete a DB instance in this case, first use the PromoteReadReplicaDBCluster
operation to promote the DB cluster so that it's no longer a read replica. After the
promotion completes, use the DeleteDBInstance
operation to delete the final
instance in the DB cluster.
For RDS Custom DB instances, deleting the DB instance permanently deletes the EC2 instance and the associated EBS volumes. Make sure that you don't terminate or delete these resources before you delete the DB instance. Otherwise, deleting the DB instance and creation of the final snapshot might fail.
Namespace: Amazon.RDS.Model
Assembly: AWSSDK.RDS.dll
Version: 3.x.y.z
public class DeleteDBInstanceRequest : AmazonRDSRequest IAmazonWebServiceRequest
The DeleteDBInstanceRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
DeleteDBInstanceRequest() |
Empty constructor used to set properties independently even when a simple constructor is available |
![]() |
DeleteDBInstanceRequest(string) |
Instantiates DeleteDBInstanceRequest with the parameterized properties |
Name | Type | Description | |
---|---|---|---|
![]() |
DBInstanceIdentifier | System.String |
Gets and sets the property DBInstanceIdentifier. The DB instance identifier for the DB instance to be deleted. This parameter isn't case-sensitive. Constraints:
|
![]() |
DeleteAutomatedBackups | System.Boolean |
Gets and sets the property DeleteAutomatedBackups. Specifies whether to remove automated backups immediately after the DB instance is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB instance is deleted. |
![]() |
FinalDBSnapshotIdentifier | System.String |
Gets and sets the property FinalDBSnapshotIdentifier.
The If you enable this parameter and also enable SkipFinalShapshot, the command results in an error. This setting doesn't apply to RDS Custom. Constraints:
|
![]() |
SkipFinalSnapshot | System.Boolean |
Gets and sets the property SkipFinalSnapshot. Specifies whether to skip the creation of a final DB snapshot before deleting the instance. If you enable this parameter, RDS doesn't create a DB snapshot. If you don't enable this parameter, RDS creates a DB snapshot before the DB instance is deleted. By default, skip isn't enabled, and the DB snapshot is created.
If you don't enable this parameter, you must specify the
When a DB instance is in a failure state and has a status of If you delete a read replica or an RDS Custom instance, you must enable this setting. This setting is required for RDS Custom. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5