create_db_subnet_group ( $db_subnet_group_name, $db_subnet_group_description, $subnet_ids, $opt )

Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the region.

Access

public

Parameters

Parameter

Type

Required

Description

$db_subnet_group_name

string

Required

The name for the DB Subnet Group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Must not be “Default”. Example: mySubnetgroup

$db_subnet_group_description

string

Required

The description for the DB Subnet Group.

$subnet_ids

string
array

Required

The EC2 Subnet IDs for the DB Subnet Group. Pass a string for a single value, or an indexed array for multiple values.

$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.

Source

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

public function create_db_subnet_group($db_subnet_group_name, $db_subnet_group_description, $subnet_ids, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DBSubnetGroupName'] = $db_subnet_group_name;
    $opt['DBSubnetGroupDescription'] = $db_subnet_group_description;
    
    // Required list (non-map)
    $opt = array_merge($opt, CFComplexType::map(array(
        'SubnetIds' => (is_array($subnet_ids) ? $subnet_ids : array($subnet_ids))
    ), 'member'));

    return $this->authenticate('CreateDBSubnetGroup', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback