create_db_snapshot ( $db_snapshot_identifier, $db_instance_identifier, $opt )

Creates a DBSnapshot. The source DBInstance must be in “available” state.

Access

public

Parameters

Parameter

Type

Required

Description

$db_snapshot_identifier

string

Required

The identifier for the DB Snapshot. Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Example: my-snapshot-id

$db_instance_identifier

string

Required

The DB Instance identifier. This is the unique key that identifies a DB Instance. 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:

  • 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

Create a database snapshot.

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

$response = $rds->create_db_snapshot('mySnapshot', 'myInstanceID');

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

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

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback