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
- class Google_SnapshotsServiceResource extends Google_ServiceResource {
- /**
- * Deletes the specified persistent disk snapshot resource. (snapshots.delete)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $snapshot Name of the persistent disk snapshot resource to delete.
- * @param array $optParams Optional parameters.
- * @return Google_Operation
- */
- public function delete($project, $snapshot, $optParams = array()) {
- $params = array('project' => $project, 'snapshot' => $snapshot);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- if ($this->useObjects()) {
- return new Google_Operation($data);
- } else {
- return $data;
- }
- }
- /**
- * Returns the specified persistent disk snapshot resource. (snapshots.get)
- *
- * @param string $project Name of the project scoping this request.
- * @param string $snapshot Name of the persistent disk snapshot resource to return.
- * @param array $optParams Optional parameters.
- * @return Google_Snapshot
- */
- public function get($project, $snapshot, $optParams = array()) {
- $params = array('project' => $project, 'snapshot' => $snapshot);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Snapshot($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieves the list of persistent disk snapshot resources contained within the specified project.
- * (snapshots.list)
- *
- * @param string $project Name of the project scoping this request.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string filter Optional. Filter expression for filtering listed resources.
- * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
- * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
- * @return Google_SnapshotList
- */
- public function listSnapshots($project, $optParams = array()) {
- $params = array('project' => $project);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_SnapshotList($data);
- } else {
- return $data;
- }
- }
- }