google-cloud-compute-v1 1.1.0 → 1.4.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 +5 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +84 -22
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +95 -26
- data/lib/google/cloud/compute/v1/compute_pb.rb +671 -3
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +177 -52
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +72 -19
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +372 -101
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +105 -29
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +91 -22
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +176 -51
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
- data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +36 -7
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +145 -13
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +59 -14
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +170 -23
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +55 -1
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +35 -8
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +44 -10
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +55 -14
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +169 -23
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +158 -19
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +46 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +6 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
- metadata +27 -3
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/region_target_https_proxies/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -78,6 +79,8 @@ module Google
|
|
78
79
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
79
80
|
}
|
80
81
|
|
82
|
+
default_config.rpcs.patch.timeout = 600.0
|
83
|
+
|
81
84
|
default_config.rpcs.set_ssl_certificates.timeout = 600.0
|
82
85
|
|
83
86
|
default_config.rpcs.set_url_map.timeout = 600.0
|
@@ -138,9 +141,21 @@ module Google
|
|
138
141
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
142
|
end
|
140
143
|
|
144
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.endpoint = @config.endpoint
|
147
|
+
end
|
148
|
+
|
141
149
|
@region_target_https_proxies_stub = ::Google::Cloud::Compute::V1::RegionTargetHttpsProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
142
150
|
end
|
143
151
|
|
152
|
+
##
|
153
|
+
# Get the associated client for long-running operations via RegionOperations.
|
154
|
+
#
|
155
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
156
|
+
#
|
157
|
+
attr_reader :region_operations
|
158
|
+
|
144
159
|
# Service calls
|
145
160
|
|
146
161
|
##
|
@@ -172,10 +187,10 @@ module Google
|
|
172
187
|
# @param target_https_proxy [::String]
|
173
188
|
# Name of the TargetHttpsProxy resource to delete.
|
174
189
|
# @yield [result, response] Access the result along with the Faraday response object
|
175
|
-
# @yieldparam result [::Gapic::
|
190
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
176
191
|
# @yieldparam response [::Faraday::Response]
|
177
192
|
#
|
178
|
-
# @return [::Gapic::
|
193
|
+
# @return [::Gapic::GenericLRO::Operation]
|
179
194
|
#
|
180
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
181
196
|
def delete request, options = nil
|
@@ -202,7 +217,15 @@ module Google
|
|
202
217
|
metadata: @config.metadata
|
203
218
|
|
204
219
|
@region_target_https_proxies_stub.delete request, options do |result, response|
|
205
|
-
result = ::
|
220
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
221
|
+
operation: result,
|
222
|
+
client: region_operations,
|
223
|
+
request_values: {
|
224
|
+
"project" => request.project,
|
225
|
+
"region" => request.region
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
206
229
|
yield result, response if block_given?
|
207
230
|
return result
|
208
231
|
end
|
@@ -305,10 +328,10 @@ module Google
|
|
305
328
|
# @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
|
306
329
|
# The body resource for this request
|
307
330
|
# @yield [result, response] Access the result along with the Faraday response object
|
308
|
-
# @yieldparam result [::Gapic::
|
331
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
309
332
|
# @yieldparam response [::Faraday::Response]
|
310
333
|
#
|
311
|
-
# @return [::Gapic::
|
334
|
+
# @return [::Gapic::GenericLRO::Operation]
|
312
335
|
#
|
313
336
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
314
337
|
def insert request, options = nil
|
@@ -335,7 +358,15 @@ module Google
|
|
335
358
|
metadata: @config.metadata
|
336
359
|
|
337
360
|
@region_target_https_proxies_stub.insert request, options do |result, response|
|
338
|
-
result = ::
|
361
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
362
|
+
operation: result,
|
363
|
+
client: region_operations,
|
364
|
+
request_values: {
|
365
|
+
"project" => request.project,
|
366
|
+
"region" => request.region
|
367
|
+
},
|
368
|
+
options: options
|
369
|
+
)
|
339
370
|
yield result, response if block_given?
|
340
371
|
return result
|
341
372
|
end
|
@@ -365,7 +396,7 @@ module Google
|
|
365
396
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
366
397
|
#
|
367
398
|
# @param filter [::String]
|
368
|
-
# A filter expression that filters resources listed in the response.
|
399
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
369
400
|
# @param max_results [::Integer]
|
370
401
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
371
402
|
# @param order_by [::String]
|
@@ -418,6 +449,84 @@ module Google
|
|
418
449
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
419
450
|
end
|
420
451
|
|
452
|
+
##
|
453
|
+
# Patches the specified regional TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
454
|
+
#
|
455
|
+
# @overload patch(request, options = nil)
|
456
|
+
# Pass arguments to `patch` via a request object, either of type
|
457
|
+
# {::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest} or an equivalent Hash.
|
458
|
+
#
|
459
|
+
# @param request [::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest, ::Hash]
|
460
|
+
# A request object representing the call parameters. Required. To specify no
|
461
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
462
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
463
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
464
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
465
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
466
|
+
#
|
467
|
+
# @overload patch(project: nil, region: nil, request_id: nil, target_https_proxy: nil, target_https_proxy_resource: nil)
|
468
|
+
# Pass arguments to `patch` via keyword arguments. Note that at
|
469
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
470
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
471
|
+
#
|
472
|
+
# @param project [::String]
|
473
|
+
# Project ID for this request.
|
474
|
+
# @param region [::String]
|
475
|
+
# Name of the region for this request.
|
476
|
+
# @param request_id [::String]
|
477
|
+
# 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).
|
478
|
+
# @param target_https_proxy [::String]
|
479
|
+
# Name of the TargetHttpsProxy resource to patch.
|
480
|
+
# @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
|
481
|
+
# The body resource for this request
|
482
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
483
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
484
|
+
# @yieldparam response [::Faraday::Response]
|
485
|
+
#
|
486
|
+
# @return [::Gapic::GenericLRO::Operation]
|
487
|
+
#
|
488
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
489
|
+
def patch request, options = nil
|
490
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
491
|
+
|
492
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest
|
493
|
+
|
494
|
+
# Converts hash and nil to an options object
|
495
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
496
|
+
|
497
|
+
# Customize the options with defaults
|
498
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
499
|
+
|
500
|
+
# Set x-goog-api-client header
|
501
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
502
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
503
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
504
|
+
transports_version_send: [:rest]
|
505
|
+
|
506
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
507
|
+
metadata: call_metadata
|
508
|
+
|
509
|
+
options.apply_defaults timeout: @config.timeout,
|
510
|
+
metadata: @config.metadata
|
511
|
+
|
512
|
+
@region_target_https_proxies_stub.patch request, options do |result, response|
|
513
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
514
|
+
operation: result,
|
515
|
+
client: region_operations,
|
516
|
+
request_values: {
|
517
|
+
"project" => request.project,
|
518
|
+
"region" => request.region
|
519
|
+
},
|
520
|
+
options: options
|
521
|
+
)
|
522
|
+
yield result, response if block_given?
|
523
|
+
return result
|
524
|
+
end
|
525
|
+
rescue ::Faraday::Error => e
|
526
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
527
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
528
|
+
end
|
529
|
+
|
421
530
|
##
|
422
531
|
# Replaces SslCertificates for TargetHttpsProxy.
|
423
532
|
#
|
@@ -449,10 +558,10 @@ module Google
|
|
449
558
|
# @param target_https_proxy [::String]
|
450
559
|
# Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
|
451
560
|
# @yield [result, response] Access the result along with the Faraday response object
|
452
|
-
# @yieldparam result [::Gapic::
|
561
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
453
562
|
# @yieldparam response [::Faraday::Response]
|
454
563
|
#
|
455
|
-
# @return [::Gapic::
|
564
|
+
# @return [::Gapic::GenericLRO::Operation]
|
456
565
|
#
|
457
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
458
567
|
def set_ssl_certificates request, options = nil
|
@@ -479,7 +588,15 @@ module Google
|
|
479
588
|
metadata: @config.metadata
|
480
589
|
|
481
590
|
@region_target_https_proxies_stub.set_ssl_certificates request, options do |result, response|
|
482
|
-
result = ::
|
591
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
592
|
+
operation: result,
|
593
|
+
client: region_operations,
|
594
|
+
request_values: {
|
595
|
+
"project" => request.project,
|
596
|
+
"region" => request.region
|
597
|
+
},
|
598
|
+
options: options
|
599
|
+
)
|
483
600
|
yield result, response if block_given?
|
484
601
|
return result
|
485
602
|
end
|
@@ -519,10 +636,10 @@ module Google
|
|
519
636
|
# @param url_map_reference_resource [::Google::Cloud::Compute::V1::UrlMapReference, ::Hash]
|
520
637
|
# The body resource for this request
|
521
638
|
# @yield [result, response] Access the result along with the Faraday response object
|
522
|
-
# @yieldparam result [::Gapic::
|
639
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
523
640
|
# @yieldparam response [::Faraday::Response]
|
524
641
|
#
|
525
|
-
# @return [::Gapic::
|
642
|
+
# @return [::Gapic::GenericLRO::Operation]
|
526
643
|
#
|
527
644
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
528
645
|
def set_url_map request, options = nil
|
@@ -549,7 +666,15 @@ module Google
|
|
549
666
|
metadata: @config.metadata
|
550
667
|
|
551
668
|
@region_target_https_proxies_stub.set_url_map request, options do |result, response|
|
552
|
-
result = ::
|
669
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
670
|
+
operation: result,
|
671
|
+
client: region_operations,
|
672
|
+
request_values: {
|
673
|
+
"project" => request.project,
|
674
|
+
"region" => request.region
|
675
|
+
},
|
676
|
+
options: options
|
677
|
+
)
|
553
678
|
yield result, response if block_given?
|
554
679
|
return result
|
555
680
|
end
|
@@ -678,6 +803,11 @@ module Google
|
|
678
803
|
#
|
679
804
|
attr_reader :list
|
680
805
|
##
|
806
|
+
# RPC-specific configuration for `patch`
|
807
|
+
# @return [::Gapic::Config::Method]
|
808
|
+
#
|
809
|
+
attr_reader :patch
|
810
|
+
##
|
681
811
|
# RPC-specific configuration for `set_ssl_certificates`
|
682
812
|
# @return [::Gapic::Config::Method]
|
683
813
|
#
|
@@ -698,6 +828,8 @@ module Google
|
|
698
828
|
@insert = ::Gapic::Config::Method.new insert_config
|
699
829
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
700
830
|
@list = ::Gapic::Config::Method.new list_config
|
831
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
832
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
701
833
|
set_ssl_certificates_config = parent_rpcs.set_ssl_certificates if parent_rpcs.respond_to? :set_ssl_certificates
|
702
834
|
@set_ssl_certificates = ::Gapic::Config::Method.new set_ssl_certificates_config
|
703
835
|
set_url_map_config = parent_rpcs.set_url_map if parent_rpcs.respond_to? :set_url_map
|
@@ -221,6 +221,52 @@ module Google
|
|
221
221
|
[uri, body, query_string_params]
|
222
222
|
end
|
223
223
|
|
224
|
+
##
|
225
|
+
# Baseline implementation for the patch REST call
|
226
|
+
#
|
227
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest]
|
228
|
+
# A request object representing the call parameters. Required.
|
229
|
+
# @param options [::Gapic::CallOptions]
|
230
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
231
|
+
#
|
232
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
233
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
234
|
+
# @yieldparam response [::Faraday::Response]
|
235
|
+
#
|
236
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
237
|
+
# A result object deserialized from the server's reply
|
238
|
+
def patch request_pb, options = nil
|
239
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
240
|
+
|
241
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
242
|
+
response = @client_stub.make_patch_request(
|
243
|
+
uri: uri,
|
244
|
+
body: body,
|
245
|
+
params: query_string_params,
|
246
|
+
options: options
|
247
|
+
)
|
248
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
249
|
+
|
250
|
+
yield result, response if block_given?
|
251
|
+
result
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# GRPC transcoding helper method for the patch REST call
|
256
|
+
#
|
257
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchRegionTargetHttpsProxyRequest]
|
258
|
+
# A request object representing the call parameters. Required.
|
259
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
260
|
+
# Uri, Body, Query string parameters
|
261
|
+
def transcode_patch_request request_pb
|
262
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/targetHttpsProxies/#{request_pb.target_https_proxy}"
|
263
|
+
body = request_pb.target_https_proxy_resource.to_json
|
264
|
+
query_string_params = {}
|
265
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
266
|
+
|
267
|
+
[uri, body, query_string_params]
|
268
|
+
end
|
269
|
+
|
224
270
|
##
|
225
271
|
# Baseline implementation for the set_ssl_certificates REST call
|
226
272
|
#
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/region_url_maps/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -140,9 +141,21 @@ module Google
|
|
140
141
|
credentials = Credentials.new credentials, scope: @config.scope
|
141
142
|
end
|
142
143
|
|
144
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.endpoint = @config.endpoint
|
147
|
+
end
|
148
|
+
|
143
149
|
@region_url_maps_stub = ::Google::Cloud::Compute::V1::RegionUrlMaps::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
144
150
|
end
|
145
151
|
|
152
|
+
##
|
153
|
+
# Get the associated client for long-running operations via RegionOperations.
|
154
|
+
#
|
155
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
156
|
+
#
|
157
|
+
attr_reader :region_operations
|
158
|
+
|
146
159
|
# Service calls
|
147
160
|
|
148
161
|
##
|
@@ -174,10 +187,10 @@ module Google
|
|
174
187
|
# @param url_map [::String]
|
175
188
|
# Name of the UrlMap resource to delete.
|
176
189
|
# @yield [result, response] Access the result along with the Faraday response object
|
177
|
-
# @yieldparam result [::Gapic::
|
190
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
178
191
|
# @yieldparam response [::Faraday::Response]
|
179
192
|
#
|
180
|
-
# @return [::Gapic::
|
193
|
+
# @return [::Gapic::GenericLRO::Operation]
|
181
194
|
#
|
182
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
183
196
|
def delete request, options = nil
|
@@ -204,7 +217,15 @@ module Google
|
|
204
217
|
metadata: @config.metadata
|
205
218
|
|
206
219
|
@region_url_maps_stub.delete request, options do |result, response|
|
207
|
-
result = ::
|
220
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
221
|
+
operation: result,
|
222
|
+
client: region_operations,
|
223
|
+
request_values: {
|
224
|
+
"project" => request.project,
|
225
|
+
"region" => request.region
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
208
229
|
yield result, response if block_given?
|
209
230
|
return result
|
210
231
|
end
|
@@ -307,10 +328,10 @@ module Google
|
|
307
328
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
308
329
|
# The body resource for this request
|
309
330
|
# @yield [result, response] Access the result along with the Faraday response object
|
310
|
-
# @yieldparam result [::Gapic::
|
331
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
311
332
|
# @yieldparam response [::Faraday::Response]
|
312
333
|
#
|
313
|
-
# @return [::Gapic::
|
334
|
+
# @return [::Gapic::GenericLRO::Operation]
|
314
335
|
#
|
315
336
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
316
337
|
def insert request, options = nil
|
@@ -337,7 +358,15 @@ module Google
|
|
337
358
|
metadata: @config.metadata
|
338
359
|
|
339
360
|
@region_url_maps_stub.insert request, options do |result, response|
|
340
|
-
result = ::
|
361
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
362
|
+
operation: result,
|
363
|
+
client: region_operations,
|
364
|
+
request_values: {
|
365
|
+
"project" => request.project,
|
366
|
+
"region" => request.region
|
367
|
+
},
|
368
|
+
options: options
|
369
|
+
)
|
341
370
|
yield result, response if block_given?
|
342
371
|
return result
|
343
372
|
end
|
@@ -367,7 +396,7 @@ module Google
|
|
367
396
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
368
397
|
#
|
369
398
|
# @param filter [::String]
|
370
|
-
# A filter expression that filters resources listed in the response.
|
399
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
371
400
|
# @param max_results [::Integer]
|
372
401
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
373
402
|
# @param order_by [::String]
|
@@ -451,10 +480,10 @@ module Google
|
|
451
480
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
452
481
|
# The body resource for this request
|
453
482
|
# @yield [result, response] Access the result along with the Faraday response object
|
454
|
-
# @yieldparam result [::Gapic::
|
483
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
455
484
|
# @yieldparam response [::Faraday::Response]
|
456
485
|
#
|
457
|
-
# @return [::Gapic::
|
486
|
+
# @return [::Gapic::GenericLRO::Operation]
|
458
487
|
#
|
459
488
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
460
489
|
def patch request, options = nil
|
@@ -481,7 +510,15 @@ module Google
|
|
481
510
|
metadata: @config.metadata
|
482
511
|
|
483
512
|
@region_url_maps_stub.patch request, options do |result, response|
|
484
|
-
result = ::
|
513
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
514
|
+
operation: result,
|
515
|
+
client: region_operations,
|
516
|
+
request_values: {
|
517
|
+
"project" => request.project,
|
518
|
+
"region" => request.region
|
519
|
+
},
|
520
|
+
options: options
|
521
|
+
)
|
485
522
|
yield result, response if block_given?
|
486
523
|
return result
|
487
524
|
end
|
@@ -521,10 +558,10 @@ module Google
|
|
521
558
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
522
559
|
# The body resource for this request
|
523
560
|
# @yield [result, response] Access the result along with the Faraday response object
|
524
|
-
# @yieldparam result [::Gapic::
|
561
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
525
562
|
# @yieldparam response [::Faraday::Response]
|
526
563
|
#
|
527
|
-
# @return [::Gapic::
|
564
|
+
# @return [::Gapic::GenericLRO::Operation]
|
528
565
|
#
|
529
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
530
567
|
def update request, options = nil
|
@@ -551,7 +588,15 @@ module Google
|
|
551
588
|
metadata: @config.metadata
|
552
589
|
|
553
590
|
@region_url_maps_stub.update request, options do |result, response|
|
554
|
-
result = ::
|
591
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
592
|
+
operation: result,
|
593
|
+
client: region_operations,
|
594
|
+
request_values: {
|
595
|
+
"project" => request.project,
|
596
|
+
"region" => request.region
|
597
|
+
},
|
598
|
+
options: options
|
599
|
+
)
|
555
600
|
yield result, response if block_given?
|
556
601
|
return result
|
557
602
|
end
|
@@ -219,7 +219,7 @@ module Google
|
|
219
219
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
220
220
|
#
|
221
221
|
# @param filter [::String]
|
222
|
-
# A filter expression that filters resources listed in the response.
|
222
|
+
# A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
|
223
223
|
# @param max_results [::Integer]
|
224
224
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
225
225
|
# @param order_by [::String]
|