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 \ V1Methods
__construct
Constructor.
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
↳ instance_filter
↳ rollout
Google\Cloud\OsConfig\V1\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
↳ 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.
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.
var
string
$this
getDescription
OS policy assignment description.
Length of the description is limited to 1024 characters.
string
setDescription
OS policy assignment description.
Length of the description is limited to 1024 characters.
var
string
$this
getOsPolicies
Required. List of OS policies to be applied to the VMs.
setOsPolicies
Required. List of OS policies to be applied to the VMs.
$this
getInstanceFilter
Required. Filter to select VMs.
hasInstanceFilter
clearInstanceFilter
setInstanceFilter
Required. Filter to select VMs.
$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.
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.
$this
getRevisionId
Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
string
setRevisionId
Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
var
string
$this
getRevisionCreateTime
Output only. The timestamp that the revision was created.
hasRevisionCreateTime
clearRevisionCreateTime
setRevisionCreateTime
Output only. The timestamp that the revision was created.
$this
getEtag
The etag for this OS policy assignment.
If this is provided on update, it must match the server's etag.
string
setEtag
The etag for this OS policy assignment.
If this is provided on update, it must match the server's etag.
var
string
$this
getRolloutState
Output only. OS policy assignment rollout state
int
setRolloutState
Output only. OS policy assignment rollout state
var
int
$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.
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.
var
bool
$this
getDeleted
Output only. Indicates that this revision deletes the OS policy assignment.
bool
setDeleted
Output only. Indicates that this revision deletes the OS policy assignment.
var
bool
$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
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
var
bool
$this
getUid
Output only. Server generated unique id for the OS policy assignment resource.
string
setUid
Output only. Server generated unique id for the OS policy assignment resource.
var
string
$this