Class: Google::Apis::ComputeAlpha::RouterNatRule

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RouterNatRule

Returns a new instance of RouterNatRule.



66392
66393
66394
# File 'lib/google/apis/compute_alpha/classes.rb', line 66392

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

Instance Attribute Details

#actionGoogle::Apis::ComputeAlpha::RouterNatRuleAction

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



66358
66359
66360
# File 'lib/google/apis/compute_alpha/classes.rb', line 66358

def action
  @action
end

#descriptionString

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

Returns:

  • (String)


66363
66364
66365
# File 'lib/google/apis/compute_alpha/classes.rb', line 66363

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)


66378
66379
66380
# File 'lib/google/apis/compute_alpha/classes.rb', line 66378

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)


66385
66386
66387
# File 'lib/google/apis/compute_alpha/classes.rb', line 66385

def rule_number
  @rule_number
end

#source_workload_identitiesArray<String>

A list of source workload identities. Corresponds to the JSON property sourceWorkloadIdentities

Returns:

  • (Array<String>)


66390
66391
66392
# File 'lib/google/apis/compute_alpha/classes.rb', line 66390

def source_workload_identities
  @source_workload_identities
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



66397
66398
66399
66400
66401
66402
66403
# File 'lib/google/apis/compute_alpha/classes.rb', line 66397

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