google-cloud-orchestration-airflow-service-v1 1.1.0 → 1.3.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 +31 -21
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb +46 -26
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/operations.rb +19 -15
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb +46 -26
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/rest/operations.rb +50 -38
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/rest/service_stub.rb +206 -146
- data/lib/google/cloud/orchestration/airflow/service/v1/environments_pb.rb +1 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/environments_services_pb.rb +1 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/image_versions/client.rb +35 -2
- data/lib/google/cloud/orchestration/airflow/service/v1/image_versions/rest/client.rb +35 -2
- data/lib/google/cloud/orchestration/airflow/service/v1/image_versions/rest/service_stub.rb +22 -8
- data/lib/google/cloud/orchestration/airflow/service/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/orchestration/airflow/service/v1/environments.rb +29 -6
- 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: 3954d3253fa9f2bf533d4c61ed7c0d9b02d581ab263e1188276aa0e0a7539b88
|
4
|
+
data.tar.gz: c263de5ec3368ba7b2a411e1addbe44781b09b30d5d3b77d95bff89aaf45514b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 631efaeca0d7c3ee30d38afc139ffdb92369dd9a82254635ff5f466ebcba5697be043a8c6f0277ee1931f65f71e6324e9387116bd3c145dbfaefc279ea8eacd4
|
7
|
+
data.tar.gz: bfde4ada6c11f861df80e5d95734e8cab9874604e8ddad92a14aba777202000495b02922121c6d7a6cd135f2033a0e69b22f16d5e063d53c33f365a1b851b10b
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/composer)
|
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/orchestration/airflow/service/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::Orchestration::Airflow::Service::V1::Environments::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
|
@@ -166,8 +166,19 @@ module Google
|
|
166
166
|
universe_domain: @config.universe_domain,
|
167
167
|
channel_args: @config.channel_args,
|
168
168
|
interceptors: @config.interceptors,
|
169
|
-
channel_pool_config: @config.channel_pool
|
169
|
+
channel_pool_config: @config.channel_pool,
|
170
|
+
logger: @config.logger
|
170
171
|
)
|
172
|
+
|
173
|
+
@environments_stub.stub_logger&.info do |entry|
|
174
|
+
entry.set_system_name
|
175
|
+
entry.set_service
|
176
|
+
entry.message = "Created client for #{entry.service}"
|
177
|
+
entry.set_credentials_fields credentials
|
178
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
179
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
180
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
181
|
+
end
|
171
182
|
end
|
172
183
|
|
173
184
|
##
|
@@ -177,6 +188,15 @@ module Google
|
|
177
188
|
#
|
178
189
|
attr_reader :operations_client
|
179
190
|
|
191
|
+
##
|
192
|
+
# The logger used for request/response debug logging.
|
193
|
+
#
|
194
|
+
# @return [Logger]
|
195
|
+
#
|
196
|
+
def logger
|
197
|
+
@environments_stub.logger
|
198
|
+
end
|
199
|
+
|
180
200
|
# Service calls
|
181
201
|
|
182
202
|
##
|
@@ -270,7 +290,7 @@ module Google
|
|
270
290
|
@environments_stub.call_rpc :create_environment, request, options: options do |response, operation|
|
271
291
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
272
292
|
yield response, operation if block_given?
|
273
|
-
|
293
|
+
throw :response, response
|
274
294
|
end
|
275
295
|
rescue ::GRPC::BadStatus => e
|
276
296
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -357,7 +377,6 @@ module Google
|
|
357
377
|
|
358
378
|
@environments_stub.call_rpc :get_environment, request, options: options do |response, operation|
|
359
379
|
yield response, operation if block_given?
|
360
|
-
return response
|
361
380
|
end
|
362
381
|
rescue ::GRPC::BadStatus => e
|
363
382
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -453,7 +472,7 @@ module Google
|
|
453
472
|
@environments_stub.call_rpc :list_environments, request, options: options do |response, operation|
|
454
473
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_environments, request, response, operation, options
|
455
474
|
yield response, operation if block_given?
|
456
|
-
|
475
|
+
throw :response, response
|
457
476
|
end
|
458
477
|
rescue ::GRPC::BadStatus => e
|
459
478
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -675,7 +694,7 @@ module Google
|
|
675
694
|
@environments_stub.call_rpc :update_environment, request, options: options do |response, operation|
|
676
695
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
677
696
|
yield response, operation if block_given?
|
678
|
-
|
697
|
+
throw :response, response
|
679
698
|
end
|
680
699
|
rescue ::GRPC::BadStatus => e
|
681
700
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -770,7 +789,7 @@ module Google
|
|
770
789
|
@environments_stub.call_rpc :delete_environment, request, options: options do |response, operation|
|
771
790
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
772
791
|
yield response, operation if block_given?
|
773
|
-
|
792
|
+
throw :response, response
|
774
793
|
end
|
775
794
|
rescue ::GRPC::BadStatus => e
|
776
795
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -866,7 +885,6 @@ module Google
|
|
866
885
|
|
867
886
|
@environments_stub.call_rpc :execute_airflow_command, request, options: options do |response, operation|
|
868
887
|
yield response, operation if block_given?
|
869
|
-
return response
|
870
888
|
end
|
871
889
|
rescue ::GRPC::BadStatus => e
|
872
890
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -962,7 +980,6 @@ module Google
|
|
962
980
|
|
963
981
|
@environments_stub.call_rpc :stop_airflow_command, request, options: options do |response, operation|
|
964
982
|
yield response, operation if block_given?
|
965
|
-
return response
|
966
983
|
end
|
967
984
|
rescue ::GRPC::BadStatus => e
|
968
985
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1057,7 +1074,6 @@ module Google
|
|
1057
1074
|
|
1058
1075
|
@environments_stub.call_rpc :poll_airflow_command, request, options: options do |response, operation|
|
1059
1076
|
yield response, operation if block_given?
|
1060
|
-
return response
|
1061
1077
|
end
|
1062
1078
|
rescue ::GRPC::BadStatus => e
|
1063
1079
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1068,7 +1084,7 @@ module Google
|
|
1068
1084
|
# runs a single Composer component.
|
1069
1085
|
#
|
1070
1086
|
# This method is supported for Cloud Composer environments in versions
|
1071
|
-
# composer-
|
1087
|
+
# composer-2.*.*-airflow-*.*.* and newer.
|
1072
1088
|
#
|
1073
1089
|
# @overload list_workloads(request, options = nil)
|
1074
1090
|
# Pass arguments to `list_workloads` via a request object, either of type
|
@@ -1165,7 +1181,7 @@ module Google
|
|
1165
1181
|
@environments_stub.call_rpc :list_workloads, request, options: options do |response, operation|
|
1166
1182
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_workloads, request, response, operation, options
|
1167
1183
|
yield response, operation if block_given?
|
1168
|
-
|
1184
|
+
throw :response, response
|
1169
1185
|
end
|
1170
1186
|
rescue ::GRPC::BadStatus => e
|
1171
1187
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1288,7 +1304,7 @@ module Google
|
|
1288
1304
|
@environments_stub.call_rpc :check_upgrade, request, options: options do |response, operation|
|
1289
1305
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1290
1306
|
yield response, operation if block_given?
|
1291
|
-
|
1307
|
+
throw :response, response
|
1292
1308
|
end
|
1293
1309
|
rescue ::GRPC::BadStatus => e
|
1294
1310
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1380,7 +1396,6 @@ module Google
|
|
1380
1396
|
|
1381
1397
|
@environments_stub.call_rpc :create_user_workloads_secret, request, options: options do |response, operation|
|
1382
1398
|
yield response, operation if block_given?
|
1383
|
-
return response
|
1384
1399
|
end
|
1385
1400
|
rescue ::GRPC::BadStatus => e
|
1386
1401
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1471,7 +1486,6 @@ module Google
|
|
1471
1486
|
|
1472
1487
|
@environments_stub.call_rpc :get_user_workloads_secret, request, options: options do |response, operation|
|
1473
1488
|
yield response, operation if block_given?
|
1474
|
-
return response
|
1475
1489
|
end
|
1476
1490
|
rescue ::GRPC::BadStatus => e
|
1477
1491
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1571,7 +1585,7 @@ module Google
|
|
1571
1585
|
@environments_stub.call_rpc :list_user_workloads_secrets, request, options: options do |response, operation|
|
1572
1586
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, request, response, operation, options
|
1573
1587
|
yield response, operation if block_given?
|
1574
|
-
|
1588
|
+
throw :response, response
|
1575
1589
|
end
|
1576
1590
|
rescue ::GRPC::BadStatus => e
|
1577
1591
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1660,7 +1674,6 @@ module Google
|
|
1660
1674
|
|
1661
1675
|
@environments_stub.call_rpc :update_user_workloads_secret, request, options: options do |response, operation|
|
1662
1676
|
yield response, operation if block_given?
|
1663
|
-
return response
|
1664
1677
|
end
|
1665
1678
|
rescue ::GRPC::BadStatus => e
|
1666
1679
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1750,7 +1763,6 @@ module Google
|
|
1750
1763
|
|
1751
1764
|
@environments_stub.call_rpc :delete_user_workloads_secret, request, options: options do |response, operation|
|
1752
1765
|
yield response, operation if block_given?
|
1753
|
-
return response
|
1754
1766
|
end
|
1755
1767
|
rescue ::GRPC::BadStatus => e
|
1756
1768
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1842,7 +1854,6 @@ module Google
|
|
1842
1854
|
|
1843
1855
|
@environments_stub.call_rpc :create_user_workloads_config_map, request, options: options do |response, operation|
|
1844
1856
|
yield response, operation if block_given?
|
1845
|
-
return response
|
1846
1857
|
end
|
1847
1858
|
rescue ::GRPC::BadStatus => e
|
1848
1859
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1932,7 +1943,6 @@ module Google
|
|
1932
1943
|
|
1933
1944
|
@environments_stub.call_rpc :get_user_workloads_config_map, request, options: options do |response, operation|
|
1934
1945
|
yield response, operation if block_given?
|
1935
|
-
return response
|
1936
1946
|
end
|
1937
1947
|
rescue ::GRPC::BadStatus => e
|
1938
1948
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2032,7 +2042,7 @@ module Google
|
|
2032
2042
|
@environments_stub.call_rpc :list_user_workloads_config_maps, request, options: options do |response, operation|
|
2033
2043
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, request, response, operation, options
|
2034
2044
|
yield response, operation if block_given?
|
2035
|
-
|
2045
|
+
throw :response, response
|
2036
2046
|
end
|
2037
2047
|
rescue ::GRPC::BadStatus => e
|
2038
2048
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2121,7 +2131,6 @@ module Google
|
|
2121
2131
|
|
2122
2132
|
@environments_stub.call_rpc :update_user_workloads_config_map, request, options: options do |response, operation|
|
2123
2133
|
yield response, operation if block_given?
|
2124
|
-
return response
|
2125
2134
|
end
|
2126
2135
|
rescue ::GRPC::BadStatus => e
|
2127
2136
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2211,7 +2220,6 @@ module Google
|
|
2211
2220
|
|
2212
2221
|
@environments_stub.call_rpc :delete_user_workloads_config_map, request, options: options do |response, operation|
|
2213
2222
|
yield response, operation if block_given?
|
2214
|
-
return response
|
2215
2223
|
end
|
2216
2224
|
rescue ::GRPC::BadStatus => e
|
2217
2225
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2312,7 +2320,7 @@ module Google
|
|
2312
2320
|
@environments_stub.call_rpc :save_snapshot, request, options: options do |response, operation|
|
2313
2321
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2314
2322
|
yield response, operation if block_given?
|
2315
|
-
|
2323
|
+
throw :response, response
|
2316
2324
|
end
|
2317
2325
|
rescue ::GRPC::BadStatus => e
|
2318
2326
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2425,7 +2433,7 @@ module Google
|
|
2425
2433
|
@environments_stub.call_rpc :load_snapshot, request, options: options do |response, operation|
|
2426
2434
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2427
2435
|
yield response, operation if block_given?
|
2428
|
-
|
2436
|
+
throw :response, response
|
2429
2437
|
end
|
2430
2438
|
rescue ::GRPC::BadStatus => e
|
2431
2439
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2520,7 +2528,7 @@ module Google
|
|
2520
2528
|
@environments_stub.call_rpc :database_failover, request, options: options do |response, operation|
|
2521
2529
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2522
2530
|
yield response, operation if block_given?
|
2523
|
-
|
2531
|
+
throw :response, response
|
2524
2532
|
end
|
2525
2533
|
rescue ::GRPC::BadStatus => e
|
2526
2534
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2607,7 +2615,6 @@ module Google
|
|
2607
2615
|
|
2608
2616
|
@environments_stub.call_rpc :fetch_database_properties, request, options: options do |response, operation|
|
2609
2617
|
yield response, operation if block_given?
|
2610
|
-
return response
|
2611
2618
|
end
|
2612
2619
|
rescue ::GRPC::BadStatus => e
|
2613
2620
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2657,6 +2664,13 @@ module Google
|
|
2657
2664
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2658
2665
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2659
2666
|
# * (`nil`) indicating no credentials
|
2667
|
+
#
|
2668
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2669
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2670
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2671
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2672
|
+
# For more information, refer to [Validate credential configurations from external
|
2673
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2660
2674
|
# @return [::Object]
|
2661
2675
|
# @!attribute [rw] scope
|
2662
2676
|
# The OAuth scopes
|
@@ -2696,6 +2710,11 @@ module Google
|
|
2696
2710
|
# default endpoint URL. The default value of nil uses the environment
|
2697
2711
|
# universe (usually the default "googleapis.com" universe).
|
2698
2712
|
# @return [::String,nil]
|
2713
|
+
# @!attribute [rw] logger
|
2714
|
+
# A custom logger to use for request/response debug logging, or the value
|
2715
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2716
|
+
# explicitly disable logging.
|
2717
|
+
# @return [::Logger,:default,nil]
|
2699
2718
|
#
|
2700
2719
|
class Configuration
|
2701
2720
|
extend ::Gapic::Config
|
@@ -2720,6 +2739,7 @@ module Google
|
|
2720
2739
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2721
2740
|
config_attr :quota_project, nil, ::String, nil
|
2722
2741
|
config_attr :universe_domain, nil, ::String, nil
|
2742
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2723
2743
|
|
2724
2744
|
# @private
|
2725
2745
|
def initialize parent_config = nil
|
@@ -126,14 +126,6 @@ module Google
|
|
126
126
|
# Lists operations that match the specified filter in the request. If the
|
127
127
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
128
128
|
#
|
129
|
-
# NOTE: the `name` binding allows API services to override the binding
|
130
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
131
|
-
# override the binding, API services can add a binding such as
|
132
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
133
|
-
# For backwards compatibility, the default name includes the operations
|
134
|
-
# collection id, however overriding users must ensure the name binding
|
135
|
-
# is the parent resource, without the operations collection id.
|
136
|
-
#
|
137
129
|
# @overload list_operations(request, options = nil)
|
138
130
|
# Pass arguments to `list_operations` via a request object, either of type
|
139
131
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -223,7 +215,7 @@ module Google
|
|
223
215
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
224
216
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
225
217
|
yield response, operation if block_given?
|
226
|
-
|
218
|
+
throw :response, response
|
227
219
|
end
|
228
220
|
rescue ::GRPC::BadStatus => e
|
229
221
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -319,7 +311,7 @@ module Google
|
|
319
311
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
320
312
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
321
313
|
yield response, operation if block_given?
|
322
|
-
|
314
|
+
throw :response, response
|
323
315
|
end
|
324
316
|
rescue ::GRPC::BadStatus => e
|
325
317
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -408,7 +400,6 @@ module Google
|
|
408
400
|
|
409
401
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
410
402
|
yield response, operation if block_given?
|
411
|
-
return response
|
412
403
|
end
|
413
404
|
rescue ::GRPC::BadStatus => e
|
414
405
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -423,8 +414,9 @@ module Google
|
|
423
414
|
# other methods to check whether the cancellation succeeded or whether the
|
424
415
|
# operation completed despite cancellation. On successful cancellation,
|
425
416
|
# the operation is not deleted; instead, it becomes an operation with
|
426
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
427
|
-
# corresponding to
|
417
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
418
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
419
|
+
# `Code.CANCELLED`.
|
428
420
|
#
|
429
421
|
# @overload cancel_operation(request, options = nil)
|
430
422
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -503,7 +495,6 @@ module Google
|
|
503
495
|
|
504
496
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
505
497
|
yield response, operation if block_given?
|
506
|
-
return response
|
507
498
|
end
|
508
499
|
rescue ::GRPC::BadStatus => e
|
509
500
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -601,7 +592,7 @@ module Google
|
|
601
592
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
602
593
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
603
594
|
yield response, operation if block_given?
|
604
|
-
|
595
|
+
throw :response, response
|
605
596
|
end
|
606
597
|
rescue ::GRPC::BadStatus => e
|
607
598
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -651,6 +642,13 @@ module Google
|
|
651
642
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
652
643
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
653
644
|
# * (`nil`) indicating no credentials
|
645
|
+
#
|
646
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
647
|
+
# external source for authentication to Google Cloud, you must validate it before
|
648
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
649
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
650
|
+
# For more information, refer to [Validate credential configurations from external
|
651
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
654
652
|
# @return [::Object]
|
655
653
|
# @!attribute [rw] scope
|
656
654
|
# The OAuth scopes
|
@@ -690,6 +688,11 @@ module Google
|
|
690
688
|
# default endpoint URL. The default value of nil uses the environment
|
691
689
|
# universe (usually the default "googleapis.com" universe).
|
692
690
|
# @return [::String,nil]
|
691
|
+
# @!attribute [rw] logger
|
692
|
+
# A custom logger to use for request/response debug logging, or the value
|
693
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
694
|
+
# explicitly disable logging.
|
695
|
+
# @return [::Logger,:default,nil]
|
693
696
|
#
|
694
697
|
class Configuration
|
695
698
|
extend ::Gapic::Config
|
@@ -714,6 +717,7 @@ module Google
|
|
714
717
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
715
718
|
config_attr :quota_project, nil, ::String, nil
|
716
719
|
config_attr :universe_domain, nil, ::String, nil
|
720
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
717
721
|
|
718
722
|
# @private
|
719
723
|
def initialize parent_config = nil
|