OSPolicyAssignment(mapping=None, *, ignore_unknown_fields=False, **kwargs)
OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances.
An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script.
For more information, see OS policy and OS policy
assignment <https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies>
__.
Attributes | |
---|---|
Name | Description |
name |
str
Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}
This field is ignored when you create an OS policy
assignment.
|
description |
str
OS policy assignment description. Length of the description is limited to 1024 characters. |
os_policies |
Sequence[google.cloud.osconfig_v1alpha.types.OSPolicy]
Required. List of OS policies to be applied to the VMs. |
instance_filter |
google.cloud.osconfig_v1alpha.types.OSPolicyAssignment.InstanceFilter
Required. Filter to select VMs. |
rollout |
google.cloud.osconfig_v1alpha.types.OSPolicyAssignment.Rollout
Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted. |
revision_id |
str
Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment |
revision_create_time |
google.protobuf.timestamp_pb2.Timestamp
Output only. The timestamp that the revision was created. |
rollout_state |
google.cloud.osconfig_v1alpha.types.OSPolicyAssignment.RolloutState
Output only. OS policy assignment rollout state |
baseline |
bool
Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of true for this field.
|
deleted |
bool
Output only. Indicates that this revision deletes the OS policy assignment. |
reconciling |
bool
Output only. Indicates that reconciliation is in progress for the revision. This value is true when the
rollout_state is one of:
- IN_PROGRESS
- CANCELLING
|
uid |
str
Output only. Server generated unique id for the OS policy assignment resource. |
Classes
InstanceFilter
InstanceFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Message to represent the filters to select VMs for an assignment
LabelSet
LabelSet(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Message representing label set.
- A label is a key value pair set for a VM.
- A LabelSet is a set of labels.
- Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet.
- Example: A LabelSet with 2 labels:
env=prod
andtype=webserver
will only be applicable for those VMs with both labels present.
Rollout
Rollout(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Message to configure the rollout at the zonal level for the OS policy assignment.
RolloutState
RolloutState(value)
OS policy assignment rollout state