Scalr\Service\Aws\Ec2\V20140615\Ec2Api::describeVolumes PHP Метод

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

Describes one or more of your Amazon EBS volumes.
public describeVolumes ( ListDataType $volumeIdList = null, Scalr\Service\Aws\Ec2\DataType\VolumeFilterList $filter = null ) : Scalr\Service\Aws\Ec2\DataType\VolumeList
$volumeIdList Scalr\Service\Aws\DataType\ListDataType optional The list of Volume ID
$filter Scalr\Service\Aws\Ec2\DataType\VolumeFilterList optional The filter list
Результат Scalr\Service\Aws\Ec2\DataType\VolumeList Returns the list of the volumes
    public function describeVolumes(ListDataType $volumeIdList = null, VolumeFilterList $filter = null)
    {
        $result = null;
        $options = array();
        if ($volumeIdList !== null) {
            $options = array_merge($options, $volumeIdList->getQueryArrayBare('VolumeId'));
        }
        if ($filter !== null) {
            $options = array_merge($options, $filter->getQueryArrayBare('Filter'));
        }
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            //Success
            $sxml = simplexml_load_string($response->getRawContent());
            $response = null;
            $result = new VolumeList();
            $result->setEc2($this->ec2);
            $result->setRequestId((string) $sxml->requestId);
            if (!empty($sxml->volumeSet->item)) {
                foreach ($sxml->volumeSet->item as $v) {
                    $result->append($this->_loadVolumeData($v));
                }
            }
        }
        return $result;
    }
Ec2Api