Class: Google::Apis::TrafficdirectorV3::Locality

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/trafficdirector_v3/classes.rb,
lib/google/apis/trafficdirector_v3/representations.rb,
lib/google/apis/trafficdirector_v3/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.



940
941
942
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 940

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

Instance Attribute Details

#regionString

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

Returns:

  • (String)


923
924
925
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 923

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)


929
930
931
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 929

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)


938
939
940
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 938

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



945
946
947
948
949
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 945

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