google-cloud-compute-v1 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +421 -1
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +420 -3
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +292 -3
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +289 -1
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +114 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +49 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +16 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +177 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +327 -6
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +149 -4
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +845 -4
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +206 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +32 -0
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +236 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +83 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +149 -4
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +257 -1
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +178 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +229 -4
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +210 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +282 -4
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +304 -3
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +445 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +273 -1
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +308 -4
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +66 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +16 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +378 -4
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +273 -1
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +497 -5
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +98 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +164 -3
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +261 -4
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +203 -6
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +129 -1
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +117 -4
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +197 -4
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +180 -3
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +188 -3
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +284 -3
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +145 -1
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +100 -3
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +100 -3
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +11 -5
@@ -77,6 +77,11 @@ module Google
|
|
77
77
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
78
78
|
}
|
79
79
|
|
80
|
+
default_config.rpcs.get_nat_ip_info.timeout = 600.0
|
81
|
+
default_config.rpcs.get_nat_ip_info.retry_policy = {
|
82
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
83
|
+
}
|
84
|
+
|
80
85
|
default_config.rpcs.get_nat_mapping_info.timeout = 600.0
|
81
86
|
default_config.rpcs.get_nat_mapping_info.retry_policy = {
|
82
87
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
@@ -195,13 +200,13 @@ module Google
|
|
195
200
|
# @param options [::Gapic::CallOptions, ::Hash]
|
196
201
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
197
202
|
#
|
198
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
203
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
|
199
204
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
200
205
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
201
206
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
202
207
|
#
|
203
208
|
# @param filter [::String]
|
204
|
-
# 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
|
209
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
205
210
|
# @param include_all_scopes [::Boolean]
|
206
211
|
# 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.
|
207
212
|
# @param max_results [::Integer]
|
@@ -214,6 +219,7 @@ module Google
|
|
214
219
|
# Project ID for this request.
|
215
220
|
# @param return_partial_success [::Boolean]
|
216
221
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
222
|
+
# @param service_project_number [::Integer]
|
217
223
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
218
224
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::RoutersScopedList>]
|
219
225
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -221,6 +227,22 @@ module Google
|
|
221
227
|
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::RoutersScopedList>]
|
222
228
|
#
|
223
229
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
230
|
+
#
|
231
|
+
# @example Basic example
|
232
|
+
# require "google/cloud/compute/v1"
|
233
|
+
#
|
234
|
+
# # Create a client object. The client can be reused for multiple calls.
|
235
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
236
|
+
#
|
237
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
238
|
+
# request = Google::Cloud::Compute::V1::AggregatedListRoutersRequest.new
|
239
|
+
#
|
240
|
+
# # Call the aggregated_list method.
|
241
|
+
# result = client.aggregated_list request
|
242
|
+
#
|
243
|
+
# # The returned object is of type Google::Cloud::Compute::V1::RouterAggregatedList.
|
244
|
+
# p result
|
245
|
+
#
|
224
246
|
def aggregated_list request, options = nil
|
225
247
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
226
248
|
|
@@ -290,6 +312,22 @@ module Google
|
|
290
312
|
# @return [::Gapic::GenericLRO::Operation]
|
291
313
|
#
|
292
314
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
315
|
+
#
|
316
|
+
# @example Basic example
|
317
|
+
# require "google/cloud/compute/v1"
|
318
|
+
#
|
319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
320
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
321
|
+
#
|
322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
323
|
+
# request = Google::Cloud::Compute::V1::DeleteRouterRequest.new
|
324
|
+
#
|
325
|
+
# # Call the delete method.
|
326
|
+
# result = client.delete request
|
327
|
+
#
|
328
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
329
|
+
# p result
|
330
|
+
#
|
293
331
|
def delete request, options = nil
|
294
332
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
295
333
|
|
@@ -365,6 +403,22 @@ module Google
|
|
365
403
|
# @return [::Google::Cloud::Compute::V1::Router]
|
366
404
|
#
|
367
405
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
406
|
+
#
|
407
|
+
# @example Basic example
|
408
|
+
# require "google/cloud/compute/v1"
|
409
|
+
#
|
410
|
+
# # Create a client object. The client can be reused for multiple calls.
|
411
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
412
|
+
#
|
413
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
414
|
+
# request = Google::Cloud::Compute::V1::GetRouterRequest.new
|
415
|
+
#
|
416
|
+
# # Call the get method.
|
417
|
+
# result = client.get request
|
418
|
+
#
|
419
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Router.
|
420
|
+
# p result
|
421
|
+
#
|
368
422
|
def get request, options = nil
|
369
423
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
370
424
|
|
@@ -400,6 +454,90 @@ module Google
|
|
400
454
|
raise ::Google::Cloud::Error.from_error(e)
|
401
455
|
end
|
402
456
|
|
457
|
+
##
|
458
|
+
# Retrieves runtime NAT IP information.
|
459
|
+
#
|
460
|
+
# @overload get_nat_ip_info(request, options = nil)
|
461
|
+
# Pass arguments to `get_nat_ip_info` via a request object, either of type
|
462
|
+
# {::Google::Cloud::Compute::V1::GetNatIpInfoRouterRequest} or an equivalent Hash.
|
463
|
+
#
|
464
|
+
# @param request [::Google::Cloud::Compute::V1::GetNatIpInfoRouterRequest, ::Hash]
|
465
|
+
# A request object representing the call parameters. Required. To specify no
|
466
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
467
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
468
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
469
|
+
#
|
470
|
+
# @overload get_nat_ip_info(nat_name: nil, project: nil, region: nil, router: nil)
|
471
|
+
# Pass arguments to `get_nat_ip_info` via keyword arguments. Note that at
|
472
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
473
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
474
|
+
#
|
475
|
+
# @param nat_name [::String]
|
476
|
+
# Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.
|
477
|
+
# @param project [::String]
|
478
|
+
# Project ID for this request.
|
479
|
+
# @param region [::String]
|
480
|
+
# Name of the region for this request.
|
481
|
+
# @param router [::String]
|
482
|
+
# Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.
|
483
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
484
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::NatIpInfoResponse]
|
485
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
486
|
+
#
|
487
|
+
# @return [::Google::Cloud::Compute::V1::NatIpInfoResponse]
|
488
|
+
#
|
489
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
490
|
+
#
|
491
|
+
# @example Basic example
|
492
|
+
# require "google/cloud/compute/v1"
|
493
|
+
#
|
494
|
+
# # Create a client object. The client can be reused for multiple calls.
|
495
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
496
|
+
#
|
497
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
498
|
+
# request = Google::Cloud::Compute::V1::GetNatIpInfoRouterRequest.new
|
499
|
+
#
|
500
|
+
# # Call the get_nat_ip_info method.
|
501
|
+
# result = client.get_nat_ip_info request
|
502
|
+
#
|
503
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NatIpInfoResponse.
|
504
|
+
# p result
|
505
|
+
#
|
506
|
+
def get_nat_ip_info request, options = nil
|
507
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
508
|
+
|
509
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetNatIpInfoRouterRequest
|
510
|
+
|
511
|
+
# Converts hash and nil to an options object
|
512
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
513
|
+
|
514
|
+
# Customize the options with defaults
|
515
|
+
call_metadata = @config.rpcs.get_nat_ip_info.metadata.to_h
|
516
|
+
|
517
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
518
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
519
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
520
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
521
|
+
transports_version_send: [:rest]
|
522
|
+
|
523
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
524
|
+
|
525
|
+
options.apply_defaults timeout: @config.rpcs.get_nat_ip_info.timeout,
|
526
|
+
metadata: call_metadata,
|
527
|
+
retry_policy: @config.rpcs.get_nat_ip_info.retry_policy
|
528
|
+
|
529
|
+
options.apply_defaults timeout: @config.timeout,
|
530
|
+
metadata: @config.metadata,
|
531
|
+
retry_policy: @config.retry_policy
|
532
|
+
|
533
|
+
@routers_stub.get_nat_ip_info request, options do |result, operation|
|
534
|
+
yield result, operation if block_given?
|
535
|
+
return result
|
536
|
+
end
|
537
|
+
rescue ::Gapic::Rest::Error => e
|
538
|
+
raise ::Google::Cloud::Error.from_error(e)
|
539
|
+
end
|
540
|
+
|
403
541
|
##
|
404
542
|
# Retrieves runtime Nat mapping information of VM endpoints.
|
405
543
|
#
|
@@ -419,7 +557,7 @@ module Google
|
|
419
557
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
420
558
|
#
|
421
559
|
# @param filter [::String]
|
422
|
-
# 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
|
560
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
423
561
|
# @param max_results [::Integer]
|
424
562
|
# 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`)
|
425
563
|
# @param nat_name [::String]
|
@@ -443,6 +581,22 @@ module Google
|
|
443
581
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::VmEndpointNatMappings>]
|
444
582
|
#
|
445
583
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
584
|
+
#
|
585
|
+
# @example Basic example
|
586
|
+
# require "google/cloud/compute/v1"
|
587
|
+
#
|
588
|
+
# # Create a client object. The client can be reused for multiple calls.
|
589
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
590
|
+
#
|
591
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
592
|
+
# request = Google::Cloud::Compute::V1::GetNatMappingInfoRoutersRequest.new
|
593
|
+
#
|
594
|
+
# # Call the get_nat_mapping_info method.
|
595
|
+
# result = client.get_nat_mapping_info request
|
596
|
+
#
|
597
|
+
# # The returned object is of type Google::Cloud::Compute::V1::VmEndpointNatMappingsList.
|
598
|
+
# p result
|
599
|
+
#
|
446
600
|
def get_nat_mapping_info request, options = nil
|
447
601
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
448
602
|
|
@@ -510,6 +664,22 @@ module Google
|
|
510
664
|
# @return [::Google::Cloud::Compute::V1::RouterStatusResponse]
|
511
665
|
#
|
512
666
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
667
|
+
#
|
668
|
+
# @example Basic example
|
669
|
+
# require "google/cloud/compute/v1"
|
670
|
+
#
|
671
|
+
# # Create a client object. The client can be reused for multiple calls.
|
672
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
673
|
+
#
|
674
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
675
|
+
# request = Google::Cloud::Compute::V1::GetRouterStatusRouterRequest.new
|
676
|
+
#
|
677
|
+
# # Call the get_router_status method.
|
678
|
+
# result = client.get_router_status request
|
679
|
+
#
|
680
|
+
# # The returned object is of type Google::Cloud::Compute::V1::RouterStatusResponse.
|
681
|
+
# p result
|
682
|
+
#
|
513
683
|
def get_router_status request, options = nil
|
514
684
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
515
685
|
|
@@ -578,6 +748,22 @@ module Google
|
|
578
748
|
# @return [::Gapic::GenericLRO::Operation]
|
579
749
|
#
|
580
750
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
751
|
+
#
|
752
|
+
# @example Basic example
|
753
|
+
# require "google/cloud/compute/v1"
|
754
|
+
#
|
755
|
+
# # Create a client object. The client can be reused for multiple calls.
|
756
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
757
|
+
#
|
758
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
759
|
+
# request = Google::Cloud::Compute::V1::InsertRouterRequest.new
|
760
|
+
#
|
761
|
+
# # Call the insert method.
|
762
|
+
# result = client.insert request
|
763
|
+
#
|
764
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
765
|
+
# p result
|
766
|
+
#
|
581
767
|
def insert request, options = nil
|
582
768
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
583
769
|
|
@@ -641,7 +827,7 @@ module Google
|
|
641
827
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
642
828
|
#
|
643
829
|
# @param filter [::String]
|
644
|
-
# 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
|
830
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
645
831
|
# @param max_results [::Integer]
|
646
832
|
# 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`)
|
647
833
|
# @param order_by [::String]
|
@@ -661,6 +847,22 @@ module Google
|
|
661
847
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Router>]
|
662
848
|
#
|
663
849
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
850
|
+
#
|
851
|
+
# @example Basic example
|
852
|
+
# require "google/cloud/compute/v1"
|
853
|
+
#
|
854
|
+
# # Create a client object. The client can be reused for multiple calls.
|
855
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
856
|
+
#
|
857
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
858
|
+
# request = Google::Cloud::Compute::V1::ListRoutersRequest.new
|
859
|
+
#
|
860
|
+
# # Call the list method.
|
861
|
+
# result = client.list request
|
862
|
+
#
|
863
|
+
# # The returned object is of type Google::Cloud::Compute::V1::RouterList.
|
864
|
+
# p result
|
865
|
+
#
|
664
866
|
def list request, options = nil
|
665
867
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
666
868
|
|
@@ -732,6 +934,22 @@ module Google
|
|
732
934
|
# @return [::Gapic::GenericLRO::Operation]
|
733
935
|
#
|
734
936
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
937
|
+
#
|
938
|
+
# @example Basic example
|
939
|
+
# require "google/cloud/compute/v1"
|
940
|
+
#
|
941
|
+
# # Create a client object. The client can be reused for multiple calls.
|
942
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
943
|
+
#
|
944
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
945
|
+
# request = Google::Cloud::Compute::V1::PatchRouterRequest.new
|
946
|
+
#
|
947
|
+
# # Call the patch method.
|
948
|
+
# result = client.patch request
|
949
|
+
#
|
950
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
951
|
+
# p result
|
952
|
+
#
|
735
953
|
def patch request, options = nil
|
736
954
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
737
955
|
|
@@ -809,6 +1027,22 @@ module Google
|
|
809
1027
|
# @return [::Google::Cloud::Compute::V1::RoutersPreviewResponse]
|
810
1028
|
#
|
811
1029
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1030
|
+
#
|
1031
|
+
# @example Basic example
|
1032
|
+
# require "google/cloud/compute/v1"
|
1033
|
+
#
|
1034
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1035
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
1036
|
+
#
|
1037
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1038
|
+
# request = Google::Cloud::Compute::V1::PreviewRouterRequest.new
|
1039
|
+
#
|
1040
|
+
# # Call the preview method.
|
1041
|
+
# result = client.preview request
|
1042
|
+
#
|
1043
|
+
# # The returned object is of type Google::Cloud::Compute::V1::RoutersPreviewResponse.
|
1044
|
+
# p result
|
1045
|
+
#
|
812
1046
|
def preview request, options = nil
|
813
1047
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
814
1048
|
|
@@ -879,6 +1113,22 @@ module Google
|
|
879
1113
|
# @return [::Gapic::GenericLRO::Operation]
|
880
1114
|
#
|
881
1115
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1116
|
+
#
|
1117
|
+
# @example Basic example
|
1118
|
+
# require "google/cloud/compute/v1"
|
1119
|
+
#
|
1120
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1121
|
+
# client = Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
1122
|
+
#
|
1123
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1124
|
+
# request = Google::Cloud::Compute::V1::UpdateRouterRequest.new
|
1125
|
+
#
|
1126
|
+
# # Call the update method.
|
1127
|
+
# result = client.update request
|
1128
|
+
#
|
1129
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
1130
|
+
# p result
|
1131
|
+
#
|
882
1132
|
def update request, options = nil
|
883
1133
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
884
1134
|
|
@@ -1064,6 +1314,11 @@ module Google
|
|
1064
1314
|
#
|
1065
1315
|
attr_reader :get
|
1066
1316
|
##
|
1317
|
+
# RPC-specific configuration for `get_nat_ip_info`
|
1318
|
+
# @return [::Gapic::Config::Method]
|
1319
|
+
#
|
1320
|
+
attr_reader :get_nat_ip_info
|
1321
|
+
##
|
1067
1322
|
# RPC-specific configuration for `get_nat_mapping_info`
|
1068
1323
|
# @return [::Gapic::Config::Method]
|
1069
1324
|
#
|
@@ -1107,6 +1362,8 @@ module Google
|
|
1107
1362
|
@delete = ::Gapic::Config::Method.new delete_config
|
1108
1363
|
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1109
1364
|
@get = ::Gapic::Config::Method.new get_config
|
1365
|
+
get_nat_ip_info_config = parent_rpcs.get_nat_ip_info if parent_rpcs.respond_to? :get_nat_ip_info
|
1366
|
+
@get_nat_ip_info = ::Gapic::Config::Method.new get_nat_ip_info_config
|
1110
1367
|
get_nat_mapping_info_config = parent_rpcs.get_nat_mapping_info if parent_rpcs.respond_to? :get_nat_mapping_info
|
1111
1368
|
@get_nat_mapping_info = ::Gapic::Config::Method.new get_nat_mapping_info_config
|
1112
1369
|
get_router_status_config = parent_rpcs.get_router_status if parent_rpcs.respond_to? :get_router_status
|
@@ -154,6 +154,44 @@ module Google
|
|
154
154
|
result
|
155
155
|
end
|
156
156
|
|
157
|
+
##
|
158
|
+
# Baseline implementation for the get_nat_ip_info REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetNatIpInfoRouterRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::NatIpInfoResponse]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::Compute::V1::NatIpInfoResponse]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def get_nat_ip_info request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_nat_ip_info_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Cloud::Compute::V1::NatIpInfoResponse.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
157
195
|
##
|
158
196
|
# Baseline implementation for the get_nat_mapping_info REST call
|
159
197
|
#
|
@@ -487,6 +525,29 @@ module Google
|
|
487
525
|
transcoder.transcode request_pb
|
488
526
|
end
|
489
527
|
|
528
|
+
##
|
529
|
+
# @private
|
530
|
+
#
|
531
|
+
# GRPC transcoding helper method for the get_nat_ip_info REST call
|
532
|
+
#
|
533
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetNatIpInfoRouterRequest]
|
534
|
+
# A request object representing the call parameters. Required.
|
535
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
536
|
+
# Uri, Body, Query string parameters
|
537
|
+
def self.transcode_get_nat_ip_info_request request_pb
|
538
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
539
|
+
.with_bindings(
|
540
|
+
uri_method: :get,
|
541
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/routers/{router}/getNatIpInfo",
|
542
|
+
matches: [
|
543
|
+
["project", %r{^[^/]+/?$}, false],
|
544
|
+
["region", %r{^[^/]+/?$}, false],
|
545
|
+
["router", %r{^[^/]+/?$}, false]
|
546
|
+
]
|
547
|
+
)
|
548
|
+
transcoder.transcode request_pb
|
549
|
+
end
|
550
|
+
|
490
551
|
##
|
491
552
|
# @private
|
492
553
|
#
|
@@ -192,6 +192,22 @@ module Google
|
|
192
192
|
# @return [::Gapic::GenericLRO::Operation]
|
193
193
|
#
|
194
194
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
195
|
+
#
|
196
|
+
# @example Basic example
|
197
|
+
# require "google/cloud/compute/v1"
|
198
|
+
#
|
199
|
+
# # Create a client object. The client can be reused for multiple calls.
|
200
|
+
# client = Google::Cloud::Compute::V1::Routes::Rest::Client.new
|
201
|
+
#
|
202
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
203
|
+
# request = Google::Cloud::Compute::V1::DeleteRouteRequest.new
|
204
|
+
#
|
205
|
+
# # Call the delete method.
|
206
|
+
# result = client.delete request
|
207
|
+
#
|
208
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
209
|
+
# p result
|
210
|
+
#
|
195
211
|
def delete request, options = nil
|
196
212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
197
213
|
|
@@ -264,6 +280,22 @@ module Google
|
|
264
280
|
# @return [::Google::Cloud::Compute::V1::Route]
|
265
281
|
#
|
266
282
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
283
|
+
#
|
284
|
+
# @example Basic example
|
285
|
+
# require "google/cloud/compute/v1"
|
286
|
+
#
|
287
|
+
# # Create a client object. The client can be reused for multiple calls.
|
288
|
+
# client = Google::Cloud::Compute::V1::Routes::Rest::Client.new
|
289
|
+
#
|
290
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
291
|
+
# request = Google::Cloud::Compute::V1::GetRouteRequest.new
|
292
|
+
#
|
293
|
+
# # Call the get method.
|
294
|
+
# result = client.get request
|
295
|
+
#
|
296
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Route.
|
297
|
+
# p result
|
298
|
+
#
|
267
299
|
def get request, options = nil
|
268
300
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
269
301
|
|
@@ -330,6 +362,22 @@ module Google
|
|
330
362
|
# @return [::Gapic::GenericLRO::Operation]
|
331
363
|
#
|
332
364
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
365
|
+
#
|
366
|
+
# @example Basic example
|
367
|
+
# require "google/cloud/compute/v1"
|
368
|
+
#
|
369
|
+
# # Create a client object. The client can be reused for multiple calls.
|
370
|
+
# client = Google::Cloud::Compute::V1::Routes::Rest::Client.new
|
371
|
+
#
|
372
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
373
|
+
# request = Google::Cloud::Compute::V1::InsertRouteRequest.new
|
374
|
+
#
|
375
|
+
# # Call the insert method.
|
376
|
+
# result = client.insert request
|
377
|
+
#
|
378
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
379
|
+
# p result
|
380
|
+
#
|
333
381
|
def insert request, options = nil
|
334
382
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
335
383
|
|
@@ -392,7 +440,7 @@ module Google
|
|
392
440
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
393
441
|
#
|
394
442
|
# @param filter [::String]
|
395
|
-
# 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
|
443
|
+
# 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
|
396
444
|
# @param max_results [::Integer]
|
397
445
|
# 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`)
|
398
446
|
# @param order_by [::String]
|
@@ -410,6 +458,22 @@ module Google
|
|
410
458
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Route>]
|
411
459
|
#
|
412
460
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
461
|
+
#
|
462
|
+
# @example Basic example
|
463
|
+
# require "google/cloud/compute/v1"
|
464
|
+
#
|
465
|
+
# # Create a client object. The client can be reused for multiple calls.
|
466
|
+
# client = Google::Cloud::Compute::V1::Routes::Rest::Client.new
|
467
|
+
#
|
468
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
469
|
+
# request = Google::Cloud::Compute::V1::ListRoutesRequest.new
|
470
|
+
#
|
471
|
+
# # Call the list method.
|
472
|
+
# result = client.list request
|
473
|
+
#
|
474
|
+
# # The returned object is of type Google::Cloud::Compute::V1::RouteList.
|
475
|
+
# p result
|
476
|
+
#
|
413
477
|
def list request, options = nil
|
414
478
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
415
479
|
|