create_db_security_group ( $db_security_group_name, $db_security_group_description, $opt )

Creates a new DB Security Group. DB Security Groups control access to a DB Instance.

Access

public

Parameters

Parameter

Type

Required

Description

$db_security_group_name

string

Required

The name for the DB Security 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: mysecuritygroup

$db_security_group_description

string

Required

The description for the DB Security Group.

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

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

$response = $rds->create_db_security_group('mySecurityGroup', 'This is a sample description.');

// 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_security_group($db_security_group_name, $db_security_group_description, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DBSecurityGroupName'] = $db_security_group_name;
    $opt['DBSecurityGroupDescription'] = $db_security_group_description;
    
    return $this->authenticate('CreateDBSecurityGroup', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback