Scalr\Service\Aws\Rds\V20130110\RdsApi::authorizeDBSecurityGroupIngress PHP Method

authorizeDBSecurityGroupIngress() public method

Enables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2 or VPC Security Groups can be added to the DBSecurityGroup if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the Internet. Required parameters for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC). Note! You cannot authorize ingress from an EC2 security group in one Region to an Amazon RDS DB Instance in another.You cannot authorize ingress from a VPC security group in one VPC to an Amazon RDS DB Instance in another.
public authorizeDBSecurityGroupIngress ( Scalr\Service\Aws\Rds\DataType\DBSecurityGroupIngressRequestData $request ) : Scalr\Service\Aws\Rds\DataType\DBSecurityGroupData
$request Scalr\Service\Aws\Rds\DataType\DBSecurityGroupIngressRequestData
return Scalr\Service\Aws\Rds\DataType\DBSecurityGroupData Returns DBSecurityGroupData on success or throws an exception.
    public function authorizeDBSecurityGroupIngress(DBSecurityGroupIngressRequestData $request)
    {
        $result = null;
        $options = $request->getQueryArray();
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            if (!$this->exist($sxml->AuthorizeDBSecurityGroupIngressResult)) {
                throw new RdsException(sprintf(self::UNEXPECTED, 'authorize DBSecurityGroupIngress'));
            }
            $result = $this->_loadDBSecurityGroupData($sxml->AuthorizeDBSecurityGroupIngressResult->DBSecurityGroup);
        }
        return $result;
    }