Class: Google::Apis::AssuredworkloadsV1beta1::GoogleCloudAssuredworkloadsV1beta1OrgPolicy
- Inherits:
-
Object
- Object
- Google::Apis::AssuredworkloadsV1beta1::GoogleCloudAssuredworkloadsV1beta1OrgPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/assuredworkloads_v1beta1/classes.rb,
lib/google/apis/assuredworkloads_v1beta1/representations.rb,
lib/google/apis/assuredworkloads_v1beta1/representations.rb
Overview
This assured workload service object is used to represent the org policy attached to a resource. It servces the same purpose as the orgpolicy.v2.Policy object but with functionality that is limited to what is supported by Assured Workloads(e.g. only one rule under one OrgPolicy object, no conditions, etc).
Instance Attribute Summary collapse
-
#constraint ⇒ String
The constraint name of the OrgPolicy.
-
#inherit ⇒ Boolean
(also: #inherit?)
If
inheritis true, policy rules of the lowest ancestor in the resource hierarchy chain are inherited. -
#reset ⇒ Boolean
(also: #reset?)
Ignores policies set above this resource and restores to the
constraint_defaultvalue. -
#resource ⇒ String
Resource that the OrgPolicy attaches to.
-
#rule ⇒ Google::Apis::AssuredworkloadsV1beta1::GoogleCloudAssuredworkloadsV1beta1OrgPolicyPolicyRule
A rule used to express this policy.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAssuredworkloadsV1beta1OrgPolicy
constructor
A new instance of GoogleCloudAssuredworkloadsV1beta1OrgPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAssuredworkloadsV1beta1OrgPolicy
Returns a new instance of GoogleCloudAssuredworkloadsV1beta1OrgPolicy.
469 470 471 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 469 def initialize(**args) update!(**args) end |
Instance Attribute Details
#constraint ⇒ String
The constraint name of the OrgPolicy. e.g. "constraints/gcp.resourceLocations".
Corresponds to the JSON property constraint
442 443 444 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 442 def constraint @constraint end |
#inherit ⇒ Boolean Also known as: inherit?
If inherit is true, policy rules of the lowest ancestor in the resource
hierarchy chain are inherited. If it is false, policy rules are not inherited.
Corresponds to the JSON property inherit
448 449 450 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 448 def inherit @inherit end |
#reset ⇒ Boolean Also known as: reset?
Ignores policies set above this resource and restores to the
constraint_default value. reset can only be true when rules is empty and
inherit is false.
Corresponds to the JSON property reset
456 457 458 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 456 def reset @reset end |
#resource ⇒ String
Resource that the OrgPolicy attaches to. Format: folders/123" projects/123".
Corresponds to the JSON property resource
462 463 464 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 462 def resource @resource end |
#rule ⇒ Google::Apis::AssuredworkloadsV1beta1::GoogleCloudAssuredworkloadsV1beta1OrgPolicyPolicyRule
A rule used to express this policy.
Corresponds to the JSON property rule
467 468 469 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 467 def rule @rule end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
474 475 476 477 478 479 480 |
# File 'lib/google/apis/assuredworkloads_v1beta1/classes.rb', line 474 def update!(**args) @constraint = args[:constraint] if args.key?(:constraint) @inherit = args[:inherit] if args.key?(:inherit) @reset = args[:reset] if args.key?(:reset) @resource = args[:resource] if args.key?(:resource) @rule = args[:rule] if args.key?(:rule) end |