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

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

Describes one or more of your placement groups.
public describePlacementGroups ( ListDataType $groupNameList = null, Scalr\Service\Aws\Ec2\DataType\PlacementGroupFilterList $filter = null ) : Scalr\Service\Aws\Ec2\DataType\PlacementGroupList
$groupNameList Scalr\Service\Aws\DataType\ListDataType optional One or more placement group names.
$filter Scalr\Service\Aws\Ec2\DataType\PlacementGroupFilterList optional The list of the filters.
Результат Scalr\Service\Aws\Ec2\DataType\PlacementGroupList Returns the list of the PlacementGroupData objects on success
    public function describePlacementGroups(ListDataType $groupNameList = null, PlacementGroupFilterList $filter = null)
    {
        $result = null;
        $options = array();
        if ($groupNameList !== null) {
            $options = array_merge($options, $groupNameList->getQueryArrayBare('GroupName'));
        }
        if ($filter !== null) {
            $options = array_merge($options, $filter->getQueryArrayBare('Filter'));
        }
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            $response = null;
            $result = new PlacementGroupList();
            $result->setEc2($this->ec2);
            $result->setRequestId((string) $sxml->requestId);
            if (isset($sxml->placementGroupSet->item)) {
                foreach ($sxml->placementGroupSet->item as $v) {
                    $item = $this->_loadPlacementGroupData($v);
                    $result->append($item);
                    unset($item);
                }
            }
        }
        return $result;
    }
Ec2Api