Method: resourcePolicies.get

Retrieves all information of the specified resource policy.

HTTP request

GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/resourcePolicies/{resourceId}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region for this request.

resourceId

string

Name of the resource policy to retrieve.

Request body

The request body must be empty.

Response body

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

Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.

JSON representation
{
  "id": string,
  "creationTimestamp": string,
  "selfLink": string,
  "region": string,
  "description": string,
  "name": string,
  "status": enum,
  "resourceStatus": {
    "instanceSchedulePolicy": {
      "nextRunStartTime": string,
      "lastRunStartTime": string
    }
  },
  "kind": string,

  // Union field policy can be only one of the following:
  "snapshotSchedulePolicy": {
    "schedule": {

      // Union field policy can be only one of the following:
      "hourlySchedule": {
        "hoursInCycle": integer,
        "startTime": string,
        "duration": string
      },
      "dailySchedule": {
        "daysInCycle": integer,
        "startTime": string,
        "duration": string
      },
      "weeklySchedule": {
        "dayOfWeeks": [
          {
            "day": enum,
            "startTime": string,
            "duration": string
          }
        ]