google-cloud-service_management-v1 1.0.2 → 1.2.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/service_management/v1/service_manager/client.rb +43 -14
- data/lib/google/cloud/service_management/v1/service_manager/operations.rb +19 -15
- data/lib/google/cloud/service_management/v1/service_manager/rest/client.rb +43 -14
- data/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb +50 -38
- data/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb +118 -80
- data/lib/google/cloud/service_management/v1/version.rb +1 -1
- data/proto_docs/google/api/auth.rb +6 -0
- data/proto_docs/google/api/backend.rb +4 -0
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/api/metric.rb +18 -0
- data/proto_docs/google/api/quota.rb +2 -2
- data/proto_docs/google/api/servicemanagement/v1/resources.rb +4 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/protobuf/struct.rb +12 -0
- 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: c9975e310ff5e6522472335d73156e3628777e7caef6c60147cf87bb56c72ce9
|
4
|
+
data.tar.gz: fb0318f2689bd3fe121eecdca8bd420fb8b129b9efd2f52b5e9748643df593d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf09478953ab1a1060b4b42889a69992d413780cf60083c38723d36f2aae6429af47ebb59c9181d4b0feac85c7d3bafe87a265a07b1db602f0e9b838996dbf37
|
7
|
+
data.tar.gz: c8384ae1e69987b2c4d1411538a29507c9ee467d3021eae3ae3eb205e8aaeaec17ea3e70d25b606e09395258679f77d395c8abb593e09852b7bb6592f9299b23
|
data/README.md
CHANGED
@@ -42,40 +42,50 @@ for class and method documentation.
|
|
42
42
|
See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/)
|
43
43
|
for general usage information.
|
44
44
|
|
45
|
-
##
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
## Debug Logging
|
46
|
+
|
47
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
48
|
+
your application's integration with the API. When logging is activated, key
|
49
|
+
events such as requests and responses, along with data payloads and metadata
|
50
|
+
such as headers and client configuration, are logged to the standard error
|
51
|
+
stream.
|
52
|
+
|
53
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
54
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
55
|
+
customers, private keys, or other security data that could be compromising if
|
56
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
57
|
+
the principle of least access. Google also recommends that Client Library Debug
|
58
|
+
Logging be enabled only temporarily during active debugging, and not used
|
59
|
+
permanently in production.
|
60
|
+
|
61
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
62
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
63
|
+
list of client library gem names. This will select the default logging behavior,
|
64
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
65
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
66
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
67
|
+
results in logs appearing alongside your application logs in the
|
68
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
69
|
+
|
70
|
+
You can customize logging by modifying the `logger` configuration when
|
71
|
+
constructing a client object. For example:
|
54
72
|
|
55
73
|
```ruby
|
74
|
+
require "google/cloud/service_management/v1"
|
56
75
|
require "logger"
|
57
76
|
|
58
|
-
|
59
|
-
|
60
|
-
def logger
|
61
|
-
LOGGER
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
66
|
-
module GRPC
|
67
|
-
extend MyLogger
|
77
|
+
client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config|
|
78
|
+
config.logger = Logger.new "my-app.log"
|
68
79
|
end
|
69
80
|
```
|
70
81
|
|
71
|
-
|
72
82
|
## Google Cloud Samples
|
73
83
|
|
74
84
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
75
85
|
|
76
86
|
## Supported Ruby Versions
|
77
87
|
|
78
|
-
This library is supported on Ruby
|
88
|
+
This library is supported on Ruby 3.0+.
|
79
89
|
|
80
90
|
Google provides official support for Ruby versions that are actively supported
|
81
91
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -166,14 +166,26 @@ 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
|
)
|
171
172
|
|
173
|
+
@service_manager_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
|
182
|
+
|
172
183
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
173
184
|
config.credentials = credentials
|
174
185
|
config.quota_project = @quota_project_id
|
175
186
|
config.endpoint = @service_manager_stub.endpoint
|
176
187
|
config.universe_domain = @service_manager_stub.universe_domain
|
188
|
+
config.logger = @service_manager_stub.logger if config.respond_to? :logger=
|
177
189
|
end
|
178
190
|
end
|
179
191
|
|
@@ -191,6 +203,15 @@ module Google
|
|
191
203
|
#
|
192
204
|
attr_reader :iam_policy_client
|
193
205
|
|
206
|
+
##
|
207
|
+
# The logger used for request/response debug logging.
|
208
|
+
#
|
209
|
+
# @return [Logger]
|
210
|
+
#
|
211
|
+
def logger
|
212
|
+
@service_manager_stub.logger
|
213
|
+
end
|
214
|
+
|
194
215
|
# Service calls
|
195
216
|
|
196
217
|
##
|
@@ -286,7 +307,7 @@ module Google
|
|
286
307
|
@service_manager_stub.call_rpc :list_services, request, options: options do |response, operation|
|
287
308
|
response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_services, request, response, operation, options
|
288
309
|
yield response, operation if block_given?
|
289
|
-
|
310
|
+
throw :response, response
|
290
311
|
end
|
291
312
|
rescue ::GRPC::BadStatus => e
|
292
313
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -374,7 +395,6 @@ module Google
|
|
374
395
|
|
375
396
|
@service_manager_stub.call_rpc :get_service, request, options: options do |response, operation|
|
376
397
|
yield response, operation if block_given?
|
377
|
-
return response
|
378
398
|
end
|
379
399
|
rescue ::GRPC::BadStatus => e
|
380
400
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -470,7 +490,7 @@ module Google
|
|
470
490
|
@service_manager_stub.call_rpc :create_service, request, options: options do |response, operation|
|
471
491
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
472
492
|
yield response, operation if block_given?
|
473
|
-
|
493
|
+
throw :response, response
|
474
494
|
end
|
475
495
|
rescue ::GRPC::BadStatus => e
|
476
496
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -573,7 +593,7 @@ module Google
|
|
573
593
|
@service_manager_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
574
594
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
575
595
|
yield response, operation if block_given?
|
576
|
-
|
596
|
+
throw :response, response
|
577
597
|
end
|
578
598
|
rescue ::GRPC::BadStatus => e
|
579
599
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -674,7 +694,7 @@ module Google
|
|
674
694
|
@service_manager_stub.call_rpc :undelete_service, request, options: options do |response, operation|
|
675
695
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
676
696
|
yield response, operation if block_given?
|
677
|
-
|
697
|
+
throw :response, response
|
678
698
|
end
|
679
699
|
rescue ::GRPC::BadStatus => e
|
680
700
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -773,7 +793,7 @@ module Google
|
|
773
793
|
@service_manager_stub.call_rpc :list_service_configs, request, options: options do |response, operation|
|
774
794
|
response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_service_configs, request, response, operation, options
|
775
795
|
yield response, operation if block_given?
|
776
|
-
|
796
|
+
throw :response, response
|
777
797
|
end
|
778
798
|
rescue ::GRPC::BadStatus => e
|
779
799
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -872,7 +892,6 @@ module Google
|
|
872
892
|
|
873
893
|
@service_manager_stub.call_rpc :get_service_config, request, options: options do |response, operation|
|
874
894
|
yield response, operation if block_given?
|
875
|
-
return response
|
876
895
|
end
|
877
896
|
rescue ::GRPC::BadStatus => e
|
878
897
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -969,7 +988,6 @@ module Google
|
|
969
988
|
|
970
989
|
@service_manager_stub.call_rpc :create_service_config, request, options: options do |response, operation|
|
971
990
|
yield response, operation if block_given?
|
972
|
-
return response
|
973
991
|
end
|
974
992
|
rescue ::GRPC::BadStatus => e
|
975
993
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1084,7 +1102,7 @@ module Google
|
|
1084
1102
|
@service_manager_stub.call_rpc :submit_config_source, request, options: options do |response, operation|
|
1085
1103
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1086
1104
|
yield response, operation if block_given?
|
1087
|
-
|
1105
|
+
throw :response, response
|
1088
1106
|
end
|
1089
1107
|
rescue ::GRPC::BadStatus => e
|
1090
1108
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1194,7 +1212,7 @@ module Google
|
|
1194
1212
|
@service_manager_stub.call_rpc :list_service_rollouts, request, options: options do |response, operation|
|
1195
1213
|
response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_service_rollouts, request, response, operation, options
|
1196
1214
|
yield response, operation if block_given?
|
1197
|
-
|
1215
|
+
throw :response, response
|
1198
1216
|
end
|
1199
1217
|
rescue ::GRPC::BadStatus => e
|
1200
1218
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1288,7 +1306,6 @@ module Google
|
|
1288
1306
|
|
1289
1307
|
@service_manager_stub.call_rpc :get_service_rollout, request, options: options do |response, operation|
|
1290
1308
|
yield response, operation if block_given?
|
1291
|
-
return response
|
1292
1309
|
end
|
1293
1310
|
rescue ::GRPC::BadStatus => e
|
1294
1311
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1399,7 +1416,7 @@ module Google
|
|
1399
1416
|
@service_manager_stub.call_rpc :create_service_rollout, request, options: options do |response, operation|
|
1400
1417
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1401
1418
|
yield response, operation if block_given?
|
1402
|
-
|
1419
|
+
throw :response, response
|
1403
1420
|
end
|
1404
1421
|
rescue ::GRPC::BadStatus => e
|
1405
1422
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1497,7 +1514,6 @@ module Google
|
|
1497
1514
|
|
1498
1515
|
@service_manager_stub.call_rpc :generate_config_report, request, options: options do |response, operation|
|
1499
1516
|
yield response, operation if block_given?
|
1500
|
-
return response
|
1501
1517
|
end
|
1502
1518
|
rescue ::GRPC::BadStatus => e
|
1503
1519
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1547,6 +1563,13 @@ module Google
|
|
1547
1563
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1548
1564
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1549
1565
|
# * (`nil`) indicating no credentials
|
1566
|
+
#
|
1567
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1568
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1569
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1570
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1571
|
+
# For more information, refer to [Validate credential configurations from external
|
1572
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1550
1573
|
# @return [::Object]
|
1551
1574
|
# @!attribute [rw] scope
|
1552
1575
|
# The OAuth scopes
|
@@ -1586,6 +1609,11 @@ module Google
|
|
1586
1609
|
# default endpoint URL. The default value of nil uses the environment
|
1587
1610
|
# universe (usually the default "googleapis.com" universe).
|
1588
1611
|
# @return [::String,nil]
|
1612
|
+
# @!attribute [rw] logger
|
1613
|
+
# A custom logger to use for request/response debug logging, or the value
|
1614
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1615
|
+
# explicitly disable logging.
|
1616
|
+
# @return [::Logger,:default,nil]
|
1589
1617
|
#
|
1590
1618
|
class Configuration
|
1591
1619
|
extend ::Gapic::Config
|
@@ -1610,6 +1638,7 @@ module Google
|
|
1610
1638
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1611
1639
|
config_attr :quota_project, nil, ::String, nil
|
1612
1640
|
config_attr :universe_domain, nil, ::String, nil
|
1641
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1613
1642
|
|
1614
1643
|
# @private
|
1615
1644
|
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.
|
@@ -213,7 +205,7 @@ module Google
|
|
213
205
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
206
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
207
|
yield response, operation if block_given?
|
216
|
-
|
208
|
+
throw :response, response
|
217
209
|
end
|
218
210
|
rescue ::GRPC::BadStatus => e
|
219
211
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +301,7 @@ module Google
|
|
309
301
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
302
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
303
|
yield response, operation if block_given?
|
312
|
-
|
304
|
+
throw :response, response
|
313
305
|
end
|
314
306
|
rescue ::GRPC::BadStatus => e
|
315
307
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +390,6 @@ module Google
|
|
398
390
|
|
399
391
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
392
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
393
|
end
|
403
394
|
rescue ::GRPC::BadStatus => e
|
404
395
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -413,8 +404,9 @@ module Google
|
|
413
404
|
# other methods to check whether the cancellation succeeded or whether the
|
414
405
|
# operation completed despite cancellation. On successful cancellation,
|
415
406
|
# the operation is not deleted; instead, it becomes an operation with
|
416
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
417
|
-
# corresponding to
|
407
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
408
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
409
|
+
# `Code.CANCELLED`.
|
418
410
|
#
|
419
411
|
# @overload cancel_operation(request, options = nil)
|
420
412
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -493,7 +485,6 @@ module Google
|
|
493
485
|
|
494
486
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
495
487
|
yield response, operation if block_given?
|
496
|
-
return response
|
497
488
|
end
|
498
489
|
rescue ::GRPC::BadStatus => e
|
499
490
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -591,7 +582,7 @@ module Google
|
|
591
582
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
592
583
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
593
584
|
yield response, operation if block_given?
|
594
|
-
|
585
|
+
throw :response, response
|
595
586
|
end
|
596
587
|
rescue ::GRPC::BadStatus => e
|
597
588
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -641,6 +632,13 @@ module Google
|
|
641
632
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
642
633
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
643
634
|
# * (`nil`) indicating no credentials
|
635
|
+
#
|
636
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
637
|
+
# external source for authentication to Google Cloud, you must validate it before
|
638
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
639
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
640
|
+
# For more information, refer to [Validate credential configurations from external
|
641
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
644
642
|
# @return [::Object]
|
645
643
|
# @!attribute [rw] scope
|
646
644
|
# The OAuth scopes
|
@@ -680,6 +678,11 @@ module Google
|
|
680
678
|
# default endpoint URL. The default value of nil uses the environment
|
681
679
|
# universe (usually the default "googleapis.com" universe).
|
682
680
|
# @return [::String,nil]
|
681
|
+
# @!attribute [rw] logger
|
682
|
+
# A custom logger to use for request/response debug logging, or the value
|
683
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
684
|
+
# explicitly disable logging.
|
685
|
+
# @return [::Logger,:default,nil]
|
683
686
|
#
|
684
687
|
class Configuration
|
685
688
|
extend ::Gapic::Config
|
@@ -704,6 +707,7 @@ module Google
|
|
704
707
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
705
708
|
config_attr :quota_project, nil, ::String, nil
|
706
709
|
config_attr :universe_domain, nil, ::String, nil
|
710
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
707
711
|
|
708
712
|
# @private
|
709
713
|
def initialize parent_config = nil
|
@@ -159,15 +159,27 @@ module Google
|
|
159
159
|
endpoint: @config.endpoint,
|
160
160
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
161
|
universe_domain: @config.universe_domain,
|
162
|
-
credentials: credentials
|
162
|
+
credentials: credentials,
|
163
|
+
logger: @config.logger
|
163
164
|
)
|
164
165
|
|
166
|
+
@service_manager_stub.logger(stub: true)&.info do |entry|
|
167
|
+
entry.set_system_name
|
168
|
+
entry.set_service
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
170
|
+
entry.set_credentials_fields credentials
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
174
|
+
end
|
175
|
+
|
165
176
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
166
177
|
config.credentials = credentials
|
167
178
|
config.quota_project = @quota_project_id
|
168
179
|
config.endpoint = @service_manager_stub.endpoint
|
169
180
|
config.universe_domain = @service_manager_stub.universe_domain
|
170
181
|
config.bindings_override = @config.bindings_override
|
182
|
+
config.logger = @service_manager_stub.logger if config.respond_to? :logger=
|
171
183
|
end
|
172
184
|
end
|
173
185
|
|
@@ -185,6 +197,15 @@ module Google
|
|
185
197
|
#
|
186
198
|
attr_reader :iam_policy_client
|
187
199
|
|
200
|
+
##
|
201
|
+
# The logger used for request/response debug logging.
|
202
|
+
#
|
203
|
+
# @return [Logger]
|
204
|
+
#
|
205
|
+
def logger
|
206
|
+
@service_manager_stub.logger
|
207
|
+
end
|
208
|
+
|
188
209
|
# Service calls
|
189
210
|
|
190
211
|
##
|
@@ -281,7 +302,7 @@ module Google
|
|
281
302
|
@service_manager_stub.list_services request, options do |result, operation|
|
282
303
|
result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_services, "services", request, result, options
|
283
304
|
yield result, operation if block_given?
|
284
|
-
|
305
|
+
throw :response, result
|
285
306
|
end
|
286
307
|
rescue ::Gapic::Rest::Error => e
|
287
308
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -362,7 +383,6 @@ module Google
|
|
362
383
|
|
363
384
|
@service_manager_stub.get_service request, options do |result, operation|
|
364
385
|
yield result, operation if block_given?
|
365
|
-
return result
|
366
386
|
end
|
367
387
|
rescue ::Gapic::Rest::Error => e
|
368
388
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -459,7 +479,7 @@ module Google
|
|
459
479
|
@service_manager_stub.create_service request, options do |result, operation|
|
460
480
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
461
481
|
yield result, operation if block_given?
|
462
|
-
|
482
|
+
throw :response, result
|
463
483
|
end
|
464
484
|
rescue ::Gapic::Rest::Error => e
|
465
485
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -555,7 +575,7 @@ module Google
|
|
555
575
|
@service_manager_stub.delete_service request, options do |result, operation|
|
556
576
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
557
577
|
yield result, operation if block_given?
|
558
|
-
|
578
|
+
throw :response, result
|
559
579
|
end
|
560
580
|
rescue ::Gapic::Rest::Error => e
|
561
581
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -649,7 +669,7 @@ module Google
|
|
649
669
|
@service_manager_stub.undelete_service request, options do |result, operation|
|
650
670
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
651
671
|
yield result, operation if block_given?
|
652
|
-
|
672
|
+
throw :response, result
|
653
673
|
end
|
654
674
|
rescue ::Gapic::Rest::Error => e
|
655
675
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -741,7 +761,7 @@ module Google
|
|
741
761
|
@service_manager_stub.list_service_configs request, options do |result, operation|
|
742
762
|
result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_service_configs, "service_configs", request, result, options
|
743
763
|
yield result, operation if block_given?
|
744
|
-
|
764
|
+
throw :response, result
|
745
765
|
end
|
746
766
|
rescue ::Gapic::Rest::Error => e
|
747
767
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -830,7 +850,6 @@ module Google
|
|
830
850
|
|
831
851
|
@service_manager_stub.get_service_config request, options do |result, operation|
|
832
852
|
yield result, operation if block_given?
|
833
|
-
return result
|
834
853
|
end
|
835
854
|
rescue ::Gapic::Rest::Error => e
|
836
855
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -920,7 +939,6 @@ module Google
|
|
920
939
|
|
921
940
|
@service_manager_stub.create_service_config request, options do |result, operation|
|
922
941
|
yield result, operation if block_given?
|
923
|
-
return result
|
924
942
|
end
|
925
943
|
rescue ::Gapic::Rest::Error => e
|
926
944
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1028,7 +1046,7 @@ module Google
|
|
1028
1046
|
@service_manager_stub.submit_config_source request, options do |result, operation|
|
1029
1047
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1030
1048
|
yield result, operation if block_given?
|
1031
|
-
|
1049
|
+
throw :response, result
|
1032
1050
|
end
|
1033
1051
|
rescue ::Gapic::Rest::Error => e
|
1034
1052
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1131,7 +1149,7 @@ module Google
|
|
1131
1149
|
@service_manager_stub.list_service_rollouts request, options do |result, operation|
|
1132
1150
|
result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_service_rollouts, "rollouts", request, result, options
|
1133
1151
|
yield result, operation if block_given?
|
1134
|
-
|
1152
|
+
throw :response, result
|
1135
1153
|
end
|
1136
1154
|
rescue ::Gapic::Rest::Error => e
|
1137
1155
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1215,7 +1233,6 @@ module Google
|
|
1215
1233
|
|
1216
1234
|
@service_manager_stub.get_service_rollout request, options do |result, operation|
|
1217
1235
|
yield result, operation if block_given?
|
1218
|
-
return result
|
1219
1236
|
end
|
1220
1237
|
rescue ::Gapic::Rest::Error => e
|
1221
1238
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1319,7 +1336,7 @@ module Google
|
|
1319
1336
|
@service_manager_stub.create_service_rollout request, options do |result, operation|
|
1320
1337
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1321
1338
|
yield result, operation if block_given?
|
1322
|
-
|
1339
|
+
throw :response, result
|
1323
1340
|
end
|
1324
1341
|
rescue ::Gapic::Rest::Error => e
|
1325
1342
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1418,7 +1435,6 @@ module Google
|
|
1418
1435
|
|
1419
1436
|
@service_manager_stub.generate_config_report request, options do |result, operation|
|
1420
1437
|
yield result, operation if block_given?
|
1421
|
-
return result
|
1422
1438
|
end
|
1423
1439
|
rescue ::Gapic::Rest::Error => e
|
1424
1440
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1466,6 +1482,13 @@ module Google
|
|
1466
1482
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1467
1483
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1468
1484
|
# * (`nil`) indicating no credentials
|
1485
|
+
#
|
1486
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1487
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1488
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1489
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1490
|
+
# For more information, refer to [Validate credential configurations from external
|
1491
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1469
1492
|
# @return [::Object]
|
1470
1493
|
# @!attribute [rw] scope
|
1471
1494
|
# The OAuth scopes
|
@@ -1498,6 +1521,11 @@ module Google
|
|
1498
1521
|
# default endpoint URL. The default value of nil uses the environment
|
1499
1522
|
# universe (usually the default "googleapis.com" universe).
|
1500
1523
|
# @return [::String,nil]
|
1524
|
+
# @!attribute [rw] logger
|
1525
|
+
# A custom logger to use for request/response debug logging, or the value
|
1526
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1527
|
+
# explicitly disable logging.
|
1528
|
+
# @return [::Logger,:default,nil]
|
1501
1529
|
#
|
1502
1530
|
class Configuration
|
1503
1531
|
extend ::Gapic::Config
|
@@ -1526,6 +1554,7 @@ module Google
|
|
1526
1554
|
# by the host service.
|
1527
1555
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1528
1556
|
config_attr :bindings_override, {}, ::Hash, nil
|
1557
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1529
1558
|
|
1530
1559
|
# @private
|
1531
1560
|
def initialize parent_config = nil
|