Class: Google::Apis::ComputeAlpha::RouterNatRule
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::RouterNatRule
- 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
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.
-
#source_workload_identities ⇒ Array<String>
A list of source workload identities.
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.
65031 65032 65033 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 65031 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
64997 64998 64999 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 64997 def action @action end |
#description ⇒ String
An optional description of this rule.
Corresponds to the JSON property description
65002 65003 65004 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 65002 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 ==
'//networkconnectivity.googleapis.com/projects/my-project/locations/global/
hubs/hub-1'
Corresponds to the JSON property match
65017 65018 65019 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 65017 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
65024 65025 65026 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 65024 def rule_number @rule_number end |
#source_workload_identities ⇒ Array<String>
A list of source workload identities.
Corresponds to the JSON property sourceWorkloadIdentities
65029 65030 65031 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 65029 def source_workload_identities @source_workload_identities end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
65036 65037 65038 65039 65040 65041 65042 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 65036 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) @source_workload_identities = args[:source_workload_identities] if args.key?(:source_workload_identities) end |