Google_ZonesServiceResource

The "zones" collection of methods.

Defined (1)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_ComputeService.php  
  1. class Google_ZonesServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Retrieves the list of zone resources available to the specified project. (zones.list) 
  6. * @param string $project Name of the project scoping this request. 
  7. * @param array $optParams Optional parameters. 
  8. * @opt_param string filter Optional. Filter expression for filtering listed resources. 
  9. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. 
  10. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100. 
  11. * @return Google_ZoneList 
  12. */ 
  13. public function listZones($project, $optParams = array()) { 
  14. $params = array('project' => $project); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('list', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_ZoneList($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Returns the specified zone resource. (zones.get) 
  23. * @param string $project Name of the project scoping this request. 
  24. * @param string $zone Name of the zone resource to return. 
  25. * @param array $optParams Optional parameters. 
  26. * @return Google_Zone 
  27. */ 
  28. public function get($project, $zone, $optParams = array()) { 
  29. $params = array('project' => $project, 'zone' => $zone); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('get', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new Google_Zone($data); 
  34. } else { 
  35. return $data;