Class: Google::Apis::TrafficdirectorV2::Locality

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/trafficdirector_v2/classes.rb,
generated/google/apis/trafficdirector_v2/representations.rb,
generated/google/apis/trafficdirector_v2/representations.rb

Overview

Identifies location of where either Envoy runs or where upstream hosts run.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Locality

Returns a new instance of Locality.



630
631
632
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 630

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

Instance Attribute Details

#regionString

Region this :ref:zone belongs to. Corresponds to the JSON property region

Returns:

  • (String)


613
614
615
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 613

def region
  @region
end

#sub_zoneString

When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently. Corresponds to the JSON property subZone

Returns:

  • (String)


619
620
621
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 619

def sub_zone
  @sub_zone
end

#zoneString

Defines the local service zone where Envoy is running. Though optional, it should be set if discovery service routing is used and the discovery service exposes :ref:zone data, either in this message or via :option:--service- zone. The meaning of zone is context dependent, e.g. Availability Zone (AZ) _ on AWS, Zone_ on GCP, etc. Corresponds to the JSON property zone

Returns:

  • (String)


628
629
630
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 628

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



635
636
637
638
639
# File 'generated/google/apis/trafficdirector_v2/classes.rb', line 635

def update!(**args)
  @region = args[:region] if args.key?(:region)
  @sub_zone = args[:sub_zone] if args.key?(:sub_zone)
  @zone = args[:zone] if args.key?(:zone)
end