Class: Google::Apis::OsconfigV1::OsPolicyAssignment
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1::OsPolicyAssignment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/osconfig_v1/classes.rb,
lib/google/apis/osconfig_v1/representations.rb,
lib/google/apis/osconfig_v1/representations.rb
Overview
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 about the OS policy resource definitions and examples, see OS policy and OS policy assignment.
Instance Attribute Summary collapse
-
#baseline ⇒ Boolean
(also: #baseline?)
Output only.
-
#deleted ⇒ Boolean
(also: #deleted?)
Output only.
-
#description ⇒ String
OS policy assignment description.
-
#etag ⇒ String
The etag for this OS policy assignment.
-
#instance_filter ⇒ Google::Apis::OsconfigV1::OsPolicyAssignmentInstanceFilter
Filters to select target VMs for an assignment.
-
#name ⇒ String
Resource name.
-
#os_policies ⇒ Array<Google::Apis::OsconfigV1::OsPolicy>
Required.
-
#reconciling ⇒ Boolean
(also: #reconciling?)
Output only.
-
#revision_create_time ⇒ String
Output only.
-
#revision_id ⇒ String
Output only.
-
#rollout ⇒ Google::Apis::OsconfigV1::OsPolicyAssignmentRollout
Message to configure the rollout at the zonal level for the OS policy assignment.
-
#rollout_state ⇒ String
Output only.
-
#uid ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OsPolicyAssignment
constructor
A new instance of OsPolicyAssignment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OsPolicyAssignment
Returns a new instance of OsPolicyAssignment.
1416 1417 1418 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1416 def initialize(**args) update!(**args) end |
Instance Attribute Details
#baseline ⇒ Boolean Also known as: baseline?
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.
Corresponds to the JSON property baseline
1341 1342 1343 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1341 def baseline @baseline end |
#deleted ⇒ Boolean Also known as: deleted?
Output only. Indicates that this revision deletes the OS policy assignment.
Corresponds to the JSON property deleted
1347 1348 1349 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1347 def deleted @deleted end |
#description ⇒ String
OS policy assignment description. Length of the description is limited to 1024
characters.
Corresponds to the JSON property description
1354 1355 1356 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1354 def description @description end |
#etag ⇒ String
The etag for this OS policy assignment. If this is provided on update, it must
match the server's etag.
Corresponds to the JSON property etag
1360 1361 1362 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1360 def etag @etag end |
#instance_filter ⇒ Google::Apis::OsconfigV1::OsPolicyAssignmentInstanceFilter
Filters to select target VMs for an assignment. If more than one filter
criteria is specified below, a VM will be selected if and only if it satisfies
all of them.
Corresponds to the JSON property instanceFilter
1367 1368 1369 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1367 def instance_filter @instance_filter end |
#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.
Corresponds to the JSON property
name`
1374 1375 1376 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1374 def name @name end |
#os_policies ⇒ Array<Google::Apis::OsconfigV1::OsPolicy>
Required. List of OS policies to be applied to the VMs.
Corresponds to the JSON property osPolicies
1379 1380 1381 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1379 def os_policies @os_policies end |
#reconciling ⇒ Boolean Also known as: reconciling?
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
Corresponds to the JSON property reconciling
1386 1387 1388 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1386 def reconciling @reconciling end |
#revision_create_time ⇒ String
Output only. The timestamp that the revision was created.
Corresponds to the JSON property revisionCreateTime
1392 1393 1394 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1392 def revision_create_time @revision_create_time end |
#revision_id ⇒ String
Output only. The assignment revision ID A new revision is committed whenever a
rollout is triggered for a OS policy assignment
Corresponds to the JSON property revisionId
1398 1399 1400 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1398 def revision_id @revision_id end |
#rollout ⇒ Google::Apis::OsconfigV1::OsPolicyAssignmentRollout
Message to configure the rollout at the zonal level for the OS policy
assignment.
Corresponds to the JSON property rollout
1404 1405 1406 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1404 def rollout @rollout end |
#rollout_state ⇒ String
Output only. OS policy assignment rollout state
Corresponds to the JSON property rolloutState
1409 1410 1411 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1409 def rollout_state @rollout_state end |
#uid ⇒ String
Output only. Server generated unique id for the OS policy assignment resource.
Corresponds to the JSON property uid
1414 1415 1416 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1414 def uid @uid end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1421 def update!(**args) @baseline = args[:baseline] if args.key?(:baseline) @deleted = args[:deleted] if args.key?(:deleted) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @instance_filter = args[:instance_filter] if args.key?(:instance_filter) @name = args[:name] if args.key?(:name) @os_policies = args[:os_policies] if args.key?(:os_policies) @reconciling = args[:reconciling] if args.key?(:reconciling) @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time) @revision_id = args[:revision_id] if args.key?(:revision_id) @rollout = args[:rollout] if args.key?(:rollout) @rollout_state = args[:rollout_state] if args.key?(:rollout_state) @uid = args[:uid] if args.key?(:uid) end |