Class: Google::Apis::ComputeAlpha::RouterNatRule
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::RouterNatRule
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/google/apis/compute_alpha/representations.rb
Instance Attribute Summary collapse
-
#action ⇒ Google::Apis::ComputeAlpha::RouterNatRuleAction
The action to be enforced for traffic that matches this rule.
-
#description ⇒ String
An optional description of this rule.
-
#match ⇒ String
CEL expression that specifies the match condition that egress traffic from a VM is evaluated against.
-
#rule_number ⇒ Fixnum
An integer uniquely identifying a rule in the list.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RouterNatRule
constructor
A new instance of RouterNatRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RouterNatRule
Returns a new instance of RouterNatRule.
32163 32164 32165 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 32163 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ Google::Apis::ComputeAlpha::RouterNatRuleAction
The action to be enforced for traffic that matches this rule.
Corresponds to the JSON property action
32138 32139 32140 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 32138 def action @action end |
#description ⇒ String
An optional description of this rule.
Corresponds to the JSON property description
32143 32144 32145 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 32143 def description @description end |
#match ⇒ String
CEL expression that specifies the match condition that egress traffic from a
VM is evaluated against. If it evaluates to true, the corresponding ?action?
is enforced.
The following examples are valid match expressions:
"inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/
16')"
"destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
Corresponds to the JSON property match
32154 32155 32156 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 32154 def match @match end |
#rule_number ⇒ Fixnum
An integer uniquely identifying a rule in the list. The rule number must be a
positive value between 0 and 65000, and must be unique among rules within a
NAT.
Corresponds to the JSON property ruleNumber
32161 32162 32163 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 32161 def rule_number @rule_number end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
32168 32169 32170 32171 32172 32173 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 32168 def update!(**args) @action = args[:action] if args.key?(:action) @description = args[:description] if args.key?(:description) @match = args[:match] if args.key?(:match) @rule_number = args[:rule_number] if args.key?(:rule_number) end |