Class: Google::Apis::ComputeAlpha::SecurityPolicyRuleMatcher

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SecurityPolicyRuleMatcher

Returns a new instance of SecurityPolicyRuleMatcher.



44026
44027
44028
# File 'lib/google/apis/compute_alpha/classes.rb', line 44026

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#configGoogle::Apis::ComputeAlpha::SecurityPolicyRuleMatcherConfig

The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified. Corresponds to the JSON property config



43991
43992
43993
# File 'lib/google/apis/compute_alpha/classes.rb', line 43991

def config
  @config
end

#exprGoogle::Apis::ComputeAlpha::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



44010
44011
44012
# File 'lib/google/apis/compute_alpha/classes.rb', line 44010

def expr
  @expr
end

#expr_optionsGoogle::Apis::ComputeAlpha::SecurityPolicyRuleMatcherExprOptions

The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr'). Corresponds to the JSON property exprOptions



44016
44017
44018
# File 'lib/google/apis/compute_alpha/classes.rb', line 44016

def expr_options
  @expr_options
end

#versioned_exprString

Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config. Corresponds to the JSON property versionedExpr

Returns:

  • (String)


44024
44025
44026
# File 'lib/google/apis/compute_alpha/classes.rb', line 44024

def versioned_expr
  @versioned_expr
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



44031
44032
44033
44034
44035
44036
# File 'lib/google/apis/compute_alpha/classes.rb', line 44031

def update!(**args)
  @config = args[:config] if args.key?(:config)
  @expr = args[:expr] if args.key?(:expr)
  @expr_options = args[:expr_options] if args.key?(:expr_options)
  @versioned_expr = args[:versioned_expr] if args.key?(:versioned_expr)
end