google-cloud-alloy_db-v1 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +490 -143
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +469 -143
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub.rb +179 -0
- data/lib/google/cloud/alloy_db/v1/version.rb +1 -1
- data/lib/google/cloud/alloydb/v1/data_model_pb.rb +45 -0
- data/lib/google/cloud/alloydb/v1/resources_pb.rb +12 -1
- data/lib/google/cloud/alloydb/v1/service_pb.rb +11 -1
- data/lib/google/cloud/alloydb/v1/service_services_pb.rb +8 -0
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/cloud/alloydb/v1/data_model.rb +75 -0
- data/proto_docs/google/cloud/alloydb/v1/resources.rb +241 -6
- data/proto_docs/google/cloud/alloydb/v1/service.rb +304 -143
- metadata +6 -3
@@ -453,22 +453,22 @@ module Google
|
|
453
453
|
# Required. The resource being created
|
454
454
|
# @param request_id [::String]
|
455
455
|
# Optional. An optional request ID to identify requests. Specify a unique
|
456
|
-
# request ID so that if you must retry your request, the server
|
457
|
-
#
|
458
|
-
#
|
456
|
+
# request ID so that if you must retry your request, the server ignores the
|
457
|
+
# request if it has already been completed. The server guarantees that for at
|
458
|
+
# least 60 minutes since the first request.
|
459
459
|
#
|
460
460
|
# For example, consider a situation where you make an initial request and
|
461
461
|
# the request times out. If you make the request again with the same request
|
462
|
-
# ID, the server can check if original operation with the same request ID
|
463
|
-
# was received, and if so,
|
462
|
+
# ID, the server can check if the original operation with the same request ID
|
463
|
+
# was received, and if so, ignores the second request. This prevents
|
464
464
|
# clients from accidentally creating duplicate commitments.
|
465
465
|
#
|
466
466
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
467
467
|
# not supported (00000000-0000-0000-0000-000000000000).
|
468
468
|
# @param validate_only [::Boolean]
|
469
|
-
# Optional. If set, performs request validation
|
470
|
-
# any other type of validation
|
471
|
-
# request.
|
469
|
+
# Optional. If set, performs request validation, for example, permission
|
470
|
+
# checks and any other type of validation, but does not actually execute the
|
471
|
+
# create request.
|
472
472
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
473
473
|
# @yieldparam result [::Gapic::Operation]
|
474
474
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -564,22 +564,22 @@ module Google
|
|
564
564
|
# Required. The resource being updated
|
565
565
|
# @param request_id [::String]
|
566
566
|
# Optional. An optional request ID to identify requests. Specify a unique
|
567
|
-
# request ID so that if you must retry your request, the server
|
568
|
-
#
|
569
|
-
#
|
567
|
+
# request ID so that if you must retry your request, the server ignores the
|
568
|
+
# request if it has already been completed. The server guarantees that for at
|
569
|
+
# least 60 minutes since the first request.
|
570
570
|
#
|
571
571
|
# For example, consider a situation where you make an initial request and
|
572
572
|
# the request times out. If you make the request again with the same request
|
573
|
-
# ID, the server can check if original operation with the same request ID
|
574
|
-
# was received, and if so,
|
573
|
+
# ID, the server can check if the original operation with the same request ID
|
574
|
+
# was received, and if so, ignores the second request. This prevents
|
575
575
|
# clients from accidentally creating duplicate commitments.
|
576
576
|
#
|
577
577
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
578
578
|
# not supported (00000000-0000-0000-0000-000000000000).
|
579
579
|
# @param validate_only [::Boolean]
|
580
|
-
# Optional. If set, performs request validation
|
581
|
-
# any other type of validation
|
582
|
-
# request.
|
580
|
+
# Optional. If set, performs request validation, for example, permission
|
581
|
+
# checks and any other type of validation, but does not actually execute the
|
582
|
+
# create request.
|
583
583
|
# @param allow_missing [::Boolean]
|
584
584
|
# Optional. If set to true, update succeeds even if cluster is not found. In
|
585
585
|
# that case, a new cluster is created and `update_mask` is ignored.
|
@@ -673,14 +673,14 @@ module Google
|
|
673
673
|
# comment on the Cluster.name field.
|
674
674
|
# @param request_id [::String]
|
675
675
|
# Optional. An optional request ID to identify requests. Specify a unique
|
676
|
-
# request ID so that if you must retry your request, the server
|
677
|
-
#
|
678
|
-
#
|
676
|
+
# request ID so that if you must retry your request, the server ignores the
|
677
|
+
# request if it has already been completed. The server guarantees that for at
|
678
|
+
# least 60 minutes since the first request.
|
679
679
|
#
|
680
680
|
# For example, consider a situation where you make an initial request and
|
681
681
|
# the request times out. If you make the request again with the same request
|
682
|
-
# ID, the server can check if original operation with the same request ID
|
683
|
-
# was received, and if so,
|
682
|
+
# ID, the server can check if the original operation with the same request ID
|
683
|
+
# was received, and if so, ignores the second request. This prevents
|
684
684
|
# clients from accidentally creating duplicate commitments.
|
685
685
|
#
|
686
686
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -690,8 +690,9 @@ module Google
|
|
690
690
|
# If an etag is provided and does not match the current etag of the Cluster,
|
691
691
|
# deletion will be blocked and an ABORTED error will be returned.
|
692
692
|
# @param validate_only [::Boolean]
|
693
|
-
# Optional. If set, performs request validation
|
694
|
-
# any other type of validation
|
693
|
+
# Optional. If set, performs request validation, for example, permission
|
694
|
+
# checks and any other type of validation, but does not actually execute the
|
695
|
+
# create request.
|
695
696
|
# @param force [::Boolean]
|
696
697
|
# Optional. Whether to cascade delete child instances for given cluster.
|
697
698
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
@@ -787,9 +788,9 @@ module Google
|
|
787
788
|
# comment on the Cluster.name field
|
788
789
|
# @param request_id [::String]
|
789
790
|
# Optional. An optional request ID to identify requests. Specify a unique
|
790
|
-
# request ID so that if you must retry your request, the server
|
791
|
-
#
|
792
|
-
#
|
791
|
+
# request ID so that if you must retry your request, the server ignores the
|
792
|
+
# request if it has already been completed. The server guarantees that for at
|
793
|
+
# least 60 minutes since the first request.
|
793
794
|
#
|
794
795
|
# For example, consider a situation where you make an initial request and
|
795
796
|
# the request times out. If you make the request again with the same request
|
@@ -804,8 +805,9 @@ module Google
|
|
804
805
|
# If an etag is provided and does not match the current etag of the Cluster,
|
805
806
|
# deletion will be blocked and an ABORTED error will be returned.
|
806
807
|
# @param validate_only [::Boolean]
|
807
|
-
# Optional. If set, performs request validation
|
808
|
-
# any other type of validation
|
808
|
+
# Optional. If set, performs request validation, for example, permission
|
809
|
+
# checks and any other type of validation, but does not actually execute the
|
810
|
+
# create request.
|
809
811
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
810
812
|
# @yieldparam result [::Gapic::Operation]
|
811
813
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -873,6 +875,114 @@ module Google
|
|
873
875
|
raise ::Google::Cloud::Error.from_error(e)
|
874
876
|
end
|
875
877
|
|
878
|
+
##
|
879
|
+
# Switches the roles of PRIMARY and SECONDARY clusters without any data loss.
|
880
|
+
# This promotes the SECONDARY cluster to PRIMARY and sets up the original
|
881
|
+
# PRIMARY cluster to replicate from this newly promoted cluster.
|
882
|
+
#
|
883
|
+
# @overload switchover_cluster(request, options = nil)
|
884
|
+
# Pass arguments to `switchover_cluster` via a request object, either of type
|
885
|
+
# {::Google::Cloud::AlloyDB::V1::SwitchoverClusterRequest} or an equivalent Hash.
|
886
|
+
#
|
887
|
+
# @param request [::Google::Cloud::AlloyDB::V1::SwitchoverClusterRequest, ::Hash]
|
888
|
+
# A request object representing the call parameters. Required. To specify no
|
889
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
890
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
891
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
892
|
+
#
|
893
|
+
# @overload switchover_cluster(name: nil, request_id: nil, validate_only: nil)
|
894
|
+
# Pass arguments to `switchover_cluster` via keyword arguments. Note that at
|
895
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
896
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
897
|
+
#
|
898
|
+
# @param name [::String]
|
899
|
+
# Required. The name of the resource. For the required format, see the
|
900
|
+
# comment on the Cluster.name field
|
901
|
+
# @param request_id [::String]
|
902
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
903
|
+
# request ID so that if you must retry your request, the server ignores the
|
904
|
+
# request if it has already been completed. The server guarantees that for at
|
905
|
+
# least 60 minutes since the first request.
|
906
|
+
#
|
907
|
+
# For example, consider a situation where you make an initial request and
|
908
|
+
# the request times out. If you make the request again with the same request
|
909
|
+
# ID, the server can check if the original operation with the same request ID
|
910
|
+
# was received, and if so, ignores the second request. This prevents
|
911
|
+
# clients from accidentally creating duplicate commitments.
|
912
|
+
#
|
913
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
914
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
915
|
+
# @param validate_only [::Boolean]
|
916
|
+
# Optional. If set, performs request validation, for example, permission
|
917
|
+
# checks and any other type of validation, but does not actually execute the
|
918
|
+
# create request.
|
919
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
920
|
+
# @yieldparam result [::Gapic::Operation]
|
921
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
922
|
+
#
|
923
|
+
# @return [::Gapic::Operation]
|
924
|
+
#
|
925
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
926
|
+
#
|
927
|
+
# @example Basic example
|
928
|
+
# require "google/cloud/alloy_db/v1"
|
929
|
+
#
|
930
|
+
# # Create a client object. The client can be reused for multiple calls.
|
931
|
+
# client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
932
|
+
#
|
933
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
934
|
+
# request = Google::Cloud::AlloyDB::V1::SwitchoverClusterRequest.new
|
935
|
+
#
|
936
|
+
# # Call the switchover_cluster method.
|
937
|
+
# result = client.switchover_cluster request
|
938
|
+
#
|
939
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
940
|
+
# # check the status of an operation, cancel it, or wait for results.
|
941
|
+
# # Here is how to wait for a response.
|
942
|
+
# result.wait_until_done! timeout: 60
|
943
|
+
# if result.response?
|
944
|
+
# p result.response
|
945
|
+
# else
|
946
|
+
# puts "No response received."
|
947
|
+
# end
|
948
|
+
#
|
949
|
+
def switchover_cluster request, options = nil
|
950
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
951
|
+
|
952
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::SwitchoverClusterRequest
|
953
|
+
|
954
|
+
# Converts hash and nil to an options object
|
955
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
956
|
+
|
957
|
+
# Customize the options with defaults
|
958
|
+
call_metadata = @config.rpcs.switchover_cluster.metadata.to_h
|
959
|
+
|
960
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
961
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
962
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
963
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
964
|
+
transports_version_send: [:rest]
|
965
|
+
|
966
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
967
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
968
|
+
|
969
|
+
options.apply_defaults timeout: @config.rpcs.switchover_cluster.timeout,
|
970
|
+
metadata: call_metadata,
|
971
|
+
retry_policy: @config.rpcs.switchover_cluster.retry_policy
|
972
|
+
|
973
|
+
options.apply_defaults timeout: @config.timeout,
|
974
|
+
metadata: @config.metadata,
|
975
|
+
retry_policy: @config.retry_policy
|
976
|
+
|
977
|
+
@alloy_db_admin_stub.switchover_cluster request, options do |result, operation|
|
978
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
979
|
+
yield result, operation if block_given?
|
980
|
+
return result
|
981
|
+
end
|
982
|
+
rescue ::Gapic::Rest::Error => e
|
983
|
+
raise ::Google::Cloud::Error.from_error(e)
|
984
|
+
end
|
985
|
+
|
876
986
|
##
|
877
987
|
# Creates a new Cluster in a given project and location, with a volume
|
878
988
|
# restored from the provided source, either a backup ID or a point-in-time
|
@@ -907,22 +1017,22 @@ module Google
|
|
907
1017
|
# Required. The resource being created
|
908
1018
|
# @param request_id [::String]
|
909
1019
|
# Optional. An optional request ID to identify requests. Specify a unique
|
910
|
-
# request ID so that if you must retry your request, the server
|
911
|
-
#
|
912
|
-
#
|
1020
|
+
# request ID so that if you must retry your request, the server ignores the
|
1021
|
+
# request if it has already been completed. The server guarantees that for at
|
1022
|
+
# least 60 minutes since the first request.
|
913
1023
|
#
|
914
1024
|
# For example, consider a situation where you make an initial request and
|
915
1025
|
# the request times out. If you make the request again with the same request
|
916
|
-
# ID, the server can check if original operation with the same request ID
|
917
|
-
# was received, and if so,
|
1026
|
+
# ID, the server can check if the original operation with the same request ID
|
1027
|
+
# was received, and if so, ignores the second request. This prevents
|
918
1028
|
# clients from accidentally creating duplicate commitments.
|
919
1029
|
#
|
920
1030
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
921
1031
|
# not supported (00000000-0000-0000-0000-000000000000).
|
922
1032
|
# @param validate_only [::Boolean]
|
923
|
-
# Optional. If set, performs request validation
|
924
|
-
# any other type of validation
|
925
|
-
# request.
|
1033
|
+
# Optional. If set, performs request validation, for example, permission
|
1034
|
+
# checks and any other type of validation, but does not actually execute the
|
1035
|
+
# create request.
|
926
1036
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
927
1037
|
# @yieldparam result [::Gapic::Operation]
|
928
1038
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1018,22 +1128,22 @@ module Google
|
|
1018
1128
|
# Required. Configuration of the requesting object (the secondary cluster).
|
1019
1129
|
# @param request_id [::String]
|
1020
1130
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1021
|
-
# request ID so that if you must retry your request, the server
|
1022
|
-
#
|
1023
|
-
#
|
1131
|
+
# request ID so that if you must retry your request, the server ignores the
|
1132
|
+
# request if it has already been completed. The server guarantees that for at
|
1133
|
+
# least 60 minutes since the first request.
|
1024
1134
|
#
|
1025
1135
|
# For example, consider a situation where you make an initial request and
|
1026
1136
|
# the request times out. If you make the request again with the same request
|
1027
|
-
# ID, the server can check if original operation with the same request ID
|
1028
|
-
# was received, and if so,
|
1137
|
+
# ID, the server can check if the original operation with the same request ID
|
1138
|
+
# was received, and if so, ignores the second request. This prevents
|
1029
1139
|
# clients from accidentally creating duplicate commitments.
|
1030
1140
|
#
|
1031
1141
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
1032
1142
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1033
1143
|
# @param validate_only [::Boolean]
|
1034
|
-
# Optional. If set, performs request validation
|
1035
|
-
# any other type of validation
|
1036
|
-
# request.
|
1144
|
+
# Optional. If set, performs request validation, for example, permission
|
1145
|
+
# checks and any other type of validation, but does not actually execute the
|
1146
|
+
# create request.
|
1037
1147
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1038
1148
|
# @yieldparam result [::Gapic::Operation]
|
1039
1149
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1307,22 +1417,22 @@ module Google
|
|
1307
1417
|
# Required. The resource being created
|
1308
1418
|
# @param request_id [::String]
|
1309
1419
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1310
|
-
# request ID so that if you must retry your request, the server
|
1311
|
-
#
|
1312
|
-
#
|
1420
|
+
# request ID so that if you must retry your request, the server ignores the
|
1421
|
+
# request if it has already been completed. The server guarantees that for at
|
1422
|
+
# least 60 minutes since the first request.
|
1313
1423
|
#
|
1314
1424
|
# For example, consider a situation where you make an initial request and
|
1315
1425
|
# the request times out. If you make the request again with the same request
|
1316
|
-
# ID, the server can check if original operation with the same request ID
|
1317
|
-
# was received, and if so,
|
1426
|
+
# ID, the server can check if the original operation with the same request ID
|
1427
|
+
# was received, and if so, ignores the second request. This prevents
|
1318
1428
|
# clients from accidentally creating duplicate commitments.
|
1319
1429
|
#
|
1320
1430
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
1321
1431
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1322
1432
|
# @param validate_only [::Boolean]
|
1323
|
-
# Optional. If set, performs request validation
|
1324
|
-
# any other type of validation
|
1325
|
-
# request.
|
1433
|
+
# Optional. If set, performs request validation, for example, permission
|
1434
|
+
# checks and any other type of validation, but does not actually execute the
|
1435
|
+
# create request.
|
1326
1436
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1327
1437
|
# @yieldparam result [::Gapic::Operation]
|
1328
1438
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1417,22 +1527,22 @@ module Google
|
|
1417
1527
|
# Required. The resource being created
|
1418
1528
|
# @param request_id [::String]
|
1419
1529
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1420
|
-
# request ID so that if you must retry your request, the server
|
1421
|
-
#
|
1422
|
-
#
|
1530
|
+
# request ID so that if you must retry your request, the server ignores the
|
1531
|
+
# request if it has already been completed. The server guarantees that for at
|
1532
|
+
# least 60 minutes since the first request.
|
1423
1533
|
#
|
1424
1534
|
# For example, consider a situation where you make an initial request and
|
1425
1535
|
# the request times out. If you make the request again with the same request
|
1426
|
-
# ID, the server can check if original operation with the same request ID
|
1427
|
-
# was received, and if so,
|
1536
|
+
# ID, the server can check if the original operation with the same request ID
|
1537
|
+
# was received, and if so, ignores the second request. This prevents
|
1428
1538
|
# clients from accidentally creating duplicate commitments.
|
1429
1539
|
#
|
1430
1540
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
1431
1541
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1432
1542
|
# @param validate_only [::Boolean]
|
1433
|
-
# Optional. If set, performs request validation
|
1434
|
-
# any other type of validation
|
1435
|
-
# request.
|
1543
|
+
# Optional. If set, performs request validation, for example, permission
|
1544
|
+
# checks and any other type of validation, but does not actually execute the
|
1545
|
+
# create request.
|
1436
1546
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1437
1547
|
# @yieldparam result [::Gapic::Operation]
|
1438
1548
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1533,14 +1643,14 @@ module Google
|
|
1533
1643
|
# Required. Resources being created.
|
1534
1644
|
# @param request_id [::String]
|
1535
1645
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1536
|
-
# request ID so that if you must retry your request, the server
|
1537
|
-
#
|
1538
|
-
#
|
1646
|
+
# request ID so that if you must retry your request, the server ignores the
|
1647
|
+
# request if it has already been completed. The server guarantees that for at
|
1648
|
+
# least 60 minutes since the first request.
|
1539
1649
|
#
|
1540
1650
|
# For example, consider a situation where you make an initial request and
|
1541
1651
|
# the request times out. If you make the request again with the same request
|
1542
|
-
# ID, the server can check if original operation with the same request ID
|
1543
|
-
# was received, and if so,
|
1652
|
+
# ID, the server can check if the original operation with the same request ID
|
1653
|
+
# was received, and if so, ignores the second request. This prevents
|
1544
1654
|
# clients from accidentally creating duplicate commitments.
|
1545
1655
|
#
|
1546
1656
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -1640,22 +1750,22 @@ module Google
|
|
1640
1750
|
# Required. The resource being updated
|
1641
1751
|
# @param request_id [::String]
|
1642
1752
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1643
|
-
# request ID so that if you must retry your request, the server
|
1644
|
-
#
|
1645
|
-
#
|
1753
|
+
# request ID so that if you must retry your request, the server ignores the
|
1754
|
+
# request if it has already been completed. The server guarantees that for at
|
1755
|
+
# least 60 minutes since the first request.
|
1646
1756
|
#
|
1647
1757
|
# For example, consider a situation where you make an initial request and
|
1648
1758
|
# 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,
|
1759
|
+
# ID, the server can check if the original operation with the same request ID
|
1760
|
+
# was received, and if so, ignores the second request. This prevents
|
1651
1761
|
# clients from accidentally creating duplicate commitments.
|
1652
1762
|
#
|
1653
1763
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
1654
1764
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1655
1765
|
# @param validate_only [::Boolean]
|
1656
|
-
# Optional. If set, performs request validation
|
1657
|
-
# any other type of validation
|
1658
|
-
# request.
|
1766
|
+
# Optional. If set, performs request validation, for example, permission
|
1767
|
+
# checks and any other type of validation, but does not actually execute the
|
1768
|
+
# create request.
|
1659
1769
|
# @param allow_missing [::Boolean]
|
1660
1770
|
# Optional. If set to true, update succeeds even if instance is not found. In
|
1661
1771
|
# that case, a new instance is created and `update_mask` is ignored.
|
@@ -1749,14 +1859,14 @@ module Google
|
|
1749
1859
|
# comment on the Instance.name field.
|
1750
1860
|
# @param request_id [::String]
|
1751
1861
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1752
|
-
# request ID so that if you must retry your request, the server
|
1753
|
-
#
|
1754
|
-
#
|
1862
|
+
# request ID so that if you must retry your request, the server ignores the
|
1863
|
+
# request if it has already been completed. The server guarantees that for at
|
1864
|
+
# least 60 minutes since the first request.
|
1755
1865
|
#
|
1756
1866
|
# For example, consider a situation where you make an initial request and
|
1757
1867
|
# the request times out. If you make the request again with the same request
|
1758
|
-
# ID, the server can check if original operation with the same request ID
|
1759
|
-
# was received, and if so,
|
1868
|
+
# ID, the server can check if the original operation with the same request ID
|
1869
|
+
# was received, and if so, ignores the second request. This prevents
|
1760
1870
|
# clients from accidentally creating duplicate commitments.
|
1761
1871
|
#
|
1762
1872
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -1766,8 +1876,9 @@ module Google
|
|
1766
1876
|
# If an etag is provided and does not match the current etag of the Instance,
|
1767
1877
|
# deletion will be blocked and an ABORTED error will be returned.
|
1768
1878
|
# @param validate_only [::Boolean]
|
1769
|
-
# Optional. If set, performs request validation
|
1770
|
-
# any other type of validation
|
1879
|
+
# Optional. If set, performs request validation, for example, permission
|
1880
|
+
# checks and any other type of validation, but does not actually execute the
|
1881
|
+
# create request.
|
1771
1882
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1772
1883
|
# @yieldparam result [::Gapic::Operation]
|
1773
1884
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1860,21 +1971,22 @@ module Google
|
|
1860
1971
|
# comment on the Instance.name field.
|
1861
1972
|
# @param request_id [::String]
|
1862
1973
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1863
|
-
# request ID so that if you must retry your request, the server
|
1864
|
-
#
|
1865
|
-
#
|
1974
|
+
# request ID so that if you must retry your request, the server ignores the
|
1975
|
+
# request if it has already been completed. The server guarantees that for at
|
1976
|
+
# least 60 minutes since the first request.
|
1866
1977
|
#
|
1867
1978
|
# For example, consider a situation where you make an initial request and
|
1868
1979
|
# the request times out. If you make the request again with the same request
|
1869
|
-
# ID, the server can check if original operation with the same request ID
|
1870
|
-
# was received, and if so,
|
1980
|
+
# ID, the server can check if the original operation with the same request ID
|
1981
|
+
# was received, and if so, ignores the second request. This prevents
|
1871
1982
|
# clients from accidentally creating duplicate commitments.
|
1872
1983
|
#
|
1873
1984
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
1874
1985
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1875
1986
|
# @param validate_only [::Boolean]
|
1876
|
-
# Optional. If set, performs request validation
|
1877
|
-
# any other type of validation
|
1987
|
+
# Optional. If set, performs request validation, for example, permission
|
1988
|
+
# checks and any other type of validation, but does not actually execute the
|
1989
|
+
# create request.
|
1878
1990
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1879
1991
|
# @yieldparam result [::Gapic::Operation]
|
1880
1992
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1968,22 +2080,22 @@ module Google
|
|
1968
2080
|
# comment on the Instance.name field.
|
1969
2081
|
# @param request_id [::String]
|
1970
2082
|
# Optional. An optional request ID to identify requests. Specify a unique
|
1971
|
-
# request ID so that if you must retry your request, the server
|
1972
|
-
#
|
1973
|
-
#
|
2083
|
+
# request ID so that if you must retry your request, the server ignores the
|
2084
|
+
# request if it has already been completed. The server guarantees that for at
|
2085
|
+
# least 60 minutes since the first request.
|
1974
2086
|
#
|
1975
2087
|
# For example, consider a situation where you make an initial request and
|
1976
2088
|
# the request times out. If you make the request again with the same request
|
1977
|
-
# ID, the server can check if original operation with the same request ID
|
1978
|
-
# was received, and if so,
|
2089
|
+
# ID, the server can check if the original operation with the same request ID
|
2090
|
+
# was received, and if so, ignores the second request. This prevents
|
1979
2091
|
# clients from accidentally creating duplicate commitments.
|
1980
2092
|
#
|
1981
2093
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
1982
2094
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1983
2095
|
# @param validate_only [::Boolean]
|
1984
|
-
# Optional. If set, performs request validation
|
1985
|
-
# any other type of validation
|
1986
|
-
#
|
2096
|
+
# Optional. If set, performs request validation, for example, permission
|
2097
|
+
# checks and any other type of validation, but does not actually execute the
|
2098
|
+
# create request.
|
1987
2099
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1988
2100
|
# @yieldparam result [::Gapic::Operation]
|
1989
2101
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -2065,7 +2177,7 @@ module Google
|
|
2065
2177
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2066
2178
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2067
2179
|
#
|
2068
|
-
# @overload restart_instance(name: nil, request_id: nil, validate_only: nil)
|
2180
|
+
# @overload restart_instance(name: nil, request_id: nil, validate_only: nil, node_ids: nil)
|
2069
2181
|
# Pass arguments to `restart_instance` via keyword arguments. Note that at
|
2070
2182
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2071
2183
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2075,21 +2187,25 @@ module Google
|
|
2075
2187
|
# comment on the Instance.name field.
|
2076
2188
|
# @param request_id [::String]
|
2077
2189
|
# Optional. An optional request ID to identify requests. Specify a unique
|
2078
|
-
# request ID so that if you must retry your request, the server
|
2079
|
-
#
|
2080
|
-
#
|
2190
|
+
# request ID so that if you must retry your request, the server ignores the
|
2191
|
+
# request if it has already been completed. The server guarantees that for at
|
2192
|
+
# least 60 minutes since the first request.
|
2081
2193
|
#
|
2082
2194
|
# For example, consider a situation where you make an initial request and
|
2083
2195
|
# the request times out. If you make the request again with the same request
|
2084
|
-
# ID, the server can check if original operation with the same request ID
|
2085
|
-
# was received, and if so,
|
2196
|
+
# ID, the server can check if the original operation with the same request ID
|
2197
|
+
# was received, and if so, ignores the second request. This prevents
|
2086
2198
|
# clients from accidentally creating duplicate commitments.
|
2087
2199
|
#
|
2088
2200
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
2089
2201
|
# not supported (00000000-0000-0000-0000-000000000000).
|
2090
2202
|
# @param validate_only [::Boolean]
|
2091
|
-
# Optional. If set, performs request validation
|
2092
|
-
# any other type of validation
|
2203
|
+
# Optional. If set, performs request validation, for example, permission
|
2204
|
+
# checks and any other type of validation, but does not actually execute the
|
2205
|
+
# create request.
|
2206
|
+
# @param node_ids [::Array<::String>]
|
2207
|
+
# Optional. Full name of the nodes as obtained from INSTANCE_VIEW_FULL to
|
2208
|
+
# restart upon. Applicable only to read instances.
|
2093
2209
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2094
2210
|
# @yieldparam result [::Gapic::Operation]
|
2095
2211
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -2157,6 +2273,99 @@ module Google
|
|
2157
2273
|
raise ::Google::Cloud::Error.from_error(e)
|
2158
2274
|
end
|
2159
2275
|
|
2276
|
+
##
|
2277
|
+
# Executes a SQL statement in a database inside an AlloyDB instance.
|
2278
|
+
#
|
2279
|
+
# @overload execute_sql(request, options = nil)
|
2280
|
+
# Pass arguments to `execute_sql` via a request object, either of type
|
2281
|
+
# {::Google::Cloud::AlloyDB::V1::ExecuteSqlRequest} or an equivalent Hash.
|
2282
|
+
#
|
2283
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ExecuteSqlRequest, ::Hash]
|
2284
|
+
# A request object representing the call parameters. Required. To specify no
|
2285
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2286
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2287
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2288
|
+
#
|
2289
|
+
# @overload execute_sql(password: nil, instance: nil, database: nil, user: nil, sql_statement: nil)
|
2290
|
+
# Pass arguments to `execute_sql` via keyword arguments. Note that at
|
2291
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2292
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2293
|
+
#
|
2294
|
+
# @param password [::String]
|
2295
|
+
# Optional. The database native user’s password.
|
2296
|
+
# @param instance [::String]
|
2297
|
+
# Required. The instance where the SQL will be executed. For the required
|
2298
|
+
# format, see the comment on the Instance.name field.
|
2299
|
+
# @param database [::String]
|
2300
|
+
# Required. Name of the database where the query will be executed.
|
2301
|
+
# Note - Value provided should be the same as expected from `SELECT
|
2302
|
+
# current_database();` and NOT as a resource reference.
|
2303
|
+
# @param user [::String]
|
2304
|
+
# Required. Database user to be used for executing the SQL.
|
2305
|
+
# Note - Value provided should be the same as expected from
|
2306
|
+
# `SELECT current_user;` and NOT as a resource reference.
|
2307
|
+
# @param sql_statement [::String]
|
2308
|
+
# Required. SQL statement to execute on database. Any valid statement is
|
2309
|
+
# permitted, including DDL, DML, DQL statements.
|
2310
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2311
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ExecuteSqlResponse]
|
2312
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2313
|
+
#
|
2314
|
+
# @return [::Google::Cloud::AlloyDB::V1::ExecuteSqlResponse]
|
2315
|
+
#
|
2316
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2317
|
+
#
|
2318
|
+
# @example Basic example
|
2319
|
+
# require "google/cloud/alloy_db/v1"
|
2320
|
+
#
|
2321
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2322
|
+
# client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
2323
|
+
#
|
2324
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2325
|
+
# request = Google::Cloud::AlloyDB::V1::ExecuteSqlRequest.new
|
2326
|
+
#
|
2327
|
+
# # Call the execute_sql method.
|
2328
|
+
# result = client.execute_sql request
|
2329
|
+
#
|
2330
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1::ExecuteSqlResponse.
|
2331
|
+
# p result
|
2332
|
+
#
|
2333
|
+
def execute_sql request, options = nil
|
2334
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2335
|
+
|
2336
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ExecuteSqlRequest
|
2337
|
+
|
2338
|
+
# Converts hash and nil to an options object
|
2339
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2340
|
+
|
2341
|
+
# Customize the options with defaults
|
2342
|
+
call_metadata = @config.rpcs.execute_sql.metadata.to_h
|
2343
|
+
|
2344
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2345
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2346
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2347
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
2348
|
+
transports_version_send: [:rest]
|
2349
|
+
|
2350
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2351
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2352
|
+
|
2353
|
+
options.apply_defaults timeout: @config.rpcs.execute_sql.timeout,
|
2354
|
+
metadata: call_metadata,
|
2355
|
+
retry_policy: @config.rpcs.execute_sql.retry_policy
|
2356
|
+
|
2357
|
+
options.apply_defaults timeout: @config.timeout,
|
2358
|
+
metadata: @config.metadata,
|
2359
|
+
retry_policy: @config.retry_policy
|
2360
|
+
|
2361
|
+
@alloy_db_admin_stub.execute_sql request, options do |result, operation|
|
2362
|
+
yield result, operation if block_given?
|
2363
|
+
return result
|
2364
|
+
end
|
2365
|
+
rescue ::Gapic::Rest::Error => e
|
2366
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2367
|
+
end
|
2368
|
+
|
2160
2369
|
##
|
2161
2370
|
# Lists Backups in a given project and location.
|
2162
2371
|
#
|
@@ -2354,14 +2563,14 @@ module Google
|
|
2354
2563
|
# Required. The resource being created
|
2355
2564
|
# @param request_id [::String]
|
2356
2565
|
# Optional. An optional request ID to identify requests. Specify a unique
|
2357
|
-
# request ID so that if you must retry your request, the server
|
2358
|
-
#
|
2359
|
-
#
|
2566
|
+
# request ID so that if you must retry your request, the server ignores the
|
2567
|
+
# request if it has already been completed. The server guarantees that for at
|
2568
|
+
# least 60 minutes since the first request.
|
2360
2569
|
#
|
2361
2570
|
# For example, consider a situation where you make an initial request and
|
2362
2571
|
# the request times out. If you make the request again with the same request
|
2363
|
-
# ID, the server can check if original operation with the same request ID
|
2364
|
-
# was received, and if so,
|
2572
|
+
# ID, the server can check if the original operation with the same request ID
|
2573
|
+
# was received, and if so, ignores the second request. This prevents
|
2365
2574
|
# clients from accidentally creating duplicate commitments.
|
2366
2575
|
#
|
2367
2576
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -2464,14 +2673,14 @@ module Google
|
|
2464
2673
|
# Required. The resource being updated
|
2465
2674
|
# @param request_id [::String]
|
2466
2675
|
# Optional. An optional request ID to identify requests. Specify a unique
|
2467
|
-
# request ID so that if you must retry your request, the server
|
2468
|
-
#
|
2469
|
-
#
|
2676
|
+
# request ID so that if you must retry your request, the server ignores the
|
2677
|
+
# request if it has already been completed. The server guarantees that for at
|
2678
|
+
# least 60 minutes since the first request.
|
2470
2679
|
#
|
2471
2680
|
# For example, consider a situation where you make an initial request and
|
2472
2681
|
# the request times out. If you make the request again with the same request
|
2473
|
-
# ID, the server can check if original operation with the same request ID
|
2474
|
-
# was received, and if so,
|
2682
|
+
# ID, the server can check if the original operation with the same request ID
|
2683
|
+
# was received, and if so, ignores the second request. This prevents
|
2475
2684
|
# clients from accidentally creating duplicate commitments.
|
2476
2685
|
#
|
2477
2686
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -2572,14 +2781,14 @@ module Google
|
|
2572
2781
|
# the Backup.name field.
|
2573
2782
|
# @param request_id [::String]
|
2574
2783
|
# Optional. An optional request ID to identify requests. Specify a unique
|
2575
|
-
# request ID so that if you must retry your request, the server
|
2576
|
-
#
|
2577
|
-
#
|
2784
|
+
# request ID so that if you must retry your request, the server ignores the
|
2785
|
+
# request if it has already been completed. The server guarantees that for at
|
2786
|
+
# least 60 minutes since the first request.
|
2578
2787
|
#
|
2579
2788
|
# For example, consider a situation where you make an initial request and
|
2580
2789
|
# the request times out. If you make the request again with the same request
|
2581
|
-
# ID, the server can check if original operation with the same request ID
|
2582
|
-
# was received, and if so,
|
2790
|
+
# ID, the server can check if the original operation with the same request ID
|
2791
|
+
# was received, and if so, ignores the second request. This prevents
|
2583
2792
|
# clients from accidentally creating duplicate commitments.
|
2584
2793
|
#
|
2585
2794
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -2780,14 +2989,14 @@ module Google
|
|
2780
2989
|
# * projects/\\{project}/locations/\\{location}/clusters/\\{cluster}
|
2781
2990
|
# @param request_id [::String]
|
2782
2991
|
# Optional. An optional request ID to identify requests. Specify a unique
|
2783
|
-
# request ID so that if you must retry your request, the server
|
2784
|
-
#
|
2785
|
-
#
|
2992
|
+
# request ID so that if you must retry your request, the server ignores the
|
2993
|
+
# request if it has already been completed. The server guarantees that for at
|
2994
|
+
# least 60 minutes since the first request.
|
2786
2995
|
#
|
2787
2996
|
# For example, consider a situation where you make an initial request and
|
2788
2997
|
# the request times out. If you make the request again with the same request
|
2789
|
-
# ID, the server can check if original operation with the same request ID
|
2790
|
-
# was received, and if so,
|
2998
|
+
# ID, the server can check if the original operation with the same request ID
|
2999
|
+
# was received, and if so, ignores the second request. This prevents
|
2791
3000
|
# clients from accidentally creating duplicate commitments.
|
2792
3001
|
#
|
2793
3002
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -2886,14 +3095,14 @@ module Google
|
|
2886
3095
|
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/instances/\\{instance}
|
2887
3096
|
# @param request_id [::String]
|
2888
3097
|
# Optional. An optional request ID to identify requests. Specify a unique
|
2889
|
-
# request ID so that if you must retry your request, the server
|
2890
|
-
#
|
2891
|
-
#
|
3098
|
+
# request ID so that if you must retry your request, the server ignores the
|
3099
|
+
# request if it has already been completed. The server guarantees that for at
|
3100
|
+
# least 60 minutes since the first request.
|
2892
3101
|
#
|
2893
3102
|
# For example, consider a situation where you make an initial request and
|
2894
3103
|
# the request times out. If you make the request again with the same request
|
2895
|
-
# ID, the server can check if original operation with the same request ID
|
2896
|
-
# was received, and if so,
|
3104
|
+
# ID, the server can check if the original operation with the same request ID
|
3105
|
+
# was received, and if so, ignores the second request. This prevents
|
2897
3106
|
# clients from accidentally creating duplicate commitments.
|
2898
3107
|
#
|
2899
3108
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -3155,14 +3364,14 @@ module Google
|
|
3155
3364
|
# Required. The resource being created
|
3156
3365
|
# @param request_id [::String]
|
3157
3366
|
# Optional. An optional request ID to identify requests. Specify a unique
|
3158
|
-
# request ID so that if you must retry your request, the server
|
3159
|
-
#
|
3160
|
-
#
|
3367
|
+
# request ID so that if you must retry your request, the server ignores the
|
3368
|
+
# request if it has already been completed. The server guarantees that for at
|
3369
|
+
# least 60 minutes since the first request.
|
3161
3370
|
#
|
3162
3371
|
# For example, consider a situation where you make an initial request and
|
3163
3372
|
# the request times out. If you make the request again with the same request
|
3164
|
-
# ID, the server can check if original operation with the same request ID
|
3165
|
-
# was received, and if so,
|
3373
|
+
# ID, the server can check if the original operation with the same request ID
|
3374
|
+
# was received, and if so, ignores the second request. This prevents
|
3166
3375
|
# clients from accidentally creating duplicate commitments.
|
3167
3376
|
#
|
3168
3377
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -3257,14 +3466,14 @@ module Google
|
|
3257
3466
|
# Required. The resource being updated
|
3258
3467
|
# @param request_id [::String]
|
3259
3468
|
# Optional. An optional request ID to identify requests. Specify a unique
|
3260
|
-
# request ID so that if you must retry your request, the server
|
3261
|
-
#
|
3262
|
-
#
|
3469
|
+
# request ID so that if you must retry your request, the server ignores the
|
3470
|
+
# request if it has already been completed. The server guarantees that for at
|
3471
|
+
# least 60 minutes since the first request.
|
3263
3472
|
#
|
3264
3473
|
# For example, consider a situation where you make an initial request and
|
3265
3474
|
# the request times out. If you make the request again with the same request
|
3266
|
-
# ID, the server can check if original operation with the same request ID
|
3267
|
-
# was received, and if so,
|
3475
|
+
# ID, the server can check if the original operation with the same request ID
|
3476
|
+
# was received, and if so, ignores the second request. This prevents
|
3268
3477
|
# clients from accidentally creating duplicate commitments.
|
3269
3478
|
#
|
3270
3479
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -3356,14 +3565,14 @@ module Google
|
|
3356
3565
|
# comment on the User.name field.
|
3357
3566
|
# @param request_id [::String]
|
3358
3567
|
# Optional. An optional request ID to identify requests. Specify a unique
|
3359
|
-
# request ID so that if you must retry your request, the server
|
3360
|
-
#
|
3361
|
-
#
|
3568
|
+
# request ID so that if you must retry your request, the server ignores the
|
3569
|
+
# request if it has already been completed. The server guarantees that for at
|
3570
|
+
# least 60 minutes since the first request.
|
3362
3571
|
#
|
3363
3572
|
# For example, consider a situation where you make an initial request and
|
3364
3573
|
# the request times out. If you make the request again with the same request
|
3365
|
-
# ID, the server can check if original operation with the same request ID
|
3366
|
-
# was received, and if so,
|
3574
|
+
# ID, the server can check if the original operation with the same request ID
|
3575
|
+
# was received, and if so, ignores the second request. This prevents
|
3367
3576
|
# clients from accidentally creating duplicate commitments.
|
3368
3577
|
#
|
3369
3578
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
@@ -3430,6 +3639,102 @@ module Google
|
|
3430
3639
|
raise ::Google::Cloud::Error.from_error(e)
|
3431
3640
|
end
|
3432
3641
|
|
3642
|
+
##
|
3643
|
+
# Lists Databases in a given project and location.
|
3644
|
+
#
|
3645
|
+
# @overload list_databases(request, options = nil)
|
3646
|
+
# Pass arguments to `list_databases` via a request object, either of type
|
3647
|
+
# {::Google::Cloud::AlloyDB::V1::ListDatabasesRequest} or an equivalent Hash.
|
3648
|
+
#
|
3649
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListDatabasesRequest, ::Hash]
|
3650
|
+
# A request object representing the call parameters. Required. To specify no
|
3651
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3652
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3653
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3654
|
+
#
|
3655
|
+
# @overload list_databases(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
3656
|
+
# Pass arguments to `list_databases` via keyword arguments. Note that at
|
3657
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3658
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3659
|
+
#
|
3660
|
+
# @param parent [::String]
|
3661
|
+
# Required. Parent value for ListDatabasesRequest.
|
3662
|
+
# @param page_size [::Integer]
|
3663
|
+
# Optional. The maximum number of databases to return. The service may return
|
3664
|
+
# fewer than this value. If unspecified, 2000 is the default page_size. The
|
3665
|
+
# max value of page_size will be 4000, values above max will be coerced to
|
3666
|
+
# max.
|
3667
|
+
# @param page_token [::String]
|
3668
|
+
# Optional. A page token, received from a previous `ListDatabases` call.
|
3669
|
+
# This should be provided to retrieve the subsequent page.
|
3670
|
+
# This field is currently not supported, its value will be ignored if passed.
|
3671
|
+
# @param filter [::String]
|
3672
|
+
# Optional. Filtering results.
|
3673
|
+
# This field is currently not supported, its value will be ignored if passed.
|
3674
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3675
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::Database>]
|
3676
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3677
|
+
#
|
3678
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::Database>]
|
3679
|
+
#
|
3680
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3681
|
+
#
|
3682
|
+
# @example Basic example
|
3683
|
+
# require "google/cloud/alloy_db/v1"
|
3684
|
+
#
|
3685
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3686
|
+
# client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
3687
|
+
#
|
3688
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3689
|
+
# request = Google::Cloud::AlloyDB::V1::ListDatabasesRequest.new
|
3690
|
+
#
|
3691
|
+
# # Call the list_databases method.
|
3692
|
+
# result = client.list_databases request
|
3693
|
+
#
|
3694
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3695
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3696
|
+
# result.each do |item|
|
3697
|
+
# # Each element is of type ::Google::Cloud::AlloyDB::V1::Database.
|
3698
|
+
# p item
|
3699
|
+
# end
|
3700
|
+
#
|
3701
|
+
def list_databases request, options = nil
|
3702
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3703
|
+
|
3704
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListDatabasesRequest
|
3705
|
+
|
3706
|
+
# Converts hash and nil to an options object
|
3707
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3708
|
+
|
3709
|
+
# Customize the options with defaults
|
3710
|
+
call_metadata = @config.rpcs.list_databases.metadata.to_h
|
3711
|
+
|
3712
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3713
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3714
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3715
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
3716
|
+
transports_version_send: [:rest]
|
3717
|
+
|
3718
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3719
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3720
|
+
|
3721
|
+
options.apply_defaults timeout: @config.rpcs.list_databases.timeout,
|
3722
|
+
metadata: call_metadata,
|
3723
|
+
retry_policy: @config.rpcs.list_databases.retry_policy
|
3724
|
+
|
3725
|
+
options.apply_defaults timeout: @config.timeout,
|
3726
|
+
metadata: @config.metadata,
|
3727
|
+
retry_policy: @config.retry_policy
|
3728
|
+
|
3729
|
+
@alloy_db_admin_stub.list_databases request, options do |result, operation|
|
3730
|
+
result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, "databases", request, result, options
|
3731
|
+
yield result, operation if block_given?
|
3732
|
+
return result
|
3733
|
+
end
|
3734
|
+
rescue ::Gapic::Rest::Error => e
|
3735
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3736
|
+
end
|
3737
|
+
|
3433
3738
|
##
|
3434
3739
|
# Configuration class for the AlloyDBAdmin REST API.
|
3435
3740
|
#
|
@@ -3601,6 +3906,11 @@ module Google
|
|
3601
3906
|
#
|
3602
3907
|
attr_reader :promote_cluster
|
3603
3908
|
##
|
3909
|
+
# RPC-specific configuration for `switchover_cluster`
|
3910
|
+
# @return [::Gapic::Config::Method]
|
3911
|
+
#
|
3912
|
+
attr_reader :switchover_cluster
|
3913
|
+
##
|
3604
3914
|
# RPC-specific configuration for `restore_cluster`
|
3605
3915
|
# @return [::Gapic::Config::Method]
|
3606
3916
|
#
|
@@ -3661,6 +3971,11 @@ module Google
|
|
3661
3971
|
#
|
3662
3972
|
attr_reader :restart_instance
|
3663
3973
|
##
|
3974
|
+
# RPC-specific configuration for `execute_sql`
|
3975
|
+
# @return [::Gapic::Config::Method]
|
3976
|
+
#
|
3977
|
+
attr_reader :execute_sql
|
3978
|
+
##
|
3664
3979
|
# RPC-specific configuration for `list_backups`
|
3665
3980
|
# @return [::Gapic::Config::Method]
|
3666
3981
|
#
|
@@ -3725,6 +4040,11 @@ module Google
|
|
3725
4040
|
# @return [::Gapic::Config::Method]
|
3726
4041
|
#
|
3727
4042
|
attr_reader :delete_user
|
4043
|
+
##
|
4044
|
+
# RPC-specific configuration for `list_databases`
|
4045
|
+
# @return [::Gapic::Config::Method]
|
4046
|
+
#
|
4047
|
+
attr_reader :list_databases
|
3728
4048
|
|
3729
4049
|
# @private
|
3730
4050
|
def initialize parent_rpcs = nil
|
@@ -3740,6 +4060,8 @@ module Google
|
|
3740
4060
|
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
3741
4061
|
promote_cluster_config = parent_rpcs.promote_cluster if parent_rpcs.respond_to? :promote_cluster
|
3742
4062
|
@promote_cluster = ::Gapic::Config::Method.new promote_cluster_config
|
4063
|
+
switchover_cluster_config = parent_rpcs.switchover_cluster if parent_rpcs.respond_to? :switchover_cluster
|
4064
|
+
@switchover_cluster = ::Gapic::Config::Method.new switchover_cluster_config
|
3743
4065
|
restore_cluster_config = parent_rpcs.restore_cluster if parent_rpcs.respond_to? :restore_cluster
|
3744
4066
|
@restore_cluster = ::Gapic::Config::Method.new restore_cluster_config
|
3745
4067
|
create_secondary_cluster_config = parent_rpcs.create_secondary_cluster if parent_rpcs.respond_to? :create_secondary_cluster
|
@@ -3764,6 +4086,8 @@ module Google
|
|
3764
4086
|
@inject_fault = ::Gapic::Config::Method.new inject_fault_config
|
3765
4087
|
restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
|
3766
4088
|
@restart_instance = ::Gapic::Config::Method.new restart_instance_config
|
4089
|
+
execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql
|
4090
|
+
@execute_sql = ::Gapic::Config::Method.new execute_sql_config
|
3767
4091
|
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
3768
4092
|
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
3769
4093
|
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
@@ -3790,6 +4114,8 @@ module Google
|
|
3790
4114
|
@update_user = ::Gapic::Config::Method.new update_user_config
|
3791
4115
|
delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
|
3792
4116
|
@delete_user = ::Gapic::Config::Method.new delete_user_config
|
4117
|
+
list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases
|
4118
|
+
@list_databases = ::Gapic::Config::Method.new list_databases_config
|
3793
4119
|
|
3794
4120
|
yield self if block_given?
|
3795
4121
|
end
|