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/target_https_proxies/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -85,6 +86,8 @@ module Google
|
|
85
86
|
|
86
87
|
default_config.rpcs.patch.timeout = 600.0
|
87
88
|
|
89
|
+
default_config.rpcs.set_certificate_map.timeout = 600.0
|
90
|
+
|
88
91
|
default_config.rpcs.set_quic_override.timeout = 600.0
|
89
92
|
|
90
93
|
default_config.rpcs.set_ssl_certificates.timeout = 600.0
|
@@ -149,9 +152,21 @@ module Google
|
|
149
152
|
credentials = Credentials.new credentials, scope: @config.scope
|
150
153
|
end
|
151
154
|
|
155
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
156
|
+
config.credentials = credentials
|
157
|
+
config.endpoint = @config.endpoint
|
158
|
+
end
|
159
|
+
|
152
160
|
@target_https_proxies_stub = ::Google::Cloud::Compute::V1::TargetHttpsProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
153
161
|
end
|
154
162
|
|
163
|
+
##
|
164
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
165
|
+
#
|
166
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
167
|
+
#
|
168
|
+
attr_reader :global_operations
|
169
|
+
|
155
170
|
# Service calls
|
156
171
|
|
157
172
|
##
|
@@ -175,7 +190,7 @@ module Google
|
|
175
190
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
176
191
|
#
|
177
192
|
# @param filter [::String]
|
178
|
-
# A filter expression that filters resources listed in the response.
|
193
|
+
# 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`.
|
179
194
|
# @param include_all_scopes [::Boolean]
|
180
195
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
181
196
|
# @param max_results [::Integer]
|
@@ -255,10 +270,10 @@ module Google
|
|
255
270
|
# @param target_https_proxy [::String]
|
256
271
|
# Name of the TargetHttpsProxy resource to delete.
|
257
272
|
# @yield [result, response] Access the result along with the Faraday response object
|
258
|
-
# @yieldparam result [::Gapic::
|
273
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
259
274
|
# @yieldparam response [::Faraday::Response]
|
260
275
|
#
|
261
|
-
# @return [::Gapic::
|
276
|
+
# @return [::Gapic::GenericLRO::Operation]
|
262
277
|
#
|
263
278
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
264
279
|
def delete request, options = nil
|
@@ -285,7 +300,14 @@ module Google
|
|
285
300
|
metadata: @config.metadata
|
286
301
|
|
287
302
|
@target_https_proxies_stub.delete request, options do |result, response|
|
288
|
-
result = ::
|
303
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
304
|
+
operation: result,
|
305
|
+
client: global_operations,
|
306
|
+
request_values: {
|
307
|
+
"project" => request.project
|
308
|
+
},
|
309
|
+
options: options
|
310
|
+
)
|
289
311
|
yield result, response if block_given?
|
290
312
|
return result
|
291
313
|
end
|
@@ -384,10 +406,10 @@ module Google
|
|
384
406
|
# @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
|
385
407
|
# The body resource for this request
|
386
408
|
# @yield [result, response] Access the result along with the Faraday response object
|
387
|
-
# @yieldparam result [::Gapic::
|
409
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
388
410
|
# @yieldparam response [::Faraday::Response]
|
389
411
|
#
|
390
|
-
# @return [::Gapic::
|
412
|
+
# @return [::Gapic::GenericLRO::Operation]
|
391
413
|
#
|
392
414
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
393
415
|
def insert request, options = nil
|
@@ -414,7 +436,14 @@ module Google
|
|
414
436
|
metadata: @config.metadata
|
415
437
|
|
416
438
|
@target_https_proxies_stub.insert request, options do |result, response|
|
417
|
-
result = ::
|
439
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
440
|
+
operation: result,
|
441
|
+
client: global_operations,
|
442
|
+
request_values: {
|
443
|
+
"project" => request.project
|
444
|
+
},
|
445
|
+
options: options
|
446
|
+
)
|
418
447
|
yield result, response if block_given?
|
419
448
|
return result
|
420
449
|
end
|
@@ -444,7 +473,7 @@ module Google
|
|
444
473
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
445
474
|
#
|
446
475
|
# @param filter [::String]
|
447
|
-
# A filter expression that filters resources listed in the response.
|
476
|
+
# 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`.
|
448
477
|
# @param max_results [::Integer]
|
449
478
|
# 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`)
|
450
479
|
# @param order_by [::String]
|
@@ -524,10 +553,10 @@ module Google
|
|
524
553
|
# @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
|
525
554
|
# The body resource for this request
|
526
555
|
# @yield [result, response] Access the result along with the Faraday response object
|
527
|
-
# @yieldparam result [::Gapic::
|
556
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
528
557
|
# @yieldparam response [::Faraday::Response]
|
529
558
|
#
|
530
|
-
# @return [::Gapic::
|
559
|
+
# @return [::Gapic::GenericLRO::Operation]
|
531
560
|
#
|
532
561
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
533
562
|
def patch request, options = nil
|
@@ -554,7 +583,89 @@ module Google
|
|
554
583
|
metadata: @config.metadata
|
555
584
|
|
556
585
|
@target_https_proxies_stub.patch request, options do |result, response|
|
557
|
-
result = ::
|
586
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
587
|
+
operation: result,
|
588
|
+
client: global_operations,
|
589
|
+
request_values: {
|
590
|
+
"project" => request.project
|
591
|
+
},
|
592
|
+
options: options
|
593
|
+
)
|
594
|
+
yield result, response if block_given?
|
595
|
+
return result
|
596
|
+
end
|
597
|
+
rescue ::Faraday::Error => e
|
598
|
+
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
599
|
+
raise ::Google::Cloud::Error.from_error(gapic_error)
|
600
|
+
end
|
601
|
+
|
602
|
+
##
|
603
|
+
# Changes the Certificate Map for TargetHttpsProxy.
|
604
|
+
#
|
605
|
+
# @overload set_certificate_map(request, options = nil)
|
606
|
+
# Pass arguments to `set_certificate_map` via a request object, either of type
|
607
|
+
# {::Google::Cloud::Compute::V1::SetCertificateMapTargetHttpsProxyRequest} or an equivalent Hash.
|
608
|
+
#
|
609
|
+
# @param request [::Google::Cloud::Compute::V1::SetCertificateMapTargetHttpsProxyRequest, ::Hash]
|
610
|
+
# A request object representing the call parameters. Required. To specify no
|
611
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
612
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
613
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
614
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
615
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
616
|
+
#
|
617
|
+
# @overload set_certificate_map(project: nil, request_id: nil, target_https_proxies_set_certificate_map_request_resource: nil, target_https_proxy: nil)
|
618
|
+
# Pass arguments to `set_certificate_map` via keyword arguments. Note that at
|
619
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
620
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
621
|
+
#
|
622
|
+
# @param project [::String]
|
623
|
+
# Project ID for this request.
|
624
|
+
# @param request_id [::String]
|
625
|
+
# 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).
|
626
|
+
# @param target_https_proxies_set_certificate_map_request_resource [::Google::Cloud::Compute::V1::TargetHttpsProxiesSetCertificateMapRequest, ::Hash]
|
627
|
+
# The body resource for this request
|
628
|
+
# @param target_https_proxy [::String]
|
629
|
+
# Name of the TargetHttpsProxy resource whose CertificateMap is to be set. The name must be 1-63 characters long, and comply with RFC1035.
|
630
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
631
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
632
|
+
# @yieldparam response [::Faraday::Response]
|
633
|
+
#
|
634
|
+
# @return [::Gapic::GenericLRO::Operation]
|
635
|
+
#
|
636
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
637
|
+
def set_certificate_map request, options = nil
|
638
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
639
|
+
|
640
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetCertificateMapTargetHttpsProxyRequest
|
641
|
+
|
642
|
+
# Converts hash and nil to an options object
|
643
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
644
|
+
|
645
|
+
# Customize the options with defaults
|
646
|
+
call_metadata = @config.rpcs.set_certificate_map.metadata.to_h
|
647
|
+
|
648
|
+
# Set x-goog-api-client header
|
649
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
650
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
651
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
652
|
+
transports_version_send: [:rest]
|
653
|
+
|
654
|
+
options.apply_defaults timeout: @config.rpcs.set_certificate_map.timeout,
|
655
|
+
metadata: call_metadata
|
656
|
+
|
657
|
+
options.apply_defaults timeout: @config.timeout,
|
658
|
+
metadata: @config.metadata
|
659
|
+
|
660
|
+
@target_https_proxies_stub.set_certificate_map request, options do |result, response|
|
661
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
662
|
+
operation: result,
|
663
|
+
client: global_operations,
|
664
|
+
request_values: {
|
665
|
+
"project" => request.project
|
666
|
+
},
|
667
|
+
options: options
|
668
|
+
)
|
558
669
|
yield result, response if block_given?
|
559
670
|
return result
|
560
671
|
end
|
@@ -592,10 +703,10 @@ module Google
|
|
592
703
|
# @param target_https_proxy [::String]
|
593
704
|
# Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.
|
594
705
|
# @yield [result, response] Access the result along with the Faraday response object
|
595
|
-
# @yieldparam result [::Gapic::
|
706
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
596
707
|
# @yieldparam response [::Faraday::Response]
|
597
708
|
#
|
598
|
-
# @return [::Gapic::
|
709
|
+
# @return [::Gapic::GenericLRO::Operation]
|
599
710
|
#
|
600
711
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
601
712
|
def set_quic_override request, options = nil
|
@@ -622,7 +733,14 @@ module Google
|
|
622
733
|
metadata: @config.metadata
|
623
734
|
|
624
735
|
@target_https_proxies_stub.set_quic_override request, options do |result, response|
|
625
|
-
result = ::
|
736
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
737
|
+
operation: result,
|
738
|
+
client: global_operations,
|
739
|
+
request_values: {
|
740
|
+
"project" => request.project
|
741
|
+
},
|
742
|
+
options: options
|
743
|
+
)
|
626
744
|
yield result, response if block_given?
|
627
745
|
return result
|
628
746
|
end
|
@@ -660,10 +778,10 @@ module Google
|
|
660
778
|
# @param target_https_proxy [::String]
|
661
779
|
# Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
|
662
780
|
# @yield [result, response] Access the result along with the Faraday response object
|
663
|
-
# @yieldparam result [::Gapic::
|
781
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
664
782
|
# @yieldparam response [::Faraday::Response]
|
665
783
|
#
|
666
|
-
# @return [::Gapic::
|
784
|
+
# @return [::Gapic::GenericLRO::Operation]
|
667
785
|
#
|
668
786
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
669
787
|
def set_ssl_certificates request, options = nil
|
@@ -690,7 +808,14 @@ module Google
|
|
690
808
|
metadata: @config.metadata
|
691
809
|
|
692
810
|
@target_https_proxies_stub.set_ssl_certificates request, options do |result, response|
|
693
|
-
result = ::
|
811
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
812
|
+
operation: result,
|
813
|
+
client: global_operations,
|
814
|
+
request_values: {
|
815
|
+
"project" => request.project
|
816
|
+
},
|
817
|
+
options: options
|
818
|
+
)
|
694
819
|
yield result, response if block_given?
|
695
820
|
return result
|
696
821
|
end
|
@@ -728,10 +853,10 @@ module Google
|
|
728
853
|
# @param target_https_proxy [::String]
|
729
854
|
# Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
|
730
855
|
# @yield [result, response] Access the result along with the Faraday response object
|
731
|
-
# @yieldparam result [::Gapic::
|
856
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
732
857
|
# @yieldparam response [::Faraday::Response]
|
733
858
|
#
|
734
|
-
# @return [::Gapic::
|
859
|
+
# @return [::Gapic::GenericLRO::Operation]
|
735
860
|
#
|
736
861
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
737
862
|
def set_ssl_policy request, options = nil
|
@@ -758,7 +883,14 @@ module Google
|
|
758
883
|
metadata: @config.metadata
|
759
884
|
|
760
885
|
@target_https_proxies_stub.set_ssl_policy request, options do |result, response|
|
761
|
-
result = ::
|
886
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
887
|
+
operation: result,
|
888
|
+
client: global_operations,
|
889
|
+
request_values: {
|
890
|
+
"project" => request.project
|
891
|
+
},
|
892
|
+
options: options
|
893
|
+
)
|
762
894
|
yield result, response if block_given?
|
763
895
|
return result
|
764
896
|
end
|
@@ -796,10 +928,10 @@ module Google
|
|
796
928
|
# @param url_map_reference_resource [::Google::Cloud::Compute::V1::UrlMapReference, ::Hash]
|
797
929
|
# The body resource for this request
|
798
930
|
# @yield [result, response] Access the result along with the Faraday response object
|
799
|
-
# @yieldparam result [::Gapic::
|
931
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
800
932
|
# @yieldparam response [::Faraday::Response]
|
801
933
|
#
|
802
|
-
# @return [::Gapic::
|
934
|
+
# @return [::Gapic::GenericLRO::Operation]
|
803
935
|
#
|
804
936
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
805
937
|
def set_url_map request, options = nil
|
@@ -826,7 +958,14 @@ module Google
|
|
826
958
|
metadata: @config.metadata
|
827
959
|
|
828
960
|
@target_https_proxies_stub.set_url_map request, options do |result, response|
|
829
|
-
result = ::
|
961
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
962
|
+
operation: result,
|
963
|
+
client: global_operations,
|
964
|
+
request_values: {
|
965
|
+
"project" => request.project
|
966
|
+
},
|
967
|
+
options: options
|
968
|
+
)
|
830
969
|
yield result, response if block_given?
|
831
970
|
return result
|
832
971
|
end
|
@@ -965,6 +1104,11 @@ module Google
|
|
965
1104
|
#
|
966
1105
|
attr_reader :patch
|
967
1106
|
##
|
1107
|
+
# RPC-specific configuration for `set_certificate_map`
|
1108
|
+
# @return [::Gapic::Config::Method]
|
1109
|
+
#
|
1110
|
+
attr_reader :set_certificate_map
|
1111
|
+
##
|
968
1112
|
# RPC-specific configuration for `set_quic_override`
|
969
1113
|
# @return [::Gapic::Config::Method]
|
970
1114
|
#
|
@@ -999,6 +1143,8 @@ module Google
|
|
999
1143
|
@list = ::Gapic::Config::Method.new list_config
|
1000
1144
|
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1001
1145
|
@patch = ::Gapic::Config::Method.new patch_config
|
1146
|
+
set_certificate_map_config = parent_rpcs.set_certificate_map if parent_rpcs.respond_to? :set_certificate_map
|
1147
|
+
@set_certificate_map = ::Gapic::Config::Method.new set_certificate_map_config
|
1002
1148
|
set_quic_override_config = parent_rpcs.set_quic_override if parent_rpcs.respond_to? :set_quic_override
|
1003
1149
|
@set_quic_override = ::Gapic::Config::Method.new set_quic_override_config
|
1004
1150
|
set_ssl_certificates_config = parent_rpcs.set_ssl_certificates if parent_rpcs.respond_to? :set_ssl_certificates
|
@@ -317,6 +317,52 @@ module Google
|
|
317
317
|
[uri, body, query_string_params]
|
318
318
|
end
|
319
319
|
|
320
|
+
##
|
321
|
+
# Baseline implementation for the set_certificate_map REST call
|
322
|
+
#
|
323
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetCertificateMapTargetHttpsProxyRequest]
|
324
|
+
# A request object representing the call parameters. Required.
|
325
|
+
# @param options [::Gapic::CallOptions]
|
326
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
327
|
+
#
|
328
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
329
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
330
|
+
# @yieldparam response [::Faraday::Response]
|
331
|
+
#
|
332
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
333
|
+
# A result object deserialized from the server's reply
|
334
|
+
def set_certificate_map request_pb, options = nil
|
335
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
336
|
+
|
337
|
+
uri, body, query_string_params = transcode_set_certificate_map_request request_pb
|
338
|
+
response = @client_stub.make_post_request(
|
339
|
+
uri: uri,
|
340
|
+
body: body,
|
341
|
+
params: query_string_params,
|
342
|
+
options: options
|
343
|
+
)
|
344
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
345
|
+
|
346
|
+
yield result, response if block_given?
|
347
|
+
result
|
348
|
+
end
|
349
|
+
|
350
|
+
##
|
351
|
+
# GRPC transcoding helper method for the set_certificate_map REST call
|
352
|
+
#
|
353
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetCertificateMapTargetHttpsProxyRequest]
|
354
|
+
# A request object representing the call parameters. Required.
|
355
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
356
|
+
# Uri, Body, Query string parameters
|
357
|
+
def transcode_set_certificate_map_request request_pb
|
358
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/targetHttpsProxies/#{request_pb.target_https_proxy}/setCertificateMap"
|
359
|
+
body = request_pb.target_https_proxies_set_certificate_map_request_resource.to_json
|
360
|
+
query_string_params = {}
|
361
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
362
|
+
|
363
|
+
[uri, body, query_string_params]
|
364
|
+
end
|
365
|
+
|
320
366
|
##
|
321
367
|
# Baseline implementation for the set_quic_override REST call
|
322
368
|
#
|
@@ -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/target_instances/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -139,9 +140,21 @@ module Google
|
|
139
140
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
141
|
end
|
141
142
|
|
143
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
144
|
+
config.credentials = credentials
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
142
148
|
@target_instances_stub = ::Google::Cloud::Compute::V1::TargetInstances::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
143
149
|
end
|
144
150
|
|
151
|
+
##
|
152
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
153
|
+
#
|
154
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
155
|
+
#
|
156
|
+
attr_reader :zone_operations
|
157
|
+
|
145
158
|
# Service calls
|
146
159
|
|
147
160
|
##
|
@@ -165,7 +178,7 @@ module Google
|
|
165
178
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
166
179
|
#
|
167
180
|
# @param filter [::String]
|
168
|
-
# A filter expression that filters resources listed in the response.
|
181
|
+
# 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`.
|
169
182
|
# @param include_all_scopes [::Boolean]
|
170
183
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
171
184
|
# @param max_results [::Integer]
|
@@ -247,10 +260,10 @@ module Google
|
|
247
260
|
# @param zone [::String]
|
248
261
|
# Name of the zone scoping this request.
|
249
262
|
# @yield [result, response] Access the result along with the Faraday response object
|
250
|
-
# @yieldparam result [::Gapic::
|
263
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
251
264
|
# @yieldparam response [::Faraday::Response]
|
252
265
|
#
|
253
|
-
# @return [::Gapic::
|
266
|
+
# @return [::Gapic::GenericLRO::Operation]
|
254
267
|
#
|
255
268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
269
|
def delete request, options = nil
|
@@ -277,7 +290,15 @@ module Google
|
|
277
290
|
metadata: @config.metadata
|
278
291
|
|
279
292
|
@target_instances_stub.delete request, options do |result, response|
|
280
|
-
result = ::
|
293
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
294
|
+
operation: result,
|
295
|
+
client: zone_operations,
|
296
|
+
request_values: {
|
297
|
+
"project" => request.project,
|
298
|
+
"zone" => request.zone
|
299
|
+
},
|
300
|
+
options: options
|
301
|
+
)
|
281
302
|
yield result, response if block_given?
|
282
303
|
return result
|
283
304
|
end
|
@@ -380,10 +401,10 @@ module Google
|
|
380
401
|
# @param zone [::String]
|
381
402
|
# Name of the zone scoping this request.
|
382
403
|
# @yield [result, response] Access the result along with the Faraday response object
|
383
|
-
# @yieldparam result [::Gapic::
|
404
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
384
405
|
# @yieldparam response [::Faraday::Response]
|
385
406
|
#
|
386
|
-
# @return [::Gapic::
|
407
|
+
# @return [::Gapic::GenericLRO::Operation]
|
387
408
|
#
|
388
409
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
389
410
|
def insert request, options = nil
|
@@ -410,7 +431,15 @@ module Google
|
|
410
431
|
metadata: @config.metadata
|
411
432
|
|
412
433
|
@target_instances_stub.insert request, options do |result, response|
|
413
|
-
result = ::
|
434
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
435
|
+
operation: result,
|
436
|
+
client: zone_operations,
|
437
|
+
request_values: {
|
438
|
+
"project" => request.project,
|
439
|
+
"zone" => request.zone
|
440
|
+
},
|
441
|
+
options: options
|
442
|
+
)
|
414
443
|
yield result, response if block_given?
|
415
444
|
return result
|
416
445
|
end
|
@@ -440,7 +469,7 @@ module Google
|
|
440
469
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
441
470
|
#
|
442
471
|
# @param filter [::String]
|
443
|
-
# A filter expression that filters resources listed in the response.
|
472
|
+
# 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`.
|
444
473
|
# @param max_results [::Integer]
|
445
474
|
# 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`)
|
446
475
|
# @param order_by [::String]
|