google-cloud-app_hub-v1 0.1.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/app_hub/v1/app_hub/client.rb +53 -28
- data/lib/google/cloud/app_hub/v1/app_hub/operations.rb +19 -15
- data/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb +47 -28
- data/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb +50 -38
- data/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb +230 -164
- data/lib/google/cloud/app_hub/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a68eec7549df42eff20b8da5829d2fb2d22961d1590c4ee94a25861fd3cbce22
|
4
|
+
data.tar.gz: d4c0f0ac76f3f35ec1ea7f5b47a1ef8cba129686acf8c3fb1c5fd4eeaa235128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdeaf33c9b921ee923ce2fe0cb06da19d0b232e7d3fcef5f860ab6d45f817e6d1314a2de8674b99f4620d10d8e151849a1a010f196c339dd166e02257fee601a
|
7
|
+
data.tar.gz: 115e124cf8b40eca0cb0f0ecb95b0e8f05cde64bebfde793fa489ccfc3fa8a1af28907e91646fbf9566c0aacc35ab4439960dc5f3e6565227c27057d9650666e
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/app-hub/docs/overview)
|
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/app_hub/v1"
|
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::AppHub::V1::AppHub::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
|
@@ -265,14 +265,26 @@ module Google
|
|
265
265
|
universe_domain: @config.universe_domain,
|
266
266
|
channel_args: @config.channel_args,
|
267
267
|
interceptors: @config.interceptors,
|
268
|
-
channel_pool_config: @config.channel_pool
|
268
|
+
channel_pool_config: @config.channel_pool,
|
269
|
+
logger: @config.logger
|
269
270
|
)
|
270
271
|
|
272
|
+
@app_hub_stub.stub_logger&.info do |entry|
|
273
|
+
entry.set_system_name
|
274
|
+
entry.set_service
|
275
|
+
entry.message = "Created client for #{entry.service}"
|
276
|
+
entry.set_credentials_fields credentials
|
277
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
278
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
279
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
280
|
+
end
|
281
|
+
|
271
282
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
272
283
|
config.credentials = credentials
|
273
284
|
config.quota_project = @quota_project_id
|
274
285
|
config.endpoint = @app_hub_stub.endpoint
|
275
286
|
config.universe_domain = @app_hub_stub.universe_domain
|
287
|
+
config.logger = @app_hub_stub.logger if config.respond_to? :logger=
|
276
288
|
end
|
277
289
|
|
278
290
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -280,6 +292,7 @@ module Google
|
|
280
292
|
config.quota_project = @quota_project_id
|
281
293
|
config.endpoint = @app_hub_stub.endpoint
|
282
294
|
config.universe_domain = @app_hub_stub.universe_domain
|
295
|
+
config.logger = @app_hub_stub.logger if config.respond_to? :logger=
|
283
296
|
end
|
284
297
|
end
|
285
298
|
|
@@ -304,6 +317,15 @@ module Google
|
|
304
317
|
#
|
305
318
|
attr_reader :iam_policy_client
|
306
319
|
|
320
|
+
##
|
321
|
+
# The logger used for request/response debug logging.
|
322
|
+
#
|
323
|
+
# @return [Logger]
|
324
|
+
#
|
325
|
+
def logger
|
326
|
+
@app_hub_stub.logger
|
327
|
+
end
|
328
|
+
|
307
329
|
# Service calls
|
308
330
|
|
309
331
|
##
|
@@ -389,7 +411,6 @@ module Google
|
|
389
411
|
|
390
412
|
@app_hub_stub.call_rpc :lookup_service_project_attachment, request, options: options do |response, operation|
|
391
413
|
yield response, operation if block_given?
|
392
|
-
return response
|
393
414
|
end
|
394
415
|
rescue ::GRPC::BadStatus => e
|
395
416
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -491,7 +512,7 @@ module Google
|
|
491
512
|
@app_hub_stub.call_rpc :list_service_project_attachments, request, options: options do |response, operation|
|
492
513
|
response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_service_project_attachments, request, response, operation, options
|
493
514
|
yield response, operation if block_given?
|
494
|
-
|
515
|
+
throw :response, response
|
495
516
|
end
|
496
517
|
rescue ::GRPC::BadStatus => e
|
497
518
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -607,7 +628,7 @@ module Google
|
|
607
628
|
@app_hub_stub.call_rpc :create_service_project_attachment, request, options: options do |response, operation|
|
608
629
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
609
630
|
yield response, operation if block_given?
|
610
|
-
|
631
|
+
throw :response, response
|
611
632
|
end
|
612
633
|
rescue ::GRPC::BadStatus => e
|
613
634
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -695,7 +716,6 @@ module Google
|
|
695
716
|
|
696
717
|
@app_hub_stub.call_rpc :get_service_project_attachment, request, options: options do |response, operation|
|
697
718
|
yield response, operation if block_given?
|
698
|
-
return response
|
699
719
|
end
|
700
720
|
rescue ::GRPC::BadStatus => e
|
701
721
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -805,7 +825,7 @@ module Google
|
|
805
825
|
@app_hub_stub.call_rpc :delete_service_project_attachment, request, options: options do |response, operation|
|
806
826
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
807
827
|
yield response, operation if block_given?
|
808
|
-
|
828
|
+
throw :response, response
|
809
829
|
end
|
810
830
|
rescue ::GRPC::BadStatus => e
|
811
831
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -895,7 +915,6 @@ module Google
|
|
895
915
|
|
896
916
|
@app_hub_stub.call_rpc :detach_service_project_attachment, request, options: options do |response, operation|
|
897
917
|
yield response, operation if block_given?
|
898
|
-
return response
|
899
918
|
end
|
900
919
|
rescue ::GRPC::BadStatus => e
|
901
920
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -997,7 +1016,7 @@ module Google
|
|
997
1016
|
@app_hub_stub.call_rpc :list_discovered_services, request, options: options do |response, operation|
|
998
1017
|
response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_services, request, response, operation, options
|
999
1018
|
yield response, operation if block_given?
|
1000
|
-
|
1019
|
+
throw :response, response
|
1001
1020
|
end
|
1002
1021
|
rescue ::GRPC::BadStatus => e
|
1003
1022
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1085,7 +1104,6 @@ module Google
|
|
1085
1104
|
|
1086
1105
|
@app_hub_stub.call_rpc :get_discovered_service, request, options: options do |response, operation|
|
1087
1106
|
yield response, operation if block_given?
|
1088
|
-
return response
|
1089
1107
|
end
|
1090
1108
|
rescue ::GRPC::BadStatus => e
|
1091
1109
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1177,7 +1195,6 @@ module Google
|
|
1177
1195
|
|
1178
1196
|
@app_hub_stub.call_rpc :lookup_discovered_service, request, options: options do |response, operation|
|
1179
1197
|
yield response, operation if block_given?
|
1180
|
-
return response
|
1181
1198
|
end
|
1182
1199
|
rescue ::GRPC::BadStatus => e
|
1183
1200
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1279,7 +1296,7 @@ module Google
|
|
1279
1296
|
@app_hub_stub.call_rpc :list_services, request, options: options do |response, operation|
|
1280
1297
|
response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_services, request, response, operation, options
|
1281
1298
|
yield response, operation if block_given?
|
1282
|
-
|
1299
|
+
throw :response, response
|
1283
1300
|
end
|
1284
1301
|
rescue ::GRPC::BadStatus => e
|
1285
1302
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1396,7 +1413,7 @@ module Google
|
|
1396
1413
|
@app_hub_stub.call_rpc :create_service, request, options: options do |response, operation|
|
1397
1414
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1398
1415
|
yield response, operation if block_given?
|
1399
|
-
|
1416
|
+
throw :response, response
|
1400
1417
|
end
|
1401
1418
|
rescue ::GRPC::BadStatus => e
|
1402
1419
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1484,7 +1501,6 @@ module Google
|
|
1484
1501
|
|
1485
1502
|
@app_hub_stub.call_rpc :get_service, request, options: options do |response, operation|
|
1486
1503
|
yield response, operation if block_given?
|
1487
|
-
return response
|
1488
1504
|
end
|
1489
1505
|
rescue ::GRPC::BadStatus => e
|
1490
1506
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1602,7 +1618,7 @@ module Google
|
|
1602
1618
|
@app_hub_stub.call_rpc :update_service, request, options: options do |response, operation|
|
1603
1619
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1604
1620
|
yield response, operation if block_given?
|
1605
|
-
|
1621
|
+
throw :response, response
|
1606
1622
|
end
|
1607
1623
|
rescue ::GRPC::BadStatus => e
|
1608
1624
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1712,7 +1728,7 @@ module Google
|
|
1712
1728
|
@app_hub_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
1713
1729
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1714
1730
|
yield response, operation if block_given?
|
1715
|
-
|
1731
|
+
throw :response, response
|
1716
1732
|
end
|
1717
1733
|
rescue ::GRPC::BadStatus => e
|
1718
1734
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1814,7 +1830,7 @@ module Google
|
|
1814
1830
|
@app_hub_stub.call_rpc :list_discovered_workloads, request, options: options do |response, operation|
|
1815
1831
|
response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_discovered_workloads, request, response, operation, options
|
1816
1832
|
yield response, operation if block_given?
|
1817
|
-
|
1833
|
+
throw :response, response
|
1818
1834
|
end
|
1819
1835
|
rescue ::GRPC::BadStatus => e
|
1820
1836
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1902,7 +1918,6 @@ module Google
|
|
1902
1918
|
|
1903
1919
|
@app_hub_stub.call_rpc :get_discovered_workload, request, options: options do |response, operation|
|
1904
1920
|
yield response, operation if block_given?
|
1905
|
-
return response
|
1906
1921
|
end
|
1907
1922
|
rescue ::GRPC::BadStatus => e
|
1908
1923
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1994,7 +2009,6 @@ module Google
|
|
1994
2009
|
|
1995
2010
|
@app_hub_stub.call_rpc :lookup_discovered_workload, request, options: options do |response, operation|
|
1996
2011
|
yield response, operation if block_given?
|
1997
|
-
return response
|
1998
2012
|
end
|
1999
2013
|
rescue ::GRPC::BadStatus => e
|
2000
2014
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2096,7 +2110,7 @@ module Google
|
|
2096
2110
|
@app_hub_stub.call_rpc :list_workloads, request, options: options do |response, operation|
|
2097
2111
|
response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_workloads, request, response, operation, options
|
2098
2112
|
yield response, operation if block_given?
|
2099
|
-
|
2113
|
+
throw :response, response
|
2100
2114
|
end
|
2101
2115
|
rescue ::GRPC::BadStatus => e
|
2102
2116
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2213,7 +2227,7 @@ module Google
|
|
2213
2227
|
@app_hub_stub.call_rpc :create_workload, request, options: options do |response, operation|
|
2214
2228
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2215
2229
|
yield response, operation if block_given?
|
2216
|
-
|
2230
|
+
throw :response, response
|
2217
2231
|
end
|
2218
2232
|
rescue ::GRPC::BadStatus => e
|
2219
2233
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2301,7 +2315,6 @@ module Google
|
|
2301
2315
|
|
2302
2316
|
@app_hub_stub.call_rpc :get_workload, request, options: options do |response, operation|
|
2303
2317
|
yield response, operation if block_given?
|
2304
|
-
return response
|
2305
2318
|
end
|
2306
2319
|
rescue ::GRPC::BadStatus => e
|
2307
2320
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2419,7 +2432,7 @@ module Google
|
|
2419
2432
|
@app_hub_stub.call_rpc :update_workload, request, options: options do |response, operation|
|
2420
2433
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2421
2434
|
yield response, operation if block_given?
|
2422
|
-
|
2435
|
+
throw :response, response
|
2423
2436
|
end
|
2424
2437
|
rescue ::GRPC::BadStatus => e
|
2425
2438
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2529,7 +2542,7 @@ module Google
|
|
2529
2542
|
@app_hub_stub.call_rpc :delete_workload, request, options: options do |response, operation|
|
2530
2543
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2531
2544
|
yield response, operation if block_given?
|
2532
|
-
|
2545
|
+
throw :response, response
|
2533
2546
|
end
|
2534
2547
|
rescue ::GRPC::BadStatus => e
|
2535
2548
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2630,7 +2643,7 @@ module Google
|
|
2630
2643
|
@app_hub_stub.call_rpc :list_applications, request, options: options do |response, operation|
|
2631
2644
|
response = ::Gapic::PagedEnumerable.new @app_hub_stub, :list_applications, request, response, operation, options
|
2632
2645
|
yield response, operation if block_given?
|
2633
|
-
|
2646
|
+
throw :response, response
|
2634
2647
|
end
|
2635
2648
|
rescue ::GRPC::BadStatus => e
|
2636
2649
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2746,7 +2759,7 @@ module Google
|
|
2746
2759
|
@app_hub_stub.call_rpc :create_application, request, options: options do |response, operation|
|
2747
2760
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2748
2761
|
yield response, operation if block_given?
|
2749
|
-
|
2762
|
+
throw :response, response
|
2750
2763
|
end
|
2751
2764
|
rescue ::GRPC::BadStatus => e
|
2752
2765
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2834,7 +2847,6 @@ module Google
|
|
2834
2847
|
|
2835
2848
|
@app_hub_stub.call_rpc :get_application, request, options: options do |response, operation|
|
2836
2849
|
yield response, operation if block_given?
|
2837
|
-
return response
|
2838
2850
|
end
|
2839
2851
|
rescue ::GRPC::BadStatus => e
|
2840
2852
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2952,7 +2964,7 @@ module Google
|
|
2952
2964
|
@app_hub_stub.call_rpc :update_application, request, options: options do |response, operation|
|
2953
2965
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2954
2966
|
yield response, operation if block_given?
|
2955
|
-
|
2967
|
+
throw :response, response
|
2956
2968
|
end
|
2957
2969
|
rescue ::GRPC::BadStatus => e
|
2958
2970
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3062,7 +3074,7 @@ module Google
|
|
3062
3074
|
@app_hub_stub.call_rpc :delete_application, request, options: options do |response, operation|
|
3063
3075
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3064
3076
|
yield response, operation if block_given?
|
3065
|
-
|
3077
|
+
throw :response, response
|
3066
3078
|
end
|
3067
3079
|
rescue ::GRPC::BadStatus => e
|
3068
3080
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3112,6 +3124,13 @@ module Google
|
|
3112
3124
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3113
3125
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3114
3126
|
# * (`nil`) indicating no credentials
|
3127
|
+
#
|
3128
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
3129
|
+
# external source for authentication to Google Cloud, you must validate it before
|
3130
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
3131
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
3132
|
+
# For more information, refer to [Validate credential configurations from external
|
3133
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
3115
3134
|
# @return [::Object]
|
3116
3135
|
# @!attribute [rw] scope
|
3117
3136
|
# The OAuth scopes
|
@@ -3151,6 +3170,11 @@ module Google
|
|
3151
3170
|
# default endpoint URL. The default value of nil uses the environment
|
3152
3171
|
# universe (usually the default "googleapis.com" universe).
|
3153
3172
|
# @return [::String,nil]
|
3173
|
+
# @!attribute [rw] logger
|
3174
|
+
# A custom logger to use for request/response debug logging, or the value
|
3175
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
3176
|
+
# explicitly disable logging.
|
3177
|
+
# @return [::Logger,:default,nil]
|
3154
3178
|
#
|
3155
3179
|
class Configuration
|
3156
3180
|
extend ::Gapic::Config
|
@@ -3175,6 +3199,7 @@ module Google
|
|
3175
3199
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3176
3200
|
config_attr :quota_project, nil, ::String, nil
|
3177
3201
|
config_attr :universe_domain, nil, ::String, nil
|
3202
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3178
3203
|
|
3179
3204
|
# @private
|
3180
3205
|
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
|