google-cloud-alloy_db-v1alpha 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/client.rb +54 -36
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/operations.rb +12 -15
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb +50 -36
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/operations.rb +43 -38
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/service_stub.rb +294 -212
- data/lib/google/cloud/alloy_db/v1alpha/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51fb79cacfdee1f7ee2cc63dc25269e6943d9a83a08cd3017cd30b86936edcdf
|
4
|
+
data.tar.gz: 742e11c649211df11f1d4a24e284ca9d1b1c58b1bf37fd30b98b655c0b8f547d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d38dfe2b067f0be0139d1b658cee4f9571ca862cae8d7c80065fb18ce72110a2d45d510334068484b48dd2a7cdddf7fa9a17ef7a14337b5d6934638cd021c98a
|
7
|
+
data.tar.gz: 2ab2044f203784c4b584e69e980fddce75d211a8df8c8d8f5d209126d2d5df35cd7f4a6921ee3beec91b652be7322781633dda11dc7c9188361d25f39ff484b5
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the AlloyDB V1ALPHA API
|
2
2
|
|
3
|
-
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance.
|
3
|
+
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
|
4
4
|
|
5
5
|
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
|
6
6
|
|
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/alloydb/docs)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/alloy_db/v1alpha"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -223,14 +223,26 @@ module Google
|
|
223
223
|
universe_domain: @config.universe_domain,
|
224
224
|
channel_args: @config.channel_args,
|
225
225
|
interceptors: @config.interceptors,
|
226
|
-
channel_pool_config: @config.channel_pool
|
226
|
+
channel_pool_config: @config.channel_pool,
|
227
|
+
logger: @config.logger
|
227
228
|
)
|
228
229
|
|
230
|
+
@alloy_db_admin_stub.stub_logger&.info do |entry|
|
231
|
+
entry.set_system_name
|
232
|
+
entry.set_service
|
233
|
+
entry.message = "Created client for #{entry.service}"
|
234
|
+
entry.set_credentials_fields credentials
|
235
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
236
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
237
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
238
|
+
end
|
239
|
+
|
229
240
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
230
241
|
config.credentials = credentials
|
231
242
|
config.quota_project = @quota_project_id
|
232
243
|
config.endpoint = @alloy_db_admin_stub.endpoint
|
233
244
|
config.universe_domain = @alloy_db_admin_stub.universe_domain
|
245
|
+
config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
|
234
246
|
end
|
235
247
|
|
236
248
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -238,6 +250,7 @@ module Google
|
|
238
250
|
config.quota_project = @quota_project_id
|
239
251
|
config.endpoint = @alloy_db_admin_stub.endpoint
|
240
252
|
config.universe_domain = @alloy_db_admin_stub.universe_domain
|
253
|
+
config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
|
241
254
|
end
|
242
255
|
end
|
243
256
|
|
@@ -262,6 +275,15 @@ module Google
|
|
262
275
|
#
|
263
276
|
attr_reader :iam_policy_client
|
264
277
|
|
278
|
+
##
|
279
|
+
# The logger used for request/response debug logging.
|
280
|
+
#
|
281
|
+
# @return [Logger]
|
282
|
+
#
|
283
|
+
def logger
|
284
|
+
@alloy_db_admin_stub.logger
|
285
|
+
end
|
286
|
+
|
265
287
|
# Service calls
|
266
288
|
|
267
289
|
##
|
@@ -361,7 +383,7 @@ module Google
|
|
361
383
|
@alloy_db_admin_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
362
384
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_clusters, request, response, operation, options
|
363
385
|
yield response, operation if block_given?
|
364
|
-
|
386
|
+
throw :response, response
|
365
387
|
end
|
366
388
|
rescue ::GRPC::BadStatus => e
|
367
389
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -451,7 +473,6 @@ module Google
|
|
451
473
|
|
452
474
|
@alloy_db_admin_stub.call_rpc :get_cluster, request, options: options do |response, operation|
|
453
475
|
yield response, operation if block_given?
|
454
|
-
return response
|
455
476
|
end
|
456
477
|
rescue ::GRPC::BadStatus => e
|
457
478
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -568,7 +589,7 @@ module Google
|
|
568
589
|
@alloy_db_admin_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
569
590
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
570
591
|
yield response, operation if block_given?
|
571
|
-
|
592
|
+
throw :response, response
|
572
593
|
end
|
573
594
|
rescue ::GRPC::BadStatus => e
|
574
595
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -689,7 +710,7 @@ module Google
|
|
689
710
|
@alloy_db_admin_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
690
711
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
691
712
|
yield response, operation if block_given?
|
692
|
-
|
713
|
+
throw :response, response
|
693
714
|
end
|
694
715
|
rescue ::GRPC::BadStatus => e
|
695
716
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -808,7 +829,7 @@ module Google
|
|
808
829
|
@alloy_db_admin_stub.call_rpc :upgrade_cluster, request, options: options do |response, operation|
|
809
830
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
810
831
|
yield response, operation if block_given?
|
811
|
-
|
832
|
+
throw :response, response
|
812
833
|
end
|
813
834
|
rescue ::GRPC::BadStatus => e
|
814
835
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -927,7 +948,7 @@ module Google
|
|
927
948
|
@alloy_db_admin_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
928
949
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
929
950
|
yield response, operation if block_given?
|
930
|
-
|
951
|
+
throw :response, response
|
931
952
|
end
|
932
953
|
rescue ::GRPC::BadStatus => e
|
933
954
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1047,7 +1068,7 @@ module Google
|
|
1047
1068
|
@alloy_db_admin_stub.call_rpc :promote_cluster, request, options: options do |response, operation|
|
1048
1069
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1049
1070
|
yield response, operation if block_given?
|
1050
|
-
|
1071
|
+
throw :response, response
|
1051
1072
|
end
|
1052
1073
|
rescue ::GRPC::BadStatus => e
|
1053
1074
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1162,7 +1183,7 @@ module Google
|
|
1162
1183
|
@alloy_db_admin_stub.call_rpc :switchover_cluster, request, options: options do |response, operation|
|
1163
1184
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1164
1185
|
yield response, operation if block_given?
|
1165
|
-
|
1186
|
+
throw :response, response
|
1166
1187
|
end
|
1167
1188
|
rescue ::GRPC::BadStatus => e
|
1168
1189
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1286,7 +1307,7 @@ module Google
|
|
1286
1307
|
@alloy_db_admin_stub.call_rpc :restore_cluster, request, options: options do |response, operation|
|
1287
1308
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1288
1309
|
yield response, operation if block_given?
|
1289
|
-
|
1310
|
+
throw :response, response
|
1290
1311
|
end
|
1291
1312
|
rescue ::GRPC::BadStatus => e
|
1292
1313
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1404,7 +1425,7 @@ module Google
|
|
1404
1425
|
@alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
|
1405
1426
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1406
1427
|
yield response, operation if block_given?
|
1407
|
-
|
1428
|
+
throw :response, response
|
1408
1429
|
end
|
1409
1430
|
rescue ::GRPC::BadStatus => e
|
1410
1431
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1509,7 +1530,7 @@ module Google
|
|
1509
1530
|
@alloy_db_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
1510
1531
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_instances, request, response, operation, options
|
1511
1532
|
yield response, operation if block_given?
|
1512
|
-
|
1533
|
+
throw :response, response
|
1513
1534
|
end
|
1514
1535
|
rescue ::GRPC::BadStatus => e
|
1515
1536
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1598,7 +1619,6 @@ module Google
|
|
1598
1619
|
|
1599
1620
|
@alloy_db_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
1600
1621
|
yield response, operation if block_given?
|
1601
|
-
return response
|
1602
1622
|
end
|
1603
1623
|
rescue ::GRPC::BadStatus => e
|
1604
1624
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1715,7 +1735,7 @@ module Google
|
|
1715
1735
|
@alloy_db_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
1716
1736
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1717
1737
|
yield response, operation if block_given?
|
1718
|
-
|
1738
|
+
throw :response, response
|
1719
1739
|
end
|
1720
1740
|
rescue ::GRPC::BadStatus => e
|
1721
1741
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1832,7 +1852,7 @@ module Google
|
|
1832
1852
|
@alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
|
1833
1853
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1834
1854
|
yield response, operation if block_given?
|
1835
|
-
|
1855
|
+
throw :response, response
|
1836
1856
|
end
|
1837
1857
|
rescue ::GRPC::BadStatus => e
|
1838
1858
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1951,7 +1971,7 @@ module Google
|
|
1951
1971
|
@alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
|
1952
1972
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1953
1973
|
yield response, operation if block_given?
|
1954
|
-
|
1974
|
+
throw :response, response
|
1955
1975
|
end
|
1956
1976
|
rescue ::GRPC::BadStatus => e
|
1957
1977
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2072,7 +2092,7 @@ module Google
|
|
2072
2092
|
@alloy_db_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
2073
2093
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2074
2094
|
yield response, operation if block_given?
|
2075
|
-
|
2095
|
+
throw :response, response
|
2076
2096
|
end
|
2077
2097
|
rescue ::GRPC::BadStatus => e
|
2078
2098
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2189,7 +2209,7 @@ module Google
|
|
2189
2209
|
@alloy_db_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
2190
2210
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2191
2211
|
yield response, operation if block_given?
|
2192
|
-
|
2212
|
+
throw :response, response
|
2193
2213
|
end
|
2194
2214
|
rescue ::GRPC::BadStatus => e
|
2195
2215
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2304,7 +2324,7 @@ module Google
|
|
2304
2324
|
@alloy_db_admin_stub.call_rpc :failover_instance, request, options: options do |response, operation|
|
2305
2325
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2306
2326
|
yield response, operation if block_given?
|
2307
|
-
|
2327
|
+
throw :response, response
|
2308
2328
|
end
|
2309
2329
|
rescue ::GRPC::BadStatus => e
|
2310
2330
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2420,7 +2440,7 @@ module Google
|
|
2420
2440
|
@alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
|
2421
2441
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2422
2442
|
yield response, operation if block_given?
|
2423
|
-
|
2443
|
+
throw :response, response
|
2424
2444
|
end
|
2425
2445
|
rescue ::GRPC::BadStatus => e
|
2426
2446
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2537,7 +2557,7 @@ module Google
|
|
2537
2557
|
@alloy_db_admin_stub.call_rpc :restart_instance, request, options: options do |response, operation|
|
2538
2558
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2539
2559
|
yield response, operation if block_given?
|
2540
|
-
|
2560
|
+
throw :response, response
|
2541
2561
|
end
|
2542
2562
|
rescue ::GRPC::BadStatus => e
|
2543
2563
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2637,7 +2657,6 @@ module Google
|
|
2637
2657
|
|
2638
2658
|
@alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
|
2639
2659
|
yield response, operation if block_given?
|
2640
|
-
return response
|
2641
2660
|
end
|
2642
2661
|
rescue ::GRPC::BadStatus => e
|
2643
2662
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2737,7 +2756,7 @@ module Google
|
|
2737
2756
|
@alloy_db_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
2738
2757
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_backups, request, response, operation, options
|
2739
2758
|
yield response, operation if block_given?
|
2740
|
-
|
2759
|
+
throw :response, response
|
2741
2760
|
end
|
2742
2761
|
rescue ::GRPC::BadStatus => e
|
2743
2762
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2823,7 +2842,6 @@ module Google
|
|
2823
2842
|
|
2824
2843
|
@alloy_db_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
2825
2844
|
yield response, operation if block_given?
|
2826
|
-
return response
|
2827
2845
|
end
|
2828
2846
|
rescue ::GRPC::BadStatus => e
|
2829
2847
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2938,7 +2956,7 @@ module Google
|
|
2938
2956
|
@alloy_db_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
2939
2957
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2940
2958
|
yield response, operation if block_given?
|
2941
|
-
|
2959
|
+
throw :response, response
|
2942
2960
|
end
|
2943
2961
|
rescue ::GRPC::BadStatus => e
|
2944
2962
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3058,7 +3076,7 @@ module Google
|
|
3058
3076
|
@alloy_db_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
3059
3077
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3060
3078
|
yield response, operation if block_given?
|
3061
|
-
|
3079
|
+
throw :response, response
|
3062
3080
|
end
|
3063
3081
|
rescue ::GRPC::BadStatus => e
|
3064
3082
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3174,7 +3192,7 @@ module Google
|
|
3174
3192
|
@alloy_db_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
3175
3193
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3176
3194
|
yield response, operation if block_given?
|
3177
|
-
|
3195
|
+
throw :response, response
|
3178
3196
|
end
|
3179
3197
|
rescue ::GRPC::BadStatus => e
|
3180
3198
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3276,7 +3294,7 @@ module Google
|
|
3276
3294
|
@alloy_db_admin_stub.call_rpc :list_supported_database_flags, request, options: options do |response, operation|
|
3277
3295
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, request, response, operation, options
|
3278
3296
|
yield response, operation if block_given?
|
3279
|
-
|
3297
|
+
throw :response, response
|
3280
3298
|
end
|
3281
3299
|
rescue ::GRPC::BadStatus => e
|
3282
3300
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3396,7 +3414,6 @@ module Google
|
|
3396
3414
|
|
3397
3415
|
@alloy_db_admin_stub.call_rpc :generate_client_certificate, request, options: options do |response, operation|
|
3398
3416
|
yield response, operation if block_given?
|
3399
|
-
return response
|
3400
3417
|
end
|
3401
3418
|
rescue ::GRPC::BadStatus => e
|
3402
3419
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3497,7 +3514,6 @@ module Google
|
|
3497
3514
|
|
3498
3515
|
@alloy_db_admin_stub.call_rpc :get_connection_info, request, options: options do |response, operation|
|
3499
3516
|
yield response, operation if block_given?
|
3500
|
-
return response
|
3501
3517
|
end
|
3502
3518
|
rescue ::GRPC::BadStatus => e
|
3503
3519
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3597,7 +3613,7 @@ module Google
|
|
3597
3613
|
@alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
|
3598
3614
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
|
3599
3615
|
yield response, operation if block_given?
|
3600
|
-
|
3616
|
+
throw :response, response
|
3601
3617
|
end
|
3602
3618
|
rescue ::GRPC::BadStatus => e
|
3603
3619
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3684,7 +3700,6 @@ module Google
|
|
3684
3700
|
|
3685
3701
|
@alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
|
3686
3702
|
yield response, operation if block_given?
|
3687
|
-
return response
|
3688
3703
|
end
|
3689
3704
|
rescue ::GRPC::BadStatus => e
|
3690
3705
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3791,7 +3806,6 @@ module Google
|
|
3791
3806
|
|
3792
3807
|
@alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
|
3793
3808
|
yield response, operation if block_given?
|
3794
|
-
return response
|
3795
3809
|
end
|
3796
3810
|
rescue ::GRPC::BadStatus => e
|
3797
3811
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3902,7 +3916,6 @@ module Google
|
|
3902
3916
|
|
3903
3917
|
@alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
|
3904
3918
|
yield response, operation if block_given?
|
3905
|
-
return response
|
3906
3919
|
end
|
3907
3920
|
rescue ::GRPC::BadStatus => e
|
3908
3921
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4006,7 +4019,6 @@ module Google
|
|
4006
4019
|
|
4007
4020
|
@alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
|
4008
4021
|
yield response, operation if block_given?
|
4009
|
-
return response
|
4010
4022
|
end
|
4011
4023
|
rescue ::GRPC::BadStatus => e
|
4012
4024
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4109,7 +4121,7 @@ module Google
|
|
4109
4121
|
@alloy_db_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
|
4110
4122
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, request, response, operation, options
|
4111
4123
|
yield response, operation if block_given?
|
4112
|
-
|
4124
|
+
throw :response, response
|
4113
4125
|
end
|
4114
4126
|
rescue ::GRPC::BadStatus => e
|
4115
4127
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4198,6 +4210,11 @@ module Google
|
|
4198
4210
|
# default endpoint URL. The default value of nil uses the environment
|
4199
4211
|
# universe (usually the default "googleapis.com" universe).
|
4200
4212
|
# @return [::String,nil]
|
4213
|
+
# @!attribute [rw] logger
|
4214
|
+
# A custom logger to use for request/response debug logging, or the value
|
4215
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4216
|
+
# explicitly disable logging.
|
4217
|
+
# @return [::Logger,:default,nil]
|
4201
4218
|
#
|
4202
4219
|
class Configuration
|
4203
4220
|
extend ::Gapic::Config
|
@@ -4222,6 +4239,7 @@ module Google
|
|
4222
4239
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4223
4240
|
config_attr :quota_project, nil, ::String, nil
|
4224
4241
|
config_attr :universe_domain, nil, ::String, nil
|
4242
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4225
4243
|
|
4226
4244
|
# @private
|
4227
4245
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|