google-cloud-alloy_db-v1alpha 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +32 -22
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/client.rb +65 -36
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/operations.rb +19 -15
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb +61 -36
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/operations.rb +50 -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/cloud/alloydb/v1alpha/resources.rb +14 -0
- data/proto_docs/google/cloud/alloydb/v1alpha/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: 2c9905ae514bf16fb44dcd530487eec3f337ffe07ab155a3b3c4adfb351b0d4f
|
4
|
+
data.tar.gz: 3c0b911a2142203c1a1f99661a0e5a2430bae8dcb1cceea008cdbd7947d5c522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4247017d4abac63e32b0afc50947088d81ce0a6d11258d3d771a217c4d0a837ae4850af18d77d1842ef270279bad69527d3958560a6b8cfe98e9c3399e041807
|
7
|
+
data.tar.gz: 4426e0d9c22d9ed7b44e1d445065e46b2b08f6ef02d7986967b1a119f79705857256aff588c50621a5e23b5d96207a2683bdba13745a09a6147c0b76d5a41906
|
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,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/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).
|
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
|
@@ -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)
|
@@ -1190,9 +1211,13 @@ module Google
|
|
1190
1211
|
#
|
1191
1212
|
# @param backup_source [::Google::Cloud::AlloyDB::V1alpha::BackupSource, ::Hash]
|
1192
1213
|
# Backup source.
|
1214
|
+
#
|
1215
|
+
# 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.
|
1193
1216
|
# @param continuous_backup_source [::Google::Cloud::AlloyDB::V1alpha::ContinuousBackupSource, ::Hash]
|
1194
1217
|
# ContinuousBackup source. Continuous backup needs to be enabled in the
|
1195
1218
|
# source cluster for this operation to succeed.
|
1219
|
+
#
|
1220
|
+
# 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.
|
1196
1221
|
# @param parent [::String]
|
1197
1222
|
# Required. The name of the parent resource. For the required format, see the
|
1198
1223
|
# comment on the Cluster.name field.
|
@@ -1286,7 +1311,7 @@ module Google
|
|
1286
1311
|
@alloy_db_admin_stub.call_rpc :restore_cluster, request, options: options do |response, operation|
|
1287
1312
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1288
1313
|
yield response, operation if block_given?
|
1289
|
-
|
1314
|
+
throw :response, response
|
1290
1315
|
end
|
1291
1316
|
rescue ::GRPC::BadStatus => e
|
1292
1317
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1404,7 +1429,7 @@ module Google
|
|
1404
1429
|
@alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
|
1405
1430
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1406
1431
|
yield response, operation if block_given?
|
1407
|
-
|
1432
|
+
throw :response, response
|
1408
1433
|
end
|
1409
1434
|
rescue ::GRPC::BadStatus => e
|
1410
1435
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1509,7 +1534,7 @@ module Google
|
|
1509
1534
|
@alloy_db_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
1510
1535
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_instances, request, response, operation, options
|
1511
1536
|
yield response, operation if block_given?
|
1512
|
-
|
1537
|
+
throw :response, response
|
1513
1538
|
end
|
1514
1539
|
rescue ::GRPC::BadStatus => e
|
1515
1540
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1598,7 +1623,6 @@ module Google
|
|
1598
1623
|
|
1599
1624
|
@alloy_db_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
1600
1625
|
yield response, operation if block_given?
|
1601
|
-
return response
|
1602
1626
|
end
|
1603
1627
|
rescue ::GRPC::BadStatus => e
|
1604
1628
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1715,7 +1739,7 @@ module Google
|
|
1715
1739
|
@alloy_db_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
1716
1740
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1717
1741
|
yield response, operation if block_given?
|
1718
|
-
|
1742
|
+
throw :response, response
|
1719
1743
|
end
|
1720
1744
|
rescue ::GRPC::BadStatus => e
|
1721
1745
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1832,7 +1856,7 @@ module Google
|
|
1832
1856
|
@alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
|
1833
1857
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1834
1858
|
yield response, operation if block_given?
|
1835
|
-
|
1859
|
+
throw :response, response
|
1836
1860
|
end
|
1837
1861
|
rescue ::GRPC::BadStatus => e
|
1838
1862
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1951,7 +1975,7 @@ module Google
|
|
1951
1975
|
@alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
|
1952
1976
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1953
1977
|
yield response, operation if block_given?
|
1954
|
-
|
1978
|
+
throw :response, response
|
1955
1979
|
end
|
1956
1980
|
rescue ::GRPC::BadStatus => e
|
1957
1981
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2072,7 +2096,7 @@ module Google
|
|
2072
2096
|
@alloy_db_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
2073
2097
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2074
2098
|
yield response, operation if block_given?
|
2075
|
-
|
2099
|
+
throw :response, response
|
2076
2100
|
end
|
2077
2101
|
rescue ::GRPC::BadStatus => e
|
2078
2102
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2189,7 +2213,7 @@ module Google
|
|
2189
2213
|
@alloy_db_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
2190
2214
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2191
2215
|
yield response, operation if block_given?
|
2192
|
-
|
2216
|
+
throw :response, response
|
2193
2217
|
end
|
2194
2218
|
rescue ::GRPC::BadStatus => e
|
2195
2219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2304,7 +2328,7 @@ module Google
|
|
2304
2328
|
@alloy_db_admin_stub.call_rpc :failover_instance, request, options: options do |response, operation|
|
2305
2329
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2306
2330
|
yield response, operation if block_given?
|
2307
|
-
|
2331
|
+
throw :response, response
|
2308
2332
|
end
|
2309
2333
|
rescue ::GRPC::BadStatus => e
|
2310
2334
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2420,7 +2444,7 @@ module Google
|
|
2420
2444
|
@alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
|
2421
2445
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2422
2446
|
yield response, operation if block_given?
|
2423
|
-
|
2447
|
+
throw :response, response
|
2424
2448
|
end
|
2425
2449
|
rescue ::GRPC::BadStatus => e
|
2426
2450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2537,7 +2561,7 @@ module Google
|
|
2537
2561
|
@alloy_db_admin_stub.call_rpc :restart_instance, request, options: options do |response, operation|
|
2538
2562
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2539
2563
|
yield response, operation if block_given?
|
2540
|
-
|
2564
|
+
throw :response, response
|
2541
2565
|
end
|
2542
2566
|
rescue ::GRPC::BadStatus => e
|
2543
2567
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2637,7 +2661,6 @@ module Google
|
|
2637
2661
|
|
2638
2662
|
@alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
|
2639
2663
|
yield response, operation if block_given?
|
2640
|
-
return response
|
2641
2664
|
end
|
2642
2665
|
rescue ::GRPC::BadStatus => e
|
2643
2666
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2737,7 +2760,7 @@ module Google
|
|
2737
2760
|
@alloy_db_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
2738
2761
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_backups, request, response, operation, options
|
2739
2762
|
yield response, operation if block_given?
|
2740
|
-
|
2763
|
+
throw :response, response
|
2741
2764
|
end
|
2742
2765
|
rescue ::GRPC::BadStatus => e
|
2743
2766
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2823,7 +2846,6 @@ module Google
|
|
2823
2846
|
|
2824
2847
|
@alloy_db_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
2825
2848
|
yield response, operation if block_given?
|
2826
|
-
return response
|
2827
2849
|
end
|
2828
2850
|
rescue ::GRPC::BadStatus => e
|
2829
2851
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2938,7 +2960,7 @@ module Google
|
|
2938
2960
|
@alloy_db_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
2939
2961
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2940
2962
|
yield response, operation if block_given?
|
2941
|
-
|
2963
|
+
throw :response, response
|
2942
2964
|
end
|
2943
2965
|
rescue ::GRPC::BadStatus => e
|
2944
2966
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3058,7 +3080,7 @@ module Google
|
|
3058
3080
|
@alloy_db_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
3059
3081
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3060
3082
|
yield response, operation if block_given?
|
3061
|
-
|
3083
|
+
throw :response, response
|
3062
3084
|
end
|
3063
3085
|
rescue ::GRPC::BadStatus => e
|
3064
3086
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3174,7 +3196,7 @@ module Google
|
|
3174
3196
|
@alloy_db_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
3175
3197
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3176
3198
|
yield response, operation if block_given?
|
3177
|
-
|
3199
|
+
throw :response, response
|
3178
3200
|
end
|
3179
3201
|
rescue ::GRPC::BadStatus => e
|
3180
3202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3276,7 +3298,7 @@ module Google
|
|
3276
3298
|
@alloy_db_admin_stub.call_rpc :list_supported_database_flags, request, options: options do |response, operation|
|
3277
3299
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, request, response, operation, options
|
3278
3300
|
yield response, operation if block_given?
|
3279
|
-
|
3301
|
+
throw :response, response
|
3280
3302
|
end
|
3281
3303
|
rescue ::GRPC::BadStatus => e
|
3282
3304
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3396,7 +3418,6 @@ module Google
|
|
3396
3418
|
|
3397
3419
|
@alloy_db_admin_stub.call_rpc :generate_client_certificate, request, options: options do |response, operation|
|
3398
3420
|
yield response, operation if block_given?
|
3399
|
-
return response
|
3400
3421
|
end
|
3401
3422
|
rescue ::GRPC::BadStatus => e
|
3402
3423
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3497,7 +3518,6 @@ module Google
|
|
3497
3518
|
|
3498
3519
|
@alloy_db_admin_stub.call_rpc :get_connection_info, request, options: options do |response, operation|
|
3499
3520
|
yield response, operation if block_given?
|
3500
|
-
return response
|
3501
3521
|
end
|
3502
3522
|
rescue ::GRPC::BadStatus => e
|
3503
3523
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3597,7 +3617,7 @@ module Google
|
|
3597
3617
|
@alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
|
3598
3618
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
|
3599
3619
|
yield response, operation if block_given?
|
3600
|
-
|
3620
|
+
throw :response, response
|
3601
3621
|
end
|
3602
3622
|
rescue ::GRPC::BadStatus => e
|
3603
3623
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3684,7 +3704,6 @@ module Google
|
|
3684
3704
|
|
3685
3705
|
@alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
|
3686
3706
|
yield response, operation if block_given?
|
3687
|
-
return response
|
3688
3707
|
end
|
3689
3708
|
rescue ::GRPC::BadStatus => e
|
3690
3709
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3791,7 +3810,6 @@ module Google
|
|
3791
3810
|
|
3792
3811
|
@alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
|
3793
3812
|
yield response, operation if block_given?
|
3794
|
-
return response
|
3795
3813
|
end
|
3796
3814
|
rescue ::GRPC::BadStatus => e
|
3797
3815
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3902,7 +3920,6 @@ module Google
|
|
3902
3920
|
|
3903
3921
|
@alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
|
3904
3922
|
yield response, operation if block_given?
|
3905
|
-
return response
|
3906
3923
|
end
|
3907
3924
|
rescue ::GRPC::BadStatus => e
|
3908
3925
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4006,7 +4023,6 @@ module Google
|
|
4006
4023
|
|
4007
4024
|
@alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
|
4008
4025
|
yield response, operation if block_given?
|
4009
|
-
return response
|
4010
4026
|
end
|
4011
4027
|
rescue ::GRPC::BadStatus => e
|
4012
4028
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4109,7 +4125,7 @@ module Google
|
|
4109
4125
|
@alloy_db_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
|
4110
4126
|
response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, request, response, operation, options
|
4111
4127
|
yield response, operation if block_given?
|
4112
|
-
|
4128
|
+
throw :response, response
|
4113
4129
|
end
|
4114
4130
|
rescue ::GRPC::BadStatus => e
|
4115
4131
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4159,6 +4175,13 @@ module Google
|
|
4159
4175
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
4160
4176
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
4161
4177
|
# * (`nil`) indicating no credentials
|
4178
|
+
#
|
4179
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
4180
|
+
# external source for authentication to Google Cloud, you must validate it before
|
4181
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
4182
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
4183
|
+
# For more information, refer to [Validate credential configurations from external
|
4184
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
4162
4185
|
# @return [::Object]
|
4163
4186
|
# @!attribute [rw] scope
|
4164
4187
|
# The OAuth scopes
|
@@ -4198,6 +4221,11 @@ module Google
|
|
4198
4221
|
# default endpoint URL. The default value of nil uses the environment
|
4199
4222
|
# universe (usually the default "googleapis.com" universe).
|
4200
4223
|
# @return [::String,nil]
|
4224
|
+
# @!attribute [rw] logger
|
4225
|
+
# A custom logger to use for request/response debug logging, or the value
|
4226
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4227
|
+
# explicitly disable logging.
|
4228
|
+
# @return [::Logger,:default,nil]
|
4201
4229
|
#
|
4202
4230
|
class Configuration
|
4203
4231
|
extend ::Gapic::Config
|
@@ -4222,6 +4250,7 @@ module Google
|
|
4222
4250
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4223
4251
|
config_attr :quota_project, nil, ::String, nil
|
4224
4252
|
config_attr :universe_domain, nil, ::String, nil
|
4253
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4225
4254
|
|
4226
4255
|
# @private
|
4227
4256
|
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
|