google-cloud-alloy_db-v1beta 0.10.0 → 0.12.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 +32 -22
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb +65 -36
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/operations.rb +19 -15
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb +61 -36
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/operations.rb +50 -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/cloud/alloydb/v1beta/resources.rb +14 -0
- data/proto_docs/google/cloud/alloydb/v1beta/service.rb +10 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- metadata +7 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f72be4e0edfa6d41f560cae770bda064f6174884f0be3a072a5af5da69a28ae7
|
4
|
+
data.tar.gz: 371b90099b5e34be20bb5a0fdc04f4fe3eee278930ebb80031db65b105937815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e27bd9ee6a0bbe9f3b2326b131e41f68676f8a1bacdc4d508b74c97b7f83bf0c69807b7038fdcbdc6cfdd239220bfeea66b6ac64f958158da5c28774e7169a1a
|
7
|
+
data.tar.gz: 6de829b0848b64e1b87c62662d3633b5a10edfbf689f359fa2a2c128b125f93deec09e05d9234add2e47bc3771e15ddc94710e5ea9135f29aad67717247994c8
|
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,40 +43,50 @@ 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).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -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)
|
@@ -1195,9 +1216,13 @@ module Google
|
|
1195
1216
|
#
|
1196
1217
|
# @param backup_source [::Google::Cloud::AlloyDB::V1beta::BackupSource, ::Hash]
|
1197
1218
|
# Backup source.
|
1219
|
+
#
|
1220
|
+
# Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1198
1221
|
# @param continuous_backup_source [::Google::Cloud::AlloyDB::V1beta::ContinuousBackupSource, ::Hash]
|
1199
1222
|
# ContinuousBackup source. Continuous backup needs to be enabled in the
|
1200
1223
|
# source cluster for this operation to succeed.
|
1224
|
+
#
|
1225
|
+
# Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1201
1226
|
# @param parent [::String]
|
1202
1227
|
# Required. The name of the parent resource. For the required format, see the
|
1203
1228
|
# comment on the Cluster.name field.
|
@@ -1291,7 +1316,7 @@ module Google
|
|
1291
1316
|
@alloy_db_admin_stub.call_rpc :restore_cluster, request, options: options do |response, operation|
|
1292
1317
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1293
1318
|
yield response, operation if block_given?
|
1294
|
-
|
1319
|
+
throw :response, response
|
1295
1320
|
end
|
1296
1321
|
rescue ::GRPC::BadStatus => e
|
1297
1322
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1409,7 +1434,7 @@ module Google
|
|
1409
1434
|
@alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
|
1410
1435
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1411
1436
|
yield response, operation if block_given?
|
1412
|
-
|
1437
|
+
throw :response, response
|
1413
1438
|
end
|
1414
1439
|
rescue ::GRPC::BadStatus => e
|
1415
1440
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1514,7 +1539,7 @@ module Google
|
|
1514
1539
|
@alloy_db_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
1515
1540
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_instances, request, response, operation, options
|
1516
1541
|
yield response, operation if block_given?
|
1517
|
-
|
1542
|
+
throw :response, response
|
1518
1543
|
end
|
1519
1544
|
rescue ::GRPC::BadStatus => e
|
1520
1545
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1603,7 +1628,6 @@ module Google
|
|
1603
1628
|
|
1604
1629
|
@alloy_db_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
1605
1630
|
yield response, operation if block_given?
|
1606
|
-
return response
|
1607
1631
|
end
|
1608
1632
|
rescue ::GRPC::BadStatus => e
|
1609
1633
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1720,7 +1744,7 @@ module Google
|
|
1720
1744
|
@alloy_db_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
1721
1745
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1722
1746
|
yield response, operation if block_given?
|
1723
|
-
|
1747
|
+
throw :response, response
|
1724
1748
|
end
|
1725
1749
|
rescue ::GRPC::BadStatus => e
|
1726
1750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1837,7 +1861,7 @@ module Google
|
|
1837
1861
|
@alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
|
1838
1862
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1839
1863
|
yield response, operation if block_given?
|
1840
|
-
|
1864
|
+
throw :response, response
|
1841
1865
|
end
|
1842
1866
|
rescue ::GRPC::BadStatus => e
|
1843
1867
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1956,7 +1980,7 @@ module Google
|
|
1956
1980
|
@alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
|
1957
1981
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1958
1982
|
yield response, operation if block_given?
|
1959
|
-
|
1983
|
+
throw :response, response
|
1960
1984
|
end
|
1961
1985
|
rescue ::GRPC::BadStatus => e
|
1962
1986
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2077,7 +2101,7 @@ module Google
|
|
2077
2101
|
@alloy_db_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
2078
2102
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2079
2103
|
yield response, operation if block_given?
|
2080
|
-
|
2104
|
+
throw :response, response
|
2081
2105
|
end
|
2082
2106
|
rescue ::GRPC::BadStatus => e
|
2083
2107
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2194,7 +2218,7 @@ module Google
|
|
2194
2218
|
@alloy_db_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
2195
2219
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2196
2220
|
yield response, operation if block_given?
|
2197
|
-
|
2221
|
+
throw :response, response
|
2198
2222
|
end
|
2199
2223
|
rescue ::GRPC::BadStatus => e
|
2200
2224
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2309,7 +2333,7 @@ module Google
|
|
2309
2333
|
@alloy_db_admin_stub.call_rpc :failover_instance, request, options: options do |response, operation|
|
2310
2334
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2311
2335
|
yield response, operation if block_given?
|
2312
|
-
|
2336
|
+
throw :response, response
|
2313
2337
|
end
|
2314
2338
|
rescue ::GRPC::BadStatus => e
|
2315
2339
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2425,7 +2449,7 @@ module Google
|
|
2425
2449
|
@alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
|
2426
2450
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2427
2451
|
yield response, operation if block_given?
|
2428
|
-
|
2452
|
+
throw :response, response
|
2429
2453
|
end
|
2430
2454
|
rescue ::GRPC::BadStatus => e
|
2431
2455
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2542,7 +2566,7 @@ module Google
|
|
2542
2566
|
@alloy_db_admin_stub.call_rpc :restart_instance, request, options: options do |response, operation|
|
2543
2567
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2544
2568
|
yield response, operation if block_given?
|
2545
|
-
|
2569
|
+
throw :response, response
|
2546
2570
|
end
|
2547
2571
|
rescue ::GRPC::BadStatus => e
|
2548
2572
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2642,7 +2666,6 @@ module Google
|
|
2642
2666
|
|
2643
2667
|
@alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
|
2644
2668
|
yield response, operation if block_given?
|
2645
|
-
return response
|
2646
2669
|
end
|
2647
2670
|
rescue ::GRPC::BadStatus => e
|
2648
2671
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2742,7 +2765,7 @@ module Google
|
|
2742
2765
|
@alloy_db_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
2743
2766
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_backups, request, response, operation, options
|
2744
2767
|
yield response, operation if block_given?
|
2745
|
-
|
2768
|
+
throw :response, response
|
2746
2769
|
end
|
2747
2770
|
rescue ::GRPC::BadStatus => e
|
2748
2771
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2828,7 +2851,6 @@ module Google
|
|
2828
2851
|
|
2829
2852
|
@alloy_db_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
2830
2853
|
yield response, operation if block_given?
|
2831
|
-
return response
|
2832
2854
|
end
|
2833
2855
|
rescue ::GRPC::BadStatus => e
|
2834
2856
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2943,7 +2965,7 @@ module Google
|
|
2943
2965
|
@alloy_db_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
2944
2966
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2945
2967
|
yield response, operation if block_given?
|
2946
|
-
|
2968
|
+
throw :response, response
|
2947
2969
|
end
|
2948
2970
|
rescue ::GRPC::BadStatus => e
|
2949
2971
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3063,7 +3085,7 @@ module Google
|
|
3063
3085
|
@alloy_db_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
3064
3086
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3065
3087
|
yield response, operation if block_given?
|
3066
|
-
|
3088
|
+
throw :response, response
|
3067
3089
|
end
|
3068
3090
|
rescue ::GRPC::BadStatus => e
|
3069
3091
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3179,7 +3201,7 @@ module Google
|
|
3179
3201
|
@alloy_db_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
3180
3202
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3181
3203
|
yield response, operation if block_given?
|
3182
|
-
|
3204
|
+
throw :response, response
|
3183
3205
|
end
|
3184
3206
|
rescue ::GRPC::BadStatus => e
|
3185
3207
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3281,7 +3303,7 @@ module Google
|
|
3281
3303
|
@alloy_db_admin_stub.call_rpc :list_supported_database_flags, request, options: options do |response, operation|
|
3282
3304
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, request, response, operation, options
|
3283
3305
|
yield response, operation if block_given?
|
3284
|
-
|
3306
|
+
throw :response, response
|
3285
3307
|
end
|
3286
3308
|
rescue ::GRPC::BadStatus => e
|
3287
3309
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3401,7 +3423,6 @@ module Google
|
|
3401
3423
|
|
3402
3424
|
@alloy_db_admin_stub.call_rpc :generate_client_certificate, request, options: options do |response, operation|
|
3403
3425
|
yield response, operation if block_given?
|
3404
|
-
return response
|
3405
3426
|
end
|
3406
3427
|
rescue ::GRPC::BadStatus => e
|
3407
3428
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3502,7 +3523,6 @@ module Google
|
|
3502
3523
|
|
3503
3524
|
@alloy_db_admin_stub.call_rpc :get_connection_info, request, options: options do |response, operation|
|
3504
3525
|
yield response, operation if block_given?
|
3505
|
-
return response
|
3506
3526
|
end
|
3507
3527
|
rescue ::GRPC::BadStatus => e
|
3508
3528
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3602,7 +3622,7 @@ module Google
|
|
3602
3622
|
@alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
|
3603
3623
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
|
3604
3624
|
yield response, operation if block_given?
|
3605
|
-
|
3625
|
+
throw :response, response
|
3606
3626
|
end
|
3607
3627
|
rescue ::GRPC::BadStatus => e
|
3608
3628
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3689,7 +3709,6 @@ module Google
|
|
3689
3709
|
|
3690
3710
|
@alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
|
3691
3711
|
yield response, operation if block_given?
|
3692
|
-
return response
|
3693
3712
|
end
|
3694
3713
|
rescue ::GRPC::BadStatus => e
|
3695
3714
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3796,7 +3815,6 @@ module Google
|
|
3796
3815
|
|
3797
3816
|
@alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
|
3798
3817
|
yield response, operation if block_given?
|
3799
|
-
return response
|
3800
3818
|
end
|
3801
3819
|
rescue ::GRPC::BadStatus => e
|
3802
3820
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3907,7 +3925,6 @@ module Google
|
|
3907
3925
|
|
3908
3926
|
@alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
|
3909
3927
|
yield response, operation if block_given?
|
3910
|
-
return response
|
3911
3928
|
end
|
3912
3929
|
rescue ::GRPC::BadStatus => e
|
3913
3930
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4011,7 +4028,6 @@ module Google
|
|
4011
4028
|
|
4012
4029
|
@alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
|
4013
4030
|
yield response, operation if block_given?
|
4014
|
-
return response
|
4015
4031
|
end
|
4016
4032
|
rescue ::GRPC::BadStatus => e
|
4017
4033
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4114,7 +4130,7 @@ module Google
|
|
4114
4130
|
@alloy_db_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
|
4115
4131
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, request, response, operation, options
|
4116
4132
|
yield response, operation if block_given?
|
4117
|
-
|
4133
|
+
throw :response, response
|
4118
4134
|
end
|
4119
4135
|
rescue ::GRPC::BadStatus => e
|
4120
4136
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4164,6 +4180,13 @@ module Google
|
|
4164
4180
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
4165
4181
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
4166
4182
|
# * (`nil`) indicating no credentials
|
4183
|
+
#
|
4184
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
4185
|
+
# external source for authentication to Google Cloud, you must validate it before
|
4186
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
4187
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
4188
|
+
# For more information, refer to [Validate credential configurations from external
|
4189
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
4167
4190
|
# @return [::Object]
|
4168
4191
|
# @!attribute [rw] scope
|
4169
4192
|
# The OAuth scopes
|
@@ -4203,6 +4226,11 @@ module Google
|
|
4203
4226
|
# default endpoint URL. The default value of nil uses the environment
|
4204
4227
|
# universe (usually the default "googleapis.com" universe).
|
4205
4228
|
# @return [::String,nil]
|
4229
|
+
# @!attribute [rw] logger
|
4230
|
+
# A custom logger to use for request/response debug logging, or the value
|
4231
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4232
|
+
# explicitly disable logging.
|
4233
|
+
# @return [::Logger,:default,nil]
|
4206
4234
|
#
|
4207
4235
|
class Configuration
|
4208
4236
|
extend ::Gapic::Config
|
@@ -4227,6 +4255,7 @@ module Google
|
|
4227
4255
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4228
4256
|
config_attr :quota_project, nil, ::String, nil
|
4229
4257
|
config_attr :universe_domain, nil, ::String, nil
|
4258
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4230
4259
|
|
4231
4260
|
# @private
|
4232
4261
|
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)
|
@@ -649,6 +640,13 @@ module Google
|
|
649
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
650
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
651
642
|
# * (`nil`) indicating no credentials
|
643
|
+
#
|
644
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
645
|
+
# external source for authentication to Google Cloud, you must validate it before
|
646
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
647
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
648
|
+
# For more information, refer to [Validate credential configurations from external
|
649
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
652
650
|
# @return [::Object]
|
653
651
|
# @!attribute [rw] scope
|
654
652
|
# The OAuth scopes
|
@@ -688,6 +686,11 @@ module Google
|
|
688
686
|
# default endpoint URL. The default value of nil uses the environment
|
689
687
|
# universe (usually the default "googleapis.com" universe).
|
690
688
|
# @return [::String,nil]
|
689
|
+
# @!attribute [rw] logger
|
690
|
+
# A custom logger to use for request/response debug logging, or the value
|
691
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
692
|
+
# explicitly disable logging.
|
693
|
+
# @return [::Logger,:default,nil]
|
691
694
|
#
|
692
695
|
class Configuration
|
693
696
|
extend ::Gapic::Config
|
@@ -712,6 +715,7 @@ module Google
|
|
712
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
716
|
config_attr :quota_project, nil, ::String, nil
|
714
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
719
|
|
716
720
|
# @private
|
717
721
|
def initialize parent_config = nil
|