google-cloud-compute-v1 0.3.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +4 -4
  5. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +4 -24
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +6 -34
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +8 -44
  8. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +85 -42
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
  10. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +91 -66
  11. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
  12. data/lib/google/cloud/compute/v1/compute_pb.rb +8335 -7443
  13. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -24
  14. data/lib/google/cloud/compute/v1/disks/rest/client.rb +12 -60
  15. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +4 -22
  16. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +13 -63
  17. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +6 -32
  18. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +9 -49
  19. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +4 -22
  20. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +7 -33
  21. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +8 -44
  22. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +6 -30
  23. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +2 -12
  24. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +5 -27
  25. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +8 -44
  26. data/lib/google/cloud/compute/v1/image_family_views/credentials.rb +53 -0
  27. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +318 -0
  28. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +89 -0
  29. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +33 -0
  30. data/lib/google/cloud/compute/v1/image_family_views.rb +44 -0
  31. data/lib/google/cloud/compute/v1/images/rest/client.rb +7 -35
  32. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +30 -150
  33. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +16 -72
  34. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -22
  35. data/lib/google/cloud/compute/v1/instances/rest/client.rb +272 -197
  36. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +134 -0
  37. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +7 -39
  38. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +2 -12
  39. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +5 -27
  40. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +2 -2
  41. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +11 -29
  42. data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
  43. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +777 -0
  44. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
  45. data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
  46. data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
  47. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -24
  48. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +10 -56
  49. data/lib/google/cloud/compute/v1/networks/rest/client.rb +14 -61
  50. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +12 -66
  51. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +6 -34
  52. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -24
  53. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +7 -39
  54. data/lib/google/cloud/compute/v1/projects/rest/client.rb +15 -71
  55. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +5 -27
  56. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +7 -39
  57. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +6 -32
  58. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +9 -35
  59. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +88 -30
  60. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
  61. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +2 -12
  62. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +10 -48
  63. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +5 -27
  64. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +6 -32
  65. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +27 -133
  66. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +5 -29
  67. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +1 -5
  68. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +4 -22
  69. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +4 -22
  70. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +3 -17
  71. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +4 -22
  72. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +5 -27
  73. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +6 -32
  74. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +2 -12
  75. data/lib/google/cloud/compute/v1/regions/rest/client.rb +4 -14
  76. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +89 -39
  77. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
  78. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +6 -34
  79. data/lib/google/cloud/compute/v1/routers/rest/client.rb +10 -56
  80. data/lib/google/cloud/compute/v1/routes/rest/client.rb +4 -22
  81. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +7 -39
  82. data/lib/google/cloud/compute/v1/service_attachments/credentials.rb +52 -0
  83. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +954 -0
  84. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +458 -0
  85. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +33 -0
  86. data/lib/google/cloud/compute/v1/service_attachments.rb +44 -0
  87. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +79 -20
  88. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
  89. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +6 -34
  90. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +7 -39
  91. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +11 -61
  92. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +5 -27
  93. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +9 -45
  94. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +12 -60
  95. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +6 -34
  96. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +11 -59
  97. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +8 -42
  98. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +6 -32
  99. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +6 -34
  100. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +10 -52
  101. data/lib/google/cloud/compute/v1/version.rb +1 -1
  102. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +7 -39
  103. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +6 -34
  104. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +3 -17
  105. data/lib/google/cloud/compute/v1/zones/rest/client.rb +2 -12
  106. data/lib/google/cloud/compute/v1.rb +3 -0
  107. data/proto_docs/README.md +1 -1
  108. data/proto_docs/google/api/field_behavior.rb +6 -0
  109. data/proto_docs/google/api/resource.rb +10 -71
  110. data/proto_docs/google/cloud/compute/v1/compute.rb +20013 -21099
  111. data/proto_docs/google/cloud/extended_operations.rb +51 -0
  112. metadata +34 -4
@@ -359,6 +359,52 @@ module Google
359
359
  [uri, body, query_string_params]
360
360
  end
361
361
 
362
+ ##
363
+ # Baseline implementation for the set_edge_security_policy REST call
364
+ #
365
+ # @param request_pb [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendBucketRequest]
366
+ # A request object representing the call parameters. Required.
367
+ # @param options [::Gapic::CallOptions]
368
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
369
+ #
370
+ # @yield [result, response] Access the result along with the Faraday response object
371
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
372
+ # @yieldparam response [::Faraday::Response]
373
+ #
374
+ # @return [::Google::Cloud::Compute::V1::Operation]
375
+ # A result object deserialized from the server's reply
376
+ def set_edge_security_policy request_pb, options = nil
377
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
378
+
379
+ uri, body, query_string_params = transcode_set_edge_security_policy_request request_pb
380
+ response = @client_stub.make_post_request(
381
+ uri: uri,
382
+ body: body,
383
+ params: query_string_params,
384
+ options: options
385
+ )
386
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
387
+
388
+ yield result, response if block_given?
389
+ result
390
+ end
391
+
392
+ ##
393
+ # GRPC transcoding helper method for the set_edge_security_policy REST call
394
+ #
395
+ # @param request_pb [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendBucketRequest]
396
+ # A request object representing the call parameters. Required.
397
+ # @return [Array(String, [String, nil], Hash{String => String})]
398
+ # Uri, Body, Query string parameters
399
+ def transcode_set_edge_security_policy_request request_pb
400
+ uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}/setEdgeSecurityPolicy"
401
+ body = request_pb.security_policy_reference_resource.to_json
402
+ query_string_params = {}
403
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
404
+
405
+ [uri, body, query_string_params]
406
+ end
407
+
362
408
  ##
363
409
  # Baseline implementation for the update REST call
364
410
  #
@@ -91,6 +91,8 @@ module Google
91
91
 
92
92
  default_config.rpcs.patch.timeout = 600.0
93
93
 
94
+ default_config.rpcs.set_edge_security_policy.timeout = 600.0
95
+
94
96
  default_config.rpcs.set_security_policy.timeout = 600.0
95
97
 
96
98
  default_config.rpcs.update.timeout = 600.0
@@ -181,11 +183,7 @@ module Google
181
183
  # @param project [::String]
182
184
  # Project ID for this request.
183
185
  # @param request_id [::String]
184
- # 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.
185
- #
186
- # 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.
187
- #
188
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
186
+ # 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).
189
187
  # @param signed_url_key_resource [::Google::Cloud::Compute::V1::SignedUrlKey, ::Hash]
190
188
  # The body resource for this request
191
189
  # @yield [result, response] Access the result along with the Faraday response object
@@ -249,23 +247,13 @@ module Google
249
247
  # the default parameter values, pass an empty Hash as a request object (see above).
250
248
  #
251
249
  # @param filter [::String]
252
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
253
- #
254
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
255
- #
256
- # 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.
257
- #
258
- # 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) ```
250
+ # A filter expression that filters resources listed in the response. The 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) ```
259
251
  # @param include_all_scopes [::Boolean]
260
252
  # 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.
261
253
  # @param max_results [::Integer]
262
254
  # 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`)
263
255
  # @param order_by [::String]
264
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
265
- #
266
- # 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.
267
- #
268
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
256
+ # 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.
269
257
  # @param page_token [::String]
270
258
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
271
259
  # @param project [::String]
@@ -337,11 +325,7 @@ module Google
337
325
  # @param project [::String]
338
326
  # Project ID for this request.
339
327
  # @param request_id [::String]
340
- # 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.
341
- #
342
- # 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.
343
- #
344
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
328
+ # 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).
345
329
  # @yield [result, response] Access the result along with the Faraday response object
346
330
  # @yieldparam result [::Gapic::Rest::BaseOperation]
347
331
  # @yieldparam response [::Faraday::Response]
@@ -409,11 +393,7 @@ module Google
409
393
  # @param project [::String]
410
394
  # Project ID for this request.
411
395
  # @param request_id [::String]
412
- # 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.
413
- #
414
- # 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.
415
- #
416
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
396
+ # 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).
417
397
  # @yield [result, response] Access the result along with the Faraday response object
418
398
  # @yieldparam result [::Gapic::Rest::BaseOperation]
419
399
  # @yieldparam response [::Faraday::Response]
@@ -518,11 +498,7 @@ module Google
518
498
  end
519
499
 
520
500
  ##
521
- # Gets the most recent health check results for this BackendService.
522
- #
523
- # Example request body:
524
- #
525
- # { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
501
+ # Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
526
502
  #
527
503
  # @overload get_health(request, options = nil)
528
504
  # Pass arguments to `get_health` via a request object, either of type
@@ -586,7 +562,7 @@ module Google
586
562
  end
587
563
 
588
564
  ##
589
- # Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.
565
+ # Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
590
566
  #
591
567
  # @overload insert(request, options = nil)
592
568
  # Pass arguments to `insert` via a request object, either of type
@@ -610,11 +586,7 @@ module Google
610
586
  # @param project [::String]
611
587
  # Project ID for this request.
612
588
  # @param request_id [::String]
613
- # 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.
614
- #
615
- # 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.
616
- #
617
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
589
+ # 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).
618
590
  # @yield [result, response] Access the result along with the Faraday response object
619
591
  # @yieldparam result [::Gapic::Rest::BaseOperation]
620
592
  # @yieldparam response [::Faraday::Response]
@@ -676,21 +648,11 @@ module Google
676
648
  # the default parameter values, pass an empty Hash as a request object (see above).
677
649
  #
678
650
  # @param filter [::String]
679
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
680
- #
681
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
682
- #
683
- # 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.
684
- #
685
- # 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) ```
651
+ # A filter expression that filters resources listed in the response. The 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) ```
686
652
  # @param max_results [::Integer]
687
653
  # 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`)
688
654
  # @param order_by [::String]
689
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
690
- #
691
- # 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.
692
- #
693
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
655
+ # 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.
694
656
  # @param page_token [::String]
695
657
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
696
658
  # @param project [::String]
@@ -738,7 +700,7 @@ module Google
738
700
  end
739
701
 
740
702
  ##
741
- # Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
703
+ # Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
742
704
  #
743
705
  # @overload patch(request, options = nil)
744
706
  # Pass arguments to `patch` via a request object, either of type
@@ -764,11 +726,7 @@ module Google
764
726
  # @param project [::String]
765
727
  # Project ID for this request.
766
728
  # @param request_id [::String]
767
- # 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.
768
- #
769
- # 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.
770
- #
771
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
729
+ # 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).
772
730
  # @yield [result, response] Access the result along with the Faraday response object
773
731
  # @yieldparam result [::Gapic::Rest::BaseOperation]
774
732
  # @yieldparam response [::Faraday::Response]
@@ -809,6 +767,74 @@ module Google
809
767
  raise ::Google::Cloud::Error.from_error(gapic_error)
810
768
  end
811
769
 
770
+ ##
771
+ # Sets the edge security policy for the specified backend service.
772
+ #
773
+ # @overload set_edge_security_policy(request, options = nil)
774
+ # Pass arguments to `set_edge_security_policy` via a request object, either of type
775
+ # {::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest} or an equivalent Hash.
776
+ #
777
+ # @param request [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest, ::Hash]
778
+ # A request object representing the call parameters. Required. To specify no
779
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
780
+ # @param options [::Gapic::CallOptions, ::Hash]
781
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
782
+ # Note: currently retry functionality is not implemented. While it is possible
783
+ # to set it using ::Gapic::CallOptions, it will not be applied
784
+ #
785
+ # @overload set_edge_security_policy(backend_service: nil, project: nil, request_id: nil, security_policy_reference_resource: nil)
786
+ # Pass arguments to `set_edge_security_policy` via keyword arguments. Note that at
787
+ # least one keyword argument is required. To specify no parameters, or to keep all
788
+ # the default parameter values, pass an empty Hash as a request object (see above).
789
+ #
790
+ # @param backend_service [::String]
791
+ # Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035.
792
+ # @param project [::String]
793
+ # Project ID for this request.
794
+ # @param request_id [::String]
795
+ # 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).
796
+ # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
797
+ # The body resource for this request
798
+ # @yield [result, response] Access the result along with the Faraday response object
799
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
800
+ # @yieldparam response [::Faraday::Response]
801
+ #
802
+ # @return [::Gapic::Rest::BaseOperation]
803
+ #
804
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
805
+ def set_edge_security_policy request, options = nil
806
+ raise ::ArgumentError, "request must be provided" if request.nil?
807
+
808
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest
809
+
810
+ # Converts hash and nil to an options object
811
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
812
+
813
+ # Customize the options with defaults
814
+ call_metadata = @config.rpcs.set_edge_security_policy.metadata.to_h
815
+
816
+ # Set x-goog-api-client header
817
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
818
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
819
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
820
+ transports_version_send: [:rest]
821
+
822
+ options.apply_defaults timeout: @config.rpcs.set_edge_security_policy.timeout,
823
+ metadata: call_metadata
824
+
825
+ options.apply_defaults timeout: @config.timeout,
826
+ metadata: @config.metadata
827
+
828
+ @backend_services_stub.set_edge_security_policy request, options do |result, response|
829
+ result = ::Gapic::Rest::BaseOperation.new result
830
+ yield result, response if block_given?
831
+ return result
832
+ end
833
+ rescue ::Faraday::Error => e
834
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
835
+ raise ::Google::Cloud::Error.from_error(gapic_error)
836
+ end
837
+
812
838
  ##
813
839
  # Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
814
840
  #
@@ -834,11 +860,7 @@ module Google
834
860
  # @param project [::String]
835
861
  # Project ID for this request.
836
862
  # @param request_id [::String]
837
- # 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.
838
- #
839
- # 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.
840
- #
841
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
863
+ # 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).
842
864
  # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
843
865
  # The body resource for this request
844
866
  # @yield [result, response] Access the result along with the Faraday response object
@@ -908,11 +930,7 @@ module Google
908
930
  # @param project [::String]
909
931
  # Project ID for this request.
910
932
  # @param request_id [::String]
911
- # 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.
912
- #
913
- # 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.
914
- #
915
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
933
+ # 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).
916
934
  # @yield [result, response] Access the result along with the Faraday response object
917
935
  # @yieldparam result [::Gapic::Rest::BaseOperation]
918
936
  # @yieldparam response [::Faraday::Response]
@@ -1098,6 +1116,11 @@ module Google
1098
1116
  #
1099
1117
  attr_reader :patch
1100
1118
  ##
1119
+ # RPC-specific configuration for `set_edge_security_policy`
1120
+ # @return [::Gapic::Config::Method]
1121
+ #
1122
+ attr_reader :set_edge_security_policy
1123
+ ##
1101
1124
  # RPC-specific configuration for `set_security_policy`
1102
1125
  # @return [::Gapic::Config::Method]
1103
1126
  #
@@ -1128,6 +1151,8 @@ module Google
1128
1151
  @list = ::Gapic::Config::Method.new list_config
1129
1152
  patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
1130
1153
  @patch = ::Gapic::Config::Method.new patch_config
1154
+ set_edge_security_policy_config = parent_rpcs.set_edge_security_policy if parent_rpcs.respond_to? :set_edge_security_policy
1155
+ @set_edge_security_policy = ::Gapic::Config::Method.new set_edge_security_policy_config
1131
1156
  set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
1132
1157
  @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
1133
1158
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
@@ -453,6 +453,52 @@ module Google
453
453
  [uri, body, query_string_params]
454
454
  end
455
455
 
456
+ ##
457
+ # Baseline implementation for the set_edge_security_policy REST call
458
+ #
459
+ # @param request_pb [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest]
460
+ # A request object representing the call parameters. Required.
461
+ # @param options [::Gapic::CallOptions]
462
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
463
+ #
464
+ # @yield [result, response] Access the result along with the Faraday response object
465
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
466
+ # @yieldparam response [::Faraday::Response]
467
+ #
468
+ # @return [::Google::Cloud::Compute::V1::Operation]
469
+ # A result object deserialized from the server's reply
470
+ def set_edge_security_policy request_pb, options = nil
471
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
472
+
473
+ uri, body, query_string_params = transcode_set_edge_security_policy_request request_pb
474
+ response = @client_stub.make_post_request(
475
+ uri: uri,
476
+ body: body,
477
+ params: query_string_params,
478
+ options: options
479
+ )
480
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
481
+
482
+ yield result, response if block_given?
483
+ result
484
+ end
485
+
486
+ ##
487
+ # GRPC transcoding helper method for the set_edge_security_policy REST call
488
+ #
489
+ # @param request_pb [::Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendServiceRequest]
490
+ # A request object representing the call parameters. Required.
491
+ # @return [Array(String, [String, nil], Hash{String => String})]
492
+ # Uri, Body, Query string parameters
493
+ def transcode_set_edge_security_policy_request request_pb
494
+ uri = "/compute/v1/projects/#{request_pb.project}/global/backendServices/#{request_pb.backend_service}/setEdgeSecurityPolicy"
495
+ body = request_pb.security_policy_reference_resource.to_json
496
+ query_string_params = {}
497
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
498
+
499
+ [uri, body, query_string_params]
500
+ end
501
+
456
502
  ##
457
503
  # Baseline implementation for the set_security_policy REST call
458
504
  #