Scalr\Service\Aws\Rds\V20130110\RdsApi::createDBSubnetGroup PHP Метод

createDBSubnetGroup() публичный Метод

DB subnet groups must contain at least one subnet in at least two AZs in the region.
public createDBSubnetGroup ( Scalr\Service\Aws\Rds\DataType\CreateDBSubnetGroupRequestData $request ) : Scalr\Service\Aws\Rds\DataType\DBSubnetGroupData
$request Scalr\Service\Aws\Rds\DataType\CreateDBSubnetGroupRequestData
Результат Scalr\Service\Aws\Rds\DataType\DBSubnetGroupData
    public function createDBSubnetGroup(CreateDBSubnetGroupRequestData $request)
    {
        $result = null;
        $options = $request->getQueryArray();
        if ($this->rds->getApiClientType() === Aws::CLIENT_SOAP) {
            if (isset($options['SubnetIds.member.1'])) {
                foreach ($options as $k => $v) {
                    if (strpos($k, 'SubnetIds.member.') !== false) {
                        $options['SubnetIds']['SubnetId'][] = $v;
                        unset($options[$k]);
                    }
                }
            }
        }
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            if (!$this->exist($sxml->CreateDBSubnetGroupResult)) {
                throw new RdsException(sprintf(self::UNEXPECTED, 'create DBSubnet group'));
            }
            $result = $this->_loadDBSubnetGroupData($sxml->CreateDBSubnetGroupResult->DBSubnetGroup);
        }
        return $result;
    }