Class: Google::Apis::AccesscontextmanagerV1beta::CustomLevel
- Inherits:
-
Object
- Object
- Google::Apis::AccesscontextmanagerV1beta::CustomLevel
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/accesscontextmanager_v1beta/classes.rb,
generated/google/apis/accesscontextmanager_v1beta/representations.rb,
generated/google/apis/accesscontextmanager_v1beta/representations.rb
Overview
CustomLevel
is an AccessLevel
using the Cloud Common Expression Language
to represent the necessary conditions for the level to apply to a request.
See CEL spec at: https://github.com/google/cel-spec
Instance Attribute Summary collapse
-
#expr ⇒ Google::Apis::AccesscontextmanagerV1beta::Expr
Represents a textual expression in the Common Expression Language (CEL) syntax.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CustomLevel
constructor
A new instance of CustomLevel.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ CustomLevel
Returns a new instance of CustomLevel.
278 279 280 |
# File 'generated/google/apis/accesscontextmanager_v1beta/classes.rb', line 278 def initialize(**args) update!(**args) end |
Instance Attribute Details
#expr ⇒ Google::Apis::AccesscontextmanagerV1beta::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 expr
276 277 278 |
# File 'generated/google/apis/accesscontextmanager_v1beta/classes.rb', line 276 def expr @expr end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
283 284 285 |
# File 'generated/google/apis/accesscontextmanager_v1beta/classes.rb', line 283 def update!(**args) @expr = args[:expr] if args.key?(:expr) end |