Google_SnapshotsServiceResource

The "snapshots" collection of methods.

Defined (1)

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

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