Class: Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestrator
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestrator
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/osconfig_v2/classes.rb,
lib/google/apis/osconfig_v2/representations.rb,
lib/google/apis/osconfig_v2/representations.rb
Overview
PolicyOrchestrator helps managing project+zone level policy resources (e.g. OS
Policy Assignments), by providing tools to create, update and delete them
across projects and locations, at scale. Policy orchestrator functions as an
endless loop. Each iteration orchestrator computes a set of resources that
should be affected, then progressively applies changes to them. If for some
reason this set of resources changes over time (e.g. new projects are added),
the future loop iterations will address that. Orchestrator can either upsert
or delete policy resources. For more details, see the description of the
action, and orchestrated_resource fields. Note that policy orchestrator do
not "manage" the resources it creates. Every iteration is independent and only
minimal history of past actions is retained (apart from Cloud Logging). If
orchestrator gets deleted, it does not affect the resources it created in the
past. Those will remain where they were. Same applies if projects are removed
from the orchestrator's scope.
Instance Attribute Summary collapse
-
#action ⇒ String
Required.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#etag ⇒ String
Output only.
-
#labels ⇒ Hash<String,String>
Optional.
-
#name ⇒ String
Immutable.
-
#orchestrated_resource ⇒ Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestratedResource
Represents a resource that is being orchestrated by the policy orchestrator.
-
#orchestration_scope ⇒ Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestrationScope
Defines a set of selectors which drive which resources are in scope of policy orchestration.
-
#orchestration_state ⇒ Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestratorOrchestrationState
Describes the state of the orchestration process.
-
#reconciling ⇒ Boolean
(also: #reconciling?)
Output only.
-
#state ⇒ String
Optional.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudOsconfigV2PolicyOrchestrator
constructor
A new instance of GoogleCloudOsconfigV2PolicyOrchestrator.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudOsconfigV2PolicyOrchestrator
Returns a new instance of GoogleCloudOsconfigV2PolicyOrchestrator.
710 711 712 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 710 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
Required. Action to be done by the orchestrator in projects/project_id/
zones/zone_id`locations defined by theorchestration_scope. Allowed
values: -UPSERT- Orchestrator will create or update target resources. -
DELETE- Orchestrator will delete target resources, if they exist
Corresponds to the JSON propertyaction`
641 642 643 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 641 def action @action end |
#create_time ⇒ String
Output only. Timestamp when the policy orchestrator resource was created.
Corresponds to the JSON property createTime
646 647 648 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 646 def create_time @create_time end |
#description ⇒ String
Optional. Freeform text describing the purpose of the resource.
Corresponds to the JSON property description
651 652 653 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 651 def description @description end |
#etag ⇒ String
Output only. This checksum is computed by the server based on the value of
other fields, and may be sent on update and delete requests to ensure the
client has an up-to-date value before proceeding.
Corresponds to the JSON property etag
658 659 660 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 658 def etag @etag end |
#labels ⇒ Hash<String,String>
Optional. Labels as key value pairs
Corresponds to the JSON property labels
663 664 665 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 663 def labels @labels end |
#name ⇒ String
Immutable. Identifier. In form of * organizations/organization_id/locations/
global/policyOrchestrators/orchestrator_id* `folders/`folder_id`/locations/
global/policyOrchestrators/`orchestrator_id * projects/
project_id_or_number/locations/global/policyOrchestrators/orchestrator_id`
Corresponds to the JSON propertyname`
671 672 673 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 671 def name @name end |
#orchestrated_resource ⇒ Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestratedResource
Represents a resource that is being orchestrated by the policy orchestrator.
Corresponds to the JSON property orchestratedResource
676 677 678 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 676 def orchestrated_resource @orchestrated_resource end |
#orchestration_scope ⇒ Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestrationScope
Defines a set of selectors which drive which resources are in scope of policy
orchestration.
Corresponds to the JSON property orchestrationScope
682 683 684 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 682 def orchestration_scope @orchestration_scope end |
#orchestration_state ⇒ Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestratorOrchestrationState
Describes the state of the orchestration process.
Corresponds to the JSON property orchestrationState
687 688 689 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 687 def orchestration_state @orchestration_state end |
#reconciling ⇒ Boolean Also known as: reconciling?
Output only. Set to true, if there are ongoing changes being applied by the
orchestrator.
Corresponds to the JSON property reconciling
693 694 695 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 693 def reconciling @reconciling end |
#state ⇒ String
Optional. State of the orchestrator. Can be updated to change orchestrator
behaviour. Allowed values: - ACTIVE - orchestrator is actively looking for
actions to be taken. - STOPPED - orchestrator won't make any changes. Note:
There might be more states added in the future. We use string here instead of
an enum, to avoid the need of propagating new states to all the client code.
Corresponds to the JSON property state
703 704 705 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 703 def state @state end |
#update_time ⇒ String
Output only. Timestamp when the policy orchestrator resource was last modified.
Corresponds to the JSON property updateTime
708 709 710 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 708 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 715 def update!(**args) @action = args[:action] if args.key?(:action) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @orchestrated_resource = args[:orchestrated_resource] if args.key?(:orchestrated_resource) @orchestration_scope = args[:orchestration_scope] if args.key?(:orchestration_scope) @orchestration_state = args[:orchestration_state] if args.key?(:orchestration_state) @reconciling = args[:reconciling] if args.key?(:reconciling) @state = args[:state] if args.key?(:state) @update_time = args[:update_time] if args.key?(:update_time) end |