Method: snapshots.getEffectiveRecycleBinRule

Returns the effective recycle bin rule for a snapshot by merging org and project level rules. If no rules are defined at org and project level, the standard default rule is returned.

HTTP request


GET https://compute.googleapis.com/compute/beta/projects/{project}/global/snapshots/{snapshot}/getEffectiveRecycleBinRule

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

snapshot

string

Name of the Snapshot resource to get the effective recycle bin rule for.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "retentionDurationDays": string
}
Fields
retentionDurationDays

string (int64 format)

The retention duration of the snapshot in recycle bin.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute.readonly
  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the following IAM permissions:

  • compute.snapshots.getEffectiveRecycleBinRule

To find predefined roles that contain those permissions, see Compute Engine IAM Roles.