Google_SnapshotsServiceResource

The "snapshots" collection of methods.

Defined (1)

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

/google-api-php-client/src/contrib/Google_ComputeService.php  
  1. class Google_SnapshotsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Deletes the specified persistent disk snapshot resource. (snapshots.delete) 
  5. * @param string $project Name of the project scoping this request. 
  6. * @param string $snapshot Name of the persistent disk snapshot resource to delete. 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_Operation 
  9. */ 
  10. public function delete($project, $snapshot, $optParams = array()) { 
  11. $params = array('project' => $project, 'snapshot' => $snapshot); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('delete', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_Operation($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * Returns the specified persistent disk snapshot resource. (snapshots.get) 
  20. * @param string $project Name of the project scoping this request. 
  21. * @param string $snapshot Name of the persistent disk snapshot resource to return. 
  22. * @param array $optParams Optional parameters. 
  23. * @return Google_Snapshot 
  24. */ 
  25. public function get($project, $snapshot, $optParams = array()) { 
  26. $params = array('project' => $project, 'snapshot' => $snapshot); 
  27. $params = array_merge($params, $optParams); 
  28. $data = $this->__call('get', array($params)); 
  29. if ($this->useObjects()) { 
  30. return new Google_Snapshot($data); 
  31. } else { 
  32. return $data; 
  33. /** 
  34. * Retrieves the list of persistent disk snapshot resources contained within the specified project. 
  35. * (snapshots.list) 
  36. * @param string $project Name of the project scoping this request. 
  37. * @param array $optParams Optional parameters. 
  38. * @opt_param string filter Optional. Filter expression for filtering listed resources. 
  39. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100. 
  40. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. 
  41. * @return Google_SnapshotList 
  42. */ 
  43. public function listSnapshots($project, $optParams = array()) { 
  44. $params = array('project' => $project); 
  45. $params = array_merge($params, $optParams); 
  46. $data = $this->__call('list', array($params)); 
  47. if ($this->useObjects()) { 
  48. return new Google_SnapshotList($data); 
  49. } else { 
  50. return $data;