Class OSPolicyAssignment

public sealed class OSPolicyAssignment : IMessage<OSPolicyAssignment>, IEquatable<OSPolicyAssignment>, IDeepCloneable<OSPolicyAssignment>, IBufferMessage, IMessage

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.

Inheritance

Object > OSPolicyAssignment

Namespace

Google.Cloud.OsConfig.V1

Assembly

Google.Cloud.OsConfig.V1.dll

Constructors

OSPolicyAssignment()

public OSPolicyAssignment()

OSPolicyAssignment(OSPolicyAssignment)

public OSPolicyAssignment(OSPolicyAssignment other)
Parameter
NameDescription
otherOSPolicyAssignment

Properties

Baseline

public bool Baseline { get; set; }

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.

Property Value
TypeDescription
Boolean

Deleted

public bool Deleted { get; set; }

Output only. Indicates that this revision deletes the OS policy assignment.

Property Value
TypeDescription
Boolean

Description

public string Description { get; set; }

OS policy assignment description. Length of the description is limited to 1024 characters.

Property Value
TypeDescription
String

Etag

public string Etag { get; set; }

The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

Property Value
TypeDescription
String

InstanceFilter

public OSPolicyAssignment.Types.InstanceFilter InstanceFilter { get; set; }

Required. Filter to select VMs.

Property Value
TypeDescription
OSPolicyAssignment.Types.InstanceFilter

Name

public string Name { get; set; }

Resource name.

Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}

This field is ignored when you create an OS policy assignment.

Property Value
TypeDescription
String

OsPolicies

public RepeatedField<OSPolicy> OsPolicies { get; }

Required. List of OS policies to be applied to the VMs.

Property Value
TypeDescription
RepeatedField<OSPolicy>

OSPolicyAssignmentName

public OSPolicyAssignmentName OSPolicyAssignmentName { get; set; }

OSPolicyAssignmentName-typed view over the Name resource name property.

Property Value
TypeDescription
OSPolicyAssignmentName

Reconciling

public bool Reconciling { get; set; }

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
Property Value
TypeDescription
Boolean

RevisionCreateTime

public Timestamp RevisionCreateTime { get; set; }

Output only. The timestamp that the revision was created.

Property Value
TypeDescription
Timestamp

RevisionId

public string RevisionId { get; set; }

Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

Property Value
TypeDescription
String

Rollout

public OSPolicyAssignment.Types.Rollout Rollout { get; set; }

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.
Property Value
TypeDescription
OSPolicyAssignment.Types.Rollout

RolloutState

public OSPolicyAssignment.Types.RolloutState RolloutState { get; set; }

Output only. OS policy assignment rollout state

Property Value
TypeDescription
OSPolicyAssignment.Types.RolloutState

Uid

public string Uid { get; set; }

Output only. Server generated unique id for the OS policy assignment resource.

Property Value
TypeDescription
String