class Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpecPolicyRule
A rule used to express this policy.
Attributes
Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints. Corresponds to the JSON property `allowAll` @return [Boolean]
Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints. Corresponds to the JSON property `allowAll` @return [Boolean]
Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at github.com/google/cel-spec. Example (Comparison): title: “Summary size limit” description: “Determines if a summary is less than 100 chars” expression: “document.summary.size() < 100” Example (Equality): title: “ Requestor is owner” description: “Determines if requestor is the document owner” expression: “document.owner == request.auth.claims.email” Example ( Logic): title: “Public documents” description: “Determine whether the document should be publicly visible” expression: “document.type != 'private' && document.type != 'internal'” Example (Data Manipulation): title: “Notification string” description: “Create a notification string with a timestamp.” expression: “'New message received at ' + string(document.create_time)” The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. Corresponds to the JSON property `condition` @return [Google::Apis::OrgpolicyV2::GoogleTypeExpr]
Setting this to true means that all values are denied. This field can be set only in Policies for list constraints. Corresponds to the JSON property `denyAll` @return [Boolean]
Setting this to true means that all values are denied. This field can be set only in Policies for list constraints. Corresponds to the JSON property `denyAll` @return [Boolean]
If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints. Corresponds to the JSON property `enforce` @return [Boolean]
If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints. Corresponds to the JSON property `enforce` @return [Boolean]
A message that holds specific allowed and denied values. This message can define specific values and subtrees of Cloud Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under: ` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a “:”. Values prefixed with “is:” are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - “projects/”, e.g. “projects/tokyo-rain-123” - “folders/”, e.g. “folders/1234” - “organizations/”, e.g. “organizations/1234” The `supports_under` field of the associated ` Constraint` defines whether ancestry prefixes can be used. Corresponds to the JSON property `values` @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues]
Public Class Methods
# File lib/google/apis/orgpolicy_v2/classes.rb, line 351 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/orgpolicy_v2/classes.rb, line 356 def update!(**args) @allow_all = args[:allow_all] if args.key?(:allow_all) @condition = args[:condition] if args.key?(:condition) @deny_all = args[:deny_all] if args.key?(:deny_all) @enforce = args[:enforce] if args.key?(:enforce) @values = args[:values] if args.key?(:values) end