Snapshots
class Snapshots extends Resource (View source)
The "snapshots" collection of methods.
Typical usage is:
$computeService = new Google\Service\Compute(...);
$snapshots = $computeService->snapshots;
Methods
Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots. (snapshots.delete)
Returns the specified Snapshot resource. (snapshots.get)
Gets the access control policy for a resource. May be empty if no such policy or resource exists. (snapshots.getIamPolicy)
Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.
Retrieves the list of Snapshot resources contained within the specified project. (snapshots.listSnapshots)
Sets the access control policy on the specified resource. Replaces any existing policy. (snapshots.setIamPolicy)
Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (snapshots.setLabels)
Returns permissions that a caller has on the specified resource.
Details
Operation
delete(string $project, string $snapshot, array $optParams = [])
Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots. (snapshots.delete)
Snapshot
get(string $project, string $snapshot, array $optParams = [])
Returns the specified Snapshot resource. (snapshots.get)
Policy
getIamPolicy(string $project, string $resource, array $optParams = [])
Gets the access control policy for a resource. May be empty if no such policy or resource exists. (snapshots.getIamPolicy)
Operation
insert(string $project, Snapshot $postBody, array $optParams = [])
Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.
(snapshots.insert)
SnapshotList
listSnapshots(string $project, array $optParams = [])
Retrieves the list of Snapshot resources contained within the specified project. (snapshots.listSnapshots)
Policy
setIamPolicy(string $project, string $resource, GlobalSetPolicyRequest $postBody, array $optParams = [])
Sets the access control policy on the specified resource. Replaces any existing policy. (snapshots.setIamPolicy)
Operation
setLabels(string $project, string $resource, GlobalSetLabelsRequest $postBody, array $optParams = [])
Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (snapshots.setLabels)
TestPermissionsResponse
testIamPermissions(string $project, string $resource, TestPermissionsRequest $postBody, array $optParams = [])
Returns permissions that a caller has on the specified resource.
(snapshots.testIamPermissions)