Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 or VPC
Security Groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId for
VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).
Access
Parameters
Parameter |
Type |
Required |
Description |
$db_security_group_name
|
string
|
Required
|
The name of the DB Security Group to revoke ingress from. |
$opt
|
array
|
Optional
|
An associative array of parameters that can have the following keys:
CIDRIP - string - Optional - The IP range to revoke access from. Must be a valid CIDR range. If CIDRIP is specified, EC2SecurityGroupName , EC2SecurityGroupId and EC2SecurityGroupOwnerId cannot be provided.EC2SecurityGroupName - string - Optional - The name of the EC2 Security Group to revoke access from. For VPC DB Security Groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.EC2SecurityGroupId - string - Optional - The id of the EC2 Security Group to revoke access from. For VPC DB Security Groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.EC2SecurityGroupOwnerId - string - Optional - The AWS Account Number of the owner of the EC2 security group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value. For VPC DB Security Groups, EC2SecurityGroupId must be provided. Otherwise, EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId must be provided.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
Examples
Revoke database security group access for a given security group.
// Instantiate the class
$rds = new AmazonRDS();
$response = $rds->revoke_db_security_group_ingress('mySecurityGroup', array(
'EC2SecurityGroupName' => 'default',
'EC2SecurityGroupOwnerId' => CFCredentials::get('@default')->account_id
));
// Success?
var_dump($response->isOK());
Result:
bool(true)
Revoke database security group access for a CIDR IP Range.
// Instantiate the class
$rds = new AmazonRDS();
$response = $rds->revoke_db_security_group_ingress('mySecurityGroup', array(
'CIDRIP' => '0.0.0.0/0'
));
// Success?
var_dump($response->isOK());
Result:
bool(true)
Related Methods
Source
Method defined in services/rds.class.php | Toggle source view (7 lines) | View on GitHub
public function revoke_db_security_group_ingress($db_security_group_name, $opt = null)
{
if (!$opt) $opt = array();
$opt['DBSecurityGroupName'] = $db_security_group_name;
return $this->authenticate('RevokeDBSecurityGroupIngress', $opt);
}