Google Cloud OS Config v1 API - Class OSPolicyAssignment (2.2.0)

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

Reference documentation and code samples for the Google Cloud OS Config v1 API class OSPolicyAssignment.

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
bool

Deleted

public bool Deleted { get; set; }

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

Property Value
TypeDescription
bool

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
OSPolicyAssignmentTypesInstanceFilter

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

OSPolicyAssignmentName

public OSPolicyAssignmentName OSPolicyAssignmentName { get; set; }

OSPolicyAssignmentName-typed view over the Name resource name property.

Property Value
TypeDescription
OSPolicyAssignmentName

OsPolicies

public RepeatedField<OSPolicy> OsPolicies { get; }

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

Property Value
TypeDescription
RepeatedFieldOSPolicy

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
bool

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
OSPolicyAssignmentTypesRollout

RolloutState

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

Output only. OS policy assignment rollout state

Property Value
TypeDescription
OSPolicyAssignmentTypesRolloutState

Uid

public string Uid { get; set; }

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

Property Value
TypeDescription
string