google-cloud-alloy_db-v1 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69cf6a6cdf19dcefb5f6494f5886503f6227bb3c1b7d6184012cfd2c96c04595
4
- data.tar.gz: 9c587f78caed0f5b9e9f0320b724d680a2de042b6b00cba064b7ff3b05722f4b
3
+ metadata.gz: 910f552b4d55be93844461ccaa2eff329bd7eba297dfbba88502eef943fdc971
4
+ data.tar.gz: 4fa3ea342cd01e2b1b3a4188e6ede07ce258df331d75d4c761c6fe011ff81d45
5
5
  SHA512:
6
- metadata.gz: 32f428e25ec7efc8ac497bf274780e0a285963c0ec41de423c9690731907d738fa138c28086857a96521b1fe934cac5873df0a5322567f4bcf6993e4be98fd26
7
- data.tar.gz: 26cab522e422d2c9490323fc35743828a33e1082641f6211573faa6d2accc48f8aede4f3d6aa8785325ad077b83adeef5a0a4e71697ce9c789840d79dda63449
6
+ metadata.gz: 0beb77b74f21043729685a5bf9edbb8bebb6cc1ec32a5a80c945efba888bdf8fcbf51e23229c5558401d6fe143aafdb34df51260bf8c36206c7f3f14f1c73a01
7
+ data.tar.gz: c86778dbc0480c5a1dcba72873c86b73b58f724eb38bfe1ed973299ff329ea7a4a4c20fd82feadf47e03b2d6c42613c912150533d36c5ffcd3452cec40aaab0f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the AlloyDB V1 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. 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.
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
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
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/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
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::V1::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 2.7+.
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
@@ -213,14 +213,26 @@ module Google
213
213
  universe_domain: @config.universe_domain,
214
214
  channel_args: @config.channel_args,
215
215
  interceptors: @config.interceptors,
216
- channel_pool_config: @config.channel_pool
216
+ channel_pool_config: @config.channel_pool,
217
+ logger: @config.logger
217
218
  )
218
219
 
220
+ @alloy_db_admin_stub.stub_logger&.info do |entry|
221
+ entry.set_system_name
222
+ entry.set_service
223
+ entry.message = "Created client for #{entry.service}"
224
+ entry.set_credentials_fields credentials
225
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
226
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
227
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
228
+ end
229
+
219
230
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
220
231
  config.credentials = credentials
221
232
  config.quota_project = @quota_project_id
222
233
  config.endpoint = @alloy_db_admin_stub.endpoint
223
234
  config.universe_domain = @alloy_db_admin_stub.universe_domain
235
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
224
236
  end
225
237
 
226
238
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -228,6 +240,7 @@ module Google
228
240
  config.quota_project = @quota_project_id
229
241
  config.endpoint = @alloy_db_admin_stub.endpoint
230
242
  config.universe_domain = @alloy_db_admin_stub.universe_domain
243
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
231
244
  end
232
245
  end
233
246
 
@@ -252,6 +265,15 @@ module Google
252
265
  #
253
266
  attr_reader :iam_policy_client
254
267
 
268
+ ##
269
+ # The logger used for request/response debug logging.
270
+ #
271
+ # @return [Logger]
272
+ #
273
+ def logger
274
+ @alloy_db_admin_stub.logger
275
+ end
276
+
255
277
  # Service calls
256
278
 
257
279
  ##
@@ -351,7 +373,7 @@ module Google
351
373
  @alloy_db_admin_stub.call_rpc :list_clusters, request, options: options do |response, operation|
352
374
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_clusters, request, response, operation, options
353
375
  yield response, operation if block_given?
354
- return response
376
+ throw :response, response
355
377
  end
356
378
  rescue ::GRPC::BadStatus => e
357
379
  raise ::Google::Cloud::Error.from_error(e)
@@ -441,7 +463,6 @@ module Google
441
463
 
442
464
  @alloy_db_admin_stub.call_rpc :get_cluster, request, options: options do |response, operation|
443
465
  yield response, operation if block_given?
444
- return response
445
466
  end
446
467
  rescue ::GRPC::BadStatus => e
447
468
  raise ::Google::Cloud::Error.from_error(e)
@@ -558,7 +579,7 @@ module Google
558
579
  @alloy_db_admin_stub.call_rpc :create_cluster, request, options: options do |response, operation|
559
580
  response = ::Gapic::Operation.new response, @operations_client, options: options
560
581
  yield response, operation if block_given?
561
- return response
582
+ throw :response, response
562
583
  end
563
584
  rescue ::GRPC::BadStatus => e
564
585
  raise ::Google::Cloud::Error.from_error(e)
@@ -679,7 +700,7 @@ module Google
679
700
  @alloy_db_admin_stub.call_rpc :update_cluster, request, options: options do |response, operation|
680
701
  response = ::Gapic::Operation.new response, @operations_client, options: options
681
702
  yield response, operation if block_given?
682
- return response
703
+ throw :response, response
683
704
  end
684
705
  rescue ::GRPC::BadStatus => e
685
706
  raise ::Google::Cloud::Error.from_error(e)
@@ -798,7 +819,7 @@ module Google
798
819
  @alloy_db_admin_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
799
820
  response = ::Gapic::Operation.new response, @operations_client, options: options
800
821
  yield response, operation if block_given?
801
- return response
822
+ throw :response, response
802
823
  end
803
824
  rescue ::GRPC::BadStatus => e
804
825
  raise ::Google::Cloud::Error.from_error(e)
@@ -918,7 +939,7 @@ module Google
918
939
  @alloy_db_admin_stub.call_rpc :promote_cluster, request, options: options do |response, operation|
919
940
  response = ::Gapic::Operation.new response, @operations_client, options: options
920
941
  yield response, operation if block_given?
921
- return response
942
+ throw :response, response
922
943
  end
923
944
  rescue ::GRPC::BadStatus => e
924
945
  raise ::Google::Cloud::Error.from_error(e)
@@ -1033,7 +1054,7 @@ module Google
1033
1054
  @alloy_db_admin_stub.call_rpc :switchover_cluster, request, options: options do |response, operation|
1034
1055
  response = ::Gapic::Operation.new response, @operations_client, options: options
1035
1056
  yield response, operation if block_given?
1036
- return response
1057
+ throw :response, response
1037
1058
  end
1038
1059
  rescue ::GRPC::BadStatus => e
1039
1060
  raise ::Google::Cloud::Error.from_error(e)
@@ -1061,9 +1082,13 @@ module Google
1061
1082
  #
1062
1083
  # @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash]
1063
1084
  # Backup source.
1085
+ #
1086
+ # 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.
1064
1087
  # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1::ContinuousBackupSource, ::Hash]
1065
1088
  # ContinuousBackup source. Continuous backup needs to be enabled in the
1066
1089
  # source cluster for this operation to succeed.
1090
+ #
1091
+ # 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.
1067
1092
  # @param parent [::String]
1068
1093
  # Required. The name of the parent resource. For the required format, see the
1069
1094
  # comment on the Cluster.name field.
@@ -1157,7 +1182,7 @@ module Google
1157
1182
  @alloy_db_admin_stub.call_rpc :restore_cluster, request, options: options do |response, operation|
1158
1183
  response = ::Gapic::Operation.new response, @operations_client, options: options
1159
1184
  yield response, operation if block_given?
1160
- return response
1185
+ throw :response, response
1161
1186
  end
1162
1187
  rescue ::GRPC::BadStatus => e
1163
1188
  raise ::Google::Cloud::Error.from_error(e)
@@ -1275,7 +1300,7 @@ module Google
1275
1300
  @alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
1276
1301
  response = ::Gapic::Operation.new response, @operations_client, options: options
1277
1302
  yield response, operation if block_given?
1278
- return response
1303
+ throw :response, response
1279
1304
  end
1280
1305
  rescue ::GRPC::BadStatus => e
1281
1306
  raise ::Google::Cloud::Error.from_error(e)
@@ -1380,7 +1405,7 @@ module Google
1380
1405
  @alloy_db_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
1381
1406
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_instances, request, response, operation, options
1382
1407
  yield response, operation if block_given?
1383
- return response
1408
+ throw :response, response
1384
1409
  end
1385
1410
  rescue ::GRPC::BadStatus => e
1386
1411
  raise ::Google::Cloud::Error.from_error(e)
@@ -1469,7 +1494,6 @@ module Google
1469
1494
 
1470
1495
  @alloy_db_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
1471
1496
  yield response, operation if block_given?
1472
- return response
1473
1497
  end
1474
1498
  rescue ::GRPC::BadStatus => e
1475
1499
  raise ::Google::Cloud::Error.from_error(e)
@@ -1586,7 +1610,7 @@ module Google
1586
1610
  @alloy_db_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
1587
1611
  response = ::Gapic::Operation.new response, @operations_client, options: options
1588
1612
  yield response, operation if block_given?
1589
- return response
1613
+ throw :response, response
1590
1614
  end
1591
1615
  rescue ::GRPC::BadStatus => e
1592
1616
  raise ::Google::Cloud::Error.from_error(e)
@@ -1703,7 +1727,7 @@ module Google
1703
1727
  @alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
1704
1728
  response = ::Gapic::Operation.new response, @operations_client, options: options
1705
1729
  yield response, operation if block_given?
1706
- return response
1730
+ throw :response, response
1707
1731
  end
1708
1732
  rescue ::GRPC::BadStatus => e
1709
1733
  raise ::Google::Cloud::Error.from_error(e)
@@ -1822,7 +1846,7 @@ module Google
1822
1846
  @alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
1823
1847
  response = ::Gapic::Operation.new response, @operations_client, options: options
1824
1848
  yield response, operation if block_given?
1825
- return response
1849
+ throw :response, response
1826
1850
  end
1827
1851
  rescue ::GRPC::BadStatus => e
1828
1852
  raise ::Google::Cloud::Error.from_error(e)
@@ -1943,7 +1967,7 @@ module Google
1943
1967
  @alloy_db_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
1944
1968
  response = ::Gapic::Operation.new response, @operations_client, options: options
1945
1969
  yield response, operation if block_given?
1946
- return response
1970
+ throw :response, response
1947
1971
  end
1948
1972
  rescue ::GRPC::BadStatus => e
1949
1973
  raise ::Google::Cloud::Error.from_error(e)
@@ -2060,7 +2084,7 @@ module Google
2060
2084
  @alloy_db_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
2061
2085
  response = ::Gapic::Operation.new response, @operations_client, options: options
2062
2086
  yield response, operation if block_given?
2063
- return response
2087
+ throw :response, response
2064
2088
  end
2065
2089
  rescue ::GRPC::BadStatus => e
2066
2090
  raise ::Google::Cloud::Error.from_error(e)
@@ -2175,7 +2199,7 @@ module Google
2175
2199
  @alloy_db_admin_stub.call_rpc :failover_instance, request, options: options do |response, operation|
2176
2200
  response = ::Gapic::Operation.new response, @operations_client, options: options
2177
2201
  yield response, operation if block_given?
2178
- return response
2202
+ throw :response, response
2179
2203
  end
2180
2204
  rescue ::GRPC::BadStatus => e
2181
2205
  raise ::Google::Cloud::Error.from_error(e)
@@ -2291,7 +2315,7 @@ module Google
2291
2315
  @alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
2292
2316
  response = ::Gapic::Operation.new response, @operations_client, options: options
2293
2317
  yield response, operation if block_given?
2294
- return response
2318
+ throw :response, response
2295
2319
  end
2296
2320
  rescue ::GRPC::BadStatus => e
2297
2321
  raise ::Google::Cloud::Error.from_error(e)
@@ -2408,7 +2432,7 @@ module Google
2408
2432
  @alloy_db_admin_stub.call_rpc :restart_instance, request, options: options do |response, operation|
2409
2433
  response = ::Gapic::Operation.new response, @operations_client, options: options
2410
2434
  yield response, operation if block_given?
2411
- return response
2435
+ throw :response, response
2412
2436
  end
2413
2437
  rescue ::GRPC::BadStatus => e
2414
2438
  raise ::Google::Cloud::Error.from_error(e)
@@ -2508,7 +2532,6 @@ module Google
2508
2532
 
2509
2533
  @alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
2510
2534
  yield response, operation if block_given?
2511
- return response
2512
2535
  end
2513
2536
  rescue ::GRPC::BadStatus => e
2514
2537
  raise ::Google::Cloud::Error.from_error(e)
@@ -2608,7 +2631,7 @@ module Google
2608
2631
  @alloy_db_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
2609
2632
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_backups, request, response, operation, options
2610
2633
  yield response, operation if block_given?
2611
- return response
2634
+ throw :response, response
2612
2635
  end
2613
2636
  rescue ::GRPC::BadStatus => e
2614
2637
  raise ::Google::Cloud::Error.from_error(e)
@@ -2694,7 +2717,6 @@ module Google
2694
2717
 
2695
2718
  @alloy_db_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
2696
2719
  yield response, operation if block_given?
2697
- return response
2698
2720
  end
2699
2721
  rescue ::GRPC::BadStatus => e
2700
2722
  raise ::Google::Cloud::Error.from_error(e)
@@ -2809,7 +2831,7 @@ module Google
2809
2831
  @alloy_db_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
2810
2832
  response = ::Gapic::Operation.new response, @operations_client, options: options
2811
2833
  yield response, operation if block_given?
2812
- return response
2834
+ throw :response, response
2813
2835
  end
2814
2836
  rescue ::GRPC::BadStatus => e
2815
2837
  raise ::Google::Cloud::Error.from_error(e)
@@ -2929,7 +2951,7 @@ module Google
2929
2951
  @alloy_db_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
2930
2952
  response = ::Gapic::Operation.new response, @operations_client, options: options
2931
2953
  yield response, operation if block_given?
2932
- return response
2954
+ throw :response, response
2933
2955
  end
2934
2956
  rescue ::GRPC::BadStatus => e
2935
2957
  raise ::Google::Cloud::Error.from_error(e)
@@ -3045,7 +3067,7 @@ module Google
3045
3067
  @alloy_db_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
3046
3068
  response = ::Gapic::Operation.new response, @operations_client, options: options
3047
3069
  yield response, operation if block_given?
3048
- return response
3070
+ throw :response, response
3049
3071
  end
3050
3072
  rescue ::GRPC::BadStatus => e
3051
3073
  raise ::Google::Cloud::Error.from_error(e)
@@ -3147,7 +3169,7 @@ module Google
3147
3169
  @alloy_db_admin_stub.call_rpc :list_supported_database_flags, request, options: options do |response, operation|
3148
3170
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, request, response, operation, options
3149
3171
  yield response, operation if block_given?
3150
- return response
3172
+ throw :response, response
3151
3173
  end
3152
3174
  rescue ::GRPC::BadStatus => e
3153
3175
  raise ::Google::Cloud::Error.from_error(e)
@@ -3264,7 +3286,6 @@ module Google
3264
3286
 
3265
3287
  @alloy_db_admin_stub.call_rpc :generate_client_certificate, request, options: options do |response, operation|
3266
3288
  yield response, operation if block_given?
3267
- return response
3268
3289
  end
3269
3290
  rescue ::GRPC::BadStatus => e
3270
3291
  raise ::Google::Cloud::Error.from_error(e)
@@ -3365,7 +3386,6 @@ module Google
3365
3386
 
3366
3387
  @alloy_db_admin_stub.call_rpc :get_connection_info, request, options: options do |response, operation|
3367
3388
  yield response, operation if block_given?
3368
- return response
3369
3389
  end
3370
3390
  rescue ::GRPC::BadStatus => e
3371
3391
  raise ::Google::Cloud::Error.from_error(e)
@@ -3465,7 +3485,7 @@ module Google
3465
3485
  @alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
3466
3486
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
3467
3487
  yield response, operation if block_given?
3468
- return response
3488
+ throw :response, response
3469
3489
  end
3470
3490
  rescue ::GRPC::BadStatus => e
3471
3491
  raise ::Google::Cloud::Error.from_error(e)
@@ -3552,7 +3572,6 @@ module Google
3552
3572
 
3553
3573
  @alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
3554
3574
  yield response, operation if block_given?
3555
- return response
3556
3575
  end
3557
3576
  rescue ::GRPC::BadStatus => e
3558
3577
  raise ::Google::Cloud::Error.from_error(e)
@@ -3659,7 +3678,6 @@ module Google
3659
3678
 
3660
3679
  @alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
3661
3680
  yield response, operation if block_given?
3662
- return response
3663
3681
  end
3664
3682
  rescue ::GRPC::BadStatus => e
3665
3683
  raise ::Google::Cloud::Error.from_error(e)
@@ -3770,7 +3788,6 @@ module Google
3770
3788
 
3771
3789
  @alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
3772
3790
  yield response, operation if block_given?
3773
- return response
3774
3791
  end
3775
3792
  rescue ::GRPC::BadStatus => e
3776
3793
  raise ::Google::Cloud::Error.from_error(e)
@@ -3874,7 +3891,6 @@ module Google
3874
3891
 
3875
3892
  @alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
3876
3893
  yield response, operation if block_given?
3877
- return response
3878
3894
  end
3879
3895
  rescue ::GRPC::BadStatus => e
3880
3896
  raise ::Google::Cloud::Error.from_error(e)
@@ -3977,7 +3993,7 @@ module Google
3977
3993
  @alloy_db_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
3978
3994
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, request, response, operation, options
3979
3995
  yield response, operation if block_given?
3980
- return response
3996
+ throw :response, response
3981
3997
  end
3982
3998
  rescue ::GRPC::BadStatus => e
3983
3999
  raise ::Google::Cloud::Error.from_error(e)
@@ -4027,6 +4043,13 @@ module Google
4027
4043
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
4028
4044
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
4029
4045
  # * (`nil`) indicating no credentials
4046
+ #
4047
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
4048
+ # external source for authentication to Google Cloud, you must validate it before
4049
+ # providing it to a Google API client library. Providing an unvalidated credential
4050
+ # configuration to Google APIs can compromise the security of your systems and data.
4051
+ # For more information, refer to [Validate credential configurations from external
4052
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
4030
4053
  # @return [::Object]
4031
4054
  # @!attribute [rw] scope
4032
4055
  # The OAuth scopes
@@ -4066,6 +4089,11 @@ module Google
4066
4089
  # default endpoint URL. The default value of nil uses the environment
4067
4090
  # universe (usually the default "googleapis.com" universe).
4068
4091
  # @return [::String,nil]
4092
+ # @!attribute [rw] logger
4093
+ # A custom logger to use for request/response debug logging, or the value
4094
+ # `:default` (the default) to construct a default logger, or `nil` to
4095
+ # explicitly disable logging.
4096
+ # @return [::Logger,:default,nil]
4069
4097
  #
4070
4098
  class Configuration
4071
4099
  extend ::Gapic::Config
@@ -4090,6 +4118,7 @@ module Google
4090
4118
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4091
4119
  config_attr :quota_project, nil, ::String, nil
4092
4120
  config_attr :universe_domain, nil, ::String, nil
4121
+ config_attr :logger, :default, ::Logger, nil, :default
4093
4122
 
4094
4123
  # @private
4095
4124
  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
- return response
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
- return response
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 {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
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
- return response
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