Scalr\Service\Aws\CloudFront\V20120701\CloudFrontApi::getDistributionConfig PHP Метод

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

GET Distribution Config action
public getDistributionConfig ( string $distributionId ) : Scalr\Service\Aws\CloudFront\DataType\DistributionConfigData
$distributionId string ID of the distribution.
Результат Scalr\Service\Aws\CloudFront\DataType\DistributionConfigData Returns DistributionConfig object.
    public function getDistributionConfig($distributionId)
    {
        $result = null;
        $options = array();
        $response = $this->client->call('GET', $options, sprintf('/distribution/%s/config', self::escape($distributionId)));
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            $result = $this->_loadDistributionConfigData($sxml);
            $result->setOriginalXml($response->getRawContent());
            $result->setETag($response->getHeader('ETag'));
            $entity = $this->cloudFront->distribution->get((string) $distributionId);
            if ($entity !== null) {
                //Refreshes config for the distribution object if it does exist in the storage.
                $entity->distributionConfig = $result;
            }
        }
        return $result;
    }