google-cloud-vpc_access-v1 1.0.2 → 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 +31 -21
- data/lib/google/cloud/vpc_access/v1/version.rb +1 -1
- data/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb +38 -5
- data/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb +16 -5
- data/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb +38 -5
- data/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb +47 -28
- data/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb +46 -26
- data/proto_docs/google/longrunning/operations.rb +4 -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: b41d650230eee69338ccd3e06d76eb61f77d13664f54d393518d4cb0af8dd2e4
|
4
|
+
data.tar.gz: 50334146492c351cf7483783441148e2ca48a356d0ffbe958a87f36d24152cce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b72dc8663bbf8ffe165d867ed9b159c74a8e2f5b365d23c2acfe1f2c22818978fc1a0340483ac6a90437838010b87fd154949cd6cf06aaf919610f5cf07fb012
|
7
|
+
data.tar.gz: c064d098ec58447818f7ad9a243233746131cb75c53d35b3098b55fc0f3b86bc353626175f00a14195d8aa9a2e4f8caa0646b8769f2e4a4e4f57ce8d08420bf4
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/vpc/docs/serverless-vpc-access)
|
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/vpc_access/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::VpcAccess::V1::VpcAccessService::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
|
@@ -180,14 +180,26 @@ module Google
|
|
180
180
|
universe_domain: @config.universe_domain,
|
181
181
|
channel_args: @config.channel_args,
|
182
182
|
interceptors: @config.interceptors,
|
183
|
-
channel_pool_config: @config.channel_pool
|
183
|
+
channel_pool_config: @config.channel_pool,
|
184
|
+
logger: @config.logger
|
184
185
|
)
|
185
186
|
|
187
|
+
@vpc_access_service_stub.stub_logger&.info do |entry|
|
188
|
+
entry.set_system_name
|
189
|
+
entry.set_service
|
190
|
+
entry.message = "Created client for #{entry.service}"
|
191
|
+
entry.set_credentials_fields credentials
|
192
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
193
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
194
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
195
|
+
end
|
196
|
+
|
186
197
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
187
198
|
config.credentials = credentials
|
188
199
|
config.quota_project = @quota_project_id
|
189
200
|
config.endpoint = @vpc_access_service_stub.endpoint
|
190
201
|
config.universe_domain = @vpc_access_service_stub.universe_domain
|
202
|
+
config.logger = @vpc_access_service_stub.logger if config.respond_to? :logger=
|
191
203
|
end
|
192
204
|
end
|
193
205
|
|
@@ -205,6 +217,15 @@ module Google
|
|
205
217
|
#
|
206
218
|
attr_reader :location_client
|
207
219
|
|
220
|
+
##
|
221
|
+
# The logger used for request/response debug logging.
|
222
|
+
#
|
223
|
+
# @return [Logger]
|
224
|
+
#
|
225
|
+
def logger
|
226
|
+
@vpc_access_service_stub.logger
|
227
|
+
end
|
228
|
+
|
208
229
|
# Service calls
|
209
230
|
|
210
231
|
##
|
@@ -300,7 +321,7 @@ module Google
|
|
300
321
|
@vpc_access_service_stub.call_rpc :create_connector, request, options: options do |response, operation|
|
301
322
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
302
323
|
yield response, operation if block_given?
|
303
|
-
|
324
|
+
throw :response, response
|
304
325
|
end
|
305
326
|
rescue ::GRPC::BadStatus => e
|
306
327
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -387,7 +408,6 @@ module Google
|
|
387
408
|
|
388
409
|
@vpc_access_service_stub.call_rpc :get_connector, request, options: options do |response, operation|
|
389
410
|
yield response, operation if block_given?
|
390
|
-
return response
|
391
411
|
end
|
392
412
|
rescue ::GRPC::BadStatus => e
|
393
413
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -482,7 +502,7 @@ module Google
|
|
482
502
|
@vpc_access_service_stub.call_rpc :list_connectors, request, options: options do |response, operation|
|
483
503
|
response = ::Gapic::PagedEnumerable.new @vpc_access_service_stub, :list_connectors, request, response, operation, options
|
484
504
|
yield response, operation if block_given?
|
485
|
-
|
505
|
+
throw :response, response
|
486
506
|
end
|
487
507
|
rescue ::GRPC::BadStatus => e
|
488
508
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -577,7 +597,7 @@ module Google
|
|
577
597
|
@vpc_access_service_stub.call_rpc :delete_connector, request, options: options do |response, operation|
|
578
598
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
579
599
|
yield response, operation if block_given?
|
580
|
-
|
600
|
+
throw :response, response
|
581
601
|
end
|
582
602
|
rescue ::GRPC::BadStatus => e
|
583
603
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -627,6 +647,13 @@ module Google
|
|
627
647
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
628
648
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
629
649
|
# * (`nil`) indicating no credentials
|
650
|
+
#
|
651
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
652
|
+
# external source for authentication to Google Cloud, you must validate it before
|
653
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
654
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
655
|
+
# For more information, refer to [Validate credential configurations from external
|
656
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
630
657
|
# @return [::Object]
|
631
658
|
# @!attribute [rw] scope
|
632
659
|
# The OAuth scopes
|
@@ -666,6 +693,11 @@ module Google
|
|
666
693
|
# default endpoint URL. The default value of nil uses the environment
|
667
694
|
# universe (usually the default "googleapis.com" universe).
|
668
695
|
# @return [::String,nil]
|
696
|
+
# @!attribute [rw] logger
|
697
|
+
# A custom logger to use for request/response debug logging, or the value
|
698
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
699
|
+
# explicitly disable logging.
|
700
|
+
# @return [::Logger,:default,nil]
|
669
701
|
#
|
670
702
|
class Configuration
|
671
703
|
extend ::Gapic::Config
|
@@ -690,6 +722,7 @@ module Google
|
|
690
722
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
691
723
|
config_attr :quota_project, nil, ::String, nil
|
692
724
|
config_attr :universe_domain, nil, ::String, nil
|
725
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
693
726
|
|
694
727
|
# @private
|
695
728
|
def initialize parent_config = nil
|
@@ -213,7 +213,7 @@ module Google
|
|
213
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
215
|
yield response, operation if block_given?
|
216
|
-
|
216
|
+
throw :response, response
|
217
217
|
end
|
218
218
|
rescue ::GRPC::BadStatus => e
|
219
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
311
|
yield response, operation if block_given?
|
312
|
-
|
312
|
+
throw :response, response
|
313
313
|
end
|
314
314
|
rescue ::GRPC::BadStatus => e
|
315
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +398,6 @@ module Google
|
|
398
398
|
|
399
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
400
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
401
|
end
|
403
402
|
rescue ::GRPC::BadStatus => e
|
404
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -592,7 +590,7 @@ module Google
|
|
592
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
593
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
594
592
|
yield response, operation if block_given?
|
595
|
-
|
593
|
+
throw :response, response
|
596
594
|
end
|
597
595
|
rescue ::GRPC::BadStatus => e
|
598
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -642,6 +640,13 @@ module Google
|
|
642
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
643
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
644
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).
|
645
650
|
# @return [::Object]
|
646
651
|
# @!attribute [rw] scope
|
647
652
|
# The OAuth scopes
|
@@ -681,6 +686,11 @@ module Google
|
|
681
686
|
# default endpoint URL. The default value of nil uses the environment
|
682
687
|
# universe (usually the default "googleapis.com" universe).
|
683
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]
|
684
694
|
#
|
685
695
|
class Configuration
|
686
696
|
extend ::Gapic::Config
|
@@ -705,6 +715,7 @@ module Google
|
|
705
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
706
716
|
config_attr :quota_project, nil, ::String, nil
|
707
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
708
719
|
|
709
720
|
# @private
|
710
721
|
def initialize parent_config = nil
|
@@ -173,15 +173,27 @@ module Google
|
|
173
173
|
endpoint: @config.endpoint,
|
174
174
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
175
175
|
universe_domain: @config.universe_domain,
|
176
|
-
credentials: credentials
|
176
|
+
credentials: credentials,
|
177
|
+
logger: @config.logger
|
177
178
|
)
|
178
179
|
|
180
|
+
@vpc_access_service_stub.logger(stub: true)&.info do |entry|
|
181
|
+
entry.set_system_name
|
182
|
+
entry.set_service
|
183
|
+
entry.message = "Created client for #{entry.service}"
|
184
|
+
entry.set_credentials_fields credentials
|
185
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
186
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
187
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
188
|
+
end
|
189
|
+
|
179
190
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
180
191
|
config.credentials = credentials
|
181
192
|
config.quota_project = @quota_project_id
|
182
193
|
config.endpoint = @vpc_access_service_stub.endpoint
|
183
194
|
config.universe_domain = @vpc_access_service_stub.universe_domain
|
184
195
|
config.bindings_override = @config.bindings_override
|
196
|
+
config.logger = @vpc_access_service_stub.logger if config.respond_to? :logger=
|
185
197
|
end
|
186
198
|
end
|
187
199
|
|
@@ -199,6 +211,15 @@ module Google
|
|
199
211
|
#
|
200
212
|
attr_reader :location_client
|
201
213
|
|
214
|
+
##
|
215
|
+
# The logger used for request/response debug logging.
|
216
|
+
#
|
217
|
+
# @return [Logger]
|
218
|
+
#
|
219
|
+
def logger
|
220
|
+
@vpc_access_service_stub.logger
|
221
|
+
end
|
222
|
+
|
202
223
|
# Service calls
|
203
224
|
|
204
225
|
##
|
@@ -287,7 +308,7 @@ module Google
|
|
287
308
|
@vpc_access_service_stub.create_connector request, options do |result, operation|
|
288
309
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
289
310
|
yield result, operation if block_given?
|
290
|
-
|
311
|
+
throw :response, result
|
291
312
|
end
|
292
313
|
rescue ::Gapic::Rest::Error => e
|
293
314
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +388,6 @@ module Google
|
|
367
388
|
|
368
389
|
@vpc_access_service_stub.get_connector request, options do |result, operation|
|
369
390
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
391
|
end
|
372
392
|
rescue ::Gapic::Rest::Error => e
|
373
393
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -455,7 +475,7 @@ module Google
|
|
455
475
|
@vpc_access_service_stub.list_connectors request, options do |result, operation|
|
456
476
|
result = ::Gapic::Rest::PagedEnumerable.new @vpc_access_service_stub, :list_connectors, "connectors", request, result, options
|
457
477
|
yield result, operation if block_given?
|
458
|
-
|
478
|
+
throw :response, result
|
459
479
|
end
|
460
480
|
rescue ::Gapic::Rest::Error => e
|
461
481
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -543,7 +563,7 @@ module Google
|
|
543
563
|
@vpc_access_service_stub.delete_connector request, options do |result, operation|
|
544
564
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
545
565
|
yield result, operation if block_given?
|
546
|
-
|
566
|
+
throw :response, result
|
547
567
|
end
|
548
568
|
rescue ::Gapic::Rest::Error => e
|
549
569
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -591,6 +611,13 @@ module Google
|
|
591
611
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
592
612
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
593
613
|
# * (`nil`) indicating no credentials
|
614
|
+
#
|
615
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
616
|
+
# external source for authentication to Google Cloud, you must validate it before
|
617
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
618
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
619
|
+
# For more information, refer to [Validate credential configurations from external
|
620
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
594
621
|
# @return [::Object]
|
595
622
|
# @!attribute [rw] scope
|
596
623
|
# The OAuth scopes
|
@@ -623,6 +650,11 @@ module Google
|
|
623
650
|
# default endpoint URL. The default value of nil uses the environment
|
624
651
|
# universe (usually the default "googleapis.com" universe).
|
625
652
|
# @return [::String,nil]
|
653
|
+
# @!attribute [rw] logger
|
654
|
+
# A custom logger to use for request/response debug logging, or the value
|
655
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
656
|
+
# explicitly disable logging.
|
657
|
+
# @return [::Logger,:default,nil]
|
626
658
|
#
|
627
659
|
class Configuration
|
628
660
|
extend ::Gapic::Config
|
@@ -651,6 +683,7 @@ module Google
|
|
651
683
|
# by the host service.
|
652
684
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
653
685
|
config_attr :bindings_override, {}, ::Hash, nil
|
686
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
654
687
|
|
655
688
|
# @private
|
656
689
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -504,6 +502,13 @@ module Google
|
|
504
502
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
505
503
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
506
504
|
# * (`nil`) indicating no credentials
|
505
|
+
#
|
506
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
507
|
+
# external source for authentication to Google Cloud, you must validate it before
|
508
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
509
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
510
|
+
# For more information, refer to [Validate credential configurations from external
|
511
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
507
512
|
# @return [::Object]
|
508
513
|
# @!attribute [rw] scope
|
509
514
|
# The OAuth scopes
|
@@ -536,6 +541,11 @@ module Google
|
|
536
541
|
# default endpoint URL. The default value of nil uses the environment
|
537
542
|
# universe (usually the default "googleapis.com" universe).
|
538
543
|
# @return [::String,nil]
|
544
|
+
# @!attribute [rw] logger
|
545
|
+
# A custom logger to use for request/response debug logging, or the value
|
546
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
547
|
+
# explicitly disable logging.
|
548
|
+
# @return [::Logger,:default,nil]
|
539
549
|
#
|
540
550
|
class Configuration
|
541
551
|
extend ::Gapic::Config
|
@@ -557,6 +567,7 @@ module Google
|
|
557
567
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
568
|
config_attr :quota_project, nil, ::String, nil
|
559
569
|
config_attr :universe_domain, nil, ::String, nil
|
570
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
571
|
|
561
572
|
# @private
|
562
573
|
def initialize parent_config = nil
|
@@ -676,16 +687,18 @@ module Google
|
|
676
687
|
|
677
688
|
response = @client_stub.make_http_request(
|
678
689
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
690
|
+
uri: uri,
|
691
|
+
body: body || "",
|
692
|
+
params: query_string_params,
|
693
|
+
method_name: "list_operations",
|
682
694
|
options: options
|
683
695
|
)
|
684
696
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
697
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
698
|
+
catch :response do
|
699
|
+
yield result, operation if block_given?
|
700
|
+
result
|
701
|
+
end
|
689
702
|
end
|
690
703
|
|
691
704
|
##
|
@@ -714,16 +727,18 @@ module Google
|
|
714
727
|
|
715
728
|
response = @client_stub.make_http_request(
|
716
729
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
730
|
+
uri: uri,
|
731
|
+
body: body || "",
|
732
|
+
params: query_string_params,
|
733
|
+
method_name: "get_operation",
|
720
734
|
options: options
|
721
735
|
)
|
722
736
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
737
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
738
|
+
catch :response do
|
739
|
+
yield result, operation if block_given?
|
740
|
+
result
|
741
|
+
end
|
727
742
|
end
|
728
743
|
|
729
744
|
##
|
@@ -752,16 +767,18 @@ module Google
|
|
752
767
|
|
753
768
|
response = @client_stub.make_http_request(
|
754
769
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
770
|
+
uri: uri,
|
771
|
+
body: body || "",
|
772
|
+
params: query_string_params,
|
773
|
+
method_name: "delete_operation",
|
758
774
|
options: options
|
759
775
|
)
|
760
776
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
777
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
778
|
+
catch :response do
|
779
|
+
yield result, operation if block_given?
|
780
|
+
result
|
781
|
+
end
|
765
782
|
end
|
766
783
|
|
767
784
|
##
|
@@ -790,16 +807,18 @@ module Google
|
|
790
807
|
|
791
808
|
response = @client_stub.make_http_request(
|
792
809
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
810
|
+
uri: uri,
|
811
|
+
body: body || "",
|
812
|
+
params: query_string_params,
|
813
|
+
method_name: "cancel_operation",
|
796
814
|
options: options
|
797
815
|
)
|
798
816
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
817
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
818
|
+
catch :response do
|
819
|
+
yield result, operation if block_given?
|
820
|
+
result
|
821
|
+
end
|
803
822
|
end
|
804
823
|
|
805
824
|
##
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the create_connector REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_connector",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_connector",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::VpcAccess::V1::Connector.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "list_connectors",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_connector",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -40,6 +40,8 @@ module Google
|
|
40
40
|
# @!attribute [rw] error
|
41
41
|
# @return [::Google::Rpc::Status]
|
42
42
|
# The error result of the operation in case of failure or cancellation.
|
43
|
+
#
|
44
|
+
# Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
43
45
|
# @!attribute [rw] response
|
44
46
|
# @return [::Google::Protobuf::Any]
|
45
47
|
# The normal, successful response of the operation. If the original
|
@@ -50,6 +52,8 @@ module Google
|
|
50
52
|
# is the original method name. For example, if the original method name
|
51
53
|
# is `TakeSnapshot()`, the inferred response type is
|
52
54
|
# `TakeSnapshotResponse`.
|
55
|
+
#
|
56
|
+
# Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
53
57
|
class Operation
|
54
58
|
include ::Google::Protobuf::MessageExts
|
55
59
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vpc_access-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gapic-common
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.a
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -112,7 +111,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
112
111
|
licenses:
|
113
112
|
- Apache-2.0
|
114
113
|
metadata: {}
|
115
|
-
post_install_message:
|
116
114
|
rdoc_options: []
|
117
115
|
require_paths:
|
118
116
|
- lib
|
@@ -120,15 +118,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
118
|
requirements:
|
121
119
|
- - ">="
|
122
120
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
121
|
+
version: '3.0'
|
124
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
123
|
requirements:
|
126
124
|
- - ">="
|
127
125
|
- !ruby/object:Gem::Version
|
128
126
|
version: '0'
|
129
127
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
131
|
-
signing_key:
|
128
|
+
rubygems_version: 3.6.2
|
132
129
|
specification_version: 4
|
133
130
|
summary: API for managing VPC access connectors.
|
134
131
|
test_files: []
|