Scalr\Service\Aws\Ec2\V20150415\Ec2Api::describeAccountAttributes PHP Метод

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

Describes the specified attribute of your AWS account.
public describeAccountAttributes ( ListDataType $attributeName ) : Scalr\Service\Aws\Ec2\DataType\AccountAttributeSetList
$attributeName Scalr\Service\Aws\DataType\ListDataType List of the The following table lists the supported account attributes
Результат Scalr\Service\Aws\Ec2\DataType\AccountAttributeSetList Returns list of the names and values of the requested attributes
    public function describeAccountAttributes(ListDataType $attributeName)
    {
        $result = null;
        $options = $attributeName->getQueryArrayBare('AttributeName');
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            $response = null;
            $result = new AccountAttributeSetList();
            $result->setEc2($this->ec2);
            if (isset($sxml->accountAttributeSet->item)) {
                foreach ($sxml->accountAttributeSet->item as $v) {
                    $item = new AccountAttributeSetData();
                    $item->setEc2($this->ec2);
                    $item->attributeName = (string) $v->attributeName;
                    $item->attributeValueSet = new AccountAttributeValueList();
                    $item->attributeValueSet->setEc2($this->ec2);
                    foreach ($v->attributeValueSet->item as $r) {
                        $val = new AccountAttributeValueData();
                        $val->setEc2($this->ec2);
                        $val->attributeValue = (string) $r->attributeValue;
                        $item->attributeValueSet->append($val);
                        unset($val);
                    }
                    $result->append($item);
                    unset($item);
                }
            }
        }
        return $result;
    }
Ec2Api