Class: Google::Apis::SpannerV1::ReplicaSelection
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::ReplicaSelection
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
The directed read replica selector. Callers must provide one or more of the
following fields for replica selection: * location - The location must be
one of the regions within the multi-region configuration of your database. *
type - The type of the replica. Some examples of using replica_selectors are:
location:us-east1--> The "us-east1" replica(s) of any available type is used to process the request. *type:READ_ONLY--> The "READ_ONLY" type replica(s) in the nearest available location are used to process the request. *location:us-east1 type:READ_ONLY--> The "READ_ONLY" type replica(s) in location "us-east1" is used to process the request.
Instance Attribute Summary collapse
-
#location ⇒ String
The location or region of the serving requests, for example, "us-east1".
-
#type ⇒ String
The type of replica.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReplicaSelection
constructor
A new instance of ReplicaSelection.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ReplicaSelection
Returns a new instance of ReplicaSelection.
5937 5938 5939 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 5937 def initialize(**args) update!(**args) end |
Instance Attribute Details
#location ⇒ String
The location or region of the serving requests, for example, "us-east1".
Corresponds to the JSON property location
5930 5931 5932 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 5930 def location @location end |
#type ⇒ String
The type of replica.
Corresponds to the JSON property type
5935 5936 5937 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 5935 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5942 5943 5944 5945 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 5942 def update!(**args) @location = args[:location] if args.key?(:location) @type = args[:type] if args.key?(:type) end |