google-cloud-compute-v1 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +151 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +119 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +228 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +60 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +155 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +121 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +759 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +408 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +587 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +288 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +47 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +82 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +60 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +86 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +58 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +87 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1.rb +2 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +637 -26
- metadata +12 -2
@@ -38,6 +38,43 @@ module Google
|
|
38
38
|
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
39
39
|
end
|
40
40
|
|
41
|
+
##
|
42
|
+
# Baseline implementation for the aggregated_list REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AggregatedListSslPoliciesRequest]
|
45
|
+
# A request object representing the call parameters. Required.
|
46
|
+
# @param options [::Gapic::CallOptions]
|
47
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
48
|
+
#
|
49
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
50
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::SslPoliciesAggregatedList]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::SslPoliciesAggregatedList]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def aggregated_list request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
verb, uri, query_string_params, body = transcode_aggregated_list_request request_pb
|
59
|
+
query_string_params = if query_string_params.any?
|
60
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
61
|
+
else
|
62
|
+
{}
|
63
|
+
end
|
64
|
+
|
65
|
+
response = @client_stub.make_http_request(
|
66
|
+
verb,
|
67
|
+
uri: uri,
|
68
|
+
body: body || "",
|
69
|
+
params: query_string_params,
|
70
|
+
options: options
|
71
|
+
)
|
72
|
+
result = ::Google::Cloud::Compute::V1::SslPoliciesAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
73
|
+
|
74
|
+
yield result, response if block_given?
|
75
|
+
result
|
76
|
+
end
|
77
|
+
|
41
78
|
##
|
42
79
|
# Baseline implementation for the delete REST call
|
43
80
|
#
|
@@ -263,6 +300,27 @@ module Google
|
|
263
300
|
|
264
301
|
private
|
265
302
|
|
303
|
+
##
|
304
|
+
# @private
|
305
|
+
#
|
306
|
+
# GRPC transcoding helper method for the aggregated_list REST call
|
307
|
+
#
|
308
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AggregatedListSslPoliciesRequest]
|
309
|
+
# A request object representing the call parameters. Required.
|
310
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
311
|
+
# Uri, Body, Query string parameters
|
312
|
+
def transcode_aggregated_list_request request_pb
|
313
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
314
|
+
.with_bindings(
|
315
|
+
uri_method: :get,
|
316
|
+
uri_template: "/compute/v1/projects/{project}/aggregated/sslPolicies",
|
317
|
+
matches: [
|
318
|
+
["project", %r{^[^/]+/?$}, false]
|
319
|
+
]
|
320
|
+
)
|
321
|
+
transcoder.transcode request_pb
|
322
|
+
end
|
323
|
+
|
266
324
|
##
|
267
325
|
# @private
|
268
326
|
#
|
@@ -84,6 +84,8 @@ module Google
|
|
84
84
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
85
|
}
|
86
86
|
|
87
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
88
|
+
|
87
89
|
default_config
|
88
90
|
end
|
89
91
|
yield @configure if block_given?
|
@@ -522,6 +524,84 @@ module Google
|
|
522
524
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
523
525
|
end
|
524
526
|
|
527
|
+
##
|
528
|
+
# Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
|
529
|
+
#
|
530
|
+
# @overload set_labels(request, options = nil)
|
531
|
+
# Pass arguments to `set_labels` via a request object, either of type
|
532
|
+
# {::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest} or an equivalent Hash.
|
533
|
+
#
|
534
|
+
# @param request [::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest, ::Hash]
|
535
|
+
# A request object representing the call parameters. Required. To specify no
|
536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
538
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
539
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
540
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
541
|
+
#
|
542
|
+
# @overload set_labels(project: nil, region: nil, region_set_labels_request_resource: nil, request_id: nil, resource: nil)
|
543
|
+
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
544
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
545
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
546
|
+
#
|
547
|
+
# @param project [::String]
|
548
|
+
# Project ID for this request.
|
549
|
+
# @param region [::String]
|
550
|
+
# The region for this request.
|
551
|
+
# @param region_set_labels_request_resource [::Google::Cloud::Compute::V1::RegionSetLabelsRequest, ::Hash]
|
552
|
+
# The body resource for this request
|
553
|
+
# @param request_id [::String]
|
554
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
555
|
+
# @param resource [::String]
|
556
|
+
# Name or id of the resource for this request.
|
557
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
558
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
559
|
+
# @yieldparam response [::Faraday::Response]
|
560
|
+
#
|
561
|
+
# @return [::Gapic::GenericLRO::Operation]
|
562
|
+
#
|
563
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
564
|
+
def set_labels request, options = nil
|
565
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
566
|
+
|
567
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest
|
568
|
+
|
569
|
+
# Converts hash and nil to an options object
|
570
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
571
|
+
|
572
|
+
# Customize the options with defaults
|
573
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
574
|
+
|
575
|
+
# Set x-goog-api-client header
|
576
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
577
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
578
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
579
|
+
transports_version_send: [:rest]
|
580
|
+
|
581
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
582
|
+
metadata: call_metadata
|
583
|
+
|
584
|
+
options.apply_defaults timeout: @config.timeout,
|
585
|
+
metadata: @config.metadata
|
586
|
+
|
587
|
+
@target_vpn_gateways_stub.set_labels request, options do |result, response|
|
588
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
589
|
+
operation: result,
|
590
|
+
client: region_operations,
|
591
|
+
request_values: {
|
592
|
+
"project" => request.project,
|
593
|
+
"region" => request.region
|
594
|
+
},
|
595
|
+
options: options
|
596
|
+
)
|
597
|
+
yield result, response if block_given?
|
598
|
+
return result
|
599
|
+
end
|
600
|
+
rescue ::Faraday::Error => e
|
601
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
602
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
603
|
+
end
|
604
|
+
|
525
605
|
##
|
526
606
|
# Configuration class for the TargetVpnGateways REST API.
|
527
607
|
#
|
@@ -646,6 +726,11 @@ module Google
|
|
646
726
|
# @return [::Gapic::Config::Method]
|
647
727
|
#
|
648
728
|
attr_reader :list
|
729
|
+
##
|
730
|
+
# RPC-specific configuration for `set_labels`
|
731
|
+
# @return [::Gapic::Config::Method]
|
732
|
+
#
|
733
|
+
attr_reader :set_labels
|
649
734
|
|
650
735
|
# @private
|
651
736
|
def initialize parent_rpcs = nil
|
@@ -659,6 +744,8 @@ module Google
|
|
659
744
|
@insert = ::Gapic::Config::Method.new insert_config
|
660
745
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
661
746
|
@list = ::Gapic::Config::Method.new list_config
|
747
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
748
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
662
749
|
|
663
750
|
yield self if block_given?
|
664
751
|
end
|
@@ -223,6 +223,43 @@ module Google
|
|
223
223
|
result
|
224
224
|
end
|
225
225
|
|
226
|
+
##
|
227
|
+
# Baseline implementation for the set_labels REST call
|
228
|
+
#
|
229
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest]
|
230
|
+
# A request object representing the call parameters. Required.
|
231
|
+
# @param options [::Gapic::CallOptions]
|
232
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
233
|
+
#
|
234
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
235
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
236
|
+
# @yieldparam response [::Faraday::Response]
|
237
|
+
#
|
238
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
239
|
+
# A result object deserialized from the server's reply
|
240
|
+
def set_labels request_pb, options = nil
|
241
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
242
|
+
|
243
|
+
verb, uri, query_string_params, body = transcode_set_labels_request request_pb
|
244
|
+
query_string_params = if query_string_params.any?
|
245
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
246
|
+
else
|
247
|
+
{}
|
248
|
+
end
|
249
|
+
|
250
|
+
response = @client_stub.make_http_request(
|
251
|
+
verb,
|
252
|
+
uri: uri,
|
253
|
+
body: body || "",
|
254
|
+
params: query_string_params,
|
255
|
+
options: options
|
256
|
+
)
|
257
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
258
|
+
|
259
|
+
yield result, response if block_given?
|
260
|
+
result
|
261
|
+
end
|
262
|
+
|
226
263
|
|
227
264
|
private
|
228
265
|
|
@@ -337,6 +374,30 @@ module Google
|
|
337
374
|
)
|
338
375
|
transcoder.transcode request_pb
|
339
376
|
end
|
377
|
+
|
378
|
+
##
|
379
|
+
# @private
|
380
|
+
#
|
381
|
+
# GRPC transcoding helper method for the set_labels REST call
|
382
|
+
#
|
383
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest]
|
384
|
+
# A request object representing the call parameters. Required.
|
385
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
386
|
+
# Uri, Body, Query string parameters
|
387
|
+
def transcode_set_labels_request request_pb
|
388
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
389
|
+
.with_bindings(
|
390
|
+
uri_method: :post,
|
391
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels",
|
392
|
+
body: "region_set_labels_request_resource",
|
393
|
+
matches: [
|
394
|
+
["project", %r{^[^/]+/?$}, false],
|
395
|
+
["region", %r{^[^/]+/?$}, false],
|
396
|
+
["resource", %r{^[^/]+/?$}, false]
|
397
|
+
]
|
398
|
+
)
|
399
|
+
transcoder.transcode request_pb
|
400
|
+
end
|
340
401
|
end
|
341
402
|
end
|
342
403
|
end
|
@@ -84,6 +84,8 @@ module Google
|
|
84
84
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
85
|
}
|
86
86
|
|
87
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
88
|
+
|
87
89
|
default_config
|
88
90
|
end
|
89
91
|
yield @configure if block_given?
|
@@ -522,6 +524,84 @@ module Google
|
|
522
524
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
523
525
|
end
|
524
526
|
|
527
|
+
##
|
528
|
+
# Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.
|
529
|
+
#
|
530
|
+
# @overload set_labels(request, options = nil)
|
531
|
+
# Pass arguments to `set_labels` via a request object, either of type
|
532
|
+
# {::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest} or an equivalent Hash.
|
533
|
+
#
|
534
|
+
# @param request [::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest, ::Hash]
|
535
|
+
# A request object representing the call parameters. Required. To specify no
|
536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
538
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
539
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
540
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
541
|
+
#
|
542
|
+
# @overload set_labels(project: nil, region: nil, region_set_labels_request_resource: nil, request_id: nil, resource: nil)
|
543
|
+
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
544
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
545
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
546
|
+
#
|
547
|
+
# @param project [::String]
|
548
|
+
# Project ID for this request.
|
549
|
+
# @param region [::String]
|
550
|
+
# The region for this request.
|
551
|
+
# @param region_set_labels_request_resource [::Google::Cloud::Compute::V1::RegionSetLabelsRequest, ::Hash]
|
552
|
+
# The body resource for this request
|
553
|
+
# @param request_id [::String]
|
554
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
555
|
+
# @param resource [::String]
|
556
|
+
# Name or id of the resource for this request.
|
557
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
558
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
559
|
+
# @yieldparam response [::Faraday::Response]
|
560
|
+
#
|
561
|
+
# @return [::Gapic::GenericLRO::Operation]
|
562
|
+
#
|
563
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
564
|
+
def set_labels request, options = nil
|
565
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
566
|
+
|
567
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest
|
568
|
+
|
569
|
+
# Converts hash and nil to an options object
|
570
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
571
|
+
|
572
|
+
# Customize the options with defaults
|
573
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
574
|
+
|
575
|
+
# Set x-goog-api-client header
|
576
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
577
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
578
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
579
|
+
transports_version_send: [:rest]
|
580
|
+
|
581
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
582
|
+
metadata: call_metadata
|
583
|
+
|
584
|
+
options.apply_defaults timeout: @config.timeout,
|
585
|
+
metadata: @config.metadata
|
586
|
+
|
587
|
+
@vpn_tunnels_stub.set_labels request, options do |result, response|
|
588
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
589
|
+
operation: result,
|
590
|
+
client: region_operations,
|
591
|
+
request_values: {
|
592
|
+
"project" => request.project,
|
593
|
+
"region" => request.region
|
594
|
+
},
|
595
|
+
options: options
|
596
|
+
)
|
597
|
+
yield result, response if block_given?
|
598
|
+
return result
|
599
|
+
end
|
600
|
+
rescue ::Faraday::Error => e
|
601
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
602
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
603
|
+
end
|
604
|
+
|
525
605
|
##
|
526
606
|
# Configuration class for the VpnTunnels REST API.
|
527
607
|
#
|
@@ -646,6 +726,11 @@ module Google
|
|
646
726
|
# @return [::Gapic::Config::Method]
|
647
727
|
#
|
648
728
|
attr_reader :list
|
729
|
+
##
|
730
|
+
# RPC-specific configuration for `set_labels`
|
731
|
+
# @return [::Gapic::Config::Method]
|
732
|
+
#
|
733
|
+
attr_reader :set_labels
|
649
734
|
|
650
735
|
# @private
|
651
736
|
def initialize parent_rpcs = nil
|
@@ -659,6 +744,8 @@ module Google
|
|
659
744
|
@insert = ::Gapic::Config::Method.new insert_config
|
660
745
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
661
746
|
@list = ::Gapic::Config::Method.new list_config
|
747
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
748
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
662
749
|
|
663
750
|
yield self if block_given?
|
664
751
|
end
|
@@ -223,6 +223,43 @@ module Google
|
|
223
223
|
result
|
224
224
|
end
|
225
225
|
|
226
|
+
##
|
227
|
+
# Baseline implementation for the set_labels REST call
|
228
|
+
#
|
229
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest]
|
230
|
+
# A request object representing the call parameters. Required.
|
231
|
+
# @param options [::Gapic::CallOptions]
|
232
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
233
|
+
#
|
234
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
235
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
236
|
+
# @yieldparam response [::Faraday::Response]
|
237
|
+
#
|
238
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
239
|
+
# A result object deserialized from the server's reply
|
240
|
+
def set_labels request_pb, options = nil
|
241
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
242
|
+
|
243
|
+
verb, uri, query_string_params, body = transcode_set_labels_request request_pb
|
244
|
+
query_string_params = if query_string_params.any?
|
245
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
246
|
+
else
|
247
|
+
{}
|
248
|
+
end
|
249
|
+
|
250
|
+
response = @client_stub.make_http_request(
|
251
|
+
verb,
|
252
|
+
uri: uri,
|
253
|
+
body: body || "",
|
254
|
+
params: query_string_params,
|
255
|
+
options: options
|
256
|
+
)
|
257
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
258
|
+
|
259
|
+
yield result, response if block_given?
|
260
|
+
result
|
261
|
+
end
|
262
|
+
|
226
263
|
|
227
264
|
private
|
228
265
|
|
@@ -337,6 +374,30 @@ module Google
|
|
337
374
|
)
|
338
375
|
transcoder.transcode request_pb
|
339
376
|
end
|
377
|
+
|
378
|
+
##
|
379
|
+
# @private
|
380
|
+
#
|
381
|
+
# GRPC transcoding helper method for the set_labels REST call
|
382
|
+
#
|
383
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsVpnTunnelRequest]
|
384
|
+
# A request object representing the call parameters. Required.
|
385
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
386
|
+
# Uri, Body, Query string parameters
|
387
|
+
def transcode_set_labels_request request_pb
|
388
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
389
|
+
.with_bindings(
|
390
|
+
uri_method: :post,
|
391
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels",
|
392
|
+
body: "region_set_labels_request_resource",
|
393
|
+
matches: [
|
394
|
+
["project", %r{^[^/]+/?$}, false],
|
395
|
+
["region", %r{^[^/]+/?$}, false],
|
396
|
+
["resource", %r{^[^/]+/?$}, false]
|
397
|
+
]
|
398
|
+
)
|
399
|
+
transcoder.transcode request_pb
|
400
|
+
end
|
340
401
|
end
|
341
402
|
end
|
342
403
|
end
|
@@ -74,8 +74,10 @@ require "google/cloud/compute/v1/region_notification_endpoints"
|
|
74
74
|
require "google/cloud/compute/v1/region_operations"
|
75
75
|
require "google/cloud/compute/v1/region_security_policies"
|
76
76
|
require "google/cloud/compute/v1/region_ssl_certificates"
|
77
|
+
require "google/cloud/compute/v1/region_ssl_policies"
|
77
78
|
require "google/cloud/compute/v1/region_target_http_proxies"
|
78
79
|
require "google/cloud/compute/v1/region_target_https_proxies"
|
80
|
+
require "google/cloud/compute/v1/region_target_tcp_proxies"
|
79
81
|
require "google/cloud/compute/v1/region_url_maps"
|
80
82
|
require "google/cloud/compute/v1/regions"
|
81
83
|
require "google/cloud/compute/v1/reservations"
|