google-cloud-network_connectivity-v1 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/network_connectivity/v1/hub_service/client.rb +52 -22
- data/lib/google/cloud/network_connectivity/v1/hub_service/operations.rb +16 -5
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service/client.rb +39 -5
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service/operations.rb +16 -5
- data/lib/google/cloud/network_connectivity/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/networkconnectivity/v1/policy_based_routing.rb +8 -0
- 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: fffdaaaa3241cb0074194c215138600a28d764f306e65551557e17fec06af598
|
4
|
+
data.tar.gz: 8bcd6b1a46cca2366a8c1d70dc0198c159cacc1c124b4b8c3d5ceba0741dded0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce03d68e65a9000d8890712a4ad68ae83993a9ccafbb25af1a478686d99efa789d1c48274cd42a14c724a1cc002bb667559515d0507f20f8fd7001fb7fe7ecf8
|
7
|
+
data.tar.gz: 9142c03a816d8314f12578e3ebc94b6795c5441b9a313ff68b67d48cea87a6d40981c55e0e198d6139bf6fae3336eafac1cebedc93c5ce3d4ee56d94d269cb1c
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/network-connectivity/docs)
|
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/network_connectivity/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::NetworkConnectivity::V1::HubService::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
|
@@ -185,14 +185,26 @@ module Google
|
|
185
185
|
universe_domain: @config.universe_domain,
|
186
186
|
channel_args: @config.channel_args,
|
187
187
|
interceptors: @config.interceptors,
|
188
|
-
channel_pool_config: @config.channel_pool
|
188
|
+
channel_pool_config: @config.channel_pool,
|
189
|
+
logger: @config.logger
|
189
190
|
)
|
190
191
|
|
192
|
+
@hub_service_stub.stub_logger&.info do |entry|
|
193
|
+
entry.set_system_name
|
194
|
+
entry.set_service
|
195
|
+
entry.message = "Created client for #{entry.service}"
|
196
|
+
entry.set_credentials_fields credentials
|
197
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
198
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
199
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
200
|
+
end
|
201
|
+
|
191
202
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
192
203
|
config.credentials = credentials
|
193
204
|
config.quota_project = @quota_project_id
|
194
205
|
config.endpoint = @hub_service_stub.endpoint
|
195
206
|
config.universe_domain = @hub_service_stub.universe_domain
|
207
|
+
config.logger = @hub_service_stub.logger if config.respond_to? :logger=
|
196
208
|
end
|
197
209
|
|
198
210
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -200,6 +212,7 @@ module Google
|
|
200
212
|
config.quota_project = @quota_project_id
|
201
213
|
config.endpoint = @hub_service_stub.endpoint
|
202
214
|
config.universe_domain = @hub_service_stub.universe_domain
|
215
|
+
config.logger = @hub_service_stub.logger if config.respond_to? :logger=
|
203
216
|
end
|
204
217
|
end
|
205
218
|
|
@@ -224,6 +237,15 @@ module Google
|
|
224
237
|
#
|
225
238
|
attr_reader :iam_policy_client
|
226
239
|
|
240
|
+
##
|
241
|
+
# The logger used for request/response debug logging.
|
242
|
+
#
|
243
|
+
# @return [Logger]
|
244
|
+
#
|
245
|
+
def logger
|
246
|
+
@hub_service_stub.logger
|
247
|
+
end
|
248
|
+
|
227
249
|
# Service calls
|
228
250
|
|
229
251
|
##
|
@@ -319,7 +341,7 @@ module Google
|
|
319
341
|
@hub_service_stub.call_rpc :list_hubs, request, options: options do |response, operation|
|
320
342
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_hubs, request, response, operation, options
|
321
343
|
yield response, operation if block_given?
|
322
|
-
|
344
|
+
throw :response, response
|
323
345
|
end
|
324
346
|
rescue ::GRPC::BadStatus => e
|
325
347
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -405,7 +427,6 @@ module Google
|
|
405
427
|
|
406
428
|
@hub_service_stub.call_rpc :get_hub, request, options: options do |response, operation|
|
407
429
|
yield response, operation if block_given?
|
408
|
-
return response
|
409
430
|
end
|
410
431
|
rescue ::GRPC::BadStatus => e
|
411
432
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -518,7 +539,7 @@ module Google
|
|
518
539
|
@hub_service_stub.call_rpc :create_hub, request, options: options do |response, operation|
|
519
540
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
520
541
|
yield response, operation if block_given?
|
521
|
-
|
542
|
+
throw :response, response
|
522
543
|
end
|
523
544
|
rescue ::GRPC::BadStatus => e
|
524
545
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -634,7 +655,7 @@ module Google
|
|
634
655
|
@hub_service_stub.call_rpc :update_hub, request, options: options do |response, operation|
|
635
656
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
636
657
|
yield response, operation if block_given?
|
637
|
-
|
658
|
+
throw :response, response
|
638
659
|
end
|
639
660
|
rescue ::GRPC::BadStatus => e
|
640
661
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -743,7 +764,7 @@ module Google
|
|
743
764
|
@hub_service_stub.call_rpc :delete_hub, request, options: options do |response, operation|
|
744
765
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
745
766
|
yield response, operation if block_given?
|
746
|
-
|
767
|
+
throw :response, response
|
747
768
|
end
|
748
769
|
rescue ::GRPC::BadStatus => e
|
749
770
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -857,7 +878,7 @@ module Google
|
|
857
878
|
@hub_service_stub.call_rpc :list_hub_spokes, request, options: options do |response, operation|
|
858
879
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_hub_spokes, request, response, operation, options
|
859
880
|
yield response, operation if block_given?
|
860
|
-
|
881
|
+
throw :response, response
|
861
882
|
end
|
862
883
|
rescue ::GRPC::BadStatus => e
|
863
884
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -983,7 +1004,7 @@ module Google
|
|
983
1004
|
@hub_service_stub.call_rpc :query_hub_status, request, options: options do |response, operation|
|
984
1005
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :query_hub_status, request, response, operation, options
|
985
1006
|
yield response, operation if block_given?
|
986
|
-
|
1007
|
+
throw :response, response
|
987
1008
|
end
|
988
1009
|
rescue ::GRPC::BadStatus => e
|
989
1010
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1083,7 +1104,7 @@ module Google
|
|
1083
1104
|
@hub_service_stub.call_rpc :list_spokes, request, options: options do |response, operation|
|
1084
1105
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_spokes, request, response, operation, options
|
1085
1106
|
yield response, operation if block_given?
|
1086
|
-
|
1107
|
+
throw :response, response
|
1087
1108
|
end
|
1088
1109
|
rescue ::GRPC::BadStatus => e
|
1089
1110
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1169,7 +1190,6 @@ module Google
|
|
1169
1190
|
|
1170
1191
|
@hub_service_stub.call_rpc :get_spoke, request, options: options do |response, operation|
|
1171
1192
|
yield response, operation if block_given?
|
1172
|
-
return response
|
1173
1193
|
end
|
1174
1194
|
rescue ::GRPC::BadStatus => e
|
1175
1195
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1282,7 +1302,7 @@ module Google
|
|
1282
1302
|
@hub_service_stub.call_rpc :create_spoke, request, options: options do |response, operation|
|
1283
1303
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1284
1304
|
yield response, operation if block_given?
|
1285
|
-
|
1305
|
+
throw :response, response
|
1286
1306
|
end
|
1287
1307
|
rescue ::GRPC::BadStatus => e
|
1288
1308
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1397,7 +1417,7 @@ module Google
|
|
1397
1417
|
@hub_service_stub.call_rpc :update_spoke, request, options: options do |response, operation|
|
1398
1418
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1399
1419
|
yield response, operation if block_given?
|
1400
|
-
|
1420
|
+
throw :response, response
|
1401
1421
|
end
|
1402
1422
|
rescue ::GRPC::BadStatus => e
|
1403
1423
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1513,7 +1533,7 @@ module Google
|
|
1513
1533
|
@hub_service_stub.call_rpc :reject_hub_spoke, request, options: options do |response, operation|
|
1514
1534
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1515
1535
|
yield response, operation if block_given?
|
1516
|
-
|
1536
|
+
throw :response, response
|
1517
1537
|
end
|
1518
1538
|
rescue ::GRPC::BadStatus => e
|
1519
1539
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1625,7 +1645,7 @@ module Google
|
|
1625
1645
|
@hub_service_stub.call_rpc :accept_hub_spoke, request, options: options do |response, operation|
|
1626
1646
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1627
1647
|
yield response, operation if block_given?
|
1628
|
-
|
1648
|
+
throw :response, response
|
1629
1649
|
end
|
1630
1650
|
rescue ::GRPC::BadStatus => e
|
1631
1651
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1734,7 +1754,7 @@ module Google
|
|
1734
1754
|
@hub_service_stub.call_rpc :delete_spoke, request, options: options do |response, operation|
|
1735
1755
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1736
1756
|
yield response, operation if block_given?
|
1737
|
-
|
1757
|
+
throw :response, response
|
1738
1758
|
end
|
1739
1759
|
rescue ::GRPC::BadStatus => e
|
1740
1760
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1820,7 +1840,6 @@ module Google
|
|
1820
1840
|
|
1821
1841
|
@hub_service_stub.call_rpc :get_route_table, request, options: options do |response, operation|
|
1822
1842
|
yield response, operation if block_given?
|
1823
|
-
return response
|
1824
1843
|
end
|
1825
1844
|
rescue ::GRPC::BadStatus => e
|
1826
1845
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1906,7 +1925,6 @@ module Google
|
|
1906
1925
|
|
1907
1926
|
@hub_service_stub.call_rpc :get_route, request, options: options do |response, operation|
|
1908
1927
|
yield response, operation if block_given?
|
1909
|
-
return response
|
1910
1928
|
end
|
1911
1929
|
rescue ::GRPC::BadStatus => e
|
1912
1930
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2005,7 +2023,7 @@ module Google
|
|
2005
2023
|
@hub_service_stub.call_rpc :list_routes, request, options: options do |response, operation|
|
2006
2024
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_routes, request, response, operation, options
|
2007
2025
|
yield response, operation if block_given?
|
2008
|
-
|
2026
|
+
throw :response, response
|
2009
2027
|
end
|
2010
2028
|
rescue ::GRPC::BadStatus => e
|
2011
2029
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2104,7 +2122,7 @@ module Google
|
|
2104
2122
|
@hub_service_stub.call_rpc :list_route_tables, request, options: options do |response, operation|
|
2105
2123
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_route_tables, request, response, operation, options
|
2106
2124
|
yield response, operation if block_given?
|
2107
|
-
|
2125
|
+
throw :response, response
|
2108
2126
|
end
|
2109
2127
|
rescue ::GRPC::BadStatus => e
|
2110
2128
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2190,7 +2208,6 @@ module Google
|
|
2190
2208
|
|
2191
2209
|
@hub_service_stub.call_rpc :get_group, request, options: options do |response, operation|
|
2192
2210
|
yield response, operation if block_given?
|
2193
|
-
return response
|
2194
2211
|
end
|
2195
2212
|
rescue ::GRPC::BadStatus => e
|
2196
2213
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2289,7 +2306,7 @@ module Google
|
|
2289
2306
|
@hub_service_stub.call_rpc :list_groups, request, options: options do |response, operation|
|
2290
2307
|
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_groups, request, response, operation, options
|
2291
2308
|
yield response, operation if block_given?
|
2292
|
-
|
2309
|
+
throw :response, response
|
2293
2310
|
end
|
2294
2311
|
rescue ::GRPC::BadStatus => e
|
2295
2312
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2404,7 +2421,7 @@ module Google
|
|
2404
2421
|
@hub_service_stub.call_rpc :update_group, request, options: options do |response, operation|
|
2405
2422
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2406
2423
|
yield response, operation if block_given?
|
2407
|
-
|
2424
|
+
throw :response, response
|
2408
2425
|
end
|
2409
2426
|
rescue ::GRPC::BadStatus => e
|
2410
2427
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2454,6 +2471,13 @@ module Google
|
|
2454
2471
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2455
2472
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2456
2473
|
# * (`nil`) indicating no credentials
|
2474
|
+
#
|
2475
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2476
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2477
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2478
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2479
|
+
# For more information, refer to [Validate credential configurations from external
|
2480
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2457
2481
|
# @return [::Object]
|
2458
2482
|
# @!attribute [rw] scope
|
2459
2483
|
# The OAuth scopes
|
@@ -2493,6 +2517,11 @@ module Google
|
|
2493
2517
|
# default endpoint URL. The default value of nil uses the environment
|
2494
2518
|
# universe (usually the default "googleapis.com" universe).
|
2495
2519
|
# @return [::String,nil]
|
2520
|
+
# @!attribute [rw] logger
|
2521
|
+
# A custom logger to use for request/response debug logging, or the value
|
2522
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2523
|
+
# explicitly disable logging.
|
2524
|
+
# @return [::Logger,:default,nil]
|
2496
2525
|
#
|
2497
2526
|
class Configuration
|
2498
2527
|
extend ::Gapic::Config
|
@@ -2517,6 +2546,7 @@ module Google
|
|
2517
2546
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2518
2547
|
config_attr :quota_project, nil, ::String, nil
|
2519
2548
|
config_attr :universe_domain, nil, ::String, nil
|
2549
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2520
2550
|
|
2521
2551
|
# @private
|
2522
2552
|
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
|
@@ -176,14 +176,26 @@ module Google
|
|
176
176
|
universe_domain: @config.universe_domain,
|
177
177
|
channel_args: @config.channel_args,
|
178
178
|
interceptors: @config.interceptors,
|
179
|
-
channel_pool_config: @config.channel_pool
|
179
|
+
channel_pool_config: @config.channel_pool,
|
180
|
+
logger: @config.logger
|
180
181
|
)
|
181
182
|
|
183
|
+
@policy_based_routing_service_stub.stub_logger&.info do |entry|
|
184
|
+
entry.set_system_name
|
185
|
+
entry.set_service
|
186
|
+
entry.message = "Created client for #{entry.service}"
|
187
|
+
entry.set_credentials_fields credentials
|
188
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
189
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
190
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
191
|
+
end
|
192
|
+
|
182
193
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
183
194
|
config.credentials = credentials
|
184
195
|
config.quota_project = @quota_project_id
|
185
196
|
config.endpoint = @policy_based_routing_service_stub.endpoint
|
186
197
|
config.universe_domain = @policy_based_routing_service_stub.universe_domain
|
198
|
+
config.logger = @policy_based_routing_service_stub.logger if config.respond_to? :logger=
|
187
199
|
end
|
188
200
|
|
189
201
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -191,6 +203,7 @@ module Google
|
|
191
203
|
config.quota_project = @quota_project_id
|
192
204
|
config.endpoint = @policy_based_routing_service_stub.endpoint
|
193
205
|
config.universe_domain = @policy_based_routing_service_stub.universe_domain
|
206
|
+
config.logger = @policy_based_routing_service_stub.logger if config.respond_to? :logger=
|
194
207
|
end
|
195
208
|
end
|
196
209
|
|
@@ -215,6 +228,15 @@ module Google
|
|
215
228
|
#
|
216
229
|
attr_reader :iam_policy_client
|
217
230
|
|
231
|
+
##
|
232
|
+
# The logger used for request/response debug logging.
|
233
|
+
#
|
234
|
+
# @return [Logger]
|
235
|
+
#
|
236
|
+
def logger
|
237
|
+
@policy_based_routing_service_stub.logger
|
238
|
+
end
|
239
|
+
|
218
240
|
# Service calls
|
219
241
|
|
220
242
|
##
|
@@ -310,7 +332,7 @@ module Google
|
|
310
332
|
@policy_based_routing_service_stub.call_rpc :list_policy_based_routes, request, options: options do |response, operation|
|
311
333
|
response = ::Gapic::PagedEnumerable.new @policy_based_routing_service_stub, :list_policy_based_routes, request, response, operation, options
|
312
334
|
yield response, operation if block_given?
|
313
|
-
|
335
|
+
throw :response, response
|
314
336
|
end
|
315
337
|
rescue ::GRPC::BadStatus => e
|
316
338
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -396,7 +418,6 @@ module Google
|
|
396
418
|
|
397
419
|
@policy_based_routing_service_stub.call_rpc :get_policy_based_route, request, options: options do |response, operation|
|
398
420
|
yield response, operation if block_given?
|
399
|
-
return response
|
400
421
|
end
|
401
422
|
rescue ::GRPC::BadStatus => e
|
402
423
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -508,7 +529,7 @@ module Google
|
|
508
529
|
@policy_based_routing_service_stub.call_rpc :create_policy_based_route, request, options: options do |response, operation|
|
509
530
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
510
531
|
yield response, operation if block_given?
|
511
|
-
|
532
|
+
throw :response, response
|
512
533
|
end
|
513
534
|
rescue ::GRPC::BadStatus => e
|
514
535
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -616,7 +637,7 @@ module Google
|
|
616
637
|
@policy_based_routing_service_stub.call_rpc :delete_policy_based_route, request, options: options do |response, operation|
|
617
638
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
618
639
|
yield response, operation if block_given?
|
619
|
-
|
640
|
+
throw :response, response
|
620
641
|
end
|
621
642
|
rescue ::GRPC::BadStatus => e
|
622
643
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -666,6 +687,13 @@ module Google
|
|
666
687
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
667
688
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
668
689
|
# * (`nil`) indicating no credentials
|
690
|
+
#
|
691
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
692
|
+
# external source for authentication to Google Cloud, you must validate it before
|
693
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
694
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
695
|
+
# For more information, refer to [Validate credential configurations from external
|
696
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
669
697
|
# @return [::Object]
|
670
698
|
# @!attribute [rw] scope
|
671
699
|
# The OAuth scopes
|
@@ -705,6 +733,11 @@ module Google
|
|
705
733
|
# default endpoint URL. The default value of nil uses the environment
|
706
734
|
# universe (usually the default "googleapis.com" universe).
|
707
735
|
# @return [::String,nil]
|
736
|
+
# @!attribute [rw] logger
|
737
|
+
# A custom logger to use for request/response debug logging, or the value
|
738
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
739
|
+
# explicitly disable logging.
|
740
|
+
# @return [::Logger,:default,nil]
|
708
741
|
#
|
709
742
|
class Configuration
|
710
743
|
extend ::Gapic::Config
|
@@ -729,6 +762,7 @@ module Google
|
|
729
762
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
730
763
|
config_attr :quota_project, nil, ::String, nil
|
731
764
|
config_attr :universe_domain, nil, ::String, nil
|
765
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
732
766
|
|
733
767
|
# @private
|
734
768
|
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
|
@@ -306,9 +306,28 @@ module Google
|
|
306
306
|
# @!attribute [rw] common
|
307
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
308
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
309
319
|
class GoSettings
|
310
320
|
include ::Google::Protobuf::MessageExts
|
311
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
312
331
|
end
|
313
332
|
|
314
333
|
# Describes the generator configuration for a method.
|
@@ -29,18 +29,26 @@ module Google
|
|
29
29
|
# @!attribute [rw] virtual_machine
|
30
30
|
# @return [::Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoute::VirtualMachine]
|
31
31
|
# Optional. VM instances to which this policy based route applies to.
|
32
|
+
#
|
33
|
+
# Note: The following fields are mutually exclusive: `virtual_machine`, `interconnect_attachment`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
32
34
|
# @!attribute [rw] interconnect_attachment
|
33
35
|
# @return [::Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoute::InterconnectAttachment]
|
34
36
|
# Optional. The interconnect attachments to which this route applies to.
|
37
|
+
#
|
38
|
+
# Note: The following fields are mutually exclusive: `interconnect_attachment`, `virtual_machine`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
35
39
|
# @!attribute [rw] next_hop_ilb_ip
|
36
40
|
# @return [::String]
|
37
41
|
# Optional. The IP of a global access enabled L4 ILB that should be the
|
38
42
|
# next hop to handle matching packets. For this version, only
|
39
43
|
# next_hop_ilb_ip is supported.
|
44
|
+
#
|
45
|
+
# Note: The following fields are mutually exclusive: `next_hop_ilb_ip`, `next_hop_other_routes`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
40
46
|
# @!attribute [rw] next_hop_other_routes
|
41
47
|
# @return [::Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoute::OtherRoutes]
|
42
48
|
# Optional. Other routes that will be referenced to determine the next hop
|
43
49
|
# of the packet.
|
50
|
+
#
|
51
|
+
# Note: The following fields are mutually exclusive: `next_hop_other_routes`, `next_hop_ilb_ip`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
44
52
|
# @!attribute [rw] name
|
45
53
|
# @return [::String]
|
46
54
|
# Immutable. A unique name of the resource in the form of
|
@@ -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-network_connectivity-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.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
|
@@ -138,7 +137,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
138
137
|
licenses:
|
139
138
|
- Apache-2.0
|
140
139
|
metadata: {}
|
141
|
-
post_install_message:
|
142
140
|
rdoc_options: []
|
143
141
|
require_paths:
|
144
142
|
- lib
|
@@ -146,15 +144,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
144
|
requirements:
|
147
145
|
- - ">="
|
148
146
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
147
|
+
version: '3.0'
|
150
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
149
|
requirements:
|
152
150
|
- - ">="
|
153
151
|
- !ruby/object:Gem::Version
|
154
152
|
version: '0'
|
155
153
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
157
|
-
signing_key:
|
154
|
+
rubygems_version: 3.6.2
|
158
155
|
specification_version: 4
|
159
156
|
summary: This API enables connectivity with and between Google Cloud resources.
|
160
157
|
test_files: []
|