google-cloud-compute-v1 2.4.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +52 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +116 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +116 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +421 -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 +420 -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 +52 -3
  11. data/lib/google/cloud/compute/v1/disks/rest/client.rb +292 -3
  12. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +97 -1
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +289 -1
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +97 -1
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +132 -3
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +97 -1
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -1
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +114 -2
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +84 -3
  20. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +49 -1
  21. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +81 -1
  22. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +116 -3
  23. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +16 -0
  24. data/lib/google/cloud/compute/v1/images/rest/client.rb +177 -1
  25. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +327 -6
  26. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +149 -4
  27. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +132 -3
  28. data/lib/google/cloud/compute/v1/instances/rest/client.rb +845 -4
  29. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  30. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +116 -3
  31. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -1
  32. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -1
  33. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +206 -2
  34. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
  35. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +32 -0
  36. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -1
  37. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -1
  38. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +52 -3
  39. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +236 -3
  40. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
  41. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +83 -2
  42. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +149 -4
  43. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +257 -1
  44. data/lib/google/cloud/compute/v1/networks/rest/client.rb +178 -2
  45. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +229 -4
  46. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +132 -3
  47. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +52 -3
  48. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +116 -3
  49. data/lib/google/cloud/compute/v1/projects/rest/client.rb +210 -2
  50. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +282 -4
  51. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
  52. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +304 -3
  53. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
  54. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +97 -1
  55. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +445 -1
  56. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
  57. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -3
  58. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -1
  59. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +273 -1
  60. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +81 -1
  61. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +97 -1
  62. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +308 -4
  63. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +66 -2
  64. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +65 -1
  65. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +16 -0
  66. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +378 -4
  67. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
  68. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +273 -1
  69. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +65 -1
  70. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +65 -1
  71. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +497 -5
  72. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
  73. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +65 -1
  74. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +98 -2
  75. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +81 -1
  76. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -1
  77. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +65 -1
  78. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -1
  79. data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -1
  80. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +164 -3
  81. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +148 -3
  82. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  83. data/lib/google/cloud/compute/v1/routers/rest/client.rb +261 -4
  84. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
  85. data/lib/google/cloud/compute/v1/routes/rest/client.rb +65 -1
  86. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +203 -6
  87. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +148 -3
  88. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  89. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
  90. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
  91. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  92. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  93. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +129 -1
  94. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +84 -3
  95. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +117 -4
  96. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +197 -4
  97. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +81 -1
  98. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +116 -3
  99. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +180 -3
  100. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +188 -3
  101. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
  102. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +284 -3
  103. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
  104. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +145 -1
  105. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +116 -3
  106. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +100 -3
  107. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +148 -3
  108. data/lib/google/cloud/compute/v1/version.rb +1 -1
  109. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +132 -3
  110. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +100 -3
  111. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +65 -1
  112. data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -1
  113. data/lib/google/cloud/compute/v1.rb +1 -0
  114. data/proto_docs/google/api/client.rb +13 -0
  115. data/proto_docs/google/api/field_behavior.rb +14 -0
  116. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  117. data/proto_docs/google/protobuf/any.rb +144 -0
  118. metadata +11 -5
@@ -86,10 +86,19 @@ module Google
86
86
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
87
87
  }
88
88
 
89
+ default_config.rpcs.list_usable.timeout = 600.0
90
+ default_config.rpcs.list_usable.retry_policy = {
91
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
92
+ }
93
+
89
94
  default_config.rpcs.patch.timeout = 600.0
90
95
 
91
96
  default_config.rpcs.set_iam_policy.timeout = 600.0
92
97
 
98
+ default_config.rpcs.set_security_policy.timeout = 600.0
99
+
100
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
101
+
93
102
  default_config.rpcs.update.timeout = 600.0
94
103
 
95
104
  default_config
@@ -207,6 +216,22 @@ module Google
207
216
  # @return [::Gapic::GenericLRO::Operation]
208
217
  #
209
218
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
219
+ #
220
+ # @example Basic example
221
+ # require "google/cloud/compute/v1"
222
+ #
223
+ # # Create a client object. The client can be reused for multiple calls.
224
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
225
+ #
226
+ # # Create a request. To set request fields, pass in keyword arguments.
227
+ # request = Google::Cloud::Compute::V1::DeleteRegionBackendServiceRequest.new
228
+ #
229
+ # # Call the delete method.
230
+ # result = client.delete request
231
+ #
232
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
233
+ # p result
234
+ #
210
235
  def delete request, options = nil
211
236
  raise ::ArgumentError, "request must be provided" if request.nil?
212
237
 
@@ -282,6 +307,22 @@ module Google
282
307
  # @return [::Google::Cloud::Compute::V1::BackendService]
283
308
  #
284
309
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
310
+ #
311
+ # @example Basic example
312
+ # require "google/cloud/compute/v1"
313
+ #
314
+ # # Create a client object. The client can be reused for multiple calls.
315
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
316
+ #
317
+ # # Create a request. To set request fields, pass in keyword arguments.
318
+ # request = Google::Cloud::Compute::V1::GetRegionBackendServiceRequest.new
319
+ #
320
+ # # Call the get method.
321
+ # result = client.get request
322
+ #
323
+ # # The returned object is of type Google::Cloud::Compute::V1::BackendService.
324
+ # p result
325
+ #
285
326
  def get request, options = nil
286
327
  raise ::ArgumentError, "request must be provided" if request.nil?
287
328
 
@@ -349,6 +390,22 @@ module Google
349
390
  # @return [::Google::Cloud::Compute::V1::BackendServiceGroupHealth]
350
391
  #
351
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::RegionBackendServices::Rest::Client.new
399
+ #
400
+ # # Create a request. To set request fields, pass in keyword arguments.
401
+ # request = Google::Cloud::Compute::V1::GetHealthRegionBackendServiceRequest.new
402
+ #
403
+ # # Call the get_health method.
404
+ # result = client.get_health request
405
+ #
406
+ # # The returned object is of type Google::Cloud::Compute::V1::BackendServiceGroupHealth.
407
+ # p result
408
+ #
352
409
  def get_health request, options = nil
353
410
  raise ::ArgumentError, "request must be provided" if request.nil?
354
411
 
@@ -417,6 +474,22 @@ module Google
417
474
  # @return [::Google::Cloud::Compute::V1::Policy]
418
475
  #
419
476
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
477
+ #
478
+ # @example Basic example
479
+ # require "google/cloud/compute/v1"
480
+ #
481
+ # # Create a client object. The client can be reused for multiple calls.
482
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
483
+ #
484
+ # # Create a request. To set request fields, pass in keyword arguments.
485
+ # request = Google::Cloud::Compute::V1::GetIamPolicyRegionBackendServiceRequest.new
486
+ #
487
+ # # Call the get_iam_policy method.
488
+ # result = client.get_iam_policy request
489
+ #
490
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
491
+ # p result
492
+ #
420
493
  def get_iam_policy request, options = nil
421
494
  raise ::ArgumentError, "request must be provided" if request.nil?
422
495
 
@@ -485,6 +558,22 @@ module Google
485
558
  # @return [::Gapic::GenericLRO::Operation]
486
559
  #
487
560
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
561
+ #
562
+ # @example Basic example
563
+ # require "google/cloud/compute/v1"
564
+ #
565
+ # # Create a client object. The client can be reused for multiple calls.
566
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
567
+ #
568
+ # # Create a request. To set request fields, pass in keyword arguments.
569
+ # request = Google::Cloud::Compute::V1::InsertRegionBackendServiceRequest.new
570
+ #
571
+ # # Call the insert method.
572
+ # result = client.insert request
573
+ #
574
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
575
+ # p result
576
+ #
488
577
  def insert request, options = nil
489
578
  raise ::ArgumentError, "request must be provided" if request.nil?
490
579
 
@@ -548,7 +637,7 @@ module Google
548
637
  # the default parameter values, pass an empty Hash as a request object (see above).
549
638
  #
550
639
  # @param filter [::String]
551
- # 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`.
640
+ # 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.
552
641
  # @param max_results [::Integer]
553
642
  # 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`)
554
643
  # @param order_by [::String]
@@ -568,6 +657,22 @@ module Google
568
657
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BackendService>]
569
658
  #
570
659
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
660
+ #
661
+ # @example Basic example
662
+ # require "google/cloud/compute/v1"
663
+ #
664
+ # # Create a client object. The client can be reused for multiple calls.
665
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
666
+ #
667
+ # # Create a request. To set request fields, pass in keyword arguments.
668
+ # request = Google::Cloud::Compute::V1::ListRegionBackendServicesRequest.new
669
+ #
670
+ # # Call the list method.
671
+ # result = client.list request
672
+ #
673
+ # # The returned object is of type Google::Cloud::Compute::V1::BackendServiceList.
674
+ # p result
675
+ #
571
676
  def list request, options = nil
572
677
  raise ::ArgumentError, "request must be provided" if request.nil?
573
678
 
@@ -604,6 +709,97 @@ module Google
604
709
  raise ::Google::Cloud::Error.from_error(e)
605
710
  end
606
711
 
712
+ ##
713
+ # Retrieves an aggregated list of all usable backend services in the specified project in the given region.
714
+ #
715
+ # @overload list_usable(request, options = nil)
716
+ # Pass arguments to `list_usable` via a request object, either of type
717
+ # {::Google::Cloud::Compute::V1::ListUsableRegionBackendServicesRequest} or an equivalent Hash.
718
+ #
719
+ # @param request [::Google::Cloud::Compute::V1::ListUsableRegionBackendServicesRequest, ::Hash]
720
+ # A request object representing the call parameters. Required. To specify no
721
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
722
+ # @param options [::Gapic::CallOptions, ::Hash]
723
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
724
+ #
725
+ # @overload list_usable(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
726
+ # Pass arguments to `list_usable` via keyword arguments. Note that at
727
+ # least one keyword argument is required. To specify no parameters, or to keep all
728
+ # the default parameter values, pass an empty Hash as a request object (see above).
729
+ #
730
+ # @param filter [::String]
731
+ # 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.
732
+ # @param max_results [::Integer]
733
+ # 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`)
734
+ # @param order_by [::String]
735
+ # 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.
736
+ # @param page_token [::String]
737
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
738
+ # @param project [::String]
739
+ # Project ID for this request.
740
+ # @param region [::String]
741
+ # Name of the region scoping this request. It must be a string that meets the requirements in RFC1035.
742
+ # @param return_partial_success [::Boolean]
743
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
744
+ # @yield [result, operation] Access the result along with the TransportOperation object
745
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BackendService>]
746
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
747
+ #
748
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BackendService>]
749
+ #
750
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
751
+ #
752
+ # @example Basic example
753
+ # require "google/cloud/compute/v1"
754
+ #
755
+ # # Create a client object. The client can be reused for multiple calls.
756
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
757
+ #
758
+ # # Create a request. To set request fields, pass in keyword arguments.
759
+ # request = Google::Cloud::Compute::V1::ListUsableRegionBackendServicesRequest.new
760
+ #
761
+ # # Call the list_usable method.
762
+ # result = client.list_usable request
763
+ #
764
+ # # The returned object is of type Google::Cloud::Compute::V1::BackendServiceListUsable.
765
+ # p result
766
+ #
767
+ def list_usable request, options = nil
768
+ raise ::ArgumentError, "request must be provided" if request.nil?
769
+
770
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListUsableRegionBackendServicesRequest
771
+
772
+ # Converts hash and nil to an options object
773
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
774
+
775
+ # Customize the options with defaults
776
+ call_metadata = @config.rpcs.list_usable.metadata.to_h
777
+
778
+ # Set x-goog-api-client and x-goog-user-project headers
779
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
780
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
781
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
782
+ transports_version_send: [:rest]
783
+
784
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
785
+
786
+ options.apply_defaults timeout: @config.rpcs.list_usable.timeout,
787
+ metadata: call_metadata,
788
+ retry_policy: @config.rpcs.list_usable.retry_policy
789
+
790
+ options.apply_defaults timeout: @config.timeout,
791
+ metadata: @config.metadata,
792
+ retry_policy: @config.retry_policy
793
+
794
+ @region_backend_services_stub.list_usable request, options do |result, operation|
795
+ result = ::Gapic::Rest::PagedEnumerable.new @region_backend_services_stub, :list_usable, "items", request, result, options
796
+ yield result, operation if block_given?
797
+ return result
798
+ end
799
+ rescue ::Gapic::Rest::Error => e
800
+ raise ::Google::Cloud::Error.from_error(e)
801
+ end
802
+
607
803
  ##
608
804
  # Updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
609
805
  #
@@ -639,6 +835,22 @@ module Google
639
835
  # @return [::Gapic::GenericLRO::Operation]
640
836
  #
641
837
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
838
+ #
839
+ # @example Basic example
840
+ # require "google/cloud/compute/v1"
841
+ #
842
+ # # Create a client object. The client can be reused for multiple calls.
843
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
844
+ #
845
+ # # Create a request. To set request fields, pass in keyword arguments.
846
+ # request = Google::Cloud::Compute::V1::PatchRegionBackendServiceRequest.new
847
+ #
848
+ # # Call the patch method.
849
+ # result = client.patch request
850
+ #
851
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
852
+ # p result
853
+ #
642
854
  def patch request, options = nil
643
855
  raise ::ArgumentError, "request must be provided" if request.nil?
644
856
 
@@ -716,6 +928,22 @@ module Google
716
928
  # @return [::Google::Cloud::Compute::V1::Policy]
717
929
  #
718
930
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
931
+ #
932
+ # @example Basic example
933
+ # require "google/cloud/compute/v1"
934
+ #
935
+ # # Create a client object. The client can be reused for multiple calls.
936
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
937
+ #
938
+ # # Create a request. To set request fields, pass in keyword arguments.
939
+ # request = Google::Cloud::Compute::V1::SetIamPolicyRegionBackendServiceRequest.new
940
+ #
941
+ # # Call the set_iam_policy method.
942
+ # result = client.set_iam_policy request
943
+ #
944
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
945
+ # p result
946
+ #
719
947
  def set_iam_policy request, options = nil
720
948
  raise ::ArgumentError, "request must be provided" if request.nil?
721
949
 
@@ -751,6 +979,185 @@ module Google
751
979
  raise ::Google::Cloud::Error.from_error(e)
752
980
  end
753
981
 
982
+ ##
983
+ # Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
984
+ #
985
+ # @overload set_security_policy(request, options = nil)
986
+ # Pass arguments to `set_security_policy` via a request object, either of type
987
+ # {::Google::Cloud::Compute::V1::SetSecurityPolicyRegionBackendServiceRequest} or an equivalent Hash.
988
+ #
989
+ # @param request [::Google::Cloud::Compute::V1::SetSecurityPolicyRegionBackendServiceRequest, ::Hash]
990
+ # A request object representing the call parameters. Required. To specify no
991
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
992
+ # @param options [::Gapic::CallOptions, ::Hash]
993
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
994
+ #
995
+ # @overload set_security_policy(backend_service: nil, project: nil, region: nil, request_id: nil, security_policy_reference_resource: nil)
996
+ # Pass arguments to `set_security_policy` via keyword arguments. Note that at
997
+ # least one keyword argument is required. To specify no parameters, or to keep all
998
+ # the default parameter values, pass an empty Hash as a request object (see above).
999
+ #
1000
+ # @param backend_service [::String]
1001
+ # Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.
1002
+ # @param project [::String]
1003
+ # Project ID for this request.
1004
+ # @param region [::String]
1005
+ # Name of the region scoping this request.
1006
+ # @param request_id [::String]
1007
+ # 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).
1008
+ # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
1009
+ # The body resource for this request
1010
+ # @yield [result, operation] Access the result along with the TransportOperation object
1011
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1012
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1013
+ #
1014
+ # @return [::Gapic::GenericLRO::Operation]
1015
+ #
1016
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1017
+ #
1018
+ # @example Basic example
1019
+ # require "google/cloud/compute/v1"
1020
+ #
1021
+ # # Create a client object. The client can be reused for multiple calls.
1022
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
1023
+ #
1024
+ # # Create a request. To set request fields, pass in keyword arguments.
1025
+ # request = Google::Cloud::Compute::V1::SetSecurityPolicyRegionBackendServiceRequest.new
1026
+ #
1027
+ # # Call the set_security_policy method.
1028
+ # result = client.set_security_policy request
1029
+ #
1030
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1031
+ # p result
1032
+ #
1033
+ def set_security_policy request, options = nil
1034
+ raise ::ArgumentError, "request must be provided" if request.nil?
1035
+
1036
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetSecurityPolicyRegionBackendServiceRequest
1037
+
1038
+ # Converts hash and nil to an options object
1039
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1040
+
1041
+ # Customize the options with defaults
1042
+ call_metadata = @config.rpcs.set_security_policy.metadata.to_h
1043
+
1044
+ # Set x-goog-api-client and x-goog-user-project headers
1045
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1046
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1047
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1048
+ transports_version_send: [:rest]
1049
+
1050
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1051
+
1052
+ options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
1053
+ metadata: call_metadata,
1054
+ retry_policy: @config.rpcs.set_security_policy.retry_policy
1055
+
1056
+ options.apply_defaults timeout: @config.timeout,
1057
+ metadata: @config.metadata,
1058
+ retry_policy: @config.retry_policy
1059
+
1060
+ @region_backend_services_stub.set_security_policy request, options do |result, response|
1061
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1062
+ operation: result,
1063
+ client: region_operations,
1064
+ request_values: {
1065
+ "project" => request.project,
1066
+ "region" => request.region
1067
+ },
1068
+ options: options
1069
+ )
1070
+ yield result, response if block_given?
1071
+ return result
1072
+ end
1073
+ rescue ::Gapic::Rest::Error => e
1074
+ raise ::Google::Cloud::Error.from_error(e)
1075
+ end
1076
+
1077
+ ##
1078
+ # Returns permissions that a caller has on the specified resource.
1079
+ #
1080
+ # @overload test_iam_permissions(request, options = nil)
1081
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1082
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsRegionBackendServiceRequest} or an equivalent Hash.
1083
+ #
1084
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsRegionBackendServiceRequest, ::Hash]
1085
+ # A request object representing the call parameters. Required. To specify no
1086
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1087
+ # @param options [::Gapic::CallOptions, ::Hash]
1088
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1089
+ #
1090
+ # @overload test_iam_permissions(project: nil, region: nil, resource: nil, test_permissions_request_resource: nil)
1091
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1092
+ # least one keyword argument is required. To specify no parameters, or to keep all
1093
+ # the default parameter values, pass an empty Hash as a request object (see above).
1094
+ #
1095
+ # @param project [::String]
1096
+ # Project ID for this request.
1097
+ # @param region [::String]
1098
+ # The name of the region for this request.
1099
+ # @param resource [::String]
1100
+ # Name or id of the resource for this request.
1101
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
1102
+ # The body resource for this request
1103
+ # @yield [result, operation] Access the result along with the TransportOperation object
1104
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1105
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1106
+ #
1107
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1108
+ #
1109
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1110
+ #
1111
+ # @example Basic example
1112
+ # require "google/cloud/compute/v1"
1113
+ #
1114
+ # # Create a client object. The client can be reused for multiple calls.
1115
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
1116
+ #
1117
+ # # Create a request. To set request fields, pass in keyword arguments.
1118
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsRegionBackendServiceRequest.new
1119
+ #
1120
+ # # Call the test_iam_permissions method.
1121
+ # result = client.test_iam_permissions request
1122
+ #
1123
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
1124
+ # p result
1125
+ #
1126
+ def test_iam_permissions request, options = nil
1127
+ raise ::ArgumentError, "request must be provided" if request.nil?
1128
+
1129
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsRegionBackendServiceRequest
1130
+
1131
+ # Converts hash and nil to an options object
1132
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1133
+
1134
+ # Customize the options with defaults
1135
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1136
+
1137
+ # Set x-goog-api-client and x-goog-user-project headers
1138
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1139
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1140
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1141
+ transports_version_send: [:rest]
1142
+
1143
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1144
+
1145
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1146
+ metadata: call_metadata,
1147
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1148
+
1149
+ options.apply_defaults timeout: @config.timeout,
1150
+ metadata: @config.metadata,
1151
+ retry_policy: @config.retry_policy
1152
+
1153
+ @region_backend_services_stub.test_iam_permissions request, options do |result, operation|
1154
+ yield result, operation if block_given?
1155
+ return result
1156
+ end
1157
+ rescue ::Gapic::Rest::Error => e
1158
+ raise ::Google::Cloud::Error.from_error(e)
1159
+ end
1160
+
754
1161
  ##
755
1162
  # Updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .
756
1163
  #
@@ -786,6 +1193,22 @@ module Google
786
1193
  # @return [::Gapic::GenericLRO::Operation]
787
1194
  #
788
1195
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1196
+ #
1197
+ # @example Basic example
1198
+ # require "google/cloud/compute/v1"
1199
+ #
1200
+ # # Create a client object. The client can be reused for multiple calls.
1201
+ # client = Google::Cloud::Compute::V1::RegionBackendServices::Rest::Client.new
1202
+ #
1203
+ # # Create a request. To set request fields, pass in keyword arguments.
1204
+ # request = Google::Cloud::Compute::V1::UpdateRegionBackendServiceRequest.new
1205
+ #
1206
+ # # Call the update method.
1207
+ # result = client.update request
1208
+ #
1209
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1210
+ # p result
1211
+ #
789
1212
  def update request, options = nil
790
1213
  raise ::ArgumentError, "request must be provided" if request.nil?
791
1214
 
@@ -986,6 +1409,11 @@ module Google
986
1409
  #
987
1410
  attr_reader :list
988
1411
  ##
1412
+ # RPC-specific configuration for `list_usable`
1413
+ # @return [::Gapic::Config::Method]
1414
+ #
1415
+ attr_reader :list_usable
1416
+ ##
989
1417
  # RPC-specific configuration for `patch`
990
1418
  # @return [::Gapic::Config::Method]
991
1419
  #
@@ -996,6 +1424,16 @@ module Google
996
1424
  #
997
1425
  attr_reader :set_iam_policy
998
1426
  ##
1427
+ # RPC-specific configuration for `set_security_policy`
1428
+ # @return [::Gapic::Config::Method]
1429
+ #
1430
+ attr_reader :set_security_policy
1431
+ ##
1432
+ # RPC-specific configuration for `test_iam_permissions`
1433
+ # @return [::Gapic::Config::Method]
1434
+ #
1435
+ attr_reader :test_iam_permissions
1436
+ ##
999
1437
  # RPC-specific configuration for `update`
1000
1438
  # @return [::Gapic::Config::Method]
1001
1439
  #
@@ -1015,10 +1453,16 @@ module Google
1015
1453
  @insert = ::Gapic::Config::Method.new insert_config
1016
1454
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
1017
1455
  @list = ::Gapic::Config::Method.new list_config
1456
+ list_usable_config = parent_rpcs.list_usable if parent_rpcs.respond_to? :list_usable
1457
+ @list_usable = ::Gapic::Config::Method.new list_usable_config
1018
1458
  patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
1019
1459
  @patch = ::Gapic::Config::Method.new patch_config
1020
1460
  set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1021
1461
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1462
+ set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
1463
+ @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
1464
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1465
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1022
1466
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1023
1467
  @update = ::Gapic::Config::Method.new update_config
1024
1468