Class: Google::Apis::ComputeBeta::RouterNatRule
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::RouterNatRule
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb
Instance Attribute Summary collapse
-
#action ⇒ Google::Apis::ComputeBeta::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.
30747 30748 30749 |
# File 'lib/google/apis/compute_beta/classes.rb', line 30747 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ Google::Apis::ComputeBeta::RouterNatRuleAction
The action to be enforced for traffic that matches this rule.
Corresponds to the JSON property action
30721 30722 30723 |
# File 'lib/google/apis/compute_beta/classes.rb', line 30721 def action @action end |
#description ⇒ String
An optional description of this rule.
Corresponds to the JSON property description
30726 30727 30728 |
# File 'lib/google/apis/compute_beta/classes.rb', line 30726 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 for public NAT:
"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'" The
following example is a valid match expression for private NAT: "nexthop.hub ==
'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/
global/hub/hub-1'"
Corresponds to the JSON property match
30738 30739 30740 |
# File 'lib/google/apis/compute_beta/classes.rb', line 30738 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
30745 30746 30747 |
# File 'lib/google/apis/compute_beta/classes.rb', line 30745 def rule_number @rule_number end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
30752 30753 30754 30755 30756 30757 |
# File 'lib/google/apis/compute_beta/classes.rb', line 30752 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 |