Google Cloud OsConfig V1 Client - Class OSPolicyAssignment (2.0.5)

Reference documentation and code samples for the Google Cloud OsConfig V1 Client 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 .

Generated from protobuf message google.cloud.osconfig.v1.OSPolicyAssignment

Namespace

Google \ Cloud \ OsConfig \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ name
string

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
string

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

↳ os_policies
array< OSPolicy >

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

↳ instance_filter
OSPolicyAssignment\InstanceFilter

Required. Filter to select VMs.

↳ rollout
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
string

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

Output only. The timestamp that the revision was created.

↳ etag
string

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

↳ rollout_state
int

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
string

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

getName

Resource name.

Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

Returns
Type
Description
string

setName

Resource name.

Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getDescription

OS policy assignment description.

Length of the description is limited to 1024 characters.

Returns
Type
Description
string

setDescription

OS policy assignment description.

Length of the description is limited to 1024 characters.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getOsPolicies

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

Returns
Type
Description

setOsPolicies

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

Parameter
Name
Description
var
array< OSPolicy >
Returns
Type
Description
$this

getInstanceFilter

Required. Filter to select VMs.

Returns
Type
Description

hasInstanceFilter

clearInstanceFilter

setInstanceFilter

Required. Filter to select VMs.

Parameter
Name
Description
Returns
Type
Description
$this

getRollout

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.
Returns
Type
Description

hasRollout

clearRollout

setRollout

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.
Parameter
Name
Description
Returns
Type
Description
$this

getRevisionId

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

Returns
Type
Description
string

setRevisionId

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

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getRevisionCreateTime

Output only. The timestamp that the revision was created.

Returns
Type
Description

hasRevisionCreateTime

clearRevisionCreateTime

setRevisionCreateTime

Output only. The timestamp that the revision was created.

Parameter
Name
Description
Returns
Type
Description
$this

getEtag

The etag for this OS policy assignment.

If this is provided on update, it must match the server's etag.

Returns
Type
Description
string

setEtag

The etag for this OS policy assignment.

If this is provided on update, it must match the server's etag.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getRolloutState

Output only. OS policy assignment rollout state

Returns
Type
Description
int

setRolloutState

Output only. OS policy assignment rollout state

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getBaseline

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.

Returns
Type
Description
bool

setBaseline

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.

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getDeleted

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

Returns
Type
Description
bool

setDeleted

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

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getReconciling

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
Returns
Type
Description
bool

setReconciling

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
Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getUid

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

Returns
Type
Description
string

setUid

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

Parameter
Name
Description
var
string
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: