Class: Google::Apis::SpannerV1::ChangeQuorumRequest
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::ChangeQuorumRequest
- 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 request for ChangeQuorum.
Instance Attribute Summary collapse
-
#etag ⇒ String
Optional.
-
#name ⇒ String
Required.
-
#quorum_type ⇒ Google::Apis::SpannerV1::QuorumType
Information about the database quorum type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ChangeQuorumRequest
constructor
A new instance of ChangeQuorumRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ChangeQuorumRequest
Returns a new instance of ChangeQuorumRequest.
1081 1082 1083 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1081 def initialize(**args) update!(**args) end |
Instance Attribute Details
#etag ⇒ String
Optional. The etag is the hash of the QuorumInfo. The ChangeQuorum
operation is only performed if the etag matches that of the QuorumInfo in
the current database resource. Otherwise the API returns an ABORTED error.
The etag is used for optimistic concurrency control as a way to help prevent
simultaneous change quorum requests that could create a race condition.
Corresponds to the JSON property etag
1067 1068 1069 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1067 def etag @etag end |
#name ⇒ String
Required. Name of the database in which to apply ChangeQuorum. Values are of
the form projects//instances//databases/.
Corresponds to the JSON property name
1073 1074 1075 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1073 def name @name end |
#quorum_type ⇒ Google::Apis::SpannerV1::QuorumType
Information about the database quorum type. This only applies to dual-region
instance configs.
Corresponds to the JSON property quorumType
1079 1080 1081 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1079 def quorum_type @quorum_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1086 1087 1088 1089 1090 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 1086 def update!(**args) @etag = args[:etag] if args.key?(:etag) @name = args[:name] if args.key?(:name) @quorum_type = args[:quorum_type] if args.key?(:quorum_type) end |