google-cloud-alloy_db-v1beta 0.10.0 → 0.11.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/v1beta/alloy_db_admin/client.rb +54 -36
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/operations.rb +12 -15
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb +50 -36
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/operations.rb +43 -38
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/service_stub.rb +294 -212
- data/lib/google/cloud/alloy_db/v1beta/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: 0e96ffd3ef44b95c421c4d9c6bcf5600e49a581dc20f445656a81677e6d6076e
|
4
|
+
data.tar.gz: '0598102bea45a61b48fd8149f1aec3bc8c71de848d14094b65200e3e783864cd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe59e6f0bf176489febca31dcd2a369a0ac5d845eedebad107f0826c86deff262698cb7c612e58ae536c1bd3e7860caf114ffed77bab59a4f71e2398eee0ccb8
|
7
|
+
data.tar.gz: 7e89c6be29081b7a3f4f327ea6fe138ffba9cd5c4cbfd31458949128c8d5d49ba748db39a7c80c0dc3d53462fd691f646dcee40ffa96751459e8f89fe73bfa4a
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the AlloyDB V1BETA 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/v1beta"
|
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::V1beta::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).
|
@@ -228,14 +228,26 @@ module Google
|
|
228
228
|
universe_domain: @config.universe_domain,
|
229
229
|
channel_args: @config.channel_args,
|
230
230
|
interceptors: @config.interceptors,
|
231
|
-
channel_pool_config: @config.channel_pool
|
231
|
+
channel_pool_config: @config.channel_pool,
|
232
|
+
logger: @config.logger
|
232
233
|
)
|
233
234
|
|
235
|
+
@alloy_db_admin_stub.stub_logger&.info do |entry|
|
236
|
+
entry.set_system_name
|
237
|
+
entry.set_service
|
238
|
+
entry.message = "Created client for #{entry.service}"
|
239
|
+
entry.set_credentials_fields credentials
|
240
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
241
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
242
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
243
|
+
end
|
244
|
+
|
234
245
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
235
246
|
config.credentials = credentials
|
236
247
|
config.quota_project = @quota_project_id
|
237
248
|
config.endpoint = @alloy_db_admin_stub.endpoint
|
238
249
|
config.universe_domain = @alloy_db_admin_stub.universe_domain
|
250
|
+
config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
|
239
251
|
end
|
240
252
|
|
241
253
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -243,6 +255,7 @@ module Google
|
|
243
255
|
config.quota_project = @quota_project_id
|
244
256
|
config.endpoint = @alloy_db_admin_stub.endpoint
|
245
257
|
config.universe_domain = @alloy_db_admin_stub.universe_domain
|
258
|
+
config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
|
246
259
|
end
|
247
260
|
end
|
248
261
|
|
@@ -267,6 +280,15 @@ module Google
|
|
267
280
|
#
|
268
281
|
attr_reader :iam_policy_client
|
269
282
|
|
283
|
+
##
|
284
|
+
# The logger used for request/response debug logging.
|
285
|
+
#
|
286
|
+
# @return [Logger]
|
287
|
+
#
|
288
|
+
def logger
|
289
|
+
@alloy_db_admin_stub.logger
|
290
|
+
end
|
291
|
+
|
270
292
|
# Service calls
|
271
293
|
|
272
294
|
##
|
@@ -366,7 +388,7 @@ module Google
|
|
366
388
|
@alloy_db_admin_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
367
389
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_clusters, request, response, operation, options
|
368
390
|
yield response, operation if block_given?
|
369
|
-
|
391
|
+
throw :response, response
|
370
392
|
end
|
371
393
|
rescue ::GRPC::BadStatus => e
|
372
394
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +478,6 @@ module Google
|
|
456
478
|
|
457
479
|
@alloy_db_admin_stub.call_rpc :get_cluster, request, options: options do |response, operation|
|
458
480
|
yield response, operation if block_given?
|
459
|
-
return response
|
460
481
|
end
|
461
482
|
rescue ::GRPC::BadStatus => e
|
462
483
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -573,7 +594,7 @@ module Google
|
|
573
594
|
@alloy_db_admin_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
574
595
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
575
596
|
yield response, operation if block_given?
|
576
|
-
|
597
|
+
throw :response, response
|
577
598
|
end
|
578
599
|
rescue ::GRPC::BadStatus => e
|
579
600
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -694,7 +715,7 @@ module Google
|
|
694
715
|
@alloy_db_admin_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
695
716
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
696
717
|
yield response, operation if block_given?
|
697
|
-
|
718
|
+
throw :response, response
|
698
719
|
end
|
699
720
|
rescue ::GRPC::BadStatus => e
|
700
721
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -813,7 +834,7 @@ module Google
|
|
813
834
|
@alloy_db_admin_stub.call_rpc :upgrade_cluster, request, options: options do |response, operation|
|
814
835
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
815
836
|
yield response, operation if block_given?
|
816
|
-
|
837
|
+
throw :response, response
|
817
838
|
end
|
818
839
|
rescue ::GRPC::BadStatus => e
|
819
840
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -932,7 +953,7 @@ module Google
|
|
932
953
|
@alloy_db_admin_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
933
954
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
934
955
|
yield response, operation if block_given?
|
935
|
-
|
956
|
+
throw :response, response
|
936
957
|
end
|
937
958
|
rescue ::GRPC::BadStatus => e
|
938
959
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1052,7 +1073,7 @@ module Google
|
|
1052
1073
|
@alloy_db_admin_stub.call_rpc :promote_cluster, request, options: options do |response, operation|
|
1053
1074
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1054
1075
|
yield response, operation if block_given?
|
1055
|
-
|
1076
|
+
throw :response, response
|
1056
1077
|
end
|
1057
1078
|
rescue ::GRPC::BadStatus => e
|
1058
1079
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1167,7 +1188,7 @@ module Google
|
|
1167
1188
|
@alloy_db_admin_stub.call_rpc :switchover_cluster, request, options: options do |response, operation|
|
1168
1189
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1169
1190
|
yield response, operation if block_given?
|
1170
|
-
|
1191
|
+
throw :response, response
|
1171
1192
|
end
|
1172
1193
|
rescue ::GRPC::BadStatus => e
|
1173
1194
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1291,7 +1312,7 @@ module Google
|
|
1291
1312
|
@alloy_db_admin_stub.call_rpc :restore_cluster, request, options: options do |response, operation|
|
1292
1313
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1293
1314
|
yield response, operation if block_given?
|
1294
|
-
|
1315
|
+
throw :response, response
|
1295
1316
|
end
|
1296
1317
|
rescue ::GRPC::BadStatus => e
|
1297
1318
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1409,7 +1430,7 @@ module Google
|
|
1409
1430
|
@alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
|
1410
1431
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1411
1432
|
yield response, operation if block_given?
|
1412
|
-
|
1433
|
+
throw :response, response
|
1413
1434
|
end
|
1414
1435
|
rescue ::GRPC::BadStatus => e
|
1415
1436
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1514,7 +1535,7 @@ module Google
|
|
1514
1535
|
@alloy_db_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
1515
1536
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_instances, request, response, operation, options
|
1516
1537
|
yield response, operation if block_given?
|
1517
|
-
|
1538
|
+
throw :response, response
|
1518
1539
|
end
|
1519
1540
|
rescue ::GRPC::BadStatus => e
|
1520
1541
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1603,7 +1624,6 @@ module Google
|
|
1603
1624
|
|
1604
1625
|
@alloy_db_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
1605
1626
|
yield response, operation if block_given?
|
1606
|
-
return response
|
1607
1627
|
end
|
1608
1628
|
rescue ::GRPC::BadStatus => e
|
1609
1629
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1720,7 +1740,7 @@ module Google
|
|
1720
1740
|
@alloy_db_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
1721
1741
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1722
1742
|
yield response, operation if block_given?
|
1723
|
-
|
1743
|
+
throw :response, response
|
1724
1744
|
end
|
1725
1745
|
rescue ::GRPC::BadStatus => e
|
1726
1746
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1837,7 +1857,7 @@ module Google
|
|
1837
1857
|
@alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
|
1838
1858
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1839
1859
|
yield response, operation if block_given?
|
1840
|
-
|
1860
|
+
throw :response, response
|
1841
1861
|
end
|
1842
1862
|
rescue ::GRPC::BadStatus => e
|
1843
1863
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1956,7 +1976,7 @@ module Google
|
|
1956
1976
|
@alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
|
1957
1977
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1958
1978
|
yield response, operation if block_given?
|
1959
|
-
|
1979
|
+
throw :response, response
|
1960
1980
|
end
|
1961
1981
|
rescue ::GRPC::BadStatus => e
|
1962
1982
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2077,7 +2097,7 @@ module Google
|
|
2077
2097
|
@alloy_db_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
2078
2098
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2079
2099
|
yield response, operation if block_given?
|
2080
|
-
|
2100
|
+
throw :response, response
|
2081
2101
|
end
|
2082
2102
|
rescue ::GRPC::BadStatus => e
|
2083
2103
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2194,7 +2214,7 @@ module Google
|
|
2194
2214
|
@alloy_db_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
2195
2215
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2196
2216
|
yield response, operation if block_given?
|
2197
|
-
|
2217
|
+
throw :response, response
|
2198
2218
|
end
|
2199
2219
|
rescue ::GRPC::BadStatus => e
|
2200
2220
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2309,7 +2329,7 @@ module Google
|
|
2309
2329
|
@alloy_db_admin_stub.call_rpc :failover_instance, request, options: options do |response, operation|
|
2310
2330
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2311
2331
|
yield response, operation if block_given?
|
2312
|
-
|
2332
|
+
throw :response, response
|
2313
2333
|
end
|
2314
2334
|
rescue ::GRPC::BadStatus => e
|
2315
2335
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2425,7 +2445,7 @@ module Google
|
|
2425
2445
|
@alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
|
2426
2446
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2427
2447
|
yield response, operation if block_given?
|
2428
|
-
|
2448
|
+
throw :response, response
|
2429
2449
|
end
|
2430
2450
|
rescue ::GRPC::BadStatus => e
|
2431
2451
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2542,7 +2562,7 @@ module Google
|
|
2542
2562
|
@alloy_db_admin_stub.call_rpc :restart_instance, request, options: options do |response, operation|
|
2543
2563
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2544
2564
|
yield response, operation if block_given?
|
2545
|
-
|
2565
|
+
throw :response, response
|
2546
2566
|
end
|
2547
2567
|
rescue ::GRPC::BadStatus => e
|
2548
2568
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2642,7 +2662,6 @@ module Google
|
|
2642
2662
|
|
2643
2663
|
@alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
|
2644
2664
|
yield response, operation if block_given?
|
2645
|
-
return response
|
2646
2665
|
end
|
2647
2666
|
rescue ::GRPC::BadStatus => e
|
2648
2667
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2742,7 +2761,7 @@ module Google
|
|
2742
2761
|
@alloy_db_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
2743
2762
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_backups, request, response, operation, options
|
2744
2763
|
yield response, operation if block_given?
|
2745
|
-
|
2764
|
+
throw :response, response
|
2746
2765
|
end
|
2747
2766
|
rescue ::GRPC::BadStatus => e
|
2748
2767
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2828,7 +2847,6 @@ module Google
|
|
2828
2847
|
|
2829
2848
|
@alloy_db_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
2830
2849
|
yield response, operation if block_given?
|
2831
|
-
return response
|
2832
2850
|
end
|
2833
2851
|
rescue ::GRPC::BadStatus => e
|
2834
2852
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2943,7 +2961,7 @@ module Google
|
|
2943
2961
|
@alloy_db_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
2944
2962
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2945
2963
|
yield response, operation if block_given?
|
2946
|
-
|
2964
|
+
throw :response, response
|
2947
2965
|
end
|
2948
2966
|
rescue ::GRPC::BadStatus => e
|
2949
2967
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3063,7 +3081,7 @@ module Google
|
|
3063
3081
|
@alloy_db_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
3064
3082
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3065
3083
|
yield response, operation if block_given?
|
3066
|
-
|
3084
|
+
throw :response, response
|
3067
3085
|
end
|
3068
3086
|
rescue ::GRPC::BadStatus => e
|
3069
3087
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3179,7 +3197,7 @@ module Google
|
|
3179
3197
|
@alloy_db_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
3180
3198
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3181
3199
|
yield response, operation if block_given?
|
3182
|
-
|
3200
|
+
throw :response, response
|
3183
3201
|
end
|
3184
3202
|
rescue ::GRPC::BadStatus => e
|
3185
3203
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3281,7 +3299,7 @@ module Google
|
|
3281
3299
|
@alloy_db_admin_stub.call_rpc :list_supported_database_flags, request, options: options do |response, operation|
|
3282
3300
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, request, response, operation, options
|
3283
3301
|
yield response, operation if block_given?
|
3284
|
-
|
3302
|
+
throw :response, response
|
3285
3303
|
end
|
3286
3304
|
rescue ::GRPC::BadStatus => e
|
3287
3305
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3401,7 +3419,6 @@ module Google
|
|
3401
3419
|
|
3402
3420
|
@alloy_db_admin_stub.call_rpc :generate_client_certificate, request, options: options do |response, operation|
|
3403
3421
|
yield response, operation if block_given?
|
3404
|
-
return response
|
3405
3422
|
end
|
3406
3423
|
rescue ::GRPC::BadStatus => e
|
3407
3424
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3502,7 +3519,6 @@ module Google
|
|
3502
3519
|
|
3503
3520
|
@alloy_db_admin_stub.call_rpc :get_connection_info, request, options: options do |response, operation|
|
3504
3521
|
yield response, operation if block_given?
|
3505
|
-
return response
|
3506
3522
|
end
|
3507
3523
|
rescue ::GRPC::BadStatus => e
|
3508
3524
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3602,7 +3618,7 @@ module Google
|
|
3602
3618
|
@alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
|
3603
3619
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
|
3604
3620
|
yield response, operation if block_given?
|
3605
|
-
|
3621
|
+
throw :response, response
|
3606
3622
|
end
|
3607
3623
|
rescue ::GRPC::BadStatus => e
|
3608
3624
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3689,7 +3705,6 @@ module Google
|
|
3689
3705
|
|
3690
3706
|
@alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
|
3691
3707
|
yield response, operation if block_given?
|
3692
|
-
return response
|
3693
3708
|
end
|
3694
3709
|
rescue ::GRPC::BadStatus => e
|
3695
3710
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3796,7 +3811,6 @@ module Google
|
|
3796
3811
|
|
3797
3812
|
@alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
|
3798
3813
|
yield response, operation if block_given?
|
3799
|
-
return response
|
3800
3814
|
end
|
3801
3815
|
rescue ::GRPC::BadStatus => e
|
3802
3816
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3907,7 +3921,6 @@ module Google
|
|
3907
3921
|
|
3908
3922
|
@alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
|
3909
3923
|
yield response, operation if block_given?
|
3910
|
-
return response
|
3911
3924
|
end
|
3912
3925
|
rescue ::GRPC::BadStatus => e
|
3913
3926
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4011,7 +4024,6 @@ module Google
|
|
4011
4024
|
|
4012
4025
|
@alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
|
4013
4026
|
yield response, operation if block_given?
|
4014
|
-
return response
|
4015
4027
|
end
|
4016
4028
|
rescue ::GRPC::BadStatus => e
|
4017
4029
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4114,7 +4126,7 @@ module Google
|
|
4114
4126
|
@alloy_db_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
|
4115
4127
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, request, response, operation, options
|
4116
4128
|
yield response, operation if block_given?
|
4117
|
-
|
4129
|
+
throw :response, response
|
4118
4130
|
end
|
4119
4131
|
rescue ::GRPC::BadStatus => e
|
4120
4132
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4203,6 +4215,11 @@ module Google
|
|
4203
4215
|
# default endpoint URL. The default value of nil uses the environment
|
4204
4216
|
# universe (usually the default "googleapis.com" universe).
|
4205
4217
|
# @return [::String,nil]
|
4218
|
+
# @!attribute [rw] logger
|
4219
|
+
# A custom logger to use for request/response debug logging, or the value
|
4220
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4221
|
+
# explicitly disable logging.
|
4222
|
+
# @return [::Logger,:default,nil]
|
4206
4223
|
#
|
4207
4224
|
class Configuration
|
4208
4225
|
extend ::Gapic::Config
|
@@ -4227,6 +4244,7 @@ module Google
|
|
4227
4244
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4228
4245
|
config_attr :quota_project, nil, ::String, nil
|
4229
4246
|
config_attr :universe_domain, nil, ::String, nil
|
4247
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4230
4248
|
|
4231
4249
|
# @private
|
4232
4250
|
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
|