Class: Google::Apis::ComputeV1::RouterNatRule

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RouterNatRule

Returns a new instance of RouterNatRule.



36421
36422
36423
# File 'lib/google/apis/compute_v1/classes.rb', line 36421

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

Instance Attribute Details

#actionGoogle::Apis::ComputeV1::RouterNatRuleAction

The action to be enforced for traffic that matches this rule. Corresponds to the JSON property action



36395
36396
36397
# File 'lib/google/apis/compute_v1/classes.rb', line 36395

def action
  @action
end

#descriptionString

An optional description of this rule. Corresponds to the JSON property description

Returns:

  • (String)


36400
36401
36402
# File 'lib/google/apis/compute_v1/classes.rb', line 36400

def description
  @description
end

#matchString

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

Returns:

  • (String)


36412
36413
36414
# File 'lib/google/apis/compute_v1/classes.rb', line 36412

def match
  @match
end

#rule_numberFixnum

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

Returns:

  • (Fixnum)


36419
36420
36421
# File 'lib/google/apis/compute_v1/classes.rb', line 36419

def rule_number
  @rule_number
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



36426
36427
36428
36429
36430
36431
# File 'lib/google/apis/compute_v1/classes.rb', line 36426

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