google-cloud-orchestration-airflow-service-v1 1.0.1 → 1.2.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/orchestration/airflow/service/v1/environments/client.rb +167 -24
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/operations.rb +12 -15
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb +160 -24
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/rest/operations.rb +43 -38
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/rest/service_stub.rb +259 -139
- data/lib/google/cloud/orchestration/airflow/service/v1/environments_pb.rb +4 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/environments_services_pb.rb +4 -0
- data/lib/google/cloud/orchestration/airflow/service/v1/image_versions/client.rb +28 -2
- data/lib/google/cloud/orchestration/airflow/service/v1/image_versions/rest/client.rb +28 -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 +95 -10
- 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: c411e9f695752f45669790ed3b511f4c5e0c29388eaff1c8342fb7745b8af6e1
|
4
|
+
data.tar.gz: bbb9f309c3fa2a3718be646910090c67aa206445f0c2d9485a5b1e6f4383f066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65423544ab160aba75cea83f546ed1da815966a6b97c43a2607b71551592e3ce1e0994e84685e6943ca1ab3cbc7874f203cdc9e9dbcd7754c0ba448442b6fa15
|
7
|
+
data.tar.gz: 4096130f5bf4b332bdb2e6387ad61a16a4fed0982bd8eadd7ce09a42df07d0ee7362f8c164e51c1b1e5655ccc83641ea424181678afa4c1b431738ae89037158
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ 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).
|
@@ -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)
|
@@ -1165,7 +1181,130 @@ 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
|
1185
|
+
end
|
1186
|
+
rescue ::GRPC::BadStatus => e
|
1187
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
##
|
1191
|
+
# Check if an upgrade operation on the environment will succeed.
|
1192
|
+
#
|
1193
|
+
# In case of problems detailed info can be found in the returned Operation.
|
1194
|
+
#
|
1195
|
+
# @overload check_upgrade(request, options = nil)
|
1196
|
+
# Pass arguments to `check_upgrade` via a request object, either of type
|
1197
|
+
# {::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest} or an equivalent Hash.
|
1198
|
+
#
|
1199
|
+
# @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest, ::Hash]
|
1200
|
+
# A request object representing the call parameters. Required. To specify no
|
1201
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1202
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1203
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1204
|
+
#
|
1205
|
+
# @overload check_upgrade(environment: nil, image_version: nil)
|
1206
|
+
# Pass arguments to `check_upgrade` via keyword arguments. Note that at
|
1207
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1208
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1209
|
+
#
|
1210
|
+
# @param environment [::String]
|
1211
|
+
# Required. The resource name of the environment to check upgrade for, in the
|
1212
|
+
# form:
|
1213
|
+
# "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
|
1214
|
+
# @param image_version [::String]
|
1215
|
+
# Optional. The version of the software running in the environment.
|
1216
|
+
# This encapsulates both the version of Cloud Composer functionality and the
|
1217
|
+
# version of Apache Airflow. It must match the regular expression
|
1218
|
+
# `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
|
1219
|
+
# When used as input, the server also checks if the provided version is
|
1220
|
+
# supported and denies the request for an unsupported version.
|
1221
|
+
#
|
1222
|
+
# The Cloud Composer portion of the image version is a full
|
1223
|
+
# [semantic version](https://semver.org), or an alias in the form of major
|
1224
|
+
# version number or `latest`. When an alias is provided, the server replaces
|
1225
|
+
# it with the current Cloud Composer version that satisfies the alias.
|
1226
|
+
#
|
1227
|
+
# The Apache Airflow portion of the image version is a full semantic version
|
1228
|
+
# that points to one of the supported Apache Airflow versions, or an alias in
|
1229
|
+
# the form of only major or major.minor versions specified. When an alias is
|
1230
|
+
# provided, the server replaces it with the latest Apache Airflow version
|
1231
|
+
# that satisfies the alias and is supported in the given Cloud Composer
|
1232
|
+
# version.
|
1233
|
+
#
|
1234
|
+
# In all cases, the resolved image version is stored in the same field.
|
1235
|
+
#
|
1236
|
+
# See also [version
|
1237
|
+
# list](/composer/docs/concepts/versioning/composer-versions) and [versioning
|
1238
|
+
# overview](/composer/docs/concepts/versioning/composer-versioning-overview).
|
1239
|
+
#
|
1240
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1241
|
+
# @yieldparam response [::Gapic::Operation]
|
1242
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1243
|
+
#
|
1244
|
+
# @return [::Gapic::Operation]
|
1245
|
+
#
|
1246
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1247
|
+
#
|
1248
|
+
# @example Basic example
|
1249
|
+
# require "google/cloud/orchestration/airflow/service/v1"
|
1250
|
+
#
|
1251
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1252
|
+
# client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
|
1253
|
+
#
|
1254
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1255
|
+
# request = Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest.new
|
1256
|
+
#
|
1257
|
+
# # Call the check_upgrade method.
|
1258
|
+
# result = client.check_upgrade request
|
1259
|
+
#
|
1260
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1261
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1262
|
+
# # Here is how to wait for a response.
|
1263
|
+
# result.wait_until_done! timeout: 60
|
1264
|
+
# if result.response?
|
1265
|
+
# p result.response
|
1266
|
+
# else
|
1267
|
+
# puts "No response received."
|
1268
|
+
# end
|
1269
|
+
#
|
1270
|
+
def check_upgrade request, options = nil
|
1271
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1272
|
+
|
1273
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest
|
1274
|
+
|
1275
|
+
# Converts hash and nil to an options object
|
1276
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1277
|
+
|
1278
|
+
# Customize the options with defaults
|
1279
|
+
metadata = @config.rpcs.check_upgrade.metadata.to_h
|
1280
|
+
|
1281
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1282
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1283
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1284
|
+
gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
|
1285
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1286
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1287
|
+
|
1288
|
+
header_params = {}
|
1289
|
+
if request.environment
|
1290
|
+
header_params["environment"] = request.environment
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1294
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1295
|
+
|
1296
|
+
options.apply_defaults timeout: @config.rpcs.check_upgrade.timeout,
|
1297
|
+
metadata: metadata,
|
1298
|
+
retry_policy: @config.rpcs.check_upgrade.retry_policy
|
1299
|
+
|
1300
|
+
options.apply_defaults timeout: @config.timeout,
|
1301
|
+
metadata: @config.metadata,
|
1302
|
+
retry_policy: @config.retry_policy
|
1303
|
+
|
1304
|
+
@environments_stub.call_rpc :check_upgrade, request, options: options do |response, operation|
|
1305
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1306
|
+
yield response, operation if block_given?
|
1307
|
+
throw :response, response
|
1169
1308
|
end
|
1170
1309
|
rescue ::GRPC::BadStatus => e
|
1171
1310
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1257,7 +1396,6 @@ module Google
|
|
1257
1396
|
|
1258
1397
|
@environments_stub.call_rpc :create_user_workloads_secret, request, options: options do |response, operation|
|
1259
1398
|
yield response, operation if block_given?
|
1260
|
-
return response
|
1261
1399
|
end
|
1262
1400
|
rescue ::GRPC::BadStatus => e
|
1263
1401
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1348,7 +1486,6 @@ module Google
|
|
1348
1486
|
|
1349
1487
|
@environments_stub.call_rpc :get_user_workloads_secret, request, options: options do |response, operation|
|
1350
1488
|
yield response, operation if block_given?
|
1351
|
-
return response
|
1352
1489
|
end
|
1353
1490
|
rescue ::GRPC::BadStatus => e
|
1354
1491
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1448,7 +1585,7 @@ module Google
|
|
1448
1585
|
@environments_stub.call_rpc :list_user_workloads_secrets, request, options: options do |response, operation|
|
1449
1586
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, request, response, operation, options
|
1450
1587
|
yield response, operation if block_given?
|
1451
|
-
|
1588
|
+
throw :response, response
|
1452
1589
|
end
|
1453
1590
|
rescue ::GRPC::BadStatus => e
|
1454
1591
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1537,7 +1674,6 @@ module Google
|
|
1537
1674
|
|
1538
1675
|
@environments_stub.call_rpc :update_user_workloads_secret, request, options: options do |response, operation|
|
1539
1676
|
yield response, operation if block_given?
|
1540
|
-
return response
|
1541
1677
|
end
|
1542
1678
|
rescue ::GRPC::BadStatus => e
|
1543
1679
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1627,7 +1763,6 @@ module Google
|
|
1627
1763
|
|
1628
1764
|
@environments_stub.call_rpc :delete_user_workloads_secret, request, options: options do |response, operation|
|
1629
1765
|
yield response, operation if block_given?
|
1630
|
-
return response
|
1631
1766
|
end
|
1632
1767
|
rescue ::GRPC::BadStatus => e
|
1633
1768
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1719,7 +1854,6 @@ module Google
|
|
1719
1854
|
|
1720
1855
|
@environments_stub.call_rpc :create_user_workloads_config_map, request, options: options do |response, operation|
|
1721
1856
|
yield response, operation if block_given?
|
1722
|
-
return response
|
1723
1857
|
end
|
1724
1858
|
rescue ::GRPC::BadStatus => e
|
1725
1859
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1809,7 +1943,6 @@ module Google
|
|
1809
1943
|
|
1810
1944
|
@environments_stub.call_rpc :get_user_workloads_config_map, request, options: options do |response, operation|
|
1811
1945
|
yield response, operation if block_given?
|
1812
|
-
return response
|
1813
1946
|
end
|
1814
1947
|
rescue ::GRPC::BadStatus => e
|
1815
1948
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1909,7 +2042,7 @@ module Google
|
|
1909
2042
|
@environments_stub.call_rpc :list_user_workloads_config_maps, request, options: options do |response, operation|
|
1910
2043
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, request, response, operation, options
|
1911
2044
|
yield response, operation if block_given?
|
1912
|
-
|
2045
|
+
throw :response, response
|
1913
2046
|
end
|
1914
2047
|
rescue ::GRPC::BadStatus => e
|
1915
2048
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1998,7 +2131,6 @@ module Google
|
|
1998
2131
|
|
1999
2132
|
@environments_stub.call_rpc :update_user_workloads_config_map, request, options: options do |response, operation|
|
2000
2133
|
yield response, operation if block_given?
|
2001
|
-
return response
|
2002
2134
|
end
|
2003
2135
|
rescue ::GRPC::BadStatus => e
|
2004
2136
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2088,7 +2220,6 @@ module Google
|
|
2088
2220
|
|
2089
2221
|
@environments_stub.call_rpc :delete_user_workloads_config_map, request, options: options do |response, operation|
|
2090
2222
|
yield response, operation if block_given?
|
2091
|
-
return response
|
2092
2223
|
end
|
2093
2224
|
rescue ::GRPC::BadStatus => e
|
2094
2225
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2189,7 +2320,7 @@ module Google
|
|
2189
2320
|
@environments_stub.call_rpc :save_snapshot, request, options: options do |response, operation|
|
2190
2321
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2191
2322
|
yield response, operation if block_given?
|
2192
|
-
|
2323
|
+
throw :response, response
|
2193
2324
|
end
|
2194
2325
|
rescue ::GRPC::BadStatus => e
|
2195
2326
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2302,7 +2433,7 @@ module Google
|
|
2302
2433
|
@environments_stub.call_rpc :load_snapshot, request, options: options do |response, operation|
|
2303
2434
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2304
2435
|
yield response, operation if block_given?
|
2305
|
-
|
2436
|
+
throw :response, response
|
2306
2437
|
end
|
2307
2438
|
rescue ::GRPC::BadStatus => e
|
2308
2439
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2397,7 +2528,7 @@ module Google
|
|
2397
2528
|
@environments_stub.call_rpc :database_failover, request, options: options do |response, operation|
|
2398
2529
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2399
2530
|
yield response, operation if block_given?
|
2400
|
-
|
2531
|
+
throw :response, response
|
2401
2532
|
end
|
2402
2533
|
rescue ::GRPC::BadStatus => e
|
2403
2534
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2484,7 +2615,6 @@ module Google
|
|
2484
2615
|
|
2485
2616
|
@environments_stub.call_rpc :fetch_database_properties, request, options: options do |response, operation|
|
2486
2617
|
yield response, operation if block_given?
|
2487
|
-
return response
|
2488
2618
|
end
|
2489
2619
|
rescue ::GRPC::BadStatus => e
|
2490
2620
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2573,6 +2703,11 @@ module Google
|
|
2573
2703
|
# default endpoint URL. The default value of nil uses the environment
|
2574
2704
|
# universe (usually the default "googleapis.com" universe).
|
2575
2705
|
# @return [::String,nil]
|
2706
|
+
# @!attribute [rw] logger
|
2707
|
+
# A custom logger to use for request/response debug logging, or the value
|
2708
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2709
|
+
# explicitly disable logging.
|
2710
|
+
# @return [::Logger,:default,nil]
|
2576
2711
|
#
|
2577
2712
|
class Configuration
|
2578
2713
|
extend ::Gapic::Config
|
@@ -2597,6 +2732,7 @@ module Google
|
|
2597
2732
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2598
2733
|
config_attr :quota_project, nil, ::String, nil
|
2599
2734
|
config_attr :universe_domain, nil, ::String, nil
|
2735
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2600
2736
|
|
2601
2737
|
# @private
|
2602
2738
|
def initialize parent_config = nil
|
@@ -2689,6 +2825,11 @@ module Google
|
|
2689
2825
|
#
|
2690
2826
|
attr_reader :list_workloads
|
2691
2827
|
##
|
2828
|
+
# RPC-specific configuration for `check_upgrade`
|
2829
|
+
# @return [::Gapic::Config::Method]
|
2830
|
+
#
|
2831
|
+
attr_reader :check_upgrade
|
2832
|
+
##
|
2692
2833
|
# RPC-specific configuration for `create_user_workloads_secret`
|
2693
2834
|
# @return [::Gapic::Config::Method]
|
2694
2835
|
#
|
@@ -2779,6 +2920,8 @@ module Google
|
|
2779
2920
|
@poll_airflow_command = ::Gapic::Config::Method.new poll_airflow_command_config
|
2780
2921
|
list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads
|
2781
2922
|
@list_workloads = ::Gapic::Config::Method.new list_workloads_config
|
2923
|
+
check_upgrade_config = parent_rpcs.check_upgrade if parent_rpcs.respond_to? :check_upgrade
|
2924
|
+
@check_upgrade = ::Gapic::Config::Method.new check_upgrade_config
|
2782
2925
|
create_user_workloads_secret_config = parent_rpcs.create_user_workloads_secret if parent_rpcs.respond_to? :create_user_workloads_secret
|
2783
2926
|
@create_user_workloads_secret = ::Gapic::Config::Method.new create_user_workloads_secret_config
|
2784
2927
|
get_user_workloads_secret_config = parent_rpcs.get_user_workloads_secret if parent_rpcs.respond_to? :get_user_workloads_secret
|
@@ -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)
|
@@ -690,6 +681,11 @@ module Google
|
|
690
681
|
# default endpoint URL. The default value of nil uses the environment
|
691
682
|
# universe (usually the default "googleapis.com" universe).
|
692
683
|
# @return [::String,nil]
|
684
|
+
# @!attribute [rw] logger
|
685
|
+
# A custom logger to use for request/response debug logging, or the value
|
686
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
687
|
+
# explicitly disable logging.
|
688
|
+
# @return [::Logger,:default,nil]
|
693
689
|
#
|
694
690
|
class Configuration
|
695
691
|
extend ::Gapic::Config
|
@@ -714,6 +710,7 @@ module Google
|
|
714
710
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
715
711
|
config_attr :quota_project, nil, ::String, nil
|
716
712
|
config_attr :universe_domain, nil, ::String, nil
|
713
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
717
714
|
|
718
715
|
# @private
|
719
716
|
def initialize parent_config = nil
|