Class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Rule
- Inherits:
-
Object
- Object
- Google::Apis::CloudassetV1::GoogleCloudAssetV1Rule
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudasset_v1/classes.rb,
lib/google/apis/cloudasset_v1/representations.rb,
lib/google/apis/cloudasset_v1/representations.rb
Overview
Represents a rule defined in an organization policy
Instance Attribute Summary collapse
-
#allow_all ⇒ Boolean
(also: #allow_all?)
Setting this to true means that all values are allowed.
-
#condition ⇒ Google::Apis::CloudassetV1::Expr
Represents a textual expression in the Common Expression Language (CEL) syntax.
-
#deny_all ⇒ Boolean
(also: #deny_all?)
Setting this to true means that all values are denied.
-
#enforce ⇒ Boolean
(also: #enforce?)
If
true, then thePolicyis enforced. -
#values ⇒ Google::Apis::CloudassetV1::GoogleCloudAssetV1StringValues
The string values for the list constraints.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAssetV1Rule
constructor
A new instance of GoogleCloudAssetV1Rule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAssetV1Rule
Returns a new instance of GoogleCloudAssetV1Rule.
2213 2214 2215 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2213 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allow_all ⇒ Boolean Also known as: allow_all?
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
2172 2173 2174 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2172 def allow_all @allow_all end |
#condition ⇒ Google::Apis::CloudassetV1::Expr
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 https://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
2192 2193 2194 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2192 def condition @condition end |
#deny_all ⇒ Boolean Also known as: deny_all?
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
2198 2199 2200 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2198 def deny_all @deny_all end |
#enforce ⇒ Boolean Also known as: enforce?
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
2205 2206 2207 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2205 def enforce @enforce end |
#values ⇒ Google::Apis::CloudassetV1::GoogleCloudAssetV1StringValues
The string values for the list constraints.
Corresponds to the JSON property values
2211 2212 2213 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2211 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2218 2219 2220 2221 2222 2223 2224 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2218 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 |