Class: Google::Apis::TrafficdirectorV3::Locality
- Inherits:
-
Object
- Object
- Google::Apis::TrafficdirectorV3::Locality
- 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
-
#region ⇒ String
Region this :ref:
zone
belongs to. -
#sub_zone ⇒ String
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.
-
#zone ⇒ String
Defines the local service zone where Envoy is running.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Locality
constructor
A new instance of Locality.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#region ⇒ String
Region this :ref:zone
belongs to.
Corresponds to the JSON property region
923 924 925 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 923 def region @region end |
#sub_zone ⇒ String
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
929 930 931 |
# File 'lib/google/apis/trafficdirector_v3/classes.rb', line 929 def sub_zone @sub_zone end |
#zone ⇒ String
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
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 |