Пример #1
0
 /**
  * UnmonitorInstances action
  *
  * Disables monitoring for a running instance
  *
  * @param   ListDataType $instanceIdList One or more instance IDs
  * @return  MonitorInstancesResponseSetList  Returns the MonitorInstancesResponseSetList
  * @throws  ClientException
  * @throws  Ec2Exception
  */
 public function unmonitorInstances(ListDataType $instanceIdList)
 {
     $result = null;
     $options = $instanceIdList->getQueryArrayBare('InstanceId');
     $action = ucfirst(__FUNCTION__);
     $response = $this->client->call($action, $options);
     if ($response->getError() === false) {
         $sxml = simplexml_load_string($response->getRawContent());
         $response = null;
         $result = $this->_loadListByName('MonitorInstancesResponseSet', $sxml->instancesSet);
     }
     return $result;
 }
Пример #2
0
 /**
  * DescribePlacementGroups action
  *
  * Describes one or more of your placement groups.
  *
  * @param   ListDataType             $groupNameList optional One or more placement group names.
  * @param   PlacementGroupFilterList $filter        optional The list of the filters.
  * @return  PlacementGroupList       Returns the list of the PlacementGroupData objects on success
  * @throws  ClientException
  * @throws  Ec2Exception
  */
 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());
         $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;
 }