google-cloud-compute-v1 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +4 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +4 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +4 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +277 -1
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
  7. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +196 -3
  8. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
  9. data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
  10. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -3
  11. data/lib/google/cloud/compute/v1/disks/rest/client.rb +4 -3
  12. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +4 -3
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +4 -3
  20. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  21. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  22. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +4 -3
  23. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  24. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +7 -6
  25. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +5 -4
  26. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -3
  27. data/lib/google/cloud/compute/v1/instances/rest/client.rb +109 -4
  28. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  29. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +4 -3
  30. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  31. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +1 -1
  32. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +94 -2
  33. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
  34. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  35. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  36. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -3
  37. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +108 -3
  38. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
  39. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +3 -2
  40. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +5 -4
  41. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1 -1
  42. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  43. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +5 -4
  44. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +4 -3
  45. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -3
  46. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +4 -3
  47. data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
  48. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +202 -4
  49. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
  50. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +208 -3
  51. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
  52. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  53. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +301 -1
  54. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
  55. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +4 -3
  56. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  57. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  58. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  59. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  60. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -4
  61. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  62. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +1 -1
  63. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +314 -4
  64. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
  65. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1 -1
  66. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  67. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  68. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +417 -5
  69. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
  70. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  71. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +2 -2
  72. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  73. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +1 -1
  74. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +1 -1
  75. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  76. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  77. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +4 -3
  78. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +4 -3
  79. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  80. data/lib/google/cloud/compute/v1/routers/rest/client.rb +101 -4
  81. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
  82. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  83. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +11 -6
  84. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +4 -3
  85. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
  87. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
  88. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  89. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  90. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  91. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +4 -3
  92. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +5 -4
  93. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +5 -4
  94. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  95. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +4 -3
  96. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +4 -3
  97. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +108 -3
  98. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
  99. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +108 -3
  100. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
  101. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +1 -1
  102. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +4 -3
  103. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +4 -3
  104. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +4 -3
  105. data/lib/google/cloud/compute/v1/version.rb +1 -1
  106. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +4 -3
  107. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +4 -3
  108. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  109. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  110. data/lib/google/cloud/compute/v1.rb +1 -0
  111. data/proto_docs/google/api/client.rb +13 -0
  112. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  113. data/proto_docs/google/protobuf/any.rb +144 -0
  114. metadata +8 -2
@@ -65,8 +65,12 @@ module Google
65
65
  end
66
66
  default_config = Client::Configuration.new parent_config
67
67
 
68
+ default_config.rpcs.attach_network_endpoints.timeout = 600.0
69
+
68
70
  default_config.rpcs.delete.timeout = 600.0
69
71
 
72
+ default_config.rpcs.detach_network_endpoints.timeout = 600.0
73
+
70
74
  default_config.rpcs.get.timeout = 600.0
71
75
  default_config.rpcs.get.retry_policy = {
72
76
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
@@ -79,6 +83,8 @@ module Google
79
83
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
80
84
  }
81
85
 
86
+ default_config.rpcs.list_network_endpoints.timeout = 600.0
87
+
82
88
  default_config
83
89
  end
84
90
  yield @configure if block_given?
@@ -161,6 +167,101 @@ module Google
161
167
 
162
168
  # Service calls
163
169
 
170
+ ##
171
+ # Attach a list of network endpoints to the specified network endpoint group.
172
+ #
173
+ # @overload attach_network_endpoints(request, options = nil)
174
+ # Pass arguments to `attach_network_endpoints` via a request object, either of type
175
+ # {::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest} or an equivalent Hash.
176
+ #
177
+ # @param request [::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest, ::Hash]
178
+ # A request object representing the call parameters. Required. To specify no
179
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
180
+ # @param options [::Gapic::CallOptions, ::Hash]
181
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
182
+ #
183
+ # @overload attach_network_endpoints(network_endpoint_group: nil, project: nil, region: nil, region_network_endpoint_groups_attach_endpoints_request_resource: nil, request_id: nil)
184
+ # Pass arguments to `attach_network_endpoints` via keyword arguments. Note that at
185
+ # least one keyword argument is required. To specify no parameters, or to keep all
186
+ # the default parameter values, pass an empty Hash as a request object (see above).
187
+ #
188
+ # @param network_endpoint_group [::String]
189
+ # The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.
190
+ # @param project [::String]
191
+ # Project ID for this request.
192
+ # @param region [::String]
193
+ # The name of the region where you want to create the network endpoint group. It should comply with RFC1035.
194
+ # @param region_network_endpoint_groups_attach_endpoints_request_resource [::Google::Cloud::Compute::V1::RegionNetworkEndpointGroupsAttachEndpointsRequest, ::Hash]
195
+ # The body resource for this request
196
+ # @param request_id [::String]
197
+ # 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).
198
+ # @yield [result, operation] Access the result along with the TransportOperation object
199
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
200
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
201
+ #
202
+ # @return [::Gapic::GenericLRO::Operation]
203
+ #
204
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
205
+ #
206
+ # @example Basic example
207
+ # require "google/cloud/compute/v1"
208
+ #
209
+ # # Create a client object. The client can be reused for multiple calls.
210
+ # client = Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new
211
+ #
212
+ # # Create a request. To set request fields, pass in keyword arguments.
213
+ # request = Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest.new
214
+ #
215
+ # # Call the attach_network_endpoints method.
216
+ # result = client.attach_network_endpoints request
217
+ #
218
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
219
+ # p result
220
+ #
221
+ def attach_network_endpoints request, options = nil
222
+ raise ::ArgumentError, "request must be provided" if request.nil?
223
+
224
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest
225
+
226
+ # Converts hash and nil to an options object
227
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
228
+
229
+ # Customize the options with defaults
230
+ call_metadata = @config.rpcs.attach_network_endpoints.metadata.to_h
231
+
232
+ # Set x-goog-api-client and x-goog-user-project headers
233
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
234
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
235
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
236
+ transports_version_send: [:rest]
237
+
238
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
239
+
240
+ options.apply_defaults timeout: @config.rpcs.attach_network_endpoints.timeout,
241
+ metadata: call_metadata,
242
+ retry_policy: @config.rpcs.attach_network_endpoints.retry_policy
243
+
244
+ options.apply_defaults timeout: @config.timeout,
245
+ metadata: @config.metadata,
246
+ retry_policy: @config.retry_policy
247
+
248
+ @region_network_endpoint_groups_stub.attach_network_endpoints request, options do |result, response|
249
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
250
+ operation: result,
251
+ client: region_operations,
252
+ request_values: {
253
+ "project" => request.project,
254
+ "region" => request.region
255
+ },
256
+ options: options
257
+ )
258
+ yield result, response if block_given?
259
+ return result
260
+ end
261
+ rescue ::Gapic::Rest::Error => e
262
+ raise ::Google::Cloud::Error.from_error(e)
263
+ end
264
+
164
265
  ##
165
266
  # Deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.
166
267
  #
@@ -254,6 +355,101 @@ module Google
254
355
  raise ::Google::Cloud::Error.from_error(e)
255
356
  end
256
357
 
358
+ ##
359
+ # Detach the network endpoint from the specified network endpoint group.
360
+ #
361
+ # @overload detach_network_endpoints(request, options = nil)
362
+ # Pass arguments to `detach_network_endpoints` via a request object, either of type
363
+ # {::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest} or an equivalent Hash.
364
+ #
365
+ # @param request [::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest, ::Hash]
366
+ # A request object representing the call parameters. Required. To specify no
367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
368
+ # @param options [::Gapic::CallOptions, ::Hash]
369
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
370
+ #
371
+ # @overload detach_network_endpoints(network_endpoint_group: nil, project: nil, region: nil, region_network_endpoint_groups_detach_endpoints_request_resource: nil, request_id: nil)
372
+ # Pass arguments to `detach_network_endpoints` via keyword arguments. Note that at
373
+ # least one keyword argument is required. To specify no parameters, or to keep all
374
+ # the default parameter values, pass an empty Hash as a request object (see above).
375
+ #
376
+ # @param network_endpoint_group [::String]
377
+ # The name of the network endpoint group you are detaching network endpoints from. It should comply with RFC1035.
378
+ # @param project [::String]
379
+ # Project ID for this request.
380
+ # @param region [::String]
381
+ # The name of the region where the network endpoint group is located. It should comply with RFC1035.
382
+ # @param region_network_endpoint_groups_detach_endpoints_request_resource [::Google::Cloud::Compute::V1::RegionNetworkEndpointGroupsDetachEndpointsRequest, ::Hash]
383
+ # The body resource for this request
384
+ # @param request_id [::String]
385
+ # 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). end_interface: MixerMutationRequestBuilder
386
+ # @yield [result, operation] Access the result along with the TransportOperation object
387
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
388
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
389
+ #
390
+ # @return [::Gapic::GenericLRO::Operation]
391
+ #
392
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
393
+ #
394
+ # @example Basic example
395
+ # require "google/cloud/compute/v1"
396
+ #
397
+ # # Create a client object. The client can be reused for multiple calls.
398
+ # client = Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new
399
+ #
400
+ # # Create a request. To set request fields, pass in keyword arguments.
401
+ # request = Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest.new
402
+ #
403
+ # # Call the detach_network_endpoints method.
404
+ # result = client.detach_network_endpoints request
405
+ #
406
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
407
+ # p result
408
+ #
409
+ def detach_network_endpoints request, options = nil
410
+ raise ::ArgumentError, "request must be provided" if request.nil?
411
+
412
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest
413
+
414
+ # Converts hash and nil to an options object
415
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
416
+
417
+ # Customize the options with defaults
418
+ call_metadata = @config.rpcs.detach_network_endpoints.metadata.to_h
419
+
420
+ # Set x-goog-api-client and x-goog-user-project headers
421
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
422
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
423
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
424
+ transports_version_send: [:rest]
425
+
426
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
427
+
428
+ options.apply_defaults timeout: @config.rpcs.detach_network_endpoints.timeout,
429
+ metadata: call_metadata,
430
+ retry_policy: @config.rpcs.detach_network_endpoints.retry_policy
431
+
432
+ options.apply_defaults timeout: @config.timeout,
433
+ metadata: @config.metadata,
434
+ retry_policy: @config.retry_policy
435
+
436
+ @region_network_endpoint_groups_stub.detach_network_endpoints request, options do |result, response|
437
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
438
+ operation: result,
439
+ client: region_operations,
440
+ request_values: {
441
+ "project" => request.project,
442
+ "region" => request.region
443
+ },
444
+ options: options
445
+ )
446
+ yield result, response if block_given?
447
+ return result
448
+ end
449
+ rescue ::Gapic::Rest::Error => e
450
+ raise ::Google::Cloud::Error.from_error(e)
451
+ end
452
+
257
453
  ##
258
454
  # Returns the specified network endpoint group.
259
455
  #
@@ -448,7 +644,7 @@ module Google
448
644
  # the default parameter values, pass an empty Hash as a request object (see above).
449
645
  #
450
646
  # @param filter [::String]
451
- # 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`.
647
+ # 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.
452
648
  # @param max_results [::Integer]
453
649
  # 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`)
454
650
  # @param order_by [::String]
@@ -520,6 +716,99 @@ module Google
520
716
  raise ::Google::Cloud::Error.from_error(e)
521
717
  end
522
718
 
719
+ ##
720
+ # Lists the network endpoints in the specified network endpoint group.
721
+ #
722
+ # @overload list_network_endpoints(request, options = nil)
723
+ # Pass arguments to `list_network_endpoints` via a request object, either of type
724
+ # {::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest} or an equivalent Hash.
725
+ #
726
+ # @param request [::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest, ::Hash]
727
+ # A request object representing the call parameters. Required. To specify no
728
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
729
+ # @param options [::Gapic::CallOptions, ::Hash]
730
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
731
+ #
732
+ # @overload list_network_endpoints(filter: nil, max_results: nil, network_endpoint_group: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
733
+ # Pass arguments to `list_network_endpoints` via keyword arguments. Note that at
734
+ # least one keyword argument is required. To specify no parameters, or to keep all
735
+ # the default parameter values, pass an empty Hash as a request object (see above).
736
+ #
737
+ # @param filter [::String]
738
+ # 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.
739
+ # @param max_results [::Integer]
740
+ # 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`)
741
+ # @param network_endpoint_group [::String]
742
+ # The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.
743
+ # @param order_by [::String]
744
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
745
+ # @param page_token [::String]
746
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
747
+ # @param project [::String]
748
+ # Project ID for this request.
749
+ # @param region [::String]
750
+ # The name of the region where the network endpoint group is located. It should comply with RFC1035.
751
+ # @param return_partial_success [::Boolean]
752
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
753
+ # @yield [result, operation] Access the result along with the TransportOperation object
754
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkEndpointWithHealthStatus>]
755
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
756
+ #
757
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkEndpointWithHealthStatus>]
758
+ #
759
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
760
+ #
761
+ # @example Basic example
762
+ # require "google/cloud/compute/v1"
763
+ #
764
+ # # Create a client object. The client can be reused for multiple calls.
765
+ # client = Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new
766
+ #
767
+ # # Create a request. To set request fields, pass in keyword arguments.
768
+ # request = Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest.new
769
+ #
770
+ # # Call the list_network_endpoints method.
771
+ # result = client.list_network_endpoints request
772
+ #
773
+ # # The returned object is of type Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints.
774
+ # p result
775
+ #
776
+ def list_network_endpoints request, options = nil
777
+ raise ::ArgumentError, "request must be provided" if request.nil?
778
+
779
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest
780
+
781
+ # Converts hash and nil to an options object
782
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
783
+
784
+ # Customize the options with defaults
785
+ call_metadata = @config.rpcs.list_network_endpoints.metadata.to_h
786
+
787
+ # Set x-goog-api-client and x-goog-user-project headers
788
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
789
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
790
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
791
+ transports_version_send: [:rest]
792
+
793
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
794
+
795
+ options.apply_defaults timeout: @config.rpcs.list_network_endpoints.timeout,
796
+ metadata: call_metadata,
797
+ retry_policy: @config.rpcs.list_network_endpoints.retry_policy
798
+
799
+ options.apply_defaults timeout: @config.timeout,
800
+ metadata: @config.metadata,
801
+ retry_policy: @config.retry_policy
802
+
803
+ @region_network_endpoint_groups_stub.list_network_endpoints request, options do |result, operation|
804
+ result = ::Gapic::Rest::PagedEnumerable.new @region_network_endpoint_groups_stub, :list_network_endpoints, "items", request, result, options
805
+ yield result, operation if block_given?
806
+ return result
807
+ end
808
+ rescue ::Gapic::Rest::Error => e
809
+ raise ::Google::Cloud::Error.from_error(e)
810
+ end
811
+
523
812
  ##
524
813
  # Configuration class for the RegionNetworkEndpointGroups REST API.
525
814
  #
@@ -536,17 +825,17 @@ module Google
536
825
  # @example
537
826
  #
538
827
  # # Modify the global config, setting the timeout for
539
- # # delete to 20 seconds,
828
+ # # attach_network_endpoints to 20 seconds,
540
829
  # # and all remaining timeouts to 10 seconds.
541
830
  # ::Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.configure do |config|
542
831
  # config.timeout = 10.0
543
- # config.rpcs.delete.timeout = 20.0
832
+ # config.rpcs.attach_network_endpoints.timeout = 20.0
544
833
  # end
545
834
  #
546
835
  # # Apply the above configuration only to a new client.
547
836
  # client = ::Google::Cloud::Compute::V1::RegionNetworkEndpointGroups::Rest::Client.new do |config|
548
837
  # config.timeout = 10.0
549
- # config.rpcs.delete.timeout = 20.0
838
+ # config.rpcs.attach_network_endpoints.timeout = 20.0
550
839
  # end
551
840
  #
552
841
  # @!attribute [rw] endpoint
@@ -645,12 +934,22 @@ module Google
645
934
  # trigger a retry.
646
935
  #
647
936
  class Rpcs
937
+ ##
938
+ # RPC-specific configuration for `attach_network_endpoints`
939
+ # @return [::Gapic::Config::Method]
940
+ #
941
+ attr_reader :attach_network_endpoints
648
942
  ##
649
943
  # RPC-specific configuration for `delete`
650
944
  # @return [::Gapic::Config::Method]
651
945
  #
652
946
  attr_reader :delete
653
947
  ##
948
+ # RPC-specific configuration for `detach_network_endpoints`
949
+ # @return [::Gapic::Config::Method]
950
+ #
951
+ attr_reader :detach_network_endpoints
952
+ ##
654
953
  # RPC-specific configuration for `get`
655
954
  # @return [::Gapic::Config::Method]
656
955
  #
@@ -665,17 +964,28 @@ module Google
665
964
  # @return [::Gapic::Config::Method]
666
965
  #
667
966
  attr_reader :list
967
+ ##
968
+ # RPC-specific configuration for `list_network_endpoints`
969
+ # @return [::Gapic::Config::Method]
970
+ #
971
+ attr_reader :list_network_endpoints
668
972
 
669
973
  # @private
670
974
  def initialize parent_rpcs = nil
975
+ attach_network_endpoints_config = parent_rpcs.attach_network_endpoints if parent_rpcs.respond_to? :attach_network_endpoints
976
+ @attach_network_endpoints = ::Gapic::Config::Method.new attach_network_endpoints_config
671
977
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
672
978
  @delete = ::Gapic::Config::Method.new delete_config
979
+ detach_network_endpoints_config = parent_rpcs.detach_network_endpoints if parent_rpcs.respond_to? :detach_network_endpoints
980
+ @detach_network_endpoints = ::Gapic::Config::Method.new detach_network_endpoints_config
673
981
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
674
982
  @get = ::Gapic::Config::Method.new get_config
675
983
  insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
676
984
  @insert = ::Gapic::Config::Method.new insert_config
677
985
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
678
986
  @list = ::Gapic::Config::Method.new list_config
987
+ list_network_endpoints_config = parent_rpcs.list_network_endpoints if parent_rpcs.respond_to? :list_network_endpoints
988
+ @list_network_endpoints = ::Gapic::Config::Method.new list_network_endpoints_config
679
989
 
680
990
  yield self if block_given?
681
991
  end
@@ -40,6 +40,44 @@ module Google
40
40
  raise_faraday_errors: false
41
41
  end
42
42
 
43
+ ##
44
+ # Baseline implementation for the attach_network_endpoints REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Compute::V1::Operation]
56
+ # A result object deserialized from the server's reply
57
+ def attach_network_endpoints request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_attach_network_endpoints_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
43
81
  ##
44
82
  # Baseline implementation for the delete REST call
45
83
  #
@@ -78,6 +116,44 @@ module Google
78
116
  result
79
117
  end
80
118
 
119
+ ##
120
+ # Baseline implementation for the detach_network_endpoints REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::Compute::V1::Operation]
132
+ # A result object deserialized from the server's reply
133
+ def detach_network_endpoints request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_detach_network_endpoints_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
81
157
  ##
82
158
  # Baseline implementation for the get REST call
83
159
  #
@@ -192,6 +268,68 @@ module Google
192
268
  result
193
269
  end
194
270
 
271
+ ##
272
+ # Baseline implementation for the list_network_endpoints REST call
273
+ #
274
+ # @param request_pb [::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest]
275
+ # A request object representing the call parameters. Required.
276
+ # @param options [::Gapic::CallOptions]
277
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
278
+ #
279
+ # @yield [result, operation] Access the result along with the TransportOperation object
280
+ # @yieldparam result [::Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints]
281
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
282
+ #
283
+ # @return [::Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints]
284
+ # A result object deserialized from the server's reply
285
+ def list_network_endpoints request_pb, options = nil
286
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
287
+
288
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_network_endpoints_request request_pb
289
+ query_string_params = if query_string_params.any?
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
+ else
292
+ {}
293
+ end
294
+
295
+ response = @client_stub.make_http_request(
296
+ verb,
297
+ uri: uri,
298
+ body: body || "",
299
+ params: query_string_params,
300
+ options: options
301
+ )
302
+ operation = ::Gapic::Rest::TransportOperation.new response
303
+ result = ::Google::Cloud::Compute::V1::NetworkEndpointGroupsListNetworkEndpoints.decode_json response.body, ignore_unknown_fields: true
304
+
305
+ yield result, operation if block_given?
306
+ result
307
+ end
308
+
309
+ ##
310
+ # @private
311
+ #
312
+ # GRPC transcoding helper method for the attach_network_endpoints REST call
313
+ #
314
+ # @param request_pb [::Google::Cloud::Compute::V1::AttachNetworkEndpointsRegionNetworkEndpointGroupRequest]
315
+ # A request object representing the call parameters. Required.
316
+ # @return [Array(String, [String, nil], Hash{String => String})]
317
+ # Uri, Body, Query string parameters
318
+ def self.transcode_attach_network_endpoints_request request_pb
319
+ transcoder = Gapic::Rest::GrpcTranscoder.new
320
+ .with_bindings(
321
+ uri_method: :post,
322
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/attachNetworkEndpoints",
323
+ body: "region_network_endpoint_groups_attach_endpoints_request_resource",
324
+ matches: [
325
+ ["project", %r{^[^/]+/?$}, false],
326
+ ["region", %r{^[^/]+/?$}, false],
327
+ ["network_endpoint_group", %r{^[^/]+/?$}, false]
328
+ ]
329
+ )
330
+ transcoder.transcode request_pb
331
+ end
332
+
195
333
  ##
196
334
  # @private
197
335
  #
@@ -215,6 +353,30 @@ module Google
215
353
  transcoder.transcode request_pb
216
354
  end
217
355
 
356
+ ##
357
+ # @private
358
+ #
359
+ # GRPC transcoding helper method for the detach_network_endpoints REST call
360
+ #
361
+ # @param request_pb [::Google::Cloud::Compute::V1::DetachNetworkEndpointsRegionNetworkEndpointGroupRequest]
362
+ # A request object representing the call parameters. Required.
363
+ # @return [Array(String, [String, nil], Hash{String => String})]
364
+ # Uri, Body, Query string parameters
365
+ def self.transcode_detach_network_endpoints_request request_pb
366
+ transcoder = Gapic::Rest::GrpcTranscoder.new
367
+ .with_bindings(
368
+ uri_method: :post,
369
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/detachNetworkEndpoints",
370
+ body: "region_network_endpoint_groups_detach_endpoints_request_resource",
371
+ matches: [
372
+ ["project", %r{^[^/]+/?$}, false],
373
+ ["region", %r{^[^/]+/?$}, false],
374
+ ["network_endpoint_group", %r{^[^/]+/?$}, false]
375
+ ]
376
+ )
377
+ transcoder.transcode request_pb
378
+ end
379
+
218
380
  ##
219
381
  # @private
220
382
  #
@@ -282,6 +444,29 @@ module Google
282
444
  )
283
445
  transcoder.transcode request_pb
284
446
  end
447
+
448
+ ##
449
+ # @private
450
+ #
451
+ # GRPC transcoding helper method for the list_network_endpoints REST call
452
+ #
453
+ # @param request_pb [::Google::Cloud::Compute::V1::ListNetworkEndpointsRegionNetworkEndpointGroupsRequest]
454
+ # A request object representing the call parameters. Required.
455
+ # @return [Array(String, [String, nil], Hash{String => String})]
456
+ # Uri, Body, Query string parameters
457
+ def self.transcode_list_network_endpoints_request request_pb
458
+ transcoder = Gapic::Rest::GrpcTranscoder.new
459
+ .with_bindings(
460
+ uri_method: :post,
461
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/networkEndpointGroups/{network_endpoint_group}/listNetworkEndpoints",
462
+ matches: [
463
+ ["project", %r{^[^/]+/?$}, false],
464
+ ["region", %r{^[^/]+/?$}, false],
465
+ ["network_endpoint_group", %r{^[^/]+/?$}, false]
466
+ ]
467
+ )
468
+ transcoder.transcode request_pb
469
+ end
285
470
  end
286
471
  end
287
472
  end
@@ -1111,7 +1111,7 @@ module Google
1111
1111
  # the default parameter values, pass an empty Hash as a request object (see above).
1112
1112
  #
1113
1113
  # @param filter [::String]
1114
- # 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`.
1114
+ # 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.
1115
1115
  # @param max_results [::Integer]
1116
1116
  # 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`)
1117
1117
  # @param order_by [::String]