google-cloud-alloy_db-v1alpha 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -129,11 +129,6 @@ module Google
129
129
  initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
130
130
  }
131
131
 
132
- default_config.rpcs.list_databases.timeout = 60.0
133
- default_config.rpcs.list_databases.retry_policy = {
134
- initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
135
- }
136
-
137
132
  default_config
138
133
  end
139
134
  yield @configure if block_given?
@@ -489,22 +484,22 @@ module Google
489
484
  # Required. The resource being created
490
485
  # @param request_id [::String]
491
486
  # Optional. An optional request ID to identify requests. Specify a unique
492
- # request ID so that if you must retry your request, the server will know to
493
- # ignore the request if it has already been completed. The server will
494
- # guarantee that for at least 60 minutes since the first request.
487
+ # request ID so that if you must retry your request, the server ignores the
488
+ # request if it has already been completed. The server guarantees that for at
489
+ # least 60 minutes since the first request.
495
490
  #
496
491
  # For example, consider a situation where you make an initial request and
497
492
  # the request times out. If you make the request again with the same request
498
- # ID, the server can check if original operation with the same request ID
499
- # was received, and if so, will ignore the second request. This prevents
493
+ # ID, the server can check if the original operation with the same request ID
494
+ # was received, and if so, ignores the second request. This prevents
500
495
  # clients from accidentally creating duplicate commitments.
501
496
  #
502
497
  # The request ID must be a valid UUID with the exception that zero UUID is
503
498
  # not supported (00000000-0000-0000-0000-000000000000).
504
499
  # @param validate_only [::Boolean]
505
- # Optional. If set, performs request validation (e.g. permission checks and
506
- # any other type of validation), but do not actually execute the create
507
- # request.
500
+ # Optional. If set, performs request validation, for example, permission
501
+ # checks and any other type of validation, but does not actually execute the
502
+ # create request.
508
503
  #
509
504
  # @yield [response, operation] Access the result along with the RPC operation
510
505
  # @yieldparam response [::Gapic::Operation]
@@ -607,22 +602,22 @@ module Google
607
602
  # Required. The resource being updated
608
603
  # @param request_id [::String]
609
604
  # Optional. An optional request ID to identify requests. Specify a unique
610
- # request ID so that if you must retry your request, the server will know to
611
- # ignore the request if it has already been completed. The server will
612
- # guarantee that for at least 60 minutes since the first request.
605
+ # request ID so that if you must retry your request, the server ignores the
606
+ # request if it has already been completed. The server guarantees that for at
607
+ # least 60 minutes since the first request.
613
608
  #
614
609
  # For example, consider a situation where you make an initial request and
615
610
  # the request times out. If you make the request again with the same request
616
- # ID, the server can check if original operation with the same request ID
617
- # was received, and if so, will ignore the second request. This prevents
611
+ # ID, the server can check if the original operation with the same request ID
612
+ # was received, and if so, ignores the second request. This prevents
618
613
  # clients from accidentally creating duplicate commitments.
619
614
  #
620
615
  # The request ID must be a valid UUID with the exception that zero UUID is
621
616
  # not supported (00000000-0000-0000-0000-000000000000).
622
617
  # @param validate_only [::Boolean]
623
- # Optional. If set, performs request validation (e.g. permission checks and
624
- # any other type of validation), but do not actually execute the update
625
- # request.
618
+ # Optional. If set, performs request validation, for example, permission
619
+ # checks and any other type of validation, but does not actually execute the
620
+ # create request.
626
621
  # @param allow_missing [::Boolean]
627
622
  # Optional. If set to true, update succeeds even if cluster is not found. In
628
623
  # that case, a new cluster is created and `update_mask` is ignored.
@@ -700,6 +695,125 @@ module Google
700
695
  raise ::Google::Cloud::Error.from_error(e)
701
696
  end
702
697
 
698
+ ##
699
+ # Upgrades a single Cluster.
700
+ # Imperative only.
701
+ #
702
+ # @overload upgrade_cluster(request, options = nil)
703
+ # Pass arguments to `upgrade_cluster` via a request object, either of type
704
+ # {::Google::Cloud::AlloyDB::V1alpha::UpgradeClusterRequest} or an equivalent Hash.
705
+ #
706
+ # @param request [::Google::Cloud::AlloyDB::V1alpha::UpgradeClusterRequest, ::Hash]
707
+ # A request object representing the call parameters. Required. To specify no
708
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
709
+ # @param options [::Gapic::CallOptions, ::Hash]
710
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
711
+ #
712
+ # @overload upgrade_cluster(name: nil, version: nil, request_id: nil, validate_only: nil, etag: nil)
713
+ # Pass arguments to `upgrade_cluster` via keyword arguments. Note that at
714
+ # least one keyword argument is required. To specify no parameters, or to keep all
715
+ # the default parameter values, pass an empty Hash as a request object (see above).
716
+ #
717
+ # @param name [::String]
718
+ # Required. The resource name of the cluster.
719
+ # @param version [::Google::Cloud::AlloyDB::V1alpha::DatabaseVersion]
720
+ # Required. The version the cluster is going to be upgraded to.
721
+ # @param request_id [::String]
722
+ # Optional. An optional request ID to identify requests. Specify a unique
723
+ # request ID so that if you must retry your request, the server ignores the
724
+ # request if it has already been completed. The server guarantees that for at
725
+ # least 60 minutes since the first request.
726
+ #
727
+ # For example, consider a situation where you make an initial request and
728
+ # the request times out. If you make the request again with the same request
729
+ # ID, the server can check if the original operation with the same request ID
730
+ # was received, and if so, ignores the second request. This prevents
731
+ # clients from accidentally creating duplicate commitments.
732
+ #
733
+ # The request ID must be a valid UUID with the exception that zero UUID is
734
+ # not supported (00000000-0000-0000-0000-000000000000).
735
+ # @param validate_only [::Boolean]
736
+ # Optional. If set, performs request validation, for example, permission
737
+ # checks and any other type of validation, but does not actually execute the
738
+ # create request.
739
+ # @param etag [::String]
740
+ # Optional. The current etag of the Cluster.
741
+ # If an etag is provided and does not match the current etag of the Cluster,
742
+ # upgrade will be blocked and an ABORTED error will be returned.
743
+ #
744
+ # @yield [response, operation] Access the result along with the RPC operation
745
+ # @yieldparam response [::Gapic::Operation]
746
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
747
+ #
748
+ # @return [::Gapic::Operation]
749
+ #
750
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
751
+ #
752
+ # @example Basic example
753
+ # require "google/cloud/alloy_db/v1alpha"
754
+ #
755
+ # # Create a client object. The client can be reused for multiple calls.
756
+ # client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Client.new
757
+ #
758
+ # # Create a request. To set request fields, pass in keyword arguments.
759
+ # request = Google::Cloud::AlloyDB::V1alpha::UpgradeClusterRequest.new
760
+ #
761
+ # # Call the upgrade_cluster method.
762
+ # result = client.upgrade_cluster request
763
+ #
764
+ # # The returned object is of type Gapic::Operation. You can use it to
765
+ # # check the status of an operation, cancel it, or wait for results.
766
+ # # Here is how to wait for a response.
767
+ # result.wait_until_done! timeout: 60
768
+ # if result.response?
769
+ # p result.response
770
+ # else
771
+ # puts "No response received."
772
+ # end
773
+ #
774
+ def upgrade_cluster request, options = nil
775
+ raise ::ArgumentError, "request must be provided" if request.nil?
776
+
777
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::UpgradeClusterRequest
778
+
779
+ # Converts hash and nil to an options object
780
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
781
+
782
+ # Customize the options with defaults
783
+ metadata = @config.rpcs.upgrade_cluster.metadata.to_h
784
+
785
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
786
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
787
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
788
+ gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION
789
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
790
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
791
+
792
+ header_params = {}
793
+ if request.name
794
+ header_params["name"] = request.name
795
+ end
796
+
797
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
798
+ metadata[:"x-goog-request-params"] ||= request_params_header
799
+
800
+ options.apply_defaults timeout: @config.rpcs.upgrade_cluster.timeout,
801
+ metadata: metadata,
802
+ retry_policy: @config.rpcs.upgrade_cluster.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @alloy_db_admin_stub.call_rpc :upgrade_cluster, request, options: options do |response, operation|
809
+ response = ::Gapic::Operation.new response, @operations_client, options: options
810
+ yield response, operation if block_given?
811
+ return response
812
+ end
813
+ rescue ::GRPC::BadStatus => e
814
+ raise ::Google::Cloud::Error.from_error(e)
815
+ end
816
+
703
817
  ##
704
818
  # Deletes a single Cluster.
705
819
  #
@@ -723,14 +837,14 @@ module Google
723
837
  # comment on the Cluster.name field.
724
838
  # @param request_id [::String]
725
839
  # Optional. An optional request ID to identify requests. Specify a unique
726
- # request ID so that if you must retry your request, the server will know to
727
- # ignore the request if it has already been completed. The server will
728
- # guarantee that for at least 60 minutes after the first request.
840
+ # request ID so that if you must retry your request, the server ignores the
841
+ # request if it has already been completed. The server guarantees that for at
842
+ # least 60 minutes since the first request.
729
843
  #
730
844
  # For example, consider a situation where you make an initial request and
731
845
  # the request times out. If you make the request again with the same request
732
- # ID, the server can check if original operation with the same request ID
733
- # was received, and if so, will ignore the second request. This prevents
846
+ # ID, the server can check if the original operation with the same request ID
847
+ # was received, and if so, ignores the second request. This prevents
734
848
  # clients from accidentally creating duplicate commitments.
735
849
  #
736
850
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -740,8 +854,9 @@ module Google
740
854
  # If an etag is provided and does not match the current etag of the Cluster,
741
855
  # deletion will be blocked and an ABORTED error will be returned.
742
856
  # @param validate_only [::Boolean]
743
- # Optional. If set, performs request validation (e.g. permission checks and
744
- # any other type of validation), but do not actually execute the delete.
857
+ # Optional. If set, performs request validation, for example, permission
858
+ # checks and any other type of validation, but does not actually execute the
859
+ # create request.
745
860
  # @param force [::Boolean]
746
861
  # Optional. Whether to cascade delete child instances for given cluster.
747
862
  #
@@ -844,9 +959,9 @@ module Google
844
959
  # comment on the Cluster.name field
845
960
  # @param request_id [::String]
846
961
  # Optional. An optional request ID to identify requests. Specify a unique
847
- # request ID so that if you must retry your request, the server will know to
848
- # ignore the request if it has already been completed. The server will
849
- # guarantee that for at least 60 minutes after the first request.
962
+ # request ID so that if you must retry your request, the server ignores the
963
+ # request if it has already been completed. The server guarantees that for at
964
+ # least 60 minutes since the first request.
850
965
  #
851
966
  # For example, consider a situation where you make an initial request and
852
967
  # the request times out. If you make the request again with the same request
@@ -861,8 +976,9 @@ module Google
861
976
  # If an etag is provided and does not match the current etag of the Cluster,
862
977
  # deletion will be blocked and an ABORTED error will be returned.
863
978
  # @param validate_only [::Boolean]
864
- # Optional. If set, performs request validation (e.g. permission checks and
865
- # any other type of validation), but do not actually execute the delete.
979
+ # Optional. If set, performs request validation, for example, permission
980
+ # checks and any other type of validation, but does not actually execute the
981
+ # create request.
866
982
  #
867
983
  # @yield [response, operation] Access the result along with the RPC operation
868
984
  # @yieldparam response [::Gapic::Operation]
@@ -937,6 +1053,121 @@ module Google
937
1053
  raise ::Google::Cloud::Error.from_error(e)
938
1054
  end
939
1055
 
1056
+ ##
1057
+ # Switches the roles of PRIMARY and SECONDARY clusters without any data loss.
1058
+ # This promotes the SECONDARY cluster to PRIMARY and sets up the original
1059
+ # PRIMARY cluster to replicate from this newly promoted cluster.
1060
+ #
1061
+ # @overload switchover_cluster(request, options = nil)
1062
+ # Pass arguments to `switchover_cluster` via a request object, either of type
1063
+ # {::Google::Cloud::AlloyDB::V1alpha::SwitchoverClusterRequest} or an equivalent Hash.
1064
+ #
1065
+ # @param request [::Google::Cloud::AlloyDB::V1alpha::SwitchoverClusterRequest, ::Hash]
1066
+ # A request object representing the call parameters. Required. To specify no
1067
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1068
+ # @param options [::Gapic::CallOptions, ::Hash]
1069
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1070
+ #
1071
+ # @overload switchover_cluster(name: nil, request_id: nil, validate_only: nil)
1072
+ # Pass arguments to `switchover_cluster` via keyword arguments. Note that at
1073
+ # least one keyword argument is required. To specify no parameters, or to keep all
1074
+ # the default parameter values, pass an empty Hash as a request object (see above).
1075
+ #
1076
+ # @param name [::String]
1077
+ # Required. The name of the resource. For the required format, see the
1078
+ # comment on the Cluster.name field
1079
+ # @param request_id [::String]
1080
+ # Optional. An optional request ID to identify requests. Specify a unique
1081
+ # request ID so that if you must retry your request, the server ignores the
1082
+ # request if it has already been completed. The server guarantees that for at
1083
+ # least 60 minutes since the first request.
1084
+ #
1085
+ # For example, consider a situation where you make an initial request and
1086
+ # the request times out. If you make the request again with the same request
1087
+ # ID, the server can check if the original operation with the same request ID
1088
+ # was received, and if so, ignores the second request. This prevents
1089
+ # clients from accidentally creating duplicate commitments.
1090
+ #
1091
+ # The request ID must be a valid UUID with the exception that zero UUID is
1092
+ # not supported (00000000-0000-0000-0000-000000000000).
1093
+ # @param validate_only [::Boolean]
1094
+ # Optional. If set, performs request validation, for example, permission
1095
+ # checks and any other type of validation, but does not actually execute the
1096
+ # create request.
1097
+ #
1098
+ # @yield [response, operation] Access the result along with the RPC operation
1099
+ # @yieldparam response [::Gapic::Operation]
1100
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1101
+ #
1102
+ # @return [::Gapic::Operation]
1103
+ #
1104
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1105
+ #
1106
+ # @example Basic example
1107
+ # require "google/cloud/alloy_db/v1alpha"
1108
+ #
1109
+ # # Create a client object. The client can be reused for multiple calls.
1110
+ # client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Client.new
1111
+ #
1112
+ # # Create a request. To set request fields, pass in keyword arguments.
1113
+ # request = Google::Cloud::AlloyDB::V1alpha::SwitchoverClusterRequest.new
1114
+ #
1115
+ # # Call the switchover_cluster method.
1116
+ # result = client.switchover_cluster request
1117
+ #
1118
+ # # The returned object is of type Gapic::Operation. You can use it to
1119
+ # # check the status of an operation, cancel it, or wait for results.
1120
+ # # Here is how to wait for a response.
1121
+ # result.wait_until_done! timeout: 60
1122
+ # if result.response?
1123
+ # p result.response
1124
+ # else
1125
+ # puts "No response received."
1126
+ # end
1127
+ #
1128
+ def switchover_cluster request, options = nil
1129
+ raise ::ArgumentError, "request must be provided" if request.nil?
1130
+
1131
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::SwitchoverClusterRequest
1132
+
1133
+ # Converts hash and nil to an options object
1134
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1135
+
1136
+ # Customize the options with defaults
1137
+ metadata = @config.rpcs.switchover_cluster.metadata.to_h
1138
+
1139
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1140
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1141
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1142
+ gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION
1143
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1144
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1145
+
1146
+ header_params = {}
1147
+ if request.name
1148
+ header_params["name"] = request.name
1149
+ end
1150
+
1151
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1152
+ metadata[:"x-goog-request-params"] ||= request_params_header
1153
+
1154
+ options.apply_defaults timeout: @config.rpcs.switchover_cluster.timeout,
1155
+ metadata: metadata,
1156
+ retry_policy: @config.rpcs.switchover_cluster.retry_policy
1157
+
1158
+ options.apply_defaults timeout: @config.timeout,
1159
+ metadata: @config.metadata,
1160
+ retry_policy: @config.retry_policy
1161
+
1162
+ @alloy_db_admin_stub.call_rpc :switchover_cluster, request, options: options do |response, operation|
1163
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1164
+ yield response, operation if block_given?
1165
+ return response
1166
+ end
1167
+ rescue ::GRPC::BadStatus => e
1168
+ raise ::Google::Cloud::Error.from_error(e)
1169
+ end
1170
+
940
1171
  ##
941
1172
  # Creates a new Cluster in a given project and location, with a volume
942
1173
  # restored from the provided source, either a backup ID or a point-in-time
@@ -971,22 +1202,22 @@ module Google
971
1202
  # Required. The resource being created
972
1203
  # @param request_id [::String]
973
1204
  # Optional. An optional request ID to identify requests. Specify a unique
974
- # request ID so that if you must retry your request, the server will know to
975
- # ignore the request if it has already been completed. The server will
976
- # guarantee that for at least 60 minutes since the first request.
1205
+ # request ID so that if you must retry your request, the server ignores the
1206
+ # request if it has already been completed. The server guarantees that for at
1207
+ # least 60 minutes since the first request.
977
1208
  #
978
1209
  # For example, consider a situation where you make an initial request and
979
1210
  # the request times out. If you make the request again with the same request
980
- # ID, the server can check if original operation with the same request ID
981
- # was received, and if so, will ignore the second request. This prevents
1211
+ # ID, the server can check if the original operation with the same request ID
1212
+ # was received, and if so, ignores the second request. This prevents
982
1213
  # clients from accidentally creating duplicate commitments.
983
1214
  #
984
1215
  # The request ID must be a valid UUID with the exception that zero UUID is
985
1216
  # not supported (00000000-0000-0000-0000-000000000000).
986
1217
  # @param validate_only [::Boolean]
987
- # Optional. If set, performs request validation (e.g. permission checks and
988
- # any other type of validation), but do not actually execute the import
989
- # request.
1218
+ # Optional. If set, performs request validation, for example, permission
1219
+ # checks and any other type of validation, but does not actually execute the
1220
+ # create request.
990
1221
  #
991
1222
  # @yield [response, operation] Access the result along with the RPC operation
992
1223
  # @yieldparam response [::Gapic::Operation]
@@ -1089,22 +1320,22 @@ module Google
1089
1320
  # Required. Configuration of the requesting object (the secondary cluster).
1090
1321
  # @param request_id [::String]
1091
1322
  # Optional. An optional request ID to identify requests. Specify a unique
1092
- # request ID so that if you must retry your request, the server will know to
1093
- # ignore the request if it has already been completed. The server will
1094
- # guarantee that for at least 60 minutes since the first request.
1323
+ # request ID so that if you must retry your request, the server ignores the
1324
+ # request if it has already been completed. The server guarantees that for at
1325
+ # least 60 minutes since the first request.
1095
1326
  #
1096
1327
  # For example, consider a situation where you make an initial request and
1097
1328
  # the request times out. If you make the request again with the same request
1098
- # ID, the server can check if original operation with the same request ID
1099
- # was received, and if so, will ignore the second request. This prevents
1329
+ # ID, the server can check if the original operation with the same request ID
1330
+ # was received, and if so, ignores the second request. This prevents
1100
1331
  # clients from accidentally creating duplicate commitments.
1101
1332
  #
1102
1333
  # The request ID must be a valid UUID with the exception that zero UUID is
1103
1334
  # not supported (00000000-0000-0000-0000-000000000000).
1104
1335
  # @param validate_only [::Boolean]
1105
- # Optional. If set, performs request validation (e.g. permission checks and
1106
- # any other type of validation), but do not actually execute the create
1107
- # request.
1336
+ # Optional. If set, performs request validation, for example, permission
1337
+ # checks and any other type of validation, but does not actually execute the
1338
+ # create request.
1108
1339
  #
1109
1340
  # @yield [response, operation] Access the result along with the RPC operation
1110
1341
  # @yieldparam response [::Gapic::Operation]
@@ -1400,22 +1631,22 @@ module Google
1400
1631
  # Required. The resource being created
1401
1632
  # @param request_id [::String]
1402
1633
  # Optional. An optional request ID to identify requests. Specify a unique
1403
- # request ID so that if you must retry your request, the server will know to
1404
- # ignore the request if it has already been completed. The server will
1405
- # guarantee that for at least 60 minutes since the first request.
1634
+ # request ID so that if you must retry your request, the server ignores the
1635
+ # request if it has already been completed. The server guarantees that for at
1636
+ # least 60 minutes since the first request.
1406
1637
  #
1407
1638
  # For example, consider a situation where you make an initial request and
1408
1639
  # the request times out. If you make the request again with the same request
1409
- # ID, the server can check if original operation with the same request ID
1410
- # was received, and if so, will ignore the second request. This prevents
1640
+ # ID, the server can check if the original operation with the same request ID
1641
+ # was received, and if so, ignores the second request. This prevents
1411
1642
  # clients from accidentally creating duplicate commitments.
1412
1643
  #
1413
1644
  # The request ID must be a valid UUID with the exception that zero UUID is
1414
1645
  # not supported (00000000-0000-0000-0000-000000000000).
1415
1646
  # @param validate_only [::Boolean]
1416
- # Optional. If set, performs request validation (e.g. permission checks and
1417
- # any other type of validation), but do not actually execute the create
1418
- # request.
1647
+ # Optional. If set, performs request validation, for example, permission
1648
+ # checks and any other type of validation, but does not actually execute the
1649
+ # create request.
1419
1650
  #
1420
1651
  # @yield [response, operation] Access the result along with the RPC operation
1421
1652
  # @yieldparam response [::Gapic::Operation]
@@ -1517,22 +1748,22 @@ module Google
1517
1748
  # Required. The resource being created
1518
1749
  # @param request_id [::String]
1519
1750
  # Optional. An optional request ID to identify requests. Specify a unique
1520
- # request ID so that if you must retry your request, the server will know to
1521
- # ignore the request if it has already been completed. The server will
1522
- # guarantee that for at least 60 minutes since the first request.
1751
+ # request ID so that if you must retry your request, the server ignores the
1752
+ # request if it has already been completed. The server guarantees that for at
1753
+ # least 60 minutes since the first request.
1523
1754
  #
1524
1755
  # For example, consider a situation where you make an initial request and
1525
1756
  # the request times out. If you make the request again with the same request
1526
- # ID, the server can check if original operation with the same request ID
1527
- # was received, and if so, will ignore the second request. This prevents
1757
+ # ID, the server can check if the original operation with the same request ID
1758
+ # was received, and if so, ignores the second request. This prevents
1528
1759
  # clients from accidentally creating duplicate commitments.
1529
1760
  #
1530
1761
  # The request ID must be a valid UUID with the exception that zero UUID is
1531
1762
  # not supported (00000000-0000-0000-0000-000000000000).
1532
1763
  # @param validate_only [::Boolean]
1533
- # Optional. If set, performs request validation (e.g. permission checks and
1534
- # any other type of validation), but do not actually execute the create
1535
- # request.
1764
+ # Optional. If set, performs request validation, for example, permission
1765
+ # checks and any other type of validation, but does not actually execute the
1766
+ # create request.
1536
1767
  #
1537
1768
  # @yield [response, operation] Access the result along with the RPC operation
1538
1769
  # @yieldparam response [::Gapic::Operation]
@@ -1640,14 +1871,14 @@ module Google
1640
1871
  # Required. Resources being created.
1641
1872
  # @param request_id [::String]
1642
1873
  # Optional. An optional request ID to identify requests. Specify a unique
1643
- # request ID so that if you must retry your request, the server will know to
1644
- # ignore the request if it has already been completed. The server will
1645
- # guarantee that for at least 60 minutes since the first request.
1874
+ # request ID so that if you must retry your request, the server ignores the
1875
+ # request if it has already been completed. The server guarantees that for at
1876
+ # least 60 minutes since the first request.
1646
1877
  #
1647
1878
  # For example, consider a situation where you make an initial request and
1648
1879
  # the request times out. If you make the request again with the same request
1649
- # ID, the server can check if original operation with the same request ID
1650
- # was received, and if so, will ignore the second request. This prevents
1880
+ # ID, the server can check if the original operation with the same request ID
1881
+ # was received, and if so, ignores the second request. This prevents
1651
1882
  # clients from accidentally creating duplicate commitments.
1652
1883
  #
1653
1884
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -1754,22 +1985,22 @@ module Google
1754
1985
  # Required. The resource being updated
1755
1986
  # @param request_id [::String]
1756
1987
  # Optional. An optional request ID to identify requests. Specify a unique
1757
- # request ID so that if you must retry your request, the server will know to
1758
- # ignore the request if it has already been completed. The server will
1759
- # guarantee that for at least 60 minutes since the first request.
1988
+ # request ID so that if you must retry your request, the server ignores the
1989
+ # request if it has already been completed. The server guarantees that for at
1990
+ # least 60 minutes since the first request.
1760
1991
  #
1761
1992
  # For example, consider a situation where you make an initial request and
1762
1993
  # the request times out. If you make the request again with the same request
1763
- # ID, the server can check if original operation with the same request ID
1764
- # was received, and if so, will ignore the second request. This prevents
1994
+ # ID, the server can check if the original operation with the same request ID
1995
+ # was received, and if so, ignores the second request. This prevents
1765
1996
  # clients from accidentally creating duplicate commitments.
1766
1997
  #
1767
1998
  # The request ID must be a valid UUID with the exception that zero UUID is
1768
1999
  # not supported (00000000-0000-0000-0000-000000000000).
1769
2000
  # @param validate_only [::Boolean]
1770
- # Optional. If set, performs request validation (e.g. permission checks and
1771
- # any other type of validation), but do not actually execute the update
1772
- # request.
2001
+ # Optional. If set, performs request validation, for example, permission
2002
+ # checks and any other type of validation, but does not actually execute the
2003
+ # create request.
1773
2004
  # @param allow_missing [::Boolean]
1774
2005
  # Optional. If set to true, update succeeds even if instance is not found. In
1775
2006
  # that case, a new instance is created and `update_mask` is ignored.
@@ -1870,14 +2101,14 @@ module Google
1870
2101
  # comment on the Instance.name field.
1871
2102
  # @param request_id [::String]
1872
2103
  # Optional. An optional request ID to identify requests. Specify a unique
1873
- # request ID so that if you must retry your request, the server will know to
1874
- # ignore the request if it has already been completed. The server will
1875
- # guarantee that for at least 60 minutes after the first request.
2104
+ # request ID so that if you must retry your request, the server ignores the
2105
+ # request if it has already been completed. The server guarantees that for at
2106
+ # least 60 minutes since the first request.
1876
2107
  #
1877
2108
  # For example, consider a situation where you make an initial request and
1878
2109
  # the request times out. If you make the request again with the same request
1879
- # ID, the server can check if original operation with the same request ID
1880
- # was received, and if so, will ignore the second request. This prevents
2110
+ # ID, the server can check if the original operation with the same request ID
2111
+ # was received, and if so, ignores the second request. This prevents
1881
2112
  # clients from accidentally creating duplicate commitments.
1882
2113
  #
1883
2114
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -1887,8 +2118,9 @@ module Google
1887
2118
  # If an etag is provided and does not match the current etag of the Instance,
1888
2119
  # deletion will be blocked and an ABORTED error will be returned.
1889
2120
  # @param validate_only [::Boolean]
1890
- # Optional. If set, performs request validation (e.g. permission checks and
1891
- # any other type of validation), but do not actually execute the delete.
2121
+ # Optional. If set, performs request validation, for example, permission
2122
+ # checks and any other type of validation, but does not actually execute the
2123
+ # create request.
1892
2124
  #
1893
2125
  # @yield [response, operation] Access the result along with the RPC operation
1894
2126
  # @yieldparam response [::Gapic::Operation]
@@ -1988,21 +2220,22 @@ module Google
1988
2220
  # comment on the Instance.name field.
1989
2221
  # @param request_id [::String]
1990
2222
  # Optional. An optional request ID to identify requests. Specify a unique
1991
- # request ID so that if you must retry your request, the server will know to
1992
- # ignore the request if it has already been completed. The server will
1993
- # guarantee that for at least 60 minutes after the first request.
2223
+ # request ID so that if you must retry your request, the server ignores the
2224
+ # request if it has already been completed. The server guarantees that for at
2225
+ # least 60 minutes since the first request.
1994
2226
  #
1995
2227
  # For example, consider a situation where you make an initial request and
1996
2228
  # the request times out. If you make the request again with the same request
1997
- # ID, the server can check if original operation with the same request ID
1998
- # was received, and if so, will ignore the second request. This prevents
2229
+ # ID, the server can check if the original operation with the same request ID
2230
+ # was received, and if so, ignores the second request. This prevents
1999
2231
  # clients from accidentally creating duplicate commitments.
2000
2232
  #
2001
2233
  # The request ID must be a valid UUID with the exception that zero UUID is
2002
2234
  # not supported (00000000-0000-0000-0000-000000000000).
2003
2235
  # @param validate_only [::Boolean]
2004
- # Optional. If set, performs request validation (e.g. permission checks and
2005
- # any other type of validation), but do not actually execute the failover.
2236
+ # Optional. If set, performs request validation, for example, permission
2237
+ # checks and any other type of validation, but does not actually execute the
2238
+ # create request.
2006
2239
  #
2007
2240
  # @yield [response, operation] Access the result along with the RPC operation
2008
2241
  # @yieldparam response [::Gapic::Operation]
@@ -2103,22 +2336,22 @@ module Google
2103
2336
  # comment on the Instance.name field.
2104
2337
  # @param request_id [::String]
2105
2338
  # Optional. An optional request ID to identify requests. Specify a unique
2106
- # request ID so that if you must retry your request, the server will know to
2107
- # ignore the request if it has already been completed. The server will
2108
- # guarantee that for at least 60 minutes after the first request.
2339
+ # request ID so that if you must retry your request, the server ignores the
2340
+ # request if it has already been completed. The server guarantees that for at
2341
+ # least 60 minutes since the first request.
2109
2342
  #
2110
2343
  # For example, consider a situation where you make an initial request and
2111
2344
  # the request times out. If you make the request again with the same request
2112
- # ID, the server can check if original operation with the same request ID
2113
- # was received, and if so, will ignore the second request. This prevents
2345
+ # ID, the server can check if the original operation with the same request ID
2346
+ # was received, and if so, ignores the second request. This prevents
2114
2347
  # clients from accidentally creating duplicate commitments.
2115
2348
  #
2116
2349
  # The request ID must be a valid UUID with the exception that zero UUID is
2117
2350
  # not supported (00000000-0000-0000-0000-000000000000).
2118
2351
  # @param validate_only [::Boolean]
2119
- # Optional. If set, performs request validation (e.g. permission checks and
2120
- # any other type of validation), but do not actually execute the fault
2121
- # injection.
2352
+ # Optional. If set, performs request validation, for example, permission
2353
+ # checks and any other type of validation, but does not actually execute the
2354
+ # create request.
2122
2355
  #
2123
2356
  # @yield [response, operation] Access the result along with the RPC operation
2124
2357
  # @yieldparam response [::Gapic::Operation]
@@ -2207,7 +2440,7 @@ module Google
2207
2440
  # @param options [::Gapic::CallOptions, ::Hash]
2208
2441
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2209
2442
  #
2210
- # @overload restart_instance(name: nil, request_id: nil, validate_only: nil)
2443
+ # @overload restart_instance(name: nil, request_id: nil, validate_only: nil, node_ids: nil)
2211
2444
  # Pass arguments to `restart_instance` via keyword arguments. Note that at
2212
2445
  # least one keyword argument is required. To specify no parameters, or to keep all
2213
2446
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2217,21 +2450,25 @@ module Google
2217
2450
  # comment on the Instance.name field.
2218
2451
  # @param request_id [::String]
2219
2452
  # Optional. An optional request ID to identify requests. Specify a unique
2220
- # request ID so that if you must retry your request, the server will know to
2221
- # ignore the request if it has already been completed. The server will
2222
- # guarantee that for at least 60 minutes after the first request.
2453
+ # request ID so that if you must retry your request, the server ignores the
2454
+ # request if it has already been completed. The server guarantees that for at
2455
+ # least 60 minutes since the first request.
2223
2456
  #
2224
2457
  # For example, consider a situation where you make an initial request and
2225
2458
  # the request times out. If you make the request again with the same request
2226
- # ID, the server can check if original operation with the same request ID
2227
- # was received, and if so, will ignore the second request. This prevents
2459
+ # ID, the server can check if the original operation with the same request ID
2460
+ # was received, and if so, ignores the second request. This prevents
2228
2461
  # clients from accidentally creating duplicate commitments.
2229
2462
  #
2230
2463
  # The request ID must be a valid UUID with the exception that zero UUID is
2231
2464
  # not supported (00000000-0000-0000-0000-000000000000).
2232
2465
  # @param validate_only [::Boolean]
2233
- # Optional. If set, performs request validation (e.g. permission checks and
2234
- # any other type of validation), but do not actually execute the restart.
2466
+ # Optional. If set, performs request validation, for example, permission
2467
+ # checks and any other type of validation, but does not actually execute the
2468
+ # create request.
2469
+ # @param node_ids [::Array<::String>]
2470
+ # Optional. Full name of the nodes as obtained from INSTANCE_VIEW_FULL to
2471
+ # restart upon. Applicable only to read instances.
2235
2472
  #
2236
2473
  # @yield [response, operation] Access the result along with the RPC operation
2237
2474
  # @yieldparam response [::Gapic::Operation]
@@ -2306,6 +2543,106 @@ module Google
2306
2543
  raise ::Google::Cloud::Error.from_error(e)
2307
2544
  end
2308
2545
 
2546
+ ##
2547
+ # Executes a SQL statement in a database inside an AlloyDB instance.
2548
+ #
2549
+ # @overload execute_sql(request, options = nil)
2550
+ # Pass arguments to `execute_sql` via a request object, either of type
2551
+ # {::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlRequest} or an equivalent Hash.
2552
+ #
2553
+ # @param request [::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlRequest, ::Hash]
2554
+ # A request object representing the call parameters. Required. To specify no
2555
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2556
+ # @param options [::Gapic::CallOptions, ::Hash]
2557
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2558
+ #
2559
+ # @overload execute_sql(password: nil, instance: nil, database: nil, user: nil, sql_statement: nil)
2560
+ # Pass arguments to `execute_sql` via keyword arguments. Note that at
2561
+ # least one keyword argument is required. To specify no parameters, or to keep all
2562
+ # the default parameter values, pass an empty Hash as a request object (see above).
2563
+ #
2564
+ # @param password [::String]
2565
+ # Optional. The database native user’s password.
2566
+ # @param instance [::String]
2567
+ # Required. The instance where the SQL will be executed. For the required
2568
+ # format, see the comment on the Instance.name field.
2569
+ # @param database [::String]
2570
+ # Required. Name of the database where the query will be executed.
2571
+ # Note - Value provided should be the same as expected from `SELECT
2572
+ # current_database();` and NOT as a resource reference.
2573
+ # @param user [::String]
2574
+ # Required. Database user to be used for executing the SQL.
2575
+ # Note - Value provided should be the same as expected from
2576
+ # `SELECT current_user;` and NOT as a resource reference.
2577
+ # @param sql_statement [::String]
2578
+ # Required. SQL statement to execute on database. Any valid statement is
2579
+ # permitted, including DDL, DML, DQL statements.
2580
+ #
2581
+ # @yield [response, operation] Access the result along with the RPC operation
2582
+ # @yieldparam response [::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlResponse]
2583
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2584
+ #
2585
+ # @return [::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlResponse]
2586
+ #
2587
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2588
+ #
2589
+ # @example Basic example
2590
+ # require "google/cloud/alloy_db/v1alpha"
2591
+ #
2592
+ # # Create a client object. The client can be reused for multiple calls.
2593
+ # client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Client.new
2594
+ #
2595
+ # # Create a request. To set request fields, pass in keyword arguments.
2596
+ # request = Google::Cloud::AlloyDB::V1alpha::ExecuteSqlRequest.new
2597
+ #
2598
+ # # Call the execute_sql method.
2599
+ # result = client.execute_sql request
2600
+ #
2601
+ # # The returned object is of type Google::Cloud::AlloyDB::V1alpha::ExecuteSqlResponse.
2602
+ # p result
2603
+ #
2604
+ def execute_sql request, options = nil
2605
+ raise ::ArgumentError, "request must be provided" if request.nil?
2606
+
2607
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlRequest
2608
+
2609
+ # Converts hash and nil to an options object
2610
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2611
+
2612
+ # Customize the options with defaults
2613
+ metadata = @config.rpcs.execute_sql.metadata.to_h
2614
+
2615
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2616
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2617
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2618
+ gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION
2619
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2620
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2621
+
2622
+ header_params = {}
2623
+ if request.instance
2624
+ header_params["instance"] = request.instance
2625
+ end
2626
+
2627
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2628
+ metadata[:"x-goog-request-params"] ||= request_params_header
2629
+
2630
+ options.apply_defaults timeout: @config.rpcs.execute_sql.timeout,
2631
+ metadata: metadata,
2632
+ retry_policy: @config.rpcs.execute_sql.retry_policy
2633
+
2634
+ options.apply_defaults timeout: @config.timeout,
2635
+ metadata: @config.metadata,
2636
+ retry_policy: @config.retry_policy
2637
+
2638
+ @alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
2639
+ yield response, operation if block_given?
2640
+ return response
2641
+ end
2642
+ rescue ::GRPC::BadStatus => e
2643
+ raise ::Google::Cloud::Error.from_error(e)
2644
+ end
2645
+
2309
2646
  ##
2310
2647
  # Lists Backups in a given project and location.
2311
2648
  #
@@ -2518,14 +2855,14 @@ module Google
2518
2855
  # Required. The resource being created
2519
2856
  # @param request_id [::String]
2520
2857
  # Optional. An optional request ID to identify requests. Specify a unique
2521
- # request ID so that if you must retry your request, the server will know to
2522
- # ignore the request if it has already been completed. The server will
2523
- # guarantee that for at least 60 minutes since the first request.
2858
+ # request ID so that if you must retry your request, the server ignores the
2859
+ # request if it has already been completed. The server guarantees that for at
2860
+ # least 60 minutes since the first request.
2524
2861
  #
2525
2862
  # For example, consider a situation where you make an initial request and
2526
2863
  # the request times out. If you make the request again with the same request
2527
- # ID, the server can check if original operation with the same request ID
2528
- # was received, and if so, will ignore the second request. This prevents
2864
+ # ID, the server can check if the original operation with the same request ID
2865
+ # was received, and if so, ignores the second request. This prevents
2529
2866
  # clients from accidentally creating duplicate commitments.
2530
2867
  #
2531
2868
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -2635,14 +2972,14 @@ module Google
2635
2972
  # Required. The resource being updated
2636
2973
  # @param request_id [::String]
2637
2974
  # Optional. An optional request ID to identify requests. Specify a unique
2638
- # request ID so that if you must retry your request, the server will know to
2639
- # ignore the request if it has already been completed. The server will
2640
- # guarantee that for at least 60 minutes since the first request.
2975
+ # request ID so that if you must retry your request, the server ignores the
2976
+ # request if it has already been completed. The server guarantees that for at
2977
+ # least 60 minutes since the first request.
2641
2978
  #
2642
2979
  # For example, consider a situation where you make an initial request and
2643
2980
  # the request times out. If you make the request again with the same request
2644
- # ID, the server can check if original operation with the same request ID
2645
- # was received, and if so, will ignore the second request. This prevents
2981
+ # ID, the server can check if the original operation with the same request ID
2982
+ # was received, and if so, ignores the second request. This prevents
2646
2983
  # clients from accidentally creating duplicate commitments.
2647
2984
  #
2648
2985
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -2750,14 +3087,14 @@ module Google
2750
3087
  # the Backup.name field.
2751
3088
  # @param request_id [::String]
2752
3089
  # Optional. An optional request ID to identify requests. Specify a unique
2753
- # request ID so that if you must retry your request, the server will know to
2754
- # ignore the request if it has already been completed. The server will
2755
- # guarantee that for at least 60 minutes after the first request.
3090
+ # request ID so that if you must retry your request, the server ignores the
3091
+ # request if it has already been completed. The server guarantees that for at
3092
+ # least 60 minutes since the first request.
2756
3093
  #
2757
3094
  # For example, consider a situation where you make an initial request and
2758
3095
  # the request times out. If you make the request again with the same request
2759
- # ID, the server can check if original operation with the same request ID
2760
- # was received, and if so, will ignore the second request. This prevents
3096
+ # ID, the server can check if the original operation with the same request ID
3097
+ # was received, and if so, ignores the second request. This prevents
2761
3098
  # clients from accidentally creating duplicate commitments.
2762
3099
  #
2763
3100
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -2972,14 +3309,14 @@ module Google
2972
3309
  # * projects/\\{project}/locations/\\{location}/clusters/\\{cluster}
2973
3310
  # @param request_id [::String]
2974
3311
  # Optional. An optional request ID to identify requests. Specify a unique
2975
- # request ID so that if you must retry your request, the server will know to
2976
- # ignore the request if it has already been completed. The server will
2977
- # guarantee that for at least 60 minutes after the first request.
3312
+ # request ID so that if you must retry your request, the server ignores the
3313
+ # request if it has already been completed. The server guarantees that for at
3314
+ # least 60 minutes since the first request.
2978
3315
  #
2979
3316
  # For example, consider a situation where you make an initial request and
2980
3317
  # the request times out. If you make the request again with the same request
2981
- # ID, the server can check if original operation with the same request ID
2982
- # was received, and if so, will ignore the second request. This prevents
3318
+ # ID, the server can check if the original operation with the same request ID
3319
+ # was received, and if so, ignores the second request. This prevents
2983
3320
  # clients from accidentally creating duplicate commitments.
2984
3321
  #
2985
3322
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -3088,14 +3425,14 @@ module Google
3088
3425
  # projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/instances/\\{instance}
3089
3426
  # @param request_id [::String]
3090
3427
  # Optional. An optional request ID to identify requests. Specify a unique
3091
- # request ID so that if you must retry your request, the server will know to
3092
- # ignore the request if it has already been completed. The server will
3093
- # guarantee that for at least 60 minutes after the first request.
3428
+ # request ID so that if you must retry your request, the server ignores the
3429
+ # request if it has already been completed. The server guarantees that for at
3430
+ # least 60 minutes since the first request.
3094
3431
  #
3095
3432
  # For example, consider a situation where you make an initial request and
3096
3433
  # the request times out. If you make the request again with the same request
3097
- # ID, the server can check if original operation with the same request ID
3098
- # was received, and if so, will ignore the second request. This prevents
3434
+ # ID, the server can check if the original operation with the same request ID
3435
+ # was received, and if so, ignores the second request. This prevents
3099
3436
  # clients from accidentally creating duplicate commitments.
3100
3437
  #
3101
3438
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -3379,14 +3716,14 @@ module Google
3379
3716
  # Required. The resource being created
3380
3717
  # @param request_id [::String]
3381
3718
  # Optional. An optional request ID to identify requests. Specify a unique
3382
- # request ID so that if you must retry your request, the server will know to
3383
- # ignore the request if it has already been completed. The server will
3384
- # guarantee that for at least 60 minutes since the first request.
3719
+ # request ID so that if you must retry your request, the server ignores the
3720
+ # request if it has already been completed. The server guarantees that for at
3721
+ # least 60 minutes since the first request.
3385
3722
  #
3386
3723
  # For example, consider a situation where you make an initial request and
3387
3724
  # the request times out. If you make the request again with the same request
3388
- # ID, the server can check if original operation with the same request ID
3389
- # was received, and if so, will ignore the second request. This prevents
3725
+ # ID, the server can check if the original operation with the same request ID
3726
+ # was received, and if so, ignores the second request. This prevents
3390
3727
  # clients from accidentally creating duplicate commitments.
3391
3728
  #
3392
3729
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -3488,14 +3825,14 @@ module Google
3488
3825
  # Required. The resource being updated
3489
3826
  # @param request_id [::String]
3490
3827
  # Optional. An optional request ID to identify requests. Specify a unique
3491
- # request ID so that if you must retry your request, the server will know to
3492
- # ignore the request if it has already been completed. The server will
3493
- # guarantee that for at least 60 minutes since the first request.
3828
+ # request ID so that if you must retry your request, the server ignores the
3829
+ # request if it has already been completed. The server guarantees that for at
3830
+ # least 60 minutes since the first request.
3494
3831
  #
3495
3832
  # For example, consider a situation where you make an initial request and
3496
3833
  # the request times out. If you make the request again with the same request
3497
- # ID, the server can check if original operation with the same request ID
3498
- # was received, and if so, will ignore the second request. This prevents
3834
+ # ID, the server can check if the original operation with the same request ID
3835
+ # was received, and if so, ignores the second request. This prevents
3499
3836
  # clients from accidentally creating duplicate commitments.
3500
3837
  #
3501
3838
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -3594,14 +3931,14 @@ module Google
3594
3931
  # comment on the User.name field.
3595
3932
  # @param request_id [::String]
3596
3933
  # Optional. An optional request ID to identify requests. Specify a unique
3597
- # request ID so that if you must retry your request, the server will know to
3598
- # ignore the request if it has already been completed. The server will
3599
- # guarantee that for at least 60 minutes after the first request.
3934
+ # request ID so that if you must retry your request, the server ignores the
3935
+ # request if it has already been completed. The server guarantees that for at
3936
+ # least 60 minutes since the first request.
3600
3937
  #
3601
3938
  # For example, consider a situation where you make an initial request and
3602
3939
  # the request times out. If you make the request again with the same request
3603
- # ID, the server can check if original operation with the same request ID
3604
- # was received, and if so, will ignore the second request. This prevents
3940
+ # ID, the server can check if the original operation with the same request ID
3941
+ # was received, and if so, ignores the second request. This prevents
3605
3942
  # clients from accidentally creating duplicate commitments.
3606
3943
  #
3607
3944
  # The request ID must be a valid UUID with the exception that zero UUID is
@@ -3697,9 +4034,9 @@ module Google
3697
4034
  # Required. Parent value for ListDatabasesRequest.
3698
4035
  # @param page_size [::Integer]
3699
4036
  # Optional. The maximum number of databases to return. The service may return
3700
- # fewer than this value. If unspecified, an appropriate number of databases
3701
- # will be returned. The max value will be 2000, values above max will be
3702
- # coerced to max.
4037
+ # fewer than this value. If unspecified, 2000 is the default page_size. The
4038
+ # max value of page_size will be 4000, values above max will be coerced to
4039
+ # max.
3703
4040
  # @param page_token [::String]
3704
4041
  # Optional. A page token, received from a previous `ListDatabases` call.
3705
4042
  # This should be provided to retrieve the subsequent page.
@@ -3952,6 +4289,11 @@ module Google
3952
4289
  #
3953
4290
  attr_reader :update_cluster
3954
4291
  ##
4292
+ # RPC-specific configuration for `upgrade_cluster`
4293
+ # @return [::Gapic::Config::Method]
4294
+ #
4295
+ attr_reader :upgrade_cluster
4296
+ ##
3955
4297
  # RPC-specific configuration for `delete_cluster`
3956
4298
  # @return [::Gapic::Config::Method]
3957
4299
  #
@@ -3962,6 +4304,11 @@ module Google
3962
4304
  #
3963
4305
  attr_reader :promote_cluster
3964
4306
  ##
4307
+ # RPC-specific configuration for `switchover_cluster`
4308
+ # @return [::Gapic::Config::Method]
4309
+ #
4310
+ attr_reader :switchover_cluster
4311
+ ##
3965
4312
  # RPC-specific configuration for `restore_cluster`
3966
4313
  # @return [::Gapic::Config::Method]
3967
4314
  #
@@ -4022,6 +4369,11 @@ module Google
4022
4369
  #
4023
4370
  attr_reader :restart_instance
4024
4371
  ##
4372
+ # RPC-specific configuration for `execute_sql`
4373
+ # @return [::Gapic::Config::Method]
4374
+ #
4375
+ attr_reader :execute_sql
4376
+ ##
4025
4377
  # RPC-specific configuration for `list_backups`
4026
4378
  # @return [::Gapic::Config::Method]
4027
4379
  #
@@ -4102,10 +4454,14 @@ module Google
4102
4454
  @create_cluster = ::Gapic::Config::Method.new create_cluster_config
4103
4455
  update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
4104
4456
  @update_cluster = ::Gapic::Config::Method.new update_cluster_config
4457
+ upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
4458
+ @upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
4105
4459
  delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
4106
4460
  @delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
4107
4461
  promote_cluster_config = parent_rpcs.promote_cluster if parent_rpcs.respond_to? :promote_cluster
4108
4462
  @promote_cluster = ::Gapic::Config::Method.new promote_cluster_config
4463
+ switchover_cluster_config = parent_rpcs.switchover_cluster if parent_rpcs.respond_to? :switchover_cluster
4464
+ @switchover_cluster = ::Gapic::Config::Method.new switchover_cluster_config
4109
4465
  restore_cluster_config = parent_rpcs.restore_cluster if parent_rpcs.respond_to? :restore_cluster
4110
4466
  @restore_cluster = ::Gapic::Config::Method.new restore_cluster_config
4111
4467
  create_secondary_cluster_config = parent_rpcs.create_secondary_cluster if parent_rpcs.respond_to? :create_secondary_cluster
@@ -4130,6 +4486,8 @@ module Google
4130
4486
  @inject_fault = ::Gapic::Config::Method.new inject_fault_config
4131
4487
  restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
4132
4488
  @restart_instance = ::Gapic::Config::Method.new restart_instance_config
4489
+ execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql
4490
+ @execute_sql = ::Gapic::Config::Method.new execute_sql_config
4133
4491
  list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
4134
4492
  @list_backups = ::Gapic::Config::Method.new list_backups_config
4135
4493
  get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup