Google_DisksServiceResource

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