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
@@ -76,6 +76,11 @@ module Google
76
76
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
77
  }
78
78
 
79
+ default_config.rpcs.get_iam_policy.timeout = 600.0
80
+ default_config.rpcs.get_iam_policy.retry_policy = {
81
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
82
+ }
83
+
79
84
  default_config.rpcs.insert.timeout = 600.0
80
85
 
81
86
  default_config.rpcs.list.timeout = 600.0
@@ -87,6 +92,10 @@ module Google
87
92
 
88
93
  default_config.rpcs.set_edge_security_policy.timeout = 600.0
89
94
 
95
+ default_config.rpcs.set_iam_policy.timeout = 600.0
96
+
97
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
98
+
90
99
  default_config.rpcs.update.timeout = 600.0
91
100
 
92
101
  default_config
@@ -204,6 +213,22 @@ module Google
204
213
  # @return [::Gapic::GenericLRO::Operation]
205
214
  #
206
215
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
216
+ #
217
+ # @example Basic example
218
+ # require "google/cloud/compute/v1"
219
+ #
220
+ # # Create a client object. The client can be reused for multiple calls.
221
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
222
+ #
223
+ # # Create a request. To set request fields, pass in keyword arguments.
224
+ # request = Google::Cloud::Compute::V1::AddSignedUrlKeyBackendBucketRequest.new
225
+ #
226
+ # # Call the add_signed_url_key method.
227
+ # result = client.add_signed_url_key request
228
+ #
229
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
230
+ # p result
231
+ #
207
232
  def add_signed_url_key request, options = nil
208
233
  raise ::ArgumentError, "request must be provided" if request.nil?
209
234
 
@@ -278,6 +303,22 @@ module Google
278
303
  # @return [::Gapic::GenericLRO::Operation]
279
304
  #
280
305
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
306
+ #
307
+ # @example Basic example
308
+ # require "google/cloud/compute/v1"
309
+ #
310
+ # # Create a client object. The client can be reused for multiple calls.
311
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
312
+ #
313
+ # # Create a request. To set request fields, pass in keyword arguments.
314
+ # request = Google::Cloud::Compute::V1::DeleteBackendBucketRequest.new
315
+ #
316
+ # # Call the delete method.
317
+ # result = client.delete request
318
+ #
319
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
320
+ # p result
321
+ #
281
322
  def delete request, options = nil
282
323
  raise ::ArgumentError, "request must be provided" if request.nil?
283
324
 
@@ -354,6 +395,22 @@ module Google
354
395
  # @return [::Gapic::GenericLRO::Operation]
355
396
  #
356
397
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
398
+ #
399
+ # @example Basic example
400
+ # require "google/cloud/compute/v1"
401
+ #
402
+ # # Create a client object. The client can be reused for multiple calls.
403
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
404
+ #
405
+ # # Create a request. To set request fields, pass in keyword arguments.
406
+ # request = Google::Cloud::Compute::V1::DeleteSignedUrlKeyBackendBucketRequest.new
407
+ #
408
+ # # Call the delete_signed_url_key method.
409
+ # result = client.delete_signed_url_key request
410
+ #
411
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
412
+ # p result
413
+ #
357
414
  def delete_signed_url_key request, options = nil
358
415
  raise ::ArgumentError, "request must be provided" if request.nil?
359
416
 
@@ -426,6 +483,22 @@ module Google
426
483
  # @return [::Google::Cloud::Compute::V1::BackendBucket]
427
484
  #
428
485
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
486
+ #
487
+ # @example Basic example
488
+ # require "google/cloud/compute/v1"
489
+ #
490
+ # # Create a client object. The client can be reused for multiple calls.
491
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
492
+ #
493
+ # # Create a request. To set request fields, pass in keyword arguments.
494
+ # request = Google::Cloud::Compute::V1::GetBackendBucketRequest.new
495
+ #
496
+ # # Call the get method.
497
+ # result = client.get request
498
+ #
499
+ # # The returned object is of type Google::Cloud::Compute::V1::BackendBucket.
500
+ # p result
501
+ #
429
502
  def get request, options = nil
430
503
  raise ::ArgumentError, "request must be provided" if request.nil?
431
504
 
@@ -461,6 +534,88 @@ module Google
461
534
  raise ::Google::Cloud::Error.from_error(e)
462
535
  end
463
536
 
537
+ ##
538
+ # Gets the access control policy for a resource. May be empty if no such policy or resource exists.
539
+ #
540
+ # @overload get_iam_policy(request, options = nil)
541
+ # Pass arguments to `get_iam_policy` via a request object, either of type
542
+ # {::Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest} or an equivalent Hash.
543
+ #
544
+ # @param request [::Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest, ::Hash]
545
+ # A request object representing the call parameters. Required. To specify no
546
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
547
+ # @param options [::Gapic::CallOptions, ::Hash]
548
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
549
+ #
550
+ # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil)
551
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
552
+ # least one keyword argument is required. To specify no parameters, or to keep all
553
+ # the default parameter values, pass an empty Hash as a request object (see above).
554
+ #
555
+ # @param options_requested_policy_version [::Integer]
556
+ # Requested IAM Policy version.
557
+ # @param project [::String]
558
+ # Project ID for this request.
559
+ # @param resource [::String]
560
+ # Name or id of the resource for this request.
561
+ # @yield [result, operation] Access the result along with the TransportOperation object
562
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
563
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
564
+ #
565
+ # @return [::Google::Cloud::Compute::V1::Policy]
566
+ #
567
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
568
+ #
569
+ # @example Basic example
570
+ # require "google/cloud/compute/v1"
571
+ #
572
+ # # Create a client object. The client can be reused for multiple calls.
573
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
574
+ #
575
+ # # Create a request. To set request fields, pass in keyword arguments.
576
+ # request = Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest.new
577
+ #
578
+ # # Call the get_iam_policy method.
579
+ # result = client.get_iam_policy request
580
+ #
581
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
582
+ # p result
583
+ #
584
+ def get_iam_policy request, options = nil
585
+ raise ::ArgumentError, "request must be provided" if request.nil?
586
+
587
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyBackendBucketRequest
588
+
589
+ # Converts hash and nil to an options object
590
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
591
+
592
+ # Customize the options with defaults
593
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
594
+
595
+ # Set x-goog-api-client and x-goog-user-project headers
596
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
597
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
598
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
599
+ transports_version_send: [:rest]
600
+
601
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
602
+
603
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
604
+ metadata: call_metadata,
605
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
606
+
607
+ options.apply_defaults timeout: @config.timeout,
608
+ metadata: @config.metadata,
609
+ retry_policy: @config.retry_policy
610
+
611
+ @backend_buckets_stub.get_iam_policy request, options do |result, operation|
612
+ yield result, operation if block_given?
613
+ return result
614
+ end
615
+ rescue ::Gapic::Rest::Error => e
616
+ raise ::Google::Cloud::Error.from_error(e)
617
+ end
618
+
464
619
  ##
465
620
  # Creates a BackendBucket resource in the specified project using the data included in the request.
466
621
  #
@@ -492,6 +647,22 @@ module Google
492
647
  # @return [::Gapic::GenericLRO::Operation]
493
648
  #
494
649
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
650
+ #
651
+ # @example Basic example
652
+ # require "google/cloud/compute/v1"
653
+ #
654
+ # # Create a client object. The client can be reused for multiple calls.
655
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
656
+ #
657
+ # # Create a request. To set request fields, pass in keyword arguments.
658
+ # request = Google::Cloud::Compute::V1::InsertBackendBucketRequest.new
659
+ #
660
+ # # Call the insert method.
661
+ # result = client.insert request
662
+ #
663
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
664
+ # p result
665
+ #
495
666
  def insert request, options = nil
496
667
  raise ::ArgumentError, "request must be provided" if request.nil?
497
668
 
@@ -554,7 +725,7 @@ module Google
554
725
  # the default parameter values, pass an empty Hash as a request object (see above).
555
726
  #
556
727
  # @param filter [::String]
557
- # 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`.
728
+ # 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.
558
729
  # @param max_results [::Integer]
559
730
  # 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`)
560
731
  # @param order_by [::String]
@@ -572,6 +743,22 @@ module Google
572
743
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BackendBucket>]
573
744
  #
574
745
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
746
+ #
747
+ # @example Basic example
748
+ # require "google/cloud/compute/v1"
749
+ #
750
+ # # Create a client object. The client can be reused for multiple calls.
751
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
752
+ #
753
+ # # Create a request. To set request fields, pass in keyword arguments.
754
+ # request = Google::Cloud::Compute::V1::ListBackendBucketsRequest.new
755
+ #
756
+ # # Call the list method.
757
+ # result = client.list request
758
+ #
759
+ # # The returned object is of type Google::Cloud::Compute::V1::BackendBucketList.
760
+ # p result
761
+ #
575
762
  def list request, options = nil
576
763
  raise ::ArgumentError, "request must be provided" if request.nil?
577
764
 
@@ -641,6 +828,22 @@ module Google
641
828
  # @return [::Gapic::GenericLRO::Operation]
642
829
  #
643
830
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
831
+ #
832
+ # @example Basic example
833
+ # require "google/cloud/compute/v1"
834
+ #
835
+ # # Create a client object. The client can be reused for multiple calls.
836
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
837
+ #
838
+ # # Create a request. To set request fields, pass in keyword arguments.
839
+ # request = Google::Cloud::Compute::V1::PatchBackendBucketRequest.new
840
+ #
841
+ # # Call the patch method.
842
+ # result = client.patch request
843
+ #
844
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
845
+ # p result
846
+ #
644
847
  def patch request, options = nil
645
848
  raise ::ArgumentError, "request must be provided" if request.nil?
646
849
 
@@ -717,6 +920,22 @@ module Google
717
920
  # @return [::Gapic::GenericLRO::Operation]
718
921
  #
719
922
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
923
+ #
924
+ # @example Basic example
925
+ # require "google/cloud/compute/v1"
926
+ #
927
+ # # Create a client object. The client can be reused for multiple calls.
928
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
929
+ #
930
+ # # Create a request. To set request fields, pass in keyword arguments.
931
+ # request = Google::Cloud::Compute::V1::SetEdgeSecurityPolicyBackendBucketRequest.new
932
+ #
933
+ # # Call the set_edge_security_policy method.
934
+ # result = client.set_edge_security_policy request
935
+ #
936
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
937
+ # p result
938
+ #
720
939
  def set_edge_security_policy request, options = nil
721
940
  raise ::ArgumentError, "request must be provided" if request.nil?
722
941
 
@@ -760,6 +979,170 @@ module Google
760
979
  raise ::Google::Cloud::Error.from_error(e)
761
980
  end
762
981
 
982
+ ##
983
+ # Sets the access control policy on the specified resource. Replaces any existing policy.
984
+ #
985
+ # @overload set_iam_policy(request, options = nil)
986
+ # Pass arguments to `set_iam_policy` via a request object, either of type
987
+ # {::Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest} or an equivalent Hash.
988
+ #
989
+ # @param request [::Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest, ::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_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil)
996
+ # Pass arguments to `set_iam_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 global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash]
1001
+ # The body resource for this request
1002
+ # @param project [::String]
1003
+ # Project ID for this request.
1004
+ # @param resource [::String]
1005
+ # Name or id of the resource for this request.
1006
+ # @yield [result, operation] Access the result along with the TransportOperation object
1007
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
1008
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1009
+ #
1010
+ # @return [::Google::Cloud::Compute::V1::Policy]
1011
+ #
1012
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1013
+ #
1014
+ # @example Basic example
1015
+ # require "google/cloud/compute/v1"
1016
+ #
1017
+ # # Create a client object. The client can be reused for multiple calls.
1018
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
1019
+ #
1020
+ # # Create a request. To set request fields, pass in keyword arguments.
1021
+ # request = Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest.new
1022
+ #
1023
+ # # Call the set_iam_policy method.
1024
+ # result = client.set_iam_policy request
1025
+ #
1026
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
1027
+ # p result
1028
+ #
1029
+ def set_iam_policy request, options = nil
1030
+ raise ::ArgumentError, "request must be provided" if request.nil?
1031
+
1032
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyBackendBucketRequest
1033
+
1034
+ # Converts hash and nil to an options object
1035
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1036
+
1037
+ # Customize the options with defaults
1038
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1039
+
1040
+ # Set x-goog-api-client and x-goog-user-project headers
1041
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1042
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1043
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1044
+ transports_version_send: [:rest]
1045
+
1046
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1047
+
1048
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1049
+ metadata: call_metadata,
1050
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1051
+
1052
+ options.apply_defaults timeout: @config.timeout,
1053
+ metadata: @config.metadata,
1054
+ retry_policy: @config.retry_policy
1055
+
1056
+ @backend_buckets_stub.set_iam_policy request, options do |result, operation|
1057
+ yield result, operation if block_given?
1058
+ return result
1059
+ end
1060
+ rescue ::Gapic::Rest::Error => e
1061
+ raise ::Google::Cloud::Error.from_error(e)
1062
+ end
1063
+
1064
+ ##
1065
+ # Returns permissions that a caller has on the specified resource.
1066
+ #
1067
+ # @overload test_iam_permissions(request, options = nil)
1068
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
1069
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest} or an equivalent Hash.
1070
+ #
1071
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest, ::Hash]
1072
+ # A request object representing the call parameters. Required. To specify no
1073
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1074
+ # @param options [::Gapic::CallOptions, ::Hash]
1075
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1076
+ #
1077
+ # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil)
1078
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
1079
+ # least one keyword argument is required. To specify no parameters, or to keep all
1080
+ # the default parameter values, pass an empty Hash as a request object (see above).
1081
+ #
1082
+ # @param project [::String]
1083
+ # Project ID for this request.
1084
+ # @param resource [::String]
1085
+ # Name or id of the resource for this request.
1086
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
1087
+ # The body resource for this request
1088
+ # @yield [result, operation] Access the result along with the TransportOperation object
1089
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1090
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1091
+ #
1092
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1093
+ #
1094
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1095
+ #
1096
+ # @example Basic example
1097
+ # require "google/cloud/compute/v1"
1098
+ #
1099
+ # # Create a client object. The client can be reused for multiple calls.
1100
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
1101
+ #
1102
+ # # Create a request. To set request fields, pass in keyword arguments.
1103
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest.new
1104
+ #
1105
+ # # Call the test_iam_permissions method.
1106
+ # result = client.test_iam_permissions request
1107
+ #
1108
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
1109
+ # p result
1110
+ #
1111
+ def test_iam_permissions request, options = nil
1112
+ raise ::ArgumentError, "request must be provided" if request.nil?
1113
+
1114
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsBackendBucketRequest
1115
+
1116
+ # Converts hash and nil to an options object
1117
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1118
+
1119
+ # Customize the options with defaults
1120
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1121
+
1122
+ # Set x-goog-api-client and x-goog-user-project headers
1123
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1124
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1125
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1126
+ transports_version_send: [:rest]
1127
+
1128
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1129
+
1130
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1131
+ metadata: call_metadata,
1132
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1133
+
1134
+ options.apply_defaults timeout: @config.timeout,
1135
+ metadata: @config.metadata,
1136
+ retry_policy: @config.retry_policy
1137
+
1138
+ @backend_buckets_stub.test_iam_permissions request, options do |result, operation|
1139
+ yield result, operation if block_given?
1140
+ return result
1141
+ end
1142
+ rescue ::Gapic::Rest::Error => e
1143
+ raise ::Google::Cloud::Error.from_error(e)
1144
+ end
1145
+
763
1146
  ##
764
1147
  # Updates the specified BackendBucket resource with the data included in the request.
765
1148
  #
@@ -793,6 +1176,22 @@ module Google
793
1176
  # @return [::Gapic::GenericLRO::Operation]
794
1177
  #
795
1178
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1179
+ #
1180
+ # @example Basic example
1181
+ # require "google/cloud/compute/v1"
1182
+ #
1183
+ # # Create a client object. The client can be reused for multiple calls.
1184
+ # client = Google::Cloud::Compute::V1::BackendBuckets::Rest::Client.new
1185
+ #
1186
+ # # Create a request. To set request fields, pass in keyword arguments.
1187
+ # request = Google::Cloud::Compute::V1::UpdateBackendBucketRequest.new
1188
+ #
1189
+ # # Call the update method.
1190
+ # result = client.update request
1191
+ #
1192
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1193
+ # p result
1194
+ #
796
1195
  def update request, options = nil
797
1196
  raise ::ArgumentError, "request must be provided" if request.nil?
798
1197
 
@@ -982,6 +1381,11 @@ module Google
982
1381
  #
983
1382
  attr_reader :get
984
1383
  ##
1384
+ # RPC-specific configuration for `get_iam_policy`
1385
+ # @return [::Gapic::Config::Method]
1386
+ #
1387
+ attr_reader :get_iam_policy
1388
+ ##
985
1389
  # RPC-specific configuration for `insert`
986
1390
  # @return [::Gapic::Config::Method]
987
1391
  #
@@ -1002,6 +1406,16 @@ module Google
1002
1406
  #
1003
1407
  attr_reader :set_edge_security_policy
1004
1408
  ##
1409
+ # RPC-specific configuration for `set_iam_policy`
1410
+ # @return [::Gapic::Config::Method]
1411
+ #
1412
+ attr_reader :set_iam_policy
1413
+ ##
1414
+ # RPC-specific configuration for `test_iam_permissions`
1415
+ # @return [::Gapic::Config::Method]
1416
+ #
1417
+ attr_reader :test_iam_permissions
1418
+ ##
1005
1419
  # RPC-specific configuration for `update`
1006
1420
  # @return [::Gapic::Config::Method]
1007
1421
  #
@@ -1017,6 +1431,8 @@ module Google
1017
1431
  @delete_signed_url_key = ::Gapic::Config::Method.new delete_signed_url_key_config
1018
1432
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
1019
1433
  @get = ::Gapic::Config::Method.new get_config
1434
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1435
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1020
1436
  insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
1021
1437
  @insert = ::Gapic::Config::Method.new insert_config
1022
1438
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
@@ -1025,6 +1441,10 @@ module Google
1025
1441
  @patch = ::Gapic::Config::Method.new patch_config
1026
1442
  set_edge_security_policy_config = parent_rpcs.set_edge_security_policy if parent_rpcs.respond_to? :set_edge_security_policy
1027
1443
  @set_edge_security_policy = ::Gapic::Config::Method.new set_edge_security_policy_config
1444
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1445
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1446
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1447
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1028
1448
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1029
1449
  @update = ::Gapic::Config::Method.new update_config
1030
1450