Amazon Relational Database Service
Command Line Interface Reference (API Version 2013-09-09)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

rds-delete-db-instance

Description

Deletes a DB instance. Once started, the process cannot be stopped, and the DB instance will no longer be accessible. When you delete a DB instance, all automated backups for that instance are deleted and cannot be recovered. Manual DB snapshots of the DB instance to be deleted are not deleted.

Syntax

rds-delete-db-instance DBInstanceIdentifier

[-f (--force) ]

[--final-db-snapshot-identifier value ]

[--skip-final-snapshot ]

[General Options]

Options

NameDescriptionRequired

DBInstanceIdentifier

DB instance identifier.

Yes

-f value

--force

Forces no confirmation prompt for the delete operation.

No

--final-db-snapshot-identifier value

Name for the final DB snapshot. This option is not permitted if the --skip-final-snapshot option is specified, and must be provided if --skip-final-snapshot is not specified. Cannot be specified when deleting a read replica.

Constraints: Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens.

No

--skip-final-snapshot

Specifies that no final DB snapshot should be made of the DB instance before it is deleted. Must be set to true when deleting a read replica.This parameter must not be specified if the --final-db-snapshot parameter is provided.

No

Output

The command returns the following information:

Note

Output values list the possible values returned by CLI commands. Not all values are returned for every call to a command. If a value is null or empty, it will not be included in the command output. For example, CLI commands to create or restore a DB instance will not return the Endpoint Address value because that value is null until the DB instance has finished being created or restored.

  • DBInstanceId—User-supplied database identifier; this is the unique key that identifies a DB instance

  • Created—When the instance was created, in UTC

  • Class—The compute and memory capacity of the Amazon RDS instance

  • Engine—Name of the database engine to be used for this DB instance

  • Storage—Initially allocated storage size specified in GBs

  • Master Username—The master username for the instance

  • Status—Status of the DB snapshot. Valid values: creating | available | deleting

  • Endpoint Address—Address of the DB instance

  • Port—The original port of the database from which the DB snapshot was taken. This column appears only with the --show-long-view command option

  • AZ—The original Availability Zone of the database. This column appears only in the --show-long view

  • PendingClass—The class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified.

  • PendingCredentials—The (hidden) master user password that will be applied to the DB instance

  • PendingStorage—The storage size to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified

  • Version—The version number of the database engine.

  • Auto Minor Version Upgrade—Indicates that minor version upgrades will be applied to the DB instance during the maintenance window. This column appears only in the --show-long view.

  • DB Name—Name of the initial database created when the instance was created or the Oracle System ID (SID) of the created DB instance (for the Oracle engine). This column appears only in the --show-long view

  • Maintenance Window—The period during which patching and instance modifications will be performed. This column appears only in the --show-long view

  • Name—security group name

  • Status—Status of authorization. Valid values: authorizing | authorized | revoking

  • Group Name—Name of DB parameter group applied to

  • Apply Status—Status of applying the parameter group. Valid values: in-sync | pending-reboot | applying

Examples

Delete a Database Instance with No Final DB snapshot

This example deletes a DB instance, forcing data deletion so no final DB snapshot is created.

PROMPT> 
rds-delete-db-instance databaseInstance1 --skip-final-snapshot

Once you begin deleting this database, it will no longer be able to accept connections.
Are you sure you want to delete this database? [Ny]y  
    
    

Delete a Database Instance, Allowing a Final DB snapshot

This example deletes a database, but specifies a final DB snapshot.

PROMPT> rds-delete-db-instance databaseInstance1 --final-db-snapshot-identifier myfinalsnapshot

Once you begin deleting this database, it will no longer be able to accept connections.
Are you sure you want to delete this database? [Ny]y  
    
                    

Output Example with Column Headers

This example shows command output with column headers.


DBINSTANCE  DBInstanceId  Created                  Class   Engine    Storage  Master Username  Status           Endpoint Address                             Port  AZ           PendingClass    PendingCredentials    
DBINSTANCE  simcoprod01   2009-05-15 22:13:39.559  db.m1.large  MySQL5.1  10GB     master           available        mydbinstance.kldusfasddog.us-east-1.rds.am...us-east-1c
      SECGROUP  Name     Status
      SECGROUP  Default  authorized
      PARAMGRP  Group Name    Apply Status
      PARAMGRP  mydbconfig    in-sync