delete_db_instance ( $db_instance_identifier, $opt )

The DeleteDBInstance API deletes a previously provisioned RDS instance. A successful response from the web service indicates the request was received correctly. If a final DBSnapshot is requested the status of the RDS instance will be “deleting” until the DBSnapshot is created. DescribeDBInstance is used to monitor the status of this operation. This cannot be canceled or reverted once submitted.

Access

public

Parameters

Parameter

Type

Required

Description

$db_instance_identifier

string

Required

The DB Instance identifier for the DB Instance to be deleted. This parameter isn’t case sensitive. Constraints:

  • 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

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • SkipFinalSnapshot - boolean - Optional - Determines whether a final DB Snapshot is created before the DB Instance is deleted. If true is specified, no DBSnapshot is created. If false is specified, a DB Snapshot is created before the DB Instance is deleted.

    The FinalDBSnapshotIdentifier parameter must be specified if SkipFinalSnapshot is false.

    Default: false
  • FinalDBSnapshotIdentifier - string - Optional - The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to false.

    Specifying this parameter and also setting the SkipFinalShapshot parameter to true results in an error.

    Constraints:
    • Must be 1 to 255 alphanumeric characters
    • First character must be a letter
    • Cannot end with a hyphen or contain two consecutive hyphens
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Delete a database instance.

// Instantiate the class
$rds = new AmazonRDS();

$response = $rds->delete_db_instance('myInstance', array(
	'SkipFinalSnapshot' => true
));

// Success?
var_dump($response->isOK());

Related Methods

Source

Method defined in services/rds.class.php | Toggle source view (7 lines) | View on GitHub

public function delete_db_instance($db_instance_identifier, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DBInstanceIdentifier'] = $db_instance_identifier;
    
    return $this->authenticate('DeleteDBInstance', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback