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

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

Describes one or more of the Amazon EBS snapshots available to you. Snapshots available to you include public snapshots available for any AWS account to launch, private snapshots you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.
public describeSnapshots ( ListDataType $snapshotIdList = null, ListDataType $ownerList = null, Scalr\Service\Aws\Ec2\DataType\SnapshotFilterList $filter = null, ListDataType $restorableByList = null, string $nextToken = null, integer $maxResults = null ) : Scalr\Service\Aws\Ec2\DataType\SnapshotList
$snapshotIdList Scalr\Service\Aws\DataType\ListDataType optional One or more snapshot IDs. By default it describes snapshots for which you have launch permissions.
$ownerList Scalr\Service\Aws\DataType\ListDataType optional Returns the snapshots owned by the specified owner. Multiple owners can be specified. Valid values: self | amazon | AWS Account ID
$filter Scalr\Service\Aws\Ec2\DataType\SnapshotFilterList optional The list of filters.
$restorableByList Scalr\Service\Aws\DataType\ListDataType optional One or more AWS accounts IDs that can create volumes from the snapshot.
$nextToken string The next paginated set of results to return
$maxResults integer The maximum number of paginated snapshots items per response.
Результат Scalr\Service\Aws\Ec2\DataType\SnapshotList Returns the list of snapshots on success
    public function describeSnapshots(ListDataType $snapshotIdList = null, ListDataType $ownerList = null, SnapshotFilterList $filter = null, ListDataType $restorableByList = null, $nextToken = null, $maxResults = null)
    {
        $result = null;
        $options = [];
        if ($snapshotIdList !== null) {
            $options = array_merge($options, $snapshotIdList->getQueryArrayBare('SnapshotId'));
        }
        if ($ownerList !== null) {
            $options = array_merge($options, $ownerList->getQueryArrayBare('Owner'));
        }
        if ($restorableByList !== null) {
            $options = array_merge($options, $restorableByList->getQueryArrayBare('RestorableBy'));
        }
        if ($filter !== null) {
            $options = array_merge($options, $filter->getQueryArrayBare('Filter'));
        }
        if ($nextToken !== null) {
            $options['NextToken'] = (string) $nextToken;
        }
        if ($maxResults !== null) {
            $options['MaxResults'] = (int) $maxResults;
        }
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            $response = null;
            $result = new SnapshotList();
            $result->setEc2($this->ec2);
            $result->setRequestId((string) $sxml->requestId);
            $result->setNextToken($this->exist($sxml->nextToken) ? (string) $sxml->nextToken : null);
            if (!empty($sxml->snapshotSet->item)) {
                foreach ($sxml->snapshotSet->item as $v) {
                    $item = $this->_loadSnapshotData($v);
                    $result->append($item);
                    unset($item);
                }
            }
        }
        return $result;
    }
Ec2Api