Represents a VM extension policy.
| JSON representation |
|---|
{ "kind": string, "id": string, "creationTimestamp": string, "updateTimestamp": string, "name": string, "description": string, "selfLink": string, "selfLinkWithId": string, "extensionPolicies": { string: { object ( |
| 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. |
updateTimestamp |
[Output Only] Update timestamp in RFC3339 text format. |
name |
Name of the resource. Provided by the client when the resource is created. The 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 |
description |
An optional description of this resource. |
selfLink |
[Output Only] Server-defined fully-qualified URL for this resource. |
selfLinkWithId |
[Output Only] Server-defined URL for this resource's resource id. |
extensionPolicies |
Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations. |
instanceSelectors[] |
Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs. |
priority |
Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence. |
managedByGlobal |
Optional. [Output Only] Indicates if this policy is managed by a global policy. |
globalResourceLink |
Optional. [Output Only] Link to the global policy that manages this zone policy, if applicable. |
state |
Optional. [Output Only] Current state of the policy: ACTIVE or DELETING. |
ExtensionPolicy
Configuration for a specific VM extension.
| JSON representation |
|---|
{ "pinnedVersion": string, // Union field |
| Fields | |
|---|---|
pinnedVersion |
Optional. The specific version of the extension to install. If not set, the latest version is used. |
Union field config. Additional configuration data passed to the extension on each VM start. config can be only one of the following: |
|
stringConfig |
Optional. String-based configuration data for the extension. |
InstanceSelector
Defines how to select VMs to apply a zone VM extension policy.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field selector_type. Currently, only the LabelSelector is supported. selector_type can be only one of the following: |
|
labelSelector |
Optional. LabelSelector selects VMs based on their labels. |
LabelSelector
A LabelSelector is applied to a VM only if it matches all the specified labels.
| JSON representation |
|---|
{ "inclusionLabels": { string: string, ... } } |
| Fields | |
|---|---|
inclusionLabels |
Optional. A map of key-value pairs representing VM labels. VMs must have all of the labels specified in this map to be selected (logical AND). e.g. If the If the map is empty, it's considered a match. |
State
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Default value. Do not use. |
ACTIVE |
The policy is active and applied to matching VMs. Newly created VMs that match the policy will also receive the extension policy. |
DELETING |
The policy is in the process of being deleted. After the extension is removed from all matching VMs, the policy will be deleted. |