google-cloud-alloy_db-v1beta 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb +799 -114
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/operations.rb +10 -1
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb +21 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb +1170 -9
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/operations.rb +75 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/service_stub.rb +357 -0
- data/lib/google/cloud/alloy_db/v1beta/version.rb +1 -1
- data/lib/google/cloud/alloydb/v1beta/resources_pb.rb +8 -2
- data/lib/google/cloud/alloydb/v1beta/service_pb.rb +9 -1
- data/lib/google/cloud/alloydb/v1beta/service_services_pb.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/alloydb/v1beta/resources.rb +134 -16
- data/proto_docs/google/cloud/alloydb/v1beta/service.rb +206 -3
- metadata +5 -5
@@ -115,6 +115,16 @@ module Google
|
|
115
115
|
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
116
116
|
}
|
117
117
|
|
118
|
+
default_config.rpcs.list_users.timeout = 60.0
|
119
|
+
default_config.rpcs.list_users.retry_policy = {
|
120
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
121
|
+
}
|
122
|
+
|
123
|
+
default_config.rpcs.get_user.timeout = 60.0
|
124
|
+
default_config.rpcs.get_user.retry_policy = {
|
125
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
126
|
+
}
|
127
|
+
|
118
128
|
default_config
|
119
129
|
end
|
120
130
|
yield @configure if block_given?
|
@@ -263,6 +273,26 @@ module Google
|
|
263
273
|
# @return [::Google::Cloud::AlloyDB::V1beta::ListClustersResponse]
|
264
274
|
#
|
265
275
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
276
|
+
#
|
277
|
+
# @example Basic example
|
278
|
+
# require "google/cloud/alloy_db/v1beta"
|
279
|
+
#
|
280
|
+
# # Create a client object. The client can be reused for multiple calls.
|
281
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
282
|
+
#
|
283
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
284
|
+
# request = Google::Cloud::AlloyDB::V1beta::ListClustersRequest.new
|
285
|
+
#
|
286
|
+
# # Call the list_clusters method.
|
287
|
+
# result = client.list_clusters request
|
288
|
+
#
|
289
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
290
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
291
|
+
# result.each do |item|
|
292
|
+
# # Each element is of type ::Google::Cloud::AlloyDB::V1beta::Cluster.
|
293
|
+
# p item
|
294
|
+
# end
|
295
|
+
#
|
266
296
|
def list_clusters request, options = nil
|
267
297
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
268
298
|
|
@@ -311,7 +341,7 @@ module Google
|
|
311
341
|
# @param options [::Gapic::CallOptions, ::Hash]
|
312
342
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
313
343
|
#
|
314
|
-
# @overload get_cluster(name: nil)
|
344
|
+
# @overload get_cluster(name: nil, view: nil)
|
315
345
|
# Pass arguments to `get_cluster` via keyword arguments. Note that at
|
316
346
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
317
347
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -319,6 +349,9 @@ module Google
|
|
319
349
|
# @param name [::String]
|
320
350
|
# Required. The name of the resource. For the required format, see the
|
321
351
|
# comment on the Cluster.name field.
|
352
|
+
# @param view [::Google::Cloud::AlloyDB::V1beta::ClusterView]
|
353
|
+
# Optional. The view of the cluster to return. Returns all default fields if
|
354
|
+
# not set.
|
322
355
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
323
356
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::Cluster]
|
324
357
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -326,6 +359,22 @@ module Google
|
|
326
359
|
# @return [::Google::Cloud::AlloyDB::V1beta::Cluster]
|
327
360
|
#
|
328
361
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
362
|
+
#
|
363
|
+
# @example Basic example
|
364
|
+
# require "google/cloud/alloy_db/v1beta"
|
365
|
+
#
|
366
|
+
# # Create a client object. The client can be reused for multiple calls.
|
367
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
368
|
+
#
|
369
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
370
|
+
# request = Google::Cloud::AlloyDB::V1beta::GetClusterRequest.new
|
371
|
+
#
|
372
|
+
# # Call the get_cluster method.
|
373
|
+
# result = client.get_cluster request
|
374
|
+
#
|
375
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::Cluster.
|
376
|
+
# p result
|
377
|
+
#
|
329
378
|
def get_cluster request, options = nil
|
330
379
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
331
380
|
|
@@ -380,7 +429,7 @@ module Google
|
|
380
429
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
381
430
|
#
|
382
431
|
# @param parent [::String]
|
383
|
-
# Required. The
|
432
|
+
# Required. The location of the new cluster. For the required format, see the
|
384
433
|
# comment on the Cluster.name field.
|
385
434
|
# @param cluster_id [::String]
|
386
435
|
# Required. ID of the requesting object.
|
@@ -411,6 +460,29 @@ module Google
|
|
411
460
|
# @return [::Gapic::Operation]
|
412
461
|
#
|
413
462
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
463
|
+
#
|
464
|
+
# @example Basic example
|
465
|
+
# require "google/cloud/alloy_db/v1beta"
|
466
|
+
#
|
467
|
+
# # Create a client object. The client can be reused for multiple calls.
|
468
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
469
|
+
#
|
470
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
471
|
+
# request = Google::Cloud::AlloyDB::V1beta::CreateClusterRequest.new
|
472
|
+
#
|
473
|
+
# # Call the create_cluster method.
|
474
|
+
# result = client.create_cluster request
|
475
|
+
#
|
476
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
477
|
+
# # check the status of an operation, cancel it, or wait for results.
|
478
|
+
# # Here is how to wait for a response.
|
479
|
+
# result.wait_until_done! timeout: 60
|
480
|
+
# if result.response?
|
481
|
+
# p result.response
|
482
|
+
# else
|
483
|
+
# puts "No response received."
|
484
|
+
# end
|
485
|
+
#
|
414
486
|
def create_cluster request, options = nil
|
415
487
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
416
488
|
|
@@ -501,6 +573,29 @@ module Google
|
|
501
573
|
# @return [::Gapic::Operation]
|
502
574
|
#
|
503
575
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
576
|
+
#
|
577
|
+
# @example Basic example
|
578
|
+
# require "google/cloud/alloy_db/v1beta"
|
579
|
+
#
|
580
|
+
# # Create a client object. The client can be reused for multiple calls.
|
581
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
582
|
+
#
|
583
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
584
|
+
# request = Google::Cloud::AlloyDB::V1beta::UpdateClusterRequest.new
|
585
|
+
#
|
586
|
+
# # Call the update_cluster method.
|
587
|
+
# result = client.update_cluster request
|
588
|
+
#
|
589
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
590
|
+
# # check the status of an operation, cancel it, or wait for results.
|
591
|
+
# # Here is how to wait for a response.
|
592
|
+
# result.wait_until_done! timeout: 60
|
593
|
+
# if result.response?
|
594
|
+
# p result.response
|
595
|
+
# else
|
596
|
+
# puts "No response received."
|
597
|
+
# end
|
598
|
+
#
|
504
599
|
def update_cluster request, options = nil
|
505
600
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
506
601
|
|
@@ -588,6 +683,29 @@ module Google
|
|
588
683
|
# @return [::Gapic::Operation]
|
589
684
|
#
|
590
685
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
686
|
+
#
|
687
|
+
# @example Basic example
|
688
|
+
# require "google/cloud/alloy_db/v1beta"
|
689
|
+
#
|
690
|
+
# # Create a client object. The client can be reused for multiple calls.
|
691
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
692
|
+
#
|
693
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
694
|
+
# request = Google::Cloud::AlloyDB::V1beta::DeleteClusterRequest.new
|
695
|
+
#
|
696
|
+
# # Call the delete_cluster method.
|
697
|
+
# result = client.delete_cluster request
|
698
|
+
#
|
699
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
700
|
+
# # check the status of an operation, cancel it, or wait for results.
|
701
|
+
# # Here is how to wait for a response.
|
702
|
+
# result.wait_until_done! timeout: 60
|
703
|
+
# if result.response?
|
704
|
+
# p result.response
|
705
|
+
# else
|
706
|
+
# puts "No response received."
|
707
|
+
# end
|
708
|
+
#
|
591
709
|
def delete_cluster request, options = nil
|
592
710
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
593
711
|
|
@@ -676,6 +794,29 @@ module Google
|
|
676
794
|
# @return [::Gapic::Operation]
|
677
795
|
#
|
678
796
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
797
|
+
#
|
798
|
+
# @example Basic example
|
799
|
+
# require "google/cloud/alloy_db/v1beta"
|
800
|
+
#
|
801
|
+
# # Create a client object. The client can be reused for multiple calls.
|
802
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
803
|
+
#
|
804
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
805
|
+
# request = Google::Cloud::AlloyDB::V1beta::PromoteClusterRequest.new
|
806
|
+
#
|
807
|
+
# # Call the promote_cluster method.
|
808
|
+
# result = client.promote_cluster request
|
809
|
+
#
|
810
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
811
|
+
# # check the status of an operation, cancel it, or wait for results.
|
812
|
+
# # Here is how to wait for a response.
|
813
|
+
# result.wait_until_done! timeout: 60
|
814
|
+
# if result.response?
|
815
|
+
# p result.response
|
816
|
+
# else
|
817
|
+
# puts "No response received."
|
818
|
+
# end
|
819
|
+
#
|
679
820
|
def promote_cluster request, options = nil
|
680
821
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
681
822
|
|
@@ -769,6 +910,29 @@ module Google
|
|
769
910
|
# @return [::Gapic::Operation]
|
770
911
|
#
|
771
912
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
913
|
+
#
|
914
|
+
# @example Basic example
|
915
|
+
# require "google/cloud/alloy_db/v1beta"
|
916
|
+
#
|
917
|
+
# # Create a client object. The client can be reused for multiple calls.
|
918
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
919
|
+
#
|
920
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
921
|
+
# request = Google::Cloud::AlloyDB::V1beta::RestoreClusterRequest.new
|
922
|
+
#
|
923
|
+
# # Call the restore_cluster method.
|
924
|
+
# result = client.restore_cluster request
|
925
|
+
#
|
926
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
927
|
+
# # check the status of an operation, cancel it, or wait for results.
|
928
|
+
# # Here is how to wait for a response.
|
929
|
+
# result.wait_until_done! timeout: 60
|
930
|
+
# if result.response?
|
931
|
+
# p result.response
|
932
|
+
# else
|
933
|
+
# puts "No response received."
|
934
|
+
# end
|
935
|
+
#
|
772
936
|
def restore_cluster request, options = nil
|
773
937
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
774
938
|
|
@@ -825,8 +989,8 @@ module Google
|
|
825
989
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
826
990
|
#
|
827
991
|
# @param parent [::String]
|
828
|
-
# Required. The
|
829
|
-
#
|
992
|
+
# Required. The location of the new cluster. For the required
|
993
|
+
# format, see the comment on the Cluster.name field.
|
830
994
|
# @param cluster_id [::String]
|
831
995
|
# Required. ID of the requesting object (the secondary cluster).
|
832
996
|
# @param cluster [::Google::Cloud::AlloyDB::V1beta::Cluster, ::Hash]
|
@@ -856,6 +1020,29 @@ module Google
|
|
856
1020
|
# @return [::Gapic::Operation]
|
857
1021
|
#
|
858
1022
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1023
|
+
#
|
1024
|
+
# @example Basic example
|
1025
|
+
# require "google/cloud/alloy_db/v1beta"
|
1026
|
+
#
|
1027
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1028
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1029
|
+
#
|
1030
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1031
|
+
# request = Google::Cloud::AlloyDB::V1beta::CreateSecondaryClusterRequest.new
|
1032
|
+
#
|
1033
|
+
# # Call the create_secondary_cluster method.
|
1034
|
+
# result = client.create_secondary_cluster request
|
1035
|
+
#
|
1036
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1037
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1038
|
+
# # Here is how to wait for a response.
|
1039
|
+
# result.wait_until_done! timeout: 60
|
1040
|
+
# if result.response?
|
1041
|
+
# p result.response
|
1042
|
+
# else
|
1043
|
+
# puts "No response received."
|
1044
|
+
# end
|
1045
|
+
#
|
859
1046
|
def create_secondary_cluster request, options = nil
|
860
1047
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
861
1048
|
|
@@ -933,6 +1120,26 @@ module Google
|
|
933
1120
|
# @return [::Google::Cloud::AlloyDB::V1beta::ListInstancesResponse]
|
934
1121
|
#
|
935
1122
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1123
|
+
#
|
1124
|
+
# @example Basic example
|
1125
|
+
# require "google/cloud/alloy_db/v1beta"
|
1126
|
+
#
|
1127
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1128
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1129
|
+
#
|
1130
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1131
|
+
# request = Google::Cloud::AlloyDB::V1beta::ListInstancesRequest.new
|
1132
|
+
#
|
1133
|
+
# # Call the list_instances method.
|
1134
|
+
# result = client.list_instances request
|
1135
|
+
#
|
1136
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1137
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1138
|
+
# result.each do |item|
|
1139
|
+
# # Each element is of type ::Google::Cloud::AlloyDB::V1beta::Instance.
|
1140
|
+
# p item
|
1141
|
+
# end
|
1142
|
+
#
|
936
1143
|
def list_instances request, options = nil
|
937
1144
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
938
1145
|
|
@@ -998,6 +1205,22 @@ module Google
|
|
998
1205
|
# @return [::Google::Cloud::AlloyDB::V1beta::Instance]
|
999
1206
|
#
|
1000
1207
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1208
|
+
#
|
1209
|
+
# @example Basic example
|
1210
|
+
# require "google/cloud/alloy_db/v1beta"
|
1211
|
+
#
|
1212
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1213
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1214
|
+
#
|
1215
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1216
|
+
# request = Google::Cloud::AlloyDB::V1beta::GetInstanceRequest.new
|
1217
|
+
#
|
1218
|
+
# # Call the get_instance method.
|
1219
|
+
# result = client.get_instance request
|
1220
|
+
#
|
1221
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::Instance.
|
1222
|
+
# p result
|
1223
|
+
#
|
1001
1224
|
def get_instance request, options = nil
|
1002
1225
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1003
1226
|
|
@@ -1083,6 +1306,29 @@ module Google
|
|
1083
1306
|
# @return [::Gapic::Operation]
|
1084
1307
|
#
|
1085
1308
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1309
|
+
#
|
1310
|
+
# @example Basic example
|
1311
|
+
# require "google/cloud/alloy_db/v1beta"
|
1312
|
+
#
|
1313
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1314
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1315
|
+
#
|
1316
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1317
|
+
# request = Google::Cloud::AlloyDB::V1beta::CreateInstanceRequest.new
|
1318
|
+
#
|
1319
|
+
# # Call the create_instance method.
|
1320
|
+
# result = client.create_instance request
|
1321
|
+
#
|
1322
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1323
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1324
|
+
# # Here is how to wait for a response.
|
1325
|
+
# result.wait_until_done! timeout: 60
|
1326
|
+
# if result.response?
|
1327
|
+
# p result.response
|
1328
|
+
# else
|
1329
|
+
# puts "No response received."
|
1330
|
+
# end
|
1331
|
+
#
|
1086
1332
|
def create_instance request, options = nil
|
1087
1333
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1088
1334
|
|
@@ -1169,6 +1415,29 @@ module Google
|
|
1169
1415
|
# @return [::Gapic::Operation]
|
1170
1416
|
#
|
1171
1417
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1418
|
+
#
|
1419
|
+
# @example Basic example
|
1420
|
+
# require "google/cloud/alloy_db/v1beta"
|
1421
|
+
#
|
1422
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1423
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1424
|
+
#
|
1425
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1426
|
+
# request = Google::Cloud::AlloyDB::V1beta::CreateSecondaryInstanceRequest.new
|
1427
|
+
#
|
1428
|
+
# # Call the create_secondary_instance method.
|
1429
|
+
# result = client.create_secondary_instance request
|
1430
|
+
#
|
1431
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1432
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1433
|
+
# # Here is how to wait for a response.
|
1434
|
+
# result.wait_until_done! timeout: 60
|
1435
|
+
# if result.response?
|
1436
|
+
# p result.response
|
1437
|
+
# else
|
1438
|
+
# puts "No response received."
|
1439
|
+
# end
|
1440
|
+
#
|
1172
1441
|
def create_secondary_instance request, options = nil
|
1173
1442
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1174
1443
|
|
@@ -1257,6 +1526,29 @@ module Google
|
|
1257
1526
|
# @return [::Gapic::Operation]
|
1258
1527
|
#
|
1259
1528
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1529
|
+
#
|
1530
|
+
# @example Basic example
|
1531
|
+
# require "google/cloud/alloy_db/v1beta"
|
1532
|
+
#
|
1533
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1534
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1535
|
+
#
|
1536
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1537
|
+
# request = Google::Cloud::AlloyDB::V1beta::BatchCreateInstancesRequest.new
|
1538
|
+
#
|
1539
|
+
# # Call the batch_create_instances method.
|
1540
|
+
# result = client.batch_create_instances request
|
1541
|
+
#
|
1542
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1543
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1544
|
+
# # Here is how to wait for a response.
|
1545
|
+
# result.wait_until_done! timeout: 60
|
1546
|
+
# if result.response?
|
1547
|
+
# p result.response
|
1548
|
+
# else
|
1549
|
+
# puts "No response received."
|
1550
|
+
# end
|
1551
|
+
#
|
1260
1552
|
def batch_create_instances request, options = nil
|
1261
1553
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1262
1554
|
|
@@ -1347,6 +1639,29 @@ module Google
|
|
1347
1639
|
# @return [::Gapic::Operation]
|
1348
1640
|
#
|
1349
1641
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1642
|
+
#
|
1643
|
+
# @example Basic example
|
1644
|
+
# require "google/cloud/alloy_db/v1beta"
|
1645
|
+
#
|
1646
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1647
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1648
|
+
#
|
1649
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1650
|
+
# request = Google::Cloud::AlloyDB::V1beta::UpdateInstanceRequest.new
|
1651
|
+
#
|
1652
|
+
# # Call the update_instance method.
|
1653
|
+
# result = client.update_instance request
|
1654
|
+
#
|
1655
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1656
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1657
|
+
# # Here is how to wait for a response.
|
1658
|
+
# result.wait_until_done! timeout: 60
|
1659
|
+
# if result.response?
|
1660
|
+
# p result.response
|
1661
|
+
# else
|
1662
|
+
# puts "No response received."
|
1663
|
+
# end
|
1664
|
+
#
|
1350
1665
|
def update_instance request, options = nil
|
1351
1666
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1352
1667
|
|
@@ -1432,6 +1747,29 @@ module Google
|
|
1432
1747
|
# @return [::Gapic::Operation]
|
1433
1748
|
#
|
1434
1749
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1750
|
+
#
|
1751
|
+
# @example Basic example
|
1752
|
+
# require "google/cloud/alloy_db/v1beta"
|
1753
|
+
#
|
1754
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1755
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1756
|
+
#
|
1757
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1758
|
+
# request = Google::Cloud::AlloyDB::V1beta::DeleteInstanceRequest.new
|
1759
|
+
#
|
1760
|
+
# # Call the delete_instance method.
|
1761
|
+
# result = client.delete_instance request
|
1762
|
+
#
|
1763
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1764
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1765
|
+
# # Here is how to wait for a response.
|
1766
|
+
# result.wait_until_done! timeout: 60
|
1767
|
+
# if result.response?
|
1768
|
+
# p result.response
|
1769
|
+
# else
|
1770
|
+
# puts "No response received."
|
1771
|
+
# end
|
1772
|
+
#
|
1435
1773
|
def delete_instance request, options = nil
|
1436
1774
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1437
1775
|
|
@@ -1515,6 +1853,29 @@ module Google
|
|
1515
1853
|
# @return [::Gapic::Operation]
|
1516
1854
|
#
|
1517
1855
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1856
|
+
#
|
1857
|
+
# @example Basic example
|
1858
|
+
# require "google/cloud/alloy_db/v1beta"
|
1859
|
+
#
|
1860
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1861
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1862
|
+
#
|
1863
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1864
|
+
# request = Google::Cloud::AlloyDB::V1beta::FailoverInstanceRequest.new
|
1865
|
+
#
|
1866
|
+
# # Call the failover_instance method.
|
1867
|
+
# result = client.failover_instance request
|
1868
|
+
#
|
1869
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1870
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1871
|
+
# # Here is how to wait for a response.
|
1872
|
+
# result.wait_until_done! timeout: 60
|
1873
|
+
# if result.response?
|
1874
|
+
# p result.response
|
1875
|
+
# else
|
1876
|
+
# puts "No response received."
|
1877
|
+
# end
|
1878
|
+
#
|
1518
1879
|
def failover_instance request, options = nil
|
1519
1880
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1520
1881
|
|
@@ -1551,6 +1912,114 @@ module Google
|
|
1551
1912
|
raise ::Google::Cloud::Error.from_error(e)
|
1552
1913
|
end
|
1553
1914
|
|
1915
|
+
##
|
1916
|
+
# Injects fault in an instance.
|
1917
|
+
# Imperative only.
|
1918
|
+
#
|
1919
|
+
# @overload inject_fault(request, options = nil)
|
1920
|
+
# Pass arguments to `inject_fault` via a request object, either of type
|
1921
|
+
# {::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest} or an equivalent Hash.
|
1922
|
+
#
|
1923
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest, ::Hash]
|
1924
|
+
# A request object representing the call parameters. Required. To specify no
|
1925
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1926
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1927
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1928
|
+
#
|
1929
|
+
# @overload inject_fault(fault_type: nil, name: nil, request_id: nil, validate_only: nil)
|
1930
|
+
# Pass arguments to `inject_fault` via keyword arguments. Note that at
|
1931
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1932
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1933
|
+
#
|
1934
|
+
# @param fault_type [::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest::FaultType]
|
1935
|
+
# Required. The type of fault to be injected in an instance.
|
1936
|
+
# @param name [::String]
|
1937
|
+
# Required. The name of the resource. For the required format, see the
|
1938
|
+
# comment on the Instance.name field.
|
1939
|
+
# @param request_id [::String]
|
1940
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1941
|
+
# request ID so that if you must retry your request, the server will know to
|
1942
|
+
# ignore the request if it has already been completed. The server will
|
1943
|
+
# guarantee that for at least 60 minutes after the first request.
|
1944
|
+
#
|
1945
|
+
# For example, consider a situation where you make an initial request and
|
1946
|
+
# the request times out. If you make the request again with the same request
|
1947
|
+
# ID, the server can check if original operation with the same request ID
|
1948
|
+
# was received, and if so, will ignore the second request. This prevents
|
1949
|
+
# clients from accidentally creating duplicate commitments.
|
1950
|
+
#
|
1951
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1952
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1953
|
+
# @param validate_only [::Boolean]
|
1954
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1955
|
+
# any other type of validation), but do not actually execute the fault
|
1956
|
+
# injection.
|
1957
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1958
|
+
# @yieldparam result [::Gapic::Operation]
|
1959
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1960
|
+
#
|
1961
|
+
# @return [::Gapic::Operation]
|
1962
|
+
#
|
1963
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1964
|
+
#
|
1965
|
+
# @example Basic example
|
1966
|
+
# require "google/cloud/alloy_db/v1beta"
|
1967
|
+
#
|
1968
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1969
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
1970
|
+
#
|
1971
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1972
|
+
# request = Google::Cloud::AlloyDB::V1beta::InjectFaultRequest.new
|
1973
|
+
#
|
1974
|
+
# # Call the inject_fault method.
|
1975
|
+
# result = client.inject_fault request
|
1976
|
+
#
|
1977
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1978
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1979
|
+
# # Here is how to wait for a response.
|
1980
|
+
# result.wait_until_done! timeout: 60
|
1981
|
+
# if result.response?
|
1982
|
+
# p result.response
|
1983
|
+
# else
|
1984
|
+
# puts "No response received."
|
1985
|
+
# end
|
1986
|
+
#
|
1987
|
+
def inject_fault request, options = nil
|
1988
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1989
|
+
|
1990
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::InjectFaultRequest
|
1991
|
+
|
1992
|
+
# Converts hash and nil to an options object
|
1993
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1994
|
+
|
1995
|
+
# Customize the options with defaults
|
1996
|
+
call_metadata = @config.rpcs.inject_fault.metadata.to_h
|
1997
|
+
|
1998
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1999
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2000
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2001
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
2002
|
+
transports_version_send: [:rest]
|
2003
|
+
|
2004
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2005
|
+
|
2006
|
+
options.apply_defaults timeout: @config.rpcs.inject_fault.timeout,
|
2007
|
+
metadata: call_metadata,
|
2008
|
+
retry_policy: @config.rpcs.inject_fault.retry_policy
|
2009
|
+
|
2010
|
+
options.apply_defaults timeout: @config.timeout,
|
2011
|
+
metadata: @config.metadata,
|
2012
|
+
retry_policy: @config.retry_policy
|
2013
|
+
|
2014
|
+
@alloy_db_admin_stub.inject_fault request, options do |result, operation|
|
2015
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2016
|
+
yield result, operation if block_given?
|
2017
|
+
return result
|
2018
|
+
end
|
2019
|
+
rescue ::Gapic::Rest::Error => e
|
2020
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2021
|
+
end
|
2022
|
+
|
1554
2023
|
##
|
1555
2024
|
# Restart an Instance in a cluster.
|
1556
2025
|
# Imperative only.
|
@@ -1597,6 +2066,29 @@ module Google
|
|
1597
2066
|
# @return [::Gapic::Operation]
|
1598
2067
|
#
|
1599
2068
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2069
|
+
#
|
2070
|
+
# @example Basic example
|
2071
|
+
# require "google/cloud/alloy_db/v1beta"
|
2072
|
+
#
|
2073
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2074
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2075
|
+
#
|
2076
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2077
|
+
# request = Google::Cloud::AlloyDB::V1beta::RestartInstanceRequest.new
|
2078
|
+
#
|
2079
|
+
# # Call the restart_instance method.
|
2080
|
+
# result = client.restart_instance request
|
2081
|
+
#
|
2082
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2083
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2084
|
+
# # Here is how to wait for a response.
|
2085
|
+
# result.wait_until_done! timeout: 60
|
2086
|
+
# if result.response?
|
2087
|
+
# p result.response
|
2088
|
+
# else
|
2089
|
+
# puts "No response received."
|
2090
|
+
# end
|
2091
|
+
#
|
1600
2092
|
def restart_instance request, options = nil
|
1601
2093
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1602
2094
|
|
@@ -1669,6 +2161,26 @@ module Google
|
|
1669
2161
|
# @return [::Google::Cloud::AlloyDB::V1beta::ListBackupsResponse]
|
1670
2162
|
#
|
1671
2163
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2164
|
+
#
|
2165
|
+
# @example Basic example
|
2166
|
+
# require "google/cloud/alloy_db/v1beta"
|
2167
|
+
#
|
2168
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2169
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2170
|
+
#
|
2171
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2172
|
+
# request = Google::Cloud::AlloyDB::V1beta::ListBackupsRequest.new
|
2173
|
+
#
|
2174
|
+
# # Call the list_backups method.
|
2175
|
+
# result = client.list_backups request
|
2176
|
+
#
|
2177
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2178
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2179
|
+
# result.each do |item|
|
2180
|
+
# # Each element is of type ::Google::Cloud::AlloyDB::V1beta::Backup.
|
2181
|
+
# p item
|
2182
|
+
# end
|
2183
|
+
#
|
1672
2184
|
def list_backups request, options = nil
|
1673
2185
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1674
2186
|
|
@@ -1731,6 +2243,22 @@ module Google
|
|
1731
2243
|
# @return [::Google::Cloud::AlloyDB::V1beta::Backup]
|
1732
2244
|
#
|
1733
2245
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2246
|
+
#
|
2247
|
+
# @example Basic example
|
2248
|
+
# require "google/cloud/alloy_db/v1beta"
|
2249
|
+
#
|
2250
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2251
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2252
|
+
#
|
2253
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2254
|
+
# request = Google::Cloud::AlloyDB::V1beta::GetBackupRequest.new
|
2255
|
+
#
|
2256
|
+
# # Call the get_backup method.
|
2257
|
+
# result = client.get_backup request
|
2258
|
+
#
|
2259
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::Backup.
|
2260
|
+
# p result
|
2261
|
+
#
|
1734
2262
|
def get_backup request, options = nil
|
1735
2263
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1736
2264
|
|
@@ -1814,6 +2342,29 @@ module Google
|
|
1814
2342
|
# @return [::Gapic::Operation]
|
1815
2343
|
#
|
1816
2344
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2345
|
+
#
|
2346
|
+
# @example Basic example
|
2347
|
+
# require "google/cloud/alloy_db/v1beta"
|
2348
|
+
#
|
2349
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2350
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2351
|
+
#
|
2352
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2353
|
+
# request = Google::Cloud::AlloyDB::V1beta::CreateBackupRequest.new
|
2354
|
+
#
|
2355
|
+
# # Call the create_backup method.
|
2356
|
+
# result = client.create_backup request
|
2357
|
+
#
|
2358
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2359
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2360
|
+
# # Here is how to wait for a response.
|
2361
|
+
# result.wait_until_done! timeout: 60
|
2362
|
+
# if result.response?
|
2363
|
+
# p result.response
|
2364
|
+
# else
|
2365
|
+
# puts "No response received."
|
2366
|
+
# end
|
2367
|
+
#
|
1817
2368
|
def create_backup request, options = nil
|
1818
2369
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1819
2370
|
|
@@ -1903,6 +2454,29 @@ module Google
|
|
1903
2454
|
# @return [::Gapic::Operation]
|
1904
2455
|
#
|
1905
2456
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2457
|
+
#
|
2458
|
+
# @example Basic example
|
2459
|
+
# require "google/cloud/alloy_db/v1beta"
|
2460
|
+
#
|
2461
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2462
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2463
|
+
#
|
2464
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2465
|
+
# request = Google::Cloud::AlloyDB::V1beta::UpdateBackupRequest.new
|
2466
|
+
#
|
2467
|
+
# # Call the update_backup method.
|
2468
|
+
# result = client.update_backup request
|
2469
|
+
#
|
2470
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2471
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2472
|
+
# # Here is how to wait for a response.
|
2473
|
+
# result.wait_until_done! timeout: 60
|
2474
|
+
# if result.response?
|
2475
|
+
# p result.response
|
2476
|
+
# else
|
2477
|
+
# puts "No response received."
|
2478
|
+
# end
|
2479
|
+
#
|
1906
2480
|
def update_backup request, options = nil
|
1907
2481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1908
2482
|
|
@@ -1988,6 +2562,29 @@ module Google
|
|
1988
2562
|
# @return [::Gapic::Operation]
|
1989
2563
|
#
|
1990
2564
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2565
|
+
#
|
2566
|
+
# @example Basic example
|
2567
|
+
# require "google/cloud/alloy_db/v1beta"
|
2568
|
+
#
|
2569
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2570
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2571
|
+
#
|
2572
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2573
|
+
# request = Google::Cloud::AlloyDB::V1beta::DeleteBackupRequest.new
|
2574
|
+
#
|
2575
|
+
# # Call the delete_backup method.
|
2576
|
+
# result = client.delete_backup request
|
2577
|
+
#
|
2578
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2579
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2580
|
+
# # Here is how to wait for a response.
|
2581
|
+
# result.wait_until_done! timeout: 60
|
2582
|
+
# if result.response?
|
2583
|
+
# p result.response
|
2584
|
+
# else
|
2585
|
+
# puts "No response received."
|
2586
|
+
# end
|
2587
|
+
#
|
1991
2588
|
def delete_backup request, options = nil
|
1992
2589
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1993
2590
|
|
@@ -2062,6 +2659,26 @@ module Google
|
|
2062
2659
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag>]
|
2063
2660
|
#
|
2064
2661
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2662
|
+
#
|
2663
|
+
# @example Basic example
|
2664
|
+
# require "google/cloud/alloy_db/v1beta"
|
2665
|
+
#
|
2666
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2667
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2668
|
+
#
|
2669
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2670
|
+
# request = Google::Cloud::AlloyDB::V1beta::ListSupportedDatabaseFlagsRequest.new
|
2671
|
+
#
|
2672
|
+
# # Call the list_supported_database_flags method.
|
2673
|
+
# result = client.list_supported_database_flags request
|
2674
|
+
#
|
2675
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2676
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2677
|
+
# result.each do |item|
|
2678
|
+
# # Each element is of type ::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag.
|
2679
|
+
# p item
|
2680
|
+
# end
|
2681
|
+
#
|
2065
2682
|
def list_supported_database_flags request, options = nil
|
2066
2683
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2067
2684
|
|
@@ -2115,7 +2732,7 @@ module Google
|
|
2115
2732
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2116
2733
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2117
2734
|
#
|
2118
|
-
# @overload generate_client_certificate(parent: nil, request_id: nil, pem_csr: nil, cert_duration: nil)
|
2735
|
+
# @overload generate_client_certificate(parent: nil, request_id: nil, pem_csr: nil, cert_duration: nil, public_key: nil)
|
2119
2736
|
# Pass arguments to `generate_client_certificate` via keyword arguments. Note that at
|
2120
2737
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2121
2738
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2145,6 +2762,8 @@ module Google
|
|
2145
2762
|
# 24 hours. The endpoint may or may not honor the hint. If the hint is left
|
2146
2763
|
# unspecified or is not honored, then the endpoint will pick an appropriate
|
2147
2764
|
# default duration.
|
2765
|
+
# @param public_key [::String]
|
2766
|
+
# Optional. The public key from the client.
|
2148
2767
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2149
2768
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateResponse]
|
2150
2769
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -2152,6 +2771,22 @@ module Google
|
|
2152
2771
|
# @return [::Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateResponse]
|
2153
2772
|
#
|
2154
2773
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2774
|
+
#
|
2775
|
+
# @example Basic example
|
2776
|
+
# require "google/cloud/alloy_db/v1beta"
|
2777
|
+
#
|
2778
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2779
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2780
|
+
#
|
2781
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2782
|
+
# request = Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateRequest.new
|
2783
|
+
#
|
2784
|
+
# # Call the generate_client_certificate method.
|
2785
|
+
# result = client.generate_client_certificate request
|
2786
|
+
#
|
2787
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateResponse.
|
2788
|
+
# p result
|
2789
|
+
#
|
2155
2790
|
def generate_client_certificate request, options = nil
|
2156
2791
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2157
2792
|
|
@@ -2229,6 +2864,22 @@ module Google
|
|
2229
2864
|
# @return [::Google::Cloud::AlloyDB::V1beta::ConnectionInfo]
|
2230
2865
|
#
|
2231
2866
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2867
|
+
#
|
2868
|
+
# @example Basic example
|
2869
|
+
# require "google/cloud/alloy_db/v1beta"
|
2870
|
+
#
|
2871
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2872
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2873
|
+
#
|
2874
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2875
|
+
# request = Google::Cloud::AlloyDB::V1beta::GetConnectionInfoRequest.new
|
2876
|
+
#
|
2877
|
+
# # Call the get_connection_info method.
|
2878
|
+
# result = client.get_connection_info request
|
2879
|
+
#
|
2880
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::ConnectionInfo.
|
2881
|
+
# p result
|
2882
|
+
#
|
2232
2883
|
def get_connection_info request, options = nil
|
2233
2884
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2234
2885
|
|
@@ -2265,11 +2916,479 @@ module Google
|
|
2265
2916
|
end
|
2266
2917
|
|
2267
2918
|
##
|
2268
|
-
#
|
2919
|
+
# Lists Users in a given project and location.
|
2269
2920
|
#
|
2270
|
-
#
|
2271
|
-
#
|
2272
|
-
#
|
2921
|
+
# @overload list_users(request, options = nil)
|
2922
|
+
# Pass arguments to `list_users` via a request object, either of type
|
2923
|
+
# {::Google::Cloud::AlloyDB::V1beta::ListUsersRequest} or an equivalent Hash.
|
2924
|
+
#
|
2925
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::ListUsersRequest, ::Hash]
|
2926
|
+
# A request object representing the call parameters. Required. To specify no
|
2927
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2928
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2929
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2930
|
+
#
|
2931
|
+
# @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2932
|
+
# Pass arguments to `list_users` via keyword arguments. Note that at
|
2933
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2934
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2935
|
+
#
|
2936
|
+
# @param parent [::String]
|
2937
|
+
# Required. Parent value for ListUsersRequest
|
2938
|
+
# @param page_size [::Integer]
|
2939
|
+
# Optional. Requested page size. Server may return fewer items than
|
2940
|
+
# requested. If unspecified, server will pick an appropriate default.
|
2941
|
+
# @param page_token [::String]
|
2942
|
+
# Optional. A token identifying a page of results the server should return.
|
2943
|
+
# @param filter [::String]
|
2944
|
+
# Optional. Filtering results
|
2945
|
+
# @param order_by [::String]
|
2946
|
+
# Optional. Hint for how to order the results
|
2947
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2948
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::ListUsersResponse]
|
2949
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2950
|
+
#
|
2951
|
+
# @return [::Google::Cloud::AlloyDB::V1beta::ListUsersResponse]
|
2952
|
+
#
|
2953
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2954
|
+
#
|
2955
|
+
# @example Basic example
|
2956
|
+
# require "google/cloud/alloy_db/v1beta"
|
2957
|
+
#
|
2958
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2959
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
2960
|
+
#
|
2961
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2962
|
+
# request = Google::Cloud::AlloyDB::V1beta::ListUsersRequest.new
|
2963
|
+
#
|
2964
|
+
# # Call the list_users method.
|
2965
|
+
# result = client.list_users request
|
2966
|
+
#
|
2967
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2968
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2969
|
+
# result.each do |item|
|
2970
|
+
# # Each element is of type ::Google::Cloud::AlloyDB::V1beta::User.
|
2971
|
+
# p item
|
2972
|
+
# end
|
2973
|
+
#
|
2974
|
+
def list_users request, options = nil
|
2975
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2976
|
+
|
2977
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::ListUsersRequest
|
2978
|
+
|
2979
|
+
# Converts hash and nil to an options object
|
2980
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2981
|
+
|
2982
|
+
# Customize the options with defaults
|
2983
|
+
call_metadata = @config.rpcs.list_users.metadata.to_h
|
2984
|
+
|
2985
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2986
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2987
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2988
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
2989
|
+
transports_version_send: [:rest]
|
2990
|
+
|
2991
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2992
|
+
|
2993
|
+
options.apply_defaults timeout: @config.rpcs.list_users.timeout,
|
2994
|
+
metadata: call_metadata,
|
2995
|
+
retry_policy: @config.rpcs.list_users.retry_policy
|
2996
|
+
|
2997
|
+
options.apply_defaults timeout: @config.timeout,
|
2998
|
+
metadata: @config.metadata,
|
2999
|
+
retry_policy: @config.retry_policy
|
3000
|
+
|
3001
|
+
@alloy_db_admin_stub.list_users request, options do |result, operation|
|
3002
|
+
yield result, operation if block_given?
|
3003
|
+
return result
|
3004
|
+
end
|
3005
|
+
rescue ::Gapic::Rest::Error => e
|
3006
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3007
|
+
end
|
3008
|
+
|
3009
|
+
##
|
3010
|
+
# Gets details of a single User.
|
3011
|
+
#
|
3012
|
+
# @overload get_user(request, options = nil)
|
3013
|
+
# Pass arguments to `get_user` via a request object, either of type
|
3014
|
+
# {::Google::Cloud::AlloyDB::V1beta::GetUserRequest} or an equivalent Hash.
|
3015
|
+
#
|
3016
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::GetUserRequest, ::Hash]
|
3017
|
+
# A request object representing the call parameters. Required. To specify no
|
3018
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3019
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3020
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3021
|
+
#
|
3022
|
+
# @overload get_user(name: nil)
|
3023
|
+
# Pass arguments to `get_user` via keyword arguments. Note that at
|
3024
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3025
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3026
|
+
#
|
3027
|
+
# @param name [::String]
|
3028
|
+
# Required. The name of the resource. For the required format, see the
|
3029
|
+
# comment on the User.name field.
|
3030
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3031
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::User]
|
3032
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3033
|
+
#
|
3034
|
+
# @return [::Google::Cloud::AlloyDB::V1beta::User]
|
3035
|
+
#
|
3036
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3037
|
+
#
|
3038
|
+
# @example Basic example
|
3039
|
+
# require "google/cloud/alloy_db/v1beta"
|
3040
|
+
#
|
3041
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3042
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
3043
|
+
#
|
3044
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3045
|
+
# request = Google::Cloud::AlloyDB::V1beta::GetUserRequest.new
|
3046
|
+
#
|
3047
|
+
# # Call the get_user method.
|
3048
|
+
# result = client.get_user request
|
3049
|
+
#
|
3050
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::User.
|
3051
|
+
# p result
|
3052
|
+
#
|
3053
|
+
def get_user request, options = nil
|
3054
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3055
|
+
|
3056
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::GetUserRequest
|
3057
|
+
|
3058
|
+
# Converts hash and nil to an options object
|
3059
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3060
|
+
|
3061
|
+
# Customize the options with defaults
|
3062
|
+
call_metadata = @config.rpcs.get_user.metadata.to_h
|
3063
|
+
|
3064
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3065
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3066
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3067
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
3068
|
+
transports_version_send: [:rest]
|
3069
|
+
|
3070
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3071
|
+
|
3072
|
+
options.apply_defaults timeout: @config.rpcs.get_user.timeout,
|
3073
|
+
metadata: call_metadata,
|
3074
|
+
retry_policy: @config.rpcs.get_user.retry_policy
|
3075
|
+
|
3076
|
+
options.apply_defaults timeout: @config.timeout,
|
3077
|
+
metadata: @config.metadata,
|
3078
|
+
retry_policy: @config.retry_policy
|
3079
|
+
|
3080
|
+
@alloy_db_admin_stub.get_user request, options do |result, operation|
|
3081
|
+
yield result, operation if block_given?
|
3082
|
+
return result
|
3083
|
+
end
|
3084
|
+
rescue ::Gapic::Rest::Error => e
|
3085
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3086
|
+
end
|
3087
|
+
|
3088
|
+
##
|
3089
|
+
# Creates a new User in a given project, location, and cluster.
|
3090
|
+
#
|
3091
|
+
# @overload create_user(request, options = nil)
|
3092
|
+
# Pass arguments to `create_user` via a request object, either of type
|
3093
|
+
# {::Google::Cloud::AlloyDB::V1beta::CreateUserRequest} or an equivalent Hash.
|
3094
|
+
#
|
3095
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::CreateUserRequest, ::Hash]
|
3096
|
+
# A request object representing the call parameters. Required. To specify no
|
3097
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3098
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3099
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3100
|
+
#
|
3101
|
+
# @overload create_user(parent: nil, user_id: nil, user: nil, request_id: nil, validate_only: nil)
|
3102
|
+
# Pass arguments to `create_user` via keyword arguments. Note that at
|
3103
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3104
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3105
|
+
#
|
3106
|
+
# @param parent [::String]
|
3107
|
+
# Required. Value for parent.
|
3108
|
+
# @param user_id [::String]
|
3109
|
+
# Required. ID of the requesting object.
|
3110
|
+
# @param user [::Google::Cloud::AlloyDB::V1beta::User, ::Hash]
|
3111
|
+
# Required. The resource being created
|
3112
|
+
# @param request_id [::String]
|
3113
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
3114
|
+
# request ID so that if you must retry your request, the server will know to
|
3115
|
+
# ignore the request if it has already been completed. The server will
|
3116
|
+
# guarantee that for at least 60 minutes since the first request.
|
3117
|
+
#
|
3118
|
+
# For example, consider a situation where you make an initial request and
|
3119
|
+
# the request times out. If you make the request again with the same request
|
3120
|
+
# ID, the server can check if original operation with the same request ID
|
3121
|
+
# was received, and if so, will ignore the second request. This prevents
|
3122
|
+
# clients from accidentally creating duplicate commitments.
|
3123
|
+
#
|
3124
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
3125
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
3126
|
+
# @param validate_only [::Boolean]
|
3127
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
3128
|
+
# execute it.
|
3129
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3130
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::User]
|
3131
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3132
|
+
#
|
3133
|
+
# @return [::Google::Cloud::AlloyDB::V1beta::User]
|
3134
|
+
#
|
3135
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3136
|
+
#
|
3137
|
+
# @example Basic example
|
3138
|
+
# require "google/cloud/alloy_db/v1beta"
|
3139
|
+
#
|
3140
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3141
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
3142
|
+
#
|
3143
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3144
|
+
# request = Google::Cloud::AlloyDB::V1beta::CreateUserRequest.new
|
3145
|
+
#
|
3146
|
+
# # Call the create_user method.
|
3147
|
+
# result = client.create_user request
|
3148
|
+
#
|
3149
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::User.
|
3150
|
+
# p result
|
3151
|
+
#
|
3152
|
+
def create_user request, options = nil
|
3153
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3154
|
+
|
3155
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::CreateUserRequest
|
3156
|
+
|
3157
|
+
# Converts hash and nil to an options object
|
3158
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3159
|
+
|
3160
|
+
# Customize the options with defaults
|
3161
|
+
call_metadata = @config.rpcs.create_user.metadata.to_h
|
3162
|
+
|
3163
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3164
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3165
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3166
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
3167
|
+
transports_version_send: [:rest]
|
3168
|
+
|
3169
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3170
|
+
|
3171
|
+
options.apply_defaults timeout: @config.rpcs.create_user.timeout,
|
3172
|
+
metadata: call_metadata,
|
3173
|
+
retry_policy: @config.rpcs.create_user.retry_policy
|
3174
|
+
|
3175
|
+
options.apply_defaults timeout: @config.timeout,
|
3176
|
+
metadata: @config.metadata,
|
3177
|
+
retry_policy: @config.retry_policy
|
3178
|
+
|
3179
|
+
@alloy_db_admin_stub.create_user request, options do |result, operation|
|
3180
|
+
yield result, operation if block_given?
|
3181
|
+
return result
|
3182
|
+
end
|
3183
|
+
rescue ::Gapic::Rest::Error => e
|
3184
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3185
|
+
end
|
3186
|
+
|
3187
|
+
##
|
3188
|
+
# Updates the parameters of a single User.
|
3189
|
+
#
|
3190
|
+
# @overload update_user(request, options = nil)
|
3191
|
+
# Pass arguments to `update_user` via a request object, either of type
|
3192
|
+
# {::Google::Cloud::AlloyDB::V1beta::UpdateUserRequest} or an equivalent Hash.
|
3193
|
+
#
|
3194
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::UpdateUserRequest, ::Hash]
|
3195
|
+
# A request object representing the call parameters. Required. To specify no
|
3196
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3197
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3198
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3199
|
+
#
|
3200
|
+
# @overload update_user(update_mask: nil, user: nil, request_id: nil, validate_only: nil, allow_missing: nil)
|
3201
|
+
# Pass arguments to `update_user` via keyword arguments. Note that at
|
3202
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3203
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3204
|
+
#
|
3205
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3206
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
3207
|
+
# User resource by the update.
|
3208
|
+
# The fields specified in the update_mask are relative to the resource, not
|
3209
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
3210
|
+
# user does not provide a mask then all fields will be overwritten.
|
3211
|
+
# @param user [::Google::Cloud::AlloyDB::V1beta::User, ::Hash]
|
3212
|
+
# Required. The resource being updated
|
3213
|
+
# @param request_id [::String]
|
3214
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
3215
|
+
# request ID so that if you must retry your request, the server will know to
|
3216
|
+
# ignore the request if it has already been completed. The server will
|
3217
|
+
# guarantee that for at least 60 minutes since the first request.
|
3218
|
+
#
|
3219
|
+
# For example, consider a situation where you make an initial request and
|
3220
|
+
# the request times out. If you make the request again with the same request
|
3221
|
+
# ID, the server can check if original operation with the same request ID
|
3222
|
+
# was received, and if so, will ignore the second request. This prevents
|
3223
|
+
# clients from accidentally creating duplicate commitments.
|
3224
|
+
#
|
3225
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
3226
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
3227
|
+
# @param validate_only [::Boolean]
|
3228
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
3229
|
+
# execute it.
|
3230
|
+
# @param allow_missing [::Boolean]
|
3231
|
+
# Optional. Allow missing fields in the update mask.
|
3232
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3233
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::User]
|
3234
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3235
|
+
#
|
3236
|
+
# @return [::Google::Cloud::AlloyDB::V1beta::User]
|
3237
|
+
#
|
3238
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3239
|
+
#
|
3240
|
+
# @example Basic example
|
3241
|
+
# require "google/cloud/alloy_db/v1beta"
|
3242
|
+
#
|
3243
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3244
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
3245
|
+
#
|
3246
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3247
|
+
# request = Google::Cloud::AlloyDB::V1beta::UpdateUserRequest.new
|
3248
|
+
#
|
3249
|
+
# # Call the update_user method.
|
3250
|
+
# result = client.update_user request
|
3251
|
+
#
|
3252
|
+
# # The returned object is of type Google::Cloud::AlloyDB::V1beta::User.
|
3253
|
+
# p result
|
3254
|
+
#
|
3255
|
+
def update_user request, options = nil
|
3256
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3257
|
+
|
3258
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::UpdateUserRequest
|
3259
|
+
|
3260
|
+
# Converts hash and nil to an options object
|
3261
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3262
|
+
|
3263
|
+
# Customize the options with defaults
|
3264
|
+
call_metadata = @config.rpcs.update_user.metadata.to_h
|
3265
|
+
|
3266
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3267
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3268
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3269
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
3270
|
+
transports_version_send: [:rest]
|
3271
|
+
|
3272
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3273
|
+
|
3274
|
+
options.apply_defaults timeout: @config.rpcs.update_user.timeout,
|
3275
|
+
metadata: call_metadata,
|
3276
|
+
retry_policy: @config.rpcs.update_user.retry_policy
|
3277
|
+
|
3278
|
+
options.apply_defaults timeout: @config.timeout,
|
3279
|
+
metadata: @config.metadata,
|
3280
|
+
retry_policy: @config.retry_policy
|
3281
|
+
|
3282
|
+
@alloy_db_admin_stub.update_user request, options do |result, operation|
|
3283
|
+
yield result, operation if block_given?
|
3284
|
+
return result
|
3285
|
+
end
|
3286
|
+
rescue ::Gapic::Rest::Error => e
|
3287
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3288
|
+
end
|
3289
|
+
|
3290
|
+
##
|
3291
|
+
# Deletes a single User.
|
3292
|
+
#
|
3293
|
+
# @overload delete_user(request, options = nil)
|
3294
|
+
# Pass arguments to `delete_user` via a request object, either of type
|
3295
|
+
# {::Google::Cloud::AlloyDB::V1beta::DeleteUserRequest} or an equivalent Hash.
|
3296
|
+
#
|
3297
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::DeleteUserRequest, ::Hash]
|
3298
|
+
# A request object representing the call parameters. Required. To specify no
|
3299
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3300
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3301
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3302
|
+
#
|
3303
|
+
# @overload delete_user(name: nil, request_id: nil, validate_only: nil)
|
3304
|
+
# Pass arguments to `delete_user` via keyword arguments. Note that at
|
3305
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3306
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3307
|
+
#
|
3308
|
+
# @param name [::String]
|
3309
|
+
# Required. The name of the resource. For the required format, see the
|
3310
|
+
# comment on the User.name field.
|
3311
|
+
# @param request_id [::String]
|
3312
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
3313
|
+
# request ID so that if you must retry your request, the server will know to
|
3314
|
+
# ignore the request if it has already been completed. The server will
|
3315
|
+
# guarantee that for at least 60 minutes after the first request.
|
3316
|
+
#
|
3317
|
+
# For example, consider a situation where you make an initial request and
|
3318
|
+
# the request times out. If you make the request again with the same request
|
3319
|
+
# ID, the server can check if original operation with the same request ID
|
3320
|
+
# was received, and if so, will ignore the second request. This prevents
|
3321
|
+
# clients from accidentally creating duplicate commitments.
|
3322
|
+
#
|
3323
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
3324
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
3325
|
+
# @param validate_only [::Boolean]
|
3326
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
3327
|
+
# execute it.
|
3328
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3329
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
3330
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3331
|
+
#
|
3332
|
+
# @return [::Google::Protobuf::Empty]
|
3333
|
+
#
|
3334
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3335
|
+
#
|
3336
|
+
# @example Basic example
|
3337
|
+
# require "google/cloud/alloy_db/v1beta"
|
3338
|
+
#
|
3339
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3340
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
3341
|
+
#
|
3342
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3343
|
+
# request = Google::Cloud::AlloyDB::V1beta::DeleteUserRequest.new
|
3344
|
+
#
|
3345
|
+
# # Call the delete_user method.
|
3346
|
+
# result = client.delete_user request
|
3347
|
+
#
|
3348
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
3349
|
+
# p result
|
3350
|
+
#
|
3351
|
+
def delete_user request, options = nil
|
3352
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3353
|
+
|
3354
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::DeleteUserRequest
|
3355
|
+
|
3356
|
+
# Converts hash and nil to an options object
|
3357
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3358
|
+
|
3359
|
+
# Customize the options with defaults
|
3360
|
+
call_metadata = @config.rpcs.delete_user.metadata.to_h
|
3361
|
+
|
3362
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3363
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3364
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3365
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
3366
|
+
transports_version_send: [:rest]
|
3367
|
+
|
3368
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3369
|
+
|
3370
|
+
options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
|
3371
|
+
metadata: call_metadata,
|
3372
|
+
retry_policy: @config.rpcs.delete_user.retry_policy
|
3373
|
+
|
3374
|
+
options.apply_defaults timeout: @config.timeout,
|
3375
|
+
metadata: @config.metadata,
|
3376
|
+
retry_policy: @config.retry_policy
|
3377
|
+
|
3378
|
+
@alloy_db_admin_stub.delete_user request, options do |result, operation|
|
3379
|
+
yield result, operation if block_given?
|
3380
|
+
return result
|
3381
|
+
end
|
3382
|
+
rescue ::Gapic::Rest::Error => e
|
3383
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3384
|
+
end
|
3385
|
+
|
3386
|
+
##
|
3387
|
+
# Configuration class for the AlloyDBAdmin REST API.
|
3388
|
+
#
|
3389
|
+
# This class represents the configuration for AlloyDBAdmin REST,
|
3390
|
+
# providing control over timeouts, retry behavior, logging, transport
|
3391
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2273
3392
|
# applied individually to specific RPCs. See
|
2274
3393
|
# {::Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client::Configuration::Rpcs}
|
2275
3394
|
# for a list of RPCs that can be configured independently.
|
@@ -2477,6 +3596,11 @@ module Google
|
|
2477
3596
|
#
|
2478
3597
|
attr_reader :failover_instance
|
2479
3598
|
##
|
3599
|
+
# RPC-specific configuration for `inject_fault`
|
3600
|
+
# @return [::Gapic::Config::Method]
|
3601
|
+
#
|
3602
|
+
attr_reader :inject_fault
|
3603
|
+
##
|
2480
3604
|
# RPC-specific configuration for `restart_instance`
|
2481
3605
|
# @return [::Gapic::Config::Method]
|
2482
3606
|
#
|
@@ -2521,6 +3645,31 @@ module Google
|
|
2521
3645
|
# @return [::Gapic::Config::Method]
|
2522
3646
|
#
|
2523
3647
|
attr_reader :get_connection_info
|
3648
|
+
##
|
3649
|
+
# RPC-specific configuration for `list_users`
|
3650
|
+
# @return [::Gapic::Config::Method]
|
3651
|
+
#
|
3652
|
+
attr_reader :list_users
|
3653
|
+
##
|
3654
|
+
# RPC-specific configuration for `get_user`
|
3655
|
+
# @return [::Gapic::Config::Method]
|
3656
|
+
#
|
3657
|
+
attr_reader :get_user
|
3658
|
+
##
|
3659
|
+
# RPC-specific configuration for `create_user`
|
3660
|
+
# @return [::Gapic::Config::Method]
|
3661
|
+
#
|
3662
|
+
attr_reader :create_user
|
3663
|
+
##
|
3664
|
+
# RPC-specific configuration for `update_user`
|
3665
|
+
# @return [::Gapic::Config::Method]
|
3666
|
+
#
|
3667
|
+
attr_reader :update_user
|
3668
|
+
##
|
3669
|
+
# RPC-specific configuration for `delete_user`
|
3670
|
+
# @return [::Gapic::Config::Method]
|
3671
|
+
#
|
3672
|
+
attr_reader :delete_user
|
2524
3673
|
|
2525
3674
|
# @private
|
2526
3675
|
def initialize parent_rpcs = nil
|
@@ -2556,6 +3705,8 @@ module Google
|
|
2556
3705
|
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
2557
3706
|
failover_instance_config = parent_rpcs.failover_instance if parent_rpcs.respond_to? :failover_instance
|
2558
3707
|
@failover_instance = ::Gapic::Config::Method.new failover_instance_config
|
3708
|
+
inject_fault_config = parent_rpcs.inject_fault if parent_rpcs.respond_to? :inject_fault
|
3709
|
+
@inject_fault = ::Gapic::Config::Method.new inject_fault_config
|
2559
3710
|
restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
|
2560
3711
|
@restart_instance = ::Gapic::Config::Method.new restart_instance_config
|
2561
3712
|
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
@@ -2574,6 +3725,16 @@ module Google
|
|
2574
3725
|
@generate_client_certificate = ::Gapic::Config::Method.new generate_client_certificate_config
|
2575
3726
|
get_connection_info_config = parent_rpcs.get_connection_info if parent_rpcs.respond_to? :get_connection_info
|
2576
3727
|
@get_connection_info = ::Gapic::Config::Method.new get_connection_info_config
|
3728
|
+
list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
|
3729
|
+
@list_users = ::Gapic::Config::Method.new list_users_config
|
3730
|
+
get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
|
3731
|
+
@get_user = ::Gapic::Config::Method.new get_user_config
|
3732
|
+
create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
|
3733
|
+
@create_user = ::Gapic::Config::Method.new create_user_config
|
3734
|
+
update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
|
3735
|
+
@update_user = ::Gapic::Config::Method.new update_user_config
|
3736
|
+
delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
|
3737
|
+
@delete_user = ::Gapic::Config::Method.new delete_user_config
|
2577
3738
|
|
2578
3739
|
yield self if block_given?
|
2579
3740
|
end
|