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 |
Project ID for this request. |
region |
Name of the region for this request. |
resourceId |
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:
JSON representation | |
---|---|
{ "id": string, "creationTimestamp": string, "selfLink": string, "region": string, "description": string, "name": string, "status": enum, "kind": string, "snapshotSchedulePolicy": { "schedule": { // Union field |
Fields | |
---|---|
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
selfLink |
[Output Only] Server-defined fully-qualified URL for this resource. |
region |
|
description |
|
name |
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
status |
[Output Only] The status of resource policy creation. |
kind |
[Output Only] Type of the resource. Always |
snapshotSchedulePolicy |
Resource policy for persistent disks for creating snapshots. |
snapshotSchedulePolicy.schedule |
A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy. |
snapshotSchedulePolicy.schedule.hourlySchedule |
|
snapshotSchedulePolicy.schedule.hourlySchedule.hoursInCycle |
Allows to define schedule that runs every nth hour. |
snapshotSchedulePolicy.schedule.hourlySchedule.startTime |
Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. |
snapshotSchedulePolicy.schedule.hourlySchedule.duration |
[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. |
snapshotSchedulePolicy.schedule.dailySchedule |
|
snapshotSchedulePolicy.schedule.dailySchedule.daysInCycle |
Defines a schedule that runs every nth day of the month. |
snapshotSchedulePolicy.schedule.dailySchedule.startTime |
instances.start time of the window. This must be in UTC format that resolves to one of |
snapshotSchedulePolicy.schedule.dailySchedule.duration |
[Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario. |
snapshotSchedulePolicy.schedule.weeklySchedule |
|
snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks[] |
Up to 7 intervals/windows, one for each day of the week. |
snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks[].day |
Allows to define schedule that runs specified day of the week. |
snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks[].startTime |
Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. |
snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks[].duration |
[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. |
snapshotSchedulePolicy.retentionPolicy |
Retention policy applied to snapshots created by this resource policy. |
snapshotSchedulePolicy.retentionPolicy.maxRetentionDays |
Maximum age of the snapshot that is allowed to be kept. |
snapshotSchedulePolicy.retentionPolicy.onSourceDiskDelete |
Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. |
snapshotSchedulePolicy.snapshotProperties |
Properties with which snapshots are created such as labels, encryption keys. |
snapshotSchedulePolicy.snapshotProperties.labels |
Labels to apply to scheduled snapshots. These can be later modified by the An object containing a list of |
snapshotSchedulePolicy.snapshotProperties.storageLocations[] |
Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional). |
snapshotSchedulePolicy.snapshotProperties.guestFlush |
Indication to perform a ‘guest aware’ snapshot. |
Authorization Scopes
Requires one of the following OAuth scopes:
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 Google IAM permissions:
compute.resourcePolicies.get