google-cloud-certificate_manager-v1 0.10.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb +51 -30
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb +12 -15
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb +45 -30
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb +43 -38
- data/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb +246 -176
- data/lib/google/cloud/certificate_manager/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14483e329fffbb70ca0ba36408171e6da3bacca08234c692e2da2dba59978568
|
4
|
+
data.tar.gz: 135660177141529c3d2c04ebb087a2bf5d486654a064c07b4b5e323c380d848a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1fbb0274c76307cd8cc0a270a8bc9849a0a205cd41570baf744facb82560276e220a3111201ccf999b28c4442d75ad64bd7c4d8da91a82cbcbcbce37b704629
|
7
|
+
data.tar.gz: 182bc63b0f296d5242db2f8def96a77553e8e0007c9b54c84525ee97f1fb3182fc8a63d9f4d713283debe0fc0959d983d12e2092b55c19cf24f9fcaaa8c4a253
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/certificate-manager)
|
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/certificate_manager/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::CertificateManager::V1::CertificateManager::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).
|
@@ -310,14 +310,26 @@ module Google
|
|
310
310
|
universe_domain: @config.universe_domain,
|
311
311
|
channel_args: @config.channel_args,
|
312
312
|
interceptors: @config.interceptors,
|
313
|
-
channel_pool_config: @config.channel_pool
|
313
|
+
channel_pool_config: @config.channel_pool,
|
314
|
+
logger: @config.logger
|
314
315
|
)
|
315
316
|
|
317
|
+
@certificate_manager_stub.stub_logger&.info do |entry|
|
318
|
+
entry.set_system_name
|
319
|
+
entry.set_service
|
320
|
+
entry.message = "Created client for #{entry.service}"
|
321
|
+
entry.set_credentials_fields credentials
|
322
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
323
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
324
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
325
|
+
end
|
326
|
+
|
316
327
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
317
328
|
config.credentials = credentials
|
318
329
|
config.quota_project = @quota_project_id
|
319
330
|
config.endpoint = @certificate_manager_stub.endpoint
|
320
331
|
config.universe_domain = @certificate_manager_stub.universe_domain
|
332
|
+
config.logger = @certificate_manager_stub.logger if config.respond_to? :logger=
|
321
333
|
end
|
322
334
|
end
|
323
335
|
|
@@ -335,6 +347,15 @@ module Google
|
|
335
347
|
#
|
336
348
|
attr_reader :location_client
|
337
349
|
|
350
|
+
##
|
351
|
+
# The logger used for request/response debug logging.
|
352
|
+
#
|
353
|
+
# @return [Logger]
|
354
|
+
#
|
355
|
+
def logger
|
356
|
+
@certificate_manager_stub.logger
|
357
|
+
end
|
358
|
+
|
338
359
|
# Service calls
|
339
360
|
|
340
361
|
##
|
@@ -435,7 +456,7 @@ module Google
|
|
435
456
|
@certificate_manager_stub.call_rpc :list_certificates, request, options: options do |response, operation|
|
436
457
|
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificates, request, response, operation, options
|
437
458
|
yield response, operation if block_given?
|
438
|
-
|
459
|
+
throw :response, response
|
439
460
|
end
|
440
461
|
rescue ::GRPC::BadStatus => e
|
441
462
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -522,7 +543,6 @@ module Google
|
|
522
543
|
|
523
544
|
@certificate_manager_stub.call_rpc :get_certificate, request, options: options do |response, operation|
|
524
545
|
yield response, operation if block_given?
|
525
|
-
return response
|
526
546
|
end
|
527
547
|
rescue ::GRPC::BadStatus => e
|
528
548
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -621,7 +641,7 @@ module Google
|
|
621
641
|
@certificate_manager_stub.call_rpc :create_certificate, request, options: options do |response, operation|
|
622
642
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
623
643
|
yield response, operation if block_given?
|
624
|
-
|
644
|
+
throw :response, response
|
625
645
|
end
|
626
646
|
rescue ::GRPC::BadStatus => e
|
627
647
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -719,7 +739,7 @@ module Google
|
|
719
739
|
@certificate_manager_stub.call_rpc :update_certificate, request, options: options do |response, operation|
|
720
740
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
721
741
|
yield response, operation if block_given?
|
722
|
-
|
742
|
+
throw :response, response
|
723
743
|
end
|
724
744
|
rescue ::GRPC::BadStatus => e
|
725
745
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -814,7 +834,7 @@ module Google
|
|
814
834
|
@certificate_manager_stub.call_rpc :delete_certificate, request, options: options do |response, operation|
|
815
835
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
816
836
|
yield response, operation if block_given?
|
817
|
-
|
837
|
+
throw :response, response
|
818
838
|
end
|
819
839
|
rescue ::GRPC::BadStatus => e
|
820
840
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -918,7 +938,7 @@ module Google
|
|
918
938
|
@certificate_manager_stub.call_rpc :list_certificate_maps, request, options: options do |response, operation|
|
919
939
|
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_maps, request, response, operation, options
|
920
940
|
yield response, operation if block_given?
|
921
|
-
|
941
|
+
throw :response, response
|
922
942
|
end
|
923
943
|
rescue ::GRPC::BadStatus => e
|
924
944
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1005,7 +1025,6 @@ module Google
|
|
1005
1025
|
|
1006
1026
|
@certificate_manager_stub.call_rpc :get_certificate_map, request, options: options do |response, operation|
|
1007
1027
|
yield response, operation if block_given?
|
1008
|
-
return response
|
1009
1028
|
end
|
1010
1029
|
rescue ::GRPC::BadStatus => e
|
1011
1030
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1104,7 +1123,7 @@ module Google
|
|
1104
1123
|
@certificate_manager_stub.call_rpc :create_certificate_map, request, options: options do |response, operation|
|
1105
1124
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1106
1125
|
yield response, operation if block_given?
|
1107
|
-
|
1126
|
+
throw :response, response
|
1108
1127
|
end
|
1109
1128
|
rescue ::GRPC::BadStatus => e
|
1110
1129
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1202,7 +1221,7 @@ module Google
|
|
1202
1221
|
@certificate_manager_stub.call_rpc :update_certificate_map, request, options: options do |response, operation|
|
1203
1222
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1204
1223
|
yield response, operation if block_given?
|
1205
|
-
|
1224
|
+
throw :response, response
|
1206
1225
|
end
|
1207
1226
|
rescue ::GRPC::BadStatus => e
|
1208
1227
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1299,7 +1318,7 @@ module Google
|
|
1299
1318
|
@certificate_manager_stub.call_rpc :delete_certificate_map, request, options: options do |response, operation|
|
1300
1319
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1301
1320
|
yield response, operation if block_given?
|
1302
|
-
|
1321
|
+
throw :response, response
|
1303
1322
|
end
|
1304
1323
|
rescue ::GRPC::BadStatus => e
|
1305
1324
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1408,7 +1427,7 @@ module Google
|
|
1408
1427
|
@certificate_manager_stub.call_rpc :list_certificate_map_entries, request, options: options do |response, operation|
|
1409
1428
|
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_map_entries, request, response, operation, options
|
1410
1429
|
yield response, operation if block_given?
|
1411
|
-
|
1430
|
+
throw :response, response
|
1412
1431
|
end
|
1413
1432
|
rescue ::GRPC::BadStatus => e
|
1414
1433
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1495,7 +1514,6 @@ module Google
|
|
1495
1514
|
|
1496
1515
|
@certificate_manager_stub.call_rpc :get_certificate_map_entry, request, options: options do |response, operation|
|
1497
1516
|
yield response, operation if block_given?
|
1498
|
-
return response
|
1499
1517
|
end
|
1500
1518
|
rescue ::GRPC::BadStatus => e
|
1501
1519
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1594,7 +1612,7 @@ module Google
|
|
1594
1612
|
@certificate_manager_stub.call_rpc :create_certificate_map_entry, request, options: options do |response, operation|
|
1595
1613
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1596
1614
|
yield response, operation if block_given?
|
1597
|
-
|
1615
|
+
throw :response, response
|
1598
1616
|
end
|
1599
1617
|
rescue ::GRPC::BadStatus => e
|
1600
1618
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1692,7 +1710,7 @@ module Google
|
|
1692
1710
|
@certificate_manager_stub.call_rpc :update_certificate_map_entry, request, options: options do |response, operation|
|
1693
1711
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1694
1712
|
yield response, operation if block_given?
|
1695
|
-
|
1713
|
+
throw :response, response
|
1696
1714
|
end
|
1697
1715
|
rescue ::GRPC::BadStatus => e
|
1698
1716
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1787,7 +1805,7 @@ module Google
|
|
1787
1805
|
@certificate_manager_stub.call_rpc :delete_certificate_map_entry, request, options: options do |response, operation|
|
1788
1806
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1789
1807
|
yield response, operation if block_given?
|
1790
|
-
|
1808
|
+
throw :response, response
|
1791
1809
|
end
|
1792
1810
|
rescue ::GRPC::BadStatus => e
|
1793
1811
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1891,7 +1909,7 @@ module Google
|
|
1891
1909
|
@certificate_manager_stub.call_rpc :list_dns_authorizations, request, options: options do |response, operation|
|
1892
1910
|
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_dns_authorizations, request, response, operation, options
|
1893
1911
|
yield response, operation if block_given?
|
1894
|
-
|
1912
|
+
throw :response, response
|
1895
1913
|
end
|
1896
1914
|
rescue ::GRPC::BadStatus => e
|
1897
1915
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1978,7 +1996,6 @@ module Google
|
|
1978
1996
|
|
1979
1997
|
@certificate_manager_stub.call_rpc :get_dns_authorization, request, options: options do |response, operation|
|
1980
1998
|
yield response, operation if block_given?
|
1981
|
-
return response
|
1982
1999
|
end
|
1983
2000
|
rescue ::GRPC::BadStatus => e
|
1984
2001
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2077,7 +2094,7 @@ module Google
|
|
2077
2094
|
@certificate_manager_stub.call_rpc :create_dns_authorization, request, options: options do |response, operation|
|
2078
2095
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2079
2096
|
yield response, operation if block_given?
|
2080
|
-
|
2097
|
+
throw :response, response
|
2081
2098
|
end
|
2082
2099
|
rescue ::GRPC::BadStatus => e
|
2083
2100
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2175,7 +2192,7 @@ module Google
|
|
2175
2192
|
@certificate_manager_stub.call_rpc :update_dns_authorization, request, options: options do |response, operation|
|
2176
2193
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2177
2194
|
yield response, operation if block_given?
|
2178
|
-
|
2195
|
+
throw :response, response
|
2179
2196
|
end
|
2180
2197
|
rescue ::GRPC::BadStatus => e
|
2181
2198
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2270,7 +2287,7 @@ module Google
|
|
2270
2287
|
@certificate_manager_stub.call_rpc :delete_dns_authorization, request, options: options do |response, operation|
|
2271
2288
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2272
2289
|
yield response, operation if block_given?
|
2273
|
-
|
2290
|
+
throw :response, response
|
2274
2291
|
end
|
2275
2292
|
rescue ::GRPC::BadStatus => e
|
2276
2293
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2375,7 +2392,7 @@ module Google
|
|
2375
2392
|
@certificate_manager_stub.call_rpc :list_certificate_issuance_configs, request, options: options do |response, operation|
|
2376
2393
|
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_issuance_configs, request, response, operation, options
|
2377
2394
|
yield response, operation if block_given?
|
2378
|
-
|
2395
|
+
throw :response, response
|
2379
2396
|
end
|
2380
2397
|
rescue ::GRPC::BadStatus => e
|
2381
2398
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2462,7 +2479,6 @@ module Google
|
|
2462
2479
|
|
2463
2480
|
@certificate_manager_stub.call_rpc :get_certificate_issuance_config, request, options: options do |response, operation|
|
2464
2481
|
yield response, operation if block_given?
|
2465
|
-
return response
|
2466
2482
|
end
|
2467
2483
|
rescue ::GRPC::BadStatus => e
|
2468
2484
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2561,7 +2577,7 @@ module Google
|
|
2561
2577
|
@certificate_manager_stub.call_rpc :create_certificate_issuance_config, request, options: options do |response, operation|
|
2562
2578
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2563
2579
|
yield response, operation if block_given?
|
2564
|
-
|
2580
|
+
throw :response, response
|
2565
2581
|
end
|
2566
2582
|
rescue ::GRPC::BadStatus => e
|
2567
2583
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2656,7 +2672,7 @@ module Google
|
|
2656
2672
|
@certificate_manager_stub.call_rpc :delete_certificate_issuance_config, request, options: options do |response, operation|
|
2657
2673
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2658
2674
|
yield response, operation if block_given?
|
2659
|
-
|
2675
|
+
throw :response, response
|
2660
2676
|
end
|
2661
2677
|
rescue ::GRPC::BadStatus => e
|
2662
2678
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2760,7 +2776,7 @@ module Google
|
|
2760
2776
|
@certificate_manager_stub.call_rpc :list_trust_configs, request, options: options do |response, operation|
|
2761
2777
|
response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_trust_configs, request, response, operation, options
|
2762
2778
|
yield response, operation if block_given?
|
2763
|
-
|
2779
|
+
throw :response, response
|
2764
2780
|
end
|
2765
2781
|
rescue ::GRPC::BadStatus => e
|
2766
2782
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2847,7 +2863,6 @@ module Google
|
|
2847
2863
|
|
2848
2864
|
@certificate_manager_stub.call_rpc :get_trust_config, request, options: options do |response, operation|
|
2849
2865
|
yield response, operation if block_given?
|
2850
|
-
return response
|
2851
2866
|
end
|
2852
2867
|
rescue ::GRPC::BadStatus => e
|
2853
2868
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2947,7 +2962,7 @@ module Google
|
|
2947
2962
|
@certificate_manager_stub.call_rpc :create_trust_config, request, options: options do |response, operation|
|
2948
2963
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2949
2964
|
yield response, operation if block_given?
|
2950
|
-
|
2965
|
+
throw :response, response
|
2951
2966
|
end
|
2952
2967
|
rescue ::GRPC::BadStatus => e
|
2953
2968
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3045,7 +3060,7 @@ module Google
|
|
3045
3060
|
@certificate_manager_stub.call_rpc :update_trust_config, request, options: options do |response, operation|
|
3046
3061
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3047
3062
|
yield response, operation if block_given?
|
3048
|
-
|
3063
|
+
throw :response, response
|
3049
3064
|
end
|
3050
3065
|
rescue ::GRPC::BadStatus => e
|
3051
3066
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3144,7 +3159,7 @@ module Google
|
|
3144
3159
|
@certificate_manager_stub.call_rpc :delete_trust_config, request, options: options do |response, operation|
|
3145
3160
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3146
3161
|
yield response, operation if block_given?
|
3147
|
-
|
3162
|
+
throw :response, response
|
3148
3163
|
end
|
3149
3164
|
rescue ::GRPC::BadStatus => e
|
3150
3165
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3233,6 +3248,11 @@ module Google
|
|
3233
3248
|
# default endpoint URL. The default value of nil uses the environment
|
3234
3249
|
# universe (usually the default "googleapis.com" universe).
|
3235
3250
|
# @return [::String,nil]
|
3251
|
+
# @!attribute [rw] logger
|
3252
|
+
# A custom logger to use for request/response debug logging, or the value
|
3253
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
3254
|
+
# explicitly disable logging.
|
3255
|
+
# @return [::Logger,:default,nil]
|
3236
3256
|
#
|
3237
3257
|
class Configuration
|
3238
3258
|
extend ::Gapic::Config
|
@@ -3257,6 +3277,7 @@ module Google
|
|
3257
3277
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3258
3278
|
config_attr :quota_project, nil, ::String, nil
|
3259
3279
|
config_attr :universe_domain, nil, ::String, nil
|
3280
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3260
3281
|
|
3261
3282
|
# @private
|
3262
3283
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|