Class: Google::Apis::OsconfigV1::OsPolicyAssignment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyAssignment

Returns a new instance of OsPolicyAssignment.



1707
1708
1709
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1707

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#baselineBoolean 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

Returns:

  • (Boolean)


1632
1633
1634
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1632

def baseline
  @baseline
end

#deletedBoolean Also known as: deleted?

Output only. Indicates that this revision deletes the OS policy assignment. Corresponds to the JSON property deleted

Returns:

  • (Boolean)


1638
1639
1640
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1638

def deleted
  @deleted
end

#descriptionString

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

Returns:

  • (String)


1645
1646
1647
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1645

def description
  @description
end

#etagString

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

Returns:

  • (String)


1651
1652
1653
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1651

def etag
  @etag
end

#instance_filterGoogle::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



1658
1659
1660
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1658

def instance_filter
  @instance_filter
end

#nameString

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 propertyname`

Returns:

  • (String)


1665
1666
1667
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1665

def name
  @name
end

#os_policiesArray<Google::Apis::OsconfigV1::OsPolicy>

Required. List of OS policies to be applied to the VMs. Corresponds to the JSON property osPolicies



1670
1671
1672
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1670

def os_policies
  @os_policies
end

#reconcilingBoolean 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

Returns:

  • (Boolean)


1677
1678
1679
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1677

def reconciling
  @reconciling
end

#revision_create_timeString

Output only. The timestamp that the revision was created. Corresponds to the JSON property revisionCreateTime

Returns:

  • (String)


1683
1684
1685
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1683

def revision_create_time
  @revision_create_time
end

#revision_idString

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

Returns:

  • (String)


1689
1690
1691
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1689

def revision_id
  @revision_id
end

#rolloutGoogle::Apis::OsconfigV1::OsPolicyAssignmentRollout

Message to configure the rollout at the zonal level for the OS policy assignment. Corresponds to the JSON property rollout



1695
1696
1697
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1695

def rollout
  @rollout
end

#rollout_stateString

Output only. OS policy assignment rollout state Corresponds to the JSON property rolloutState

Returns:

  • (String)


1700
1701
1702
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1700

def rollout_state
  @rollout_state
end

#uidString

Output only. Server generated unique id for the OS policy assignment resource. Corresponds to the JSON property uid

Returns:

  • (String)


1705
1706
1707
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1705

def uid
  @uid
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1712

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