Resource: ResourcePolicy
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 | 
|---|
| { "kind": string, "id": string, "creationTimestamp": string, "selfLink": string, "region": string, "description": string, "name": string, "status": enum, "resourceStatus": { "instanceSchedulePolicy": { "nextRunStartTime": string, "lastRunStartTime": string } }, // Union field | 
| Fields | |
|---|---|
| kind | 
 [Output Only] Type of the resource. Always  | 
| 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. | 
| resourceStatus | 
 [Output Only] The system status of the resource policy. | 
| resourceStatus.instanceSchedulePolicy | 
 [Output Only] Specifies a set of output values reffering to the instanceSchedulePolicy system status. This field should have the same name as corresponding policy field. | 
| resourceStatus.instanceSchedulePolicy.nextRunStartTime | 
 [Output Only] The next time the schedule is planned to run. The actual time might be slightly different. The timestamp is an RFC3339 string. | 
| resourceStatus.instanceSchedulePolicy.lastRunStartTime | 
 [Output Only] The last time the schedule successfully ran. The timestamp is an RFC3339 string. | 
| Union field  
 | |
| 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 | 
 Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle. | 
| 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 with units measured in days. The value determines how many days pass between the start of each cycle. | 
| snapshotSchedulePolicy.schedule.dailySchedule.startTime | 
 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 | 
 Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. | 
| 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  | 
| 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. | 
| snapshotSchedulePolicy.snapshotProperties.chainName | 
 Chain name that the snapshot is created in. | 
| groupPlacementPolicy | 
 Resource policy for instances for placement configuration. | 
| groupPlacementPolicy.vmCount | 
 Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs. | 
| groupPlacementPolicy.availabilityDomainCount | 
 The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network. | 
| groupPlacementPolicy.collocation | 
 Specifies network collocation | 
| groupPlacementPolicy.gpuTopology | 
 Specifies the shape of the GPU slice, in slice based GPU families eg. A4X. | 
| instanceSchedulePolicy | 
 Resource policy for scheduling instance operations. | 
| instanceSchedulePolicy.vmStartSchedule | 
 Specifies the schedule for starting instances. | 
| instanceSchedulePolicy.vmStartSchedule.schedule | 
 Specifies the frequency for the operation, using the unix-cron format. | 
| instanceSchedulePolicy.vmStopSchedule | 
 Specifies the schedule for stopping instances. | 
| instanceSchedulePolicy.vmStopSchedule.schedule | 
 Specifies the frequency for the operation, using the unix-cron format. | 
| instanceSchedulePolicy.timeZone | 
 Specifies the time zone to be used in interpreting Schedule.schedule. The value of this field must be a time zone name from the tz database: https://wikipedia.org/wiki/Tz_database. | 
| instanceSchedulePolicy.startTime | 
 The start time of the schedule. The timestamp is an RFC3339 string. | 
| instanceSchedulePolicy.expirationTime | 
 The expiration time of the schedule. The timestamp is an RFC3339 string. | 
| diskConsistencyGroupPolicy | 
 Resource policy for disk consistency groups. | 
| workloadPolicy | 
 Resource policy for defining instance placement for MIGs. | 
| workloadPolicy.type | 
 Specifies the intent of the instance placement in the MIG. | 
| workloadPolicy.maxTopologyDistance | 
 Specifies the maximum distance between instances. | 
| workloadPolicy.acceleratorTopology | 
 Specifies the topology required to create a partition for VMs that have interconnected GPUs. | 
| Methods | |
|---|---|
| 
 | Retrieves an aggregated list of resource policies. | 
| 
 | Deletes the specified resource policy. | 
| 
 | Retrieves all information of the specified resource policy. | 
| 
 | Gets the access control policy for a resource. | 
| 
 | Creates a new resource policy. | 
| 
 | A list all the resource policies that have been configured for the specified project in specified region. | 
| 
 | Modify the specified resource policy. | 
| 
 | Sets the access control policy on the specified resource. | 
| 
 | Returns permissions that a caller has on the specified resource. |