google-cloud-datastream-v1alpha1 0.7.1 → 0.9.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/datastream/v1alpha1/datastream/client.rb +61 -22
- data/lib/google/cloud/datastream/v1alpha1/datastream/operations.rb +19 -15
- data/lib/google/cloud/datastream/v1alpha1/datastream/rest/client.rb +58 -22
- data/lib/google/cloud/datastream/v1alpha1/datastream/rest/operations.rb +50 -38
- data/lib/google/cloud/datastream/v1alpha1/datastream/rest/service_stub.rb +182 -128
- data/lib/google/cloud/datastream/v1alpha1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/datastream/v1alpha1/datastream.rb +16 -0
- data/proto_docs/google/cloud/datastream/v1alpha1/datastream_resources.rb +34 -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: 3e8f72614c10e67f8aef248444a34b6525998fd3cd383cbc1b49eba0c995a48e
|
4
|
+
data.tar.gz: 393fd3dc1925b7e9fd96d60a48caf7267cde6b152c234a310915d08278f6111e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1de37fd9caf59f428afa10a5c68282d6cb7d4f315362860d72471e6f7c6de065a5a7cbe90e2b1325309f24e29f36072017297fb91125758454e2f2f1d3ac6f04
|
7
|
+
data.tar.gz: b88675c06169a961293a3bdfe6c4d2b1b5b259343a7c04165611d7dd856f3d56b5b878304a0275a6bcceb722eb8622a425559e192a0e0e199c8533913d7bcf87
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/datastream/)
|
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/datastream/v1alpha1"
|
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::Datastream::V1alpha1::Datastream::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
|
@@ -189,8 +189,19 @@ module Google
|
|
189
189
|
universe_domain: @config.universe_domain,
|
190
190
|
channel_args: @config.channel_args,
|
191
191
|
interceptors: @config.interceptors,
|
192
|
-
channel_pool_config: @config.channel_pool
|
192
|
+
channel_pool_config: @config.channel_pool,
|
193
|
+
logger: @config.logger
|
193
194
|
)
|
195
|
+
|
196
|
+
@datastream_stub.stub_logger&.info do |entry|
|
197
|
+
entry.set_system_name
|
198
|
+
entry.set_service
|
199
|
+
entry.message = "Created client for #{entry.service}"
|
200
|
+
entry.set_credentials_fields credentials
|
201
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
202
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
203
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
204
|
+
end
|
194
205
|
end
|
195
206
|
|
196
207
|
##
|
@@ -200,6 +211,15 @@ module Google
|
|
200
211
|
#
|
201
212
|
attr_reader :operations_client
|
202
213
|
|
214
|
+
##
|
215
|
+
# The logger used for request/response debug logging.
|
216
|
+
#
|
217
|
+
# @return [Logger]
|
218
|
+
#
|
219
|
+
def logger
|
220
|
+
@datastream_stub.logger
|
221
|
+
end
|
222
|
+
|
203
223
|
# Service calls
|
204
224
|
|
205
225
|
##
|
@@ -302,7 +322,7 @@ module Google
|
|
302
322
|
@datastream_stub.call_rpc :list_connection_profiles, request, options: options do |response, operation|
|
303
323
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_connection_profiles, request, response, operation, options
|
304
324
|
yield response, operation if block_given?
|
305
|
-
|
325
|
+
throw :response, response
|
306
326
|
end
|
307
327
|
rescue ::GRPC::BadStatus => e
|
308
328
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -388,7 +408,6 @@ module Google
|
|
388
408
|
|
389
409
|
@datastream_stub.call_rpc :get_connection_profile, request, options: options do |response, operation|
|
390
410
|
yield response, operation if block_given?
|
391
|
-
return response
|
392
411
|
end
|
393
412
|
rescue ::GRPC::BadStatus => e
|
394
413
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -500,7 +519,7 @@ module Google
|
|
500
519
|
@datastream_stub.call_rpc :create_connection_profile, request, options: options do |response, operation|
|
501
520
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
502
521
|
yield response, operation if block_given?
|
503
|
-
|
522
|
+
throw :response, response
|
504
523
|
end
|
505
524
|
rescue ::GRPC::BadStatus => e
|
506
525
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -614,7 +633,7 @@ module Google
|
|
614
633
|
@datastream_stub.call_rpc :update_connection_profile, request, options: options do |response, operation|
|
615
634
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
616
635
|
yield response, operation if block_given?
|
617
|
-
|
636
|
+
throw :response, response
|
618
637
|
end
|
619
638
|
rescue ::GRPC::BadStatus => e
|
620
639
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -722,7 +741,7 @@ module Google
|
|
722
741
|
@datastream_stub.call_rpc :delete_connection_profile, request, options: options do |response, operation|
|
723
742
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
724
743
|
yield response, operation if block_given?
|
725
|
-
|
744
|
+
throw :response, response
|
726
745
|
end
|
727
746
|
rescue ::GRPC::BadStatus => e
|
728
747
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -754,18 +773,30 @@ module Google
|
|
754
773
|
# format `projects/*/locations/*`.
|
755
774
|
# @param connection_profile [::Google::Cloud::Datastream::V1alpha1::ConnectionProfile, ::Hash]
|
756
775
|
# An ad-hoc ConnectionProfile configuration.
|
776
|
+
#
|
777
|
+
# Note: The following fields are mutually exclusive: `connection_profile`, `connection_profile_name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
757
778
|
# @param connection_profile_name [::String]
|
758
779
|
# A reference to an existing ConnectionProfile.
|
780
|
+
#
|
781
|
+
# Note: The following fields are mutually exclusive: `connection_profile_name`, `connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
759
782
|
# @param recursive [::Boolean]
|
760
783
|
# Whether to retrieve the full hierarchy of data objects (TRUE) or only the
|
761
784
|
# current level (FALSE).
|
785
|
+
#
|
786
|
+
# Note: The following fields are mutually exclusive: `recursive`, `recursion_depth`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
762
787
|
# @param recursion_depth [::Integer]
|
763
788
|
# The number of hierarchy levels below the current level to be retrieved.
|
789
|
+
#
|
790
|
+
# Note: The following fields are mutually exclusive: `recursion_depth`, `recursive`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
764
791
|
# @param oracle_rdbms [::Google::Cloud::Datastream::V1alpha1::OracleRdbms, ::Hash]
|
765
792
|
# Oracle RDBMS to enrich with child data objects and metadata.
|
793
|
+
#
|
794
|
+
# Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
766
795
|
# @param mysql_rdbms [::Google::Cloud::Datastream::V1alpha1::MysqlRdbms, ::Hash]
|
767
796
|
# MySQL RDBMS to enrich with child data objects and metadata.
|
768
797
|
#
|
798
|
+
# Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
799
|
+
#
|
769
800
|
# @yield [response, operation] Access the result along with the RPC operation
|
770
801
|
# @yieldparam response [::Google::Cloud::Datastream::V1alpha1::DiscoverConnectionProfileResponse]
|
771
802
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
@@ -825,7 +856,6 @@ module Google
|
|
825
856
|
|
826
857
|
@datastream_stub.call_rpc :discover_connection_profile, request, options: options do |response, operation|
|
827
858
|
yield response, operation if block_given?
|
828
|
-
return response
|
829
859
|
end
|
830
860
|
rescue ::GRPC::BadStatus => e
|
831
861
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -930,7 +960,7 @@ module Google
|
|
930
960
|
@datastream_stub.call_rpc :list_streams, request, options: options do |response, operation|
|
931
961
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_streams, request, response, operation, options
|
932
962
|
yield response, operation if block_given?
|
933
|
-
|
963
|
+
throw :response, response
|
934
964
|
end
|
935
965
|
rescue ::GRPC::BadStatus => e
|
936
966
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1016,7 +1046,6 @@ module Google
|
|
1016
1046
|
|
1017
1047
|
@datastream_stub.call_rpc :get_stream, request, options: options do |response, operation|
|
1018
1048
|
yield response, operation if block_given?
|
1019
|
-
return response
|
1020
1049
|
end
|
1021
1050
|
rescue ::GRPC::BadStatus => e
|
1022
1051
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1133,7 +1162,7 @@ module Google
|
|
1133
1162
|
@datastream_stub.call_rpc :create_stream, request, options: options do |response, operation|
|
1134
1163
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1135
1164
|
yield response, operation if block_given?
|
1136
|
-
|
1165
|
+
throw :response, response
|
1137
1166
|
end
|
1138
1167
|
rescue ::GRPC::BadStatus => e
|
1139
1168
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1252,7 +1281,7 @@ module Google
|
|
1252
1281
|
@datastream_stub.call_rpc :update_stream, request, options: options do |response, operation|
|
1253
1282
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1254
1283
|
yield response, operation if block_given?
|
1255
|
-
|
1284
|
+
throw :response, response
|
1256
1285
|
end
|
1257
1286
|
rescue ::GRPC::BadStatus => e
|
1258
1287
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1360,7 +1389,7 @@ module Google
|
|
1360
1389
|
@datastream_stub.call_rpc :delete_stream, request, options: options do |response, operation|
|
1361
1390
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1362
1391
|
yield response, operation if block_given?
|
1363
|
-
|
1392
|
+
throw :response, response
|
1364
1393
|
end
|
1365
1394
|
rescue ::GRPC::BadStatus => e
|
1366
1395
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1454,7 +1483,7 @@ module Google
|
|
1454
1483
|
@datastream_stub.call_rpc :fetch_errors, request, options: options do |response, operation|
|
1455
1484
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1456
1485
|
yield response, operation if block_given?
|
1457
|
-
|
1486
|
+
throw :response, response
|
1458
1487
|
end
|
1459
1488
|
rescue ::GRPC::BadStatus => e
|
1460
1489
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1548,7 +1577,6 @@ module Google
|
|
1548
1577
|
|
1549
1578
|
@datastream_stub.call_rpc :fetch_static_ips, request, options: options do |response, operation|
|
1550
1579
|
yield response, operation if block_given?
|
1551
|
-
return response
|
1552
1580
|
end
|
1553
1581
|
rescue ::GRPC::BadStatus => e
|
1554
1582
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1660,7 +1688,7 @@ module Google
|
|
1660
1688
|
@datastream_stub.call_rpc :create_private_connection, request, options: options do |response, operation|
|
1661
1689
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1662
1690
|
yield response, operation if block_given?
|
1663
|
-
|
1691
|
+
throw :response, response
|
1664
1692
|
end
|
1665
1693
|
rescue ::GRPC::BadStatus => e
|
1666
1694
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1746,7 +1774,6 @@ module Google
|
|
1746
1774
|
|
1747
1775
|
@datastream_stub.call_rpc :get_private_connection, request, options: options do |response, operation|
|
1748
1776
|
yield response, operation if block_given?
|
1749
|
-
return response
|
1750
1777
|
end
|
1751
1778
|
rescue ::GRPC::BadStatus => e
|
1752
1779
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1854,7 +1881,7 @@ module Google
|
|
1854
1881
|
@datastream_stub.call_rpc :list_private_connections, request, options: options do |response, operation|
|
1855
1882
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_private_connections, request, response, operation, options
|
1856
1883
|
yield response, operation if block_given?
|
1857
|
-
|
1884
|
+
throw :response, response
|
1858
1885
|
end
|
1859
1886
|
rescue ::GRPC::BadStatus => e
|
1860
1887
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1965,7 +1992,7 @@ module Google
|
|
1965
1992
|
@datastream_stub.call_rpc :delete_private_connection, request, options: options do |response, operation|
|
1966
1993
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1967
1994
|
yield response, operation if block_given?
|
1968
|
-
|
1995
|
+
throw :response, response
|
1969
1996
|
end
|
1970
1997
|
rescue ::GRPC::BadStatus => e
|
1971
1998
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2078,7 +2105,7 @@ module Google
|
|
2078
2105
|
@datastream_stub.call_rpc :create_route, request, options: options do |response, operation|
|
2079
2106
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2080
2107
|
yield response, operation if block_given?
|
2081
|
-
|
2108
|
+
throw :response, response
|
2082
2109
|
end
|
2083
2110
|
rescue ::GRPC::BadStatus => e
|
2084
2111
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2164,7 +2191,6 @@ module Google
|
|
2164
2191
|
|
2165
2192
|
@datastream_stub.call_rpc :get_route, request, options: options do |response, operation|
|
2166
2193
|
yield response, operation if block_given?
|
2167
|
-
return response
|
2168
2194
|
end
|
2169
2195
|
rescue ::GRPC::BadStatus => e
|
2170
2196
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2272,7 +2298,7 @@ module Google
|
|
2272
2298
|
@datastream_stub.call_rpc :list_routes, request, options: options do |response, operation|
|
2273
2299
|
response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_routes, request, response, operation, options
|
2274
2300
|
yield response, operation if block_given?
|
2275
|
-
|
2301
|
+
throw :response, response
|
2276
2302
|
end
|
2277
2303
|
rescue ::GRPC::BadStatus => e
|
2278
2304
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2380,7 +2406,7 @@ module Google
|
|
2380
2406
|
@datastream_stub.call_rpc :delete_route, request, options: options do |response, operation|
|
2381
2407
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2382
2408
|
yield response, operation if block_given?
|
2383
|
-
|
2409
|
+
throw :response, response
|
2384
2410
|
end
|
2385
2411
|
rescue ::GRPC::BadStatus => e
|
2386
2412
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2430,6 +2456,13 @@ module Google
|
|
2430
2456
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2431
2457
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2432
2458
|
# * (`nil`) indicating no credentials
|
2459
|
+
#
|
2460
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2461
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2462
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2463
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2464
|
+
# For more information, refer to [Validate credential configurations from external
|
2465
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2433
2466
|
# @return [::Object]
|
2434
2467
|
# @!attribute [rw] scope
|
2435
2468
|
# The OAuth scopes
|
@@ -2469,6 +2502,11 @@ module Google
|
|
2469
2502
|
# default endpoint URL. The default value of nil uses the environment
|
2470
2503
|
# universe (usually the default "googleapis.com" universe).
|
2471
2504
|
# @return [::String,nil]
|
2505
|
+
# @!attribute [rw] logger
|
2506
|
+
# A custom logger to use for request/response debug logging, or the value
|
2507
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2508
|
+
# explicitly disable logging.
|
2509
|
+
# @return [::Logger,:default,nil]
|
2472
2510
|
#
|
2473
2511
|
class Configuration
|
2474
2512
|
extend ::Gapic::Config
|
@@ -2493,6 +2531,7 @@ module Google
|
|
2493
2531
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2494
2532
|
config_attr :quota_project, nil, ::String, nil
|
2495
2533
|
config_attr :universe_domain, nil, ::String, nil
|
2534
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2496
2535
|
|
2497
2536
|
# @private
|
2498
2537
|
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
|