AWS SDK Version 3 for .NET
API Reference

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.

The DeleteDBInstance action 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. Manual DB snapshots of the DB instance to be deleted by DeleteDBInstance are not deleted.

If you request a final DB snapshot the status of the Amazon Neptune DB instance is deleting until the DB snapshot is created. The API action DescribeDBInstance is used to monitor the status of this operation. The action can't be canceled or reverted once submitted.

Note that 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 the SkipFinalSnapshot parameter is set to true.

You can't delete a DB instance if it is the only instance in the DB cluster, or if it has deletion protection enabled.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to DeleteDBInstanceAsync.

Namespace: Amazon.Neptune
Assembly: AWSSDK.Neptune.dll
Version: 3.x.y.z

Syntax

C#
public abstract DeleteDBInstanceResponse DeleteDBInstance(
         DeleteDBInstanceRequest request
)

Parameters

request
Type: Amazon.Neptune.Model.DeleteDBInstanceRequest

Container for the necessary parameters to execute the DeleteDBInstance service method.

Return Value


The response from the DeleteDBInstance service method, as returned by Neptune.

Exceptions

ExceptionCondition
DBInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
DBSnapshotAlreadyExistsException DBSnapshotIdentifier is already used by an existing snapshot.
InvalidDBClusterStateException The DB cluster is not in a valid state.
InvalidDBInstanceStateException The specified DB instance is not in the available state.
SnapshotQuotaExceededException Request would result in user exceeding the allowed number of DB snapshots.

Examples

This example deletes the specified DB instance.

To delete a DB instance.


var response = client.DeleteDBInstance(new DeleteDBInstanceRequest 
{
    DBInstanceIdentifier = "mymysqlinstance",
    SkipFinalSnapshot = true
});

DBInstance dbInstance = response.DBInstance;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also