- Resource: ResourcePolicy
- SnapshotSchedulePolicy
- Schedule
- HourlyCycle
- DailyCycle
- WeeklyCycle
- DayOfWeek
- Day
- RetentionPolicy
- OnSourceDiskDelete
- SnapshotProperties
- GroupPlacementPolicy
- Collocation
- InstanceSchedulePolicy
- Schedule
- DiskConsistencyGroupPolicy
- WorkloadPolicy
- WorkloadType
- TopologyDistance
- Status
- ResourceStatus
- InstanceSchedulePolicyStatus
- Methods
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 ( |
| Fields | |
|---|---|
kind |
[Output Only] Type of the resource. Always
for resource policies. |
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. |
Union field
|
|
snapshotSchedulePolicy |
Resource policy for persistent disks for creating snapshots. |
groupPlacementPolicy |
Resource policy for instances for placement configuration. |
instanceSchedulePolicy |
Resource policy for scheduling instance operations. |
diskConsistencyGroupPolicy |
Resource policy for disk consistency groups. |
workloadPolicy |
Resource policy for defining instance placement for MIGs. |
SnapshotSchedulePolicy
A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.
| JSON representation |
|---|
{ "schedule": { object ( |
| Fields | |
|---|---|
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. |
retentionPolicy |
Retention policy applied to snapshots created by this resource policy. |
snapshotProperties |
Properties with which snapshots are created such as labels, encryption keys. |
Schedule
A schedule for disks where the schedueled operations are performed.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field
|
|
hourlySchedule |
|
dailySchedule |
|
weeklySchedule |
|
HourlyCycle
Time window specified for hourly operations.
| JSON representation |
|---|
{ "hoursInCycle": integer, "startTime": string, "duration": string } |
| Fields | |
|---|---|
hoursInCycle |
Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle. |
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. |
duration |
[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. |
DailyCycle
Time window specified for daily operations.
| JSON representation |
|---|
{ "daysInCycle": integer, "startTime": string, "duration": string } |
| Fields | |
|---|---|
daysInCycle |
Defines a schedule with units measured in days. The value determines how many days pass between the start of each cycle. |
startTime |
Start time of the window. This must be in UTC format that resolves to one of
,
,
,
,
, or
. For example, both
and
are valid. |
duration |
[Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario. |
WeeklyCycle
Time window specified for weekly operations.
| JSON representation |
|---|
{
"dayOfWeeks": [
{
object ( |
| Fields | |
|---|---|
dayOfWeeks[] |
Up to 7 intervals/windows, one for each day of the week. |
DayOfWeek
| JSON representation |
|---|
{
"day": enum ( |
| Fields | |
|---|---|
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. |
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. |
duration |
[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. |
Day
| Enums | |
|---|---|
INVALID |
|
MONDAY |
|
TUESDAY |
|
WEDNESDAY |
|
THURSDAY |
|
FRIDAY |
|
SATURDAY |
|
SUNDAY |
|
RetentionPolicy
Policy for retention of scheduled snapshots.
| JSON representation |
|---|
{
"maxRetentionDays": integer,
"onSourceDiskDelete": enum ( |
| Fields | |
|---|---|
maxRetentionDays |
Maximum age of the snapshot that is allowed to be kept. |
onSourceDiskDelete |
Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. |
OnSourceDiskDelete
| Enums | |
|---|---|
UNSPECIFIED_ON_SOURCE_DISK_DELETE |
|
KEEP_AUTO_SNAPSHOTS |
|
APPLY_RETENTION_POLICY |
|
SnapshotProperties
Specified snapshot properties for scheduled snapshots created by this policy.
| JSON representation |
|---|
{ "labels": { string: string, ... }, "storageLocations": [ string ], "guestFlush": boolean, "chainName": string } |
| Fields | |
|---|---|
labels |
Labels to apply to scheduled snapshots. These can be later modified by the
method. Label values may be empty. |
storageLocations[] |
Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional). |
guestFlush |
Indication to perform a 'guest aware' snapshot. |
chainName |
Chain name that the snapshot is created in. |
GroupPlacementPolicy
A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation
| JSON representation |
|---|
{
"vmCount": integer,
"availabilityDomainCount": integer,
"collocation": enum ( |
| Fields | |
|---|---|
vmCount |
Number of VMs in this placement group. Trusted Cloud 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. |
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. |
collocation |
Specifies network collocation |
gpuTopology |
Specifies the shape of the GPU slice, in slice based GPU families eg. A4X. |
Collocation
| Enums | |
|---|---|
UNSPECIFIED_COLLOCATION |
|
COLLOCATED |
|
InstanceSchedulePolicy
An InstanceSchedulePolicy specifies when and how frequent certain operations are performed on the instance.
| JSON representation |
|---|
{ "vmStartSchedule": { object ( |
| Fields | |
|---|---|
vmStartSchedule |
Specifies the schedule for starting instances. |
vmStopSchedule |
Specifies the schedule for stopping instances. |
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. |
startTime |
The start time of the schedule. The timestamp is an RFC3339 string. |
expirationTime |
The expiration time of the schedule. The timestamp is an RFC3339 string. |
Schedule
Schedule for an instance operation.
| JSON representation |
|---|
{ "schedule": string } |
| Fields | |
|---|---|
schedule |
Specifies the frequency for the operation, using the unix-cron format. |
DiskConsistencyGroupPolicy
This type has no fields.
Resource policy for disk consistency groups.
WorkloadPolicy
Represents the workload policy.
| JSON representation |
|---|
{ "type": enum ( |
| Fields | |
|---|---|
type |
Specifies the intent of the instance placement in the MIG. |
maxTopologyDistance |
Specifies the maximum distance between instances. |
acceleratorTopology |
Specifies the topology required to create a partition for VMs that have interconnected GPUs. |
WorkloadType
Specifies the type of workload.
| Enums | |
|---|---|
HIGH_AVAILABILITY |
MIG spreads out the instances as much as possible for high availability. |
HIGH_THROUGHPUT |
MIG provisions instances as close to each other as possible for high throughput. |
TopologyDistance
Specifies the topology distance.
| Enums | |
|---|---|
SUBBLOCK |
VMs must be provisioned in the same subblock. |
BLOCK |
VMs must be provisioned in the same block. |
CLUSTER |
VMs must be provisioned in the same cluster. |
Status
| Enums | |
|---|---|
INVALID |
|
CREATING |
Resource policy is being created. |
READY |
Resource policy is ready to be used. |
DELETING |
Resource policy is being deleted. |
EXPIRED |
Resource policy is expired and will not run again. |
ResourceStatus
Contains output only fields. Use this sub-message for all output fields set on ResourcePolicy. The internal structure of this "status" field should mimic the structure of ResourcePolicy proto specification.
| JSON representation |
|---|
{
"instanceSchedulePolicy": {
object ( |
| Fields | |
|---|---|
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. |
InstanceSchedulePolicyStatus
| JSON representation |
|---|
{ "nextRunStartTime": string, "lastRunStartTime": string } |
| Fields | |
|---|---|
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. |
lastRunStartTime |
[Output Only] The last time the schedule successfully ran. The timestamp is an RFC3339 string. |
Methods |
|
|---|---|
|
Retrieves an aggregated list of resource policies. |
|
Deletes the specified resource policy. |
|
Retrieves all information of the specified resource policy. |
|
Creates a new resource policy. |
|
A list all the resource policies that have been configured for the specified project in specified region. |
|
The method compute.v1.ResourcePoliciesService.GetPolicy is not available in Cloud de Confiance by S3NS. |
|
The method compute.v1.ResourcePoliciesService.Patch is not available in Cloud de Confiance by S3NS. |
|
The method compute.v1.ResourcePoliciesService.SetPolicy is not available in Cloud de Confiance by S3NS. |
|
The method compute.v1.ResourcePoliciesService.TestPermissions is not available in Cloud de Confiance by S3NS. |