google-cloud-compute-v1 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +421 -1
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +420 -3
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
- data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +292 -3
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +289 -1
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +114 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +49 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +16 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +177 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +327 -6
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +149 -4
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +845 -4
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +206 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +32 -0
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +236 -3
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +83 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +149 -4
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +257 -1
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +178 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +229 -4
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +52 -3
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +210 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +282 -4
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +304 -3
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +445 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +273 -1
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +97 -1
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +308 -4
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +66 -2
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +16 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +378 -4
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +273 -1
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +497 -5
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +98 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -1
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +164 -3
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +261 -4
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +203 -6
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +129 -1
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +84 -3
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +117 -4
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +197 -4
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +81 -1
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +180 -3
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +188 -3
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +284 -3
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +145 -1
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +116 -3
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +100 -3
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +148 -3
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +132 -3
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +100 -3
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +65 -1
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -1
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
- data/proto_docs/google/protobuf/any.rb +144 -0
- metadata +11 -5
@@ -96,6 +96,8 @@ module Google
|
|
96
96
|
|
97
97
|
default_config.rpcs.set_backup.timeout = 600.0
|
98
98
|
|
99
|
+
default_config.rpcs.set_security_policy.timeout = 600.0
|
100
|
+
|
99
101
|
default_config
|
100
102
|
end
|
101
103
|
yield @configure if block_given?
|
@@ -213,6 +215,22 @@ module Google
|
|
213
215
|
# @return [::Gapic::GenericLRO::Operation]
|
214
216
|
#
|
215
217
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
218
|
+
#
|
219
|
+
# @example Basic example
|
220
|
+
# require "google/cloud/compute/v1"
|
221
|
+
#
|
222
|
+
# # Create a client object. The client can be reused for multiple calls.
|
223
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
224
|
+
#
|
225
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
226
|
+
# request = Google::Cloud::Compute::V1::AddHealthCheckTargetPoolRequest.new
|
227
|
+
#
|
228
|
+
# # Call the add_health_check method.
|
229
|
+
# result = client.add_health_check request
|
230
|
+
#
|
231
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
232
|
+
# p result
|
233
|
+
#
|
216
234
|
def add_health_check request, options = nil
|
217
235
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
218
236
|
|
@@ -292,6 +310,22 @@ module Google
|
|
292
310
|
# @return [::Gapic::GenericLRO::Operation]
|
293
311
|
#
|
294
312
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
313
|
+
#
|
314
|
+
# @example Basic example
|
315
|
+
# require "google/cloud/compute/v1"
|
316
|
+
#
|
317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
318
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
319
|
+
#
|
320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
321
|
+
# request = Google::Cloud::Compute::V1::AddInstanceTargetPoolRequest.new
|
322
|
+
#
|
323
|
+
# # Call the add_instance method.
|
324
|
+
# result = client.add_instance request
|
325
|
+
#
|
326
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
327
|
+
# p result
|
328
|
+
#
|
295
329
|
def add_instance request, options = nil
|
296
330
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
297
331
|
|
@@ -349,13 +383,13 @@ module Google
|
|
349
383
|
# @param options [::Gapic::CallOptions, ::Hash]
|
350
384
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
351
385
|
#
|
352
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
386
|
+
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
|
353
387
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
354
388
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
355
389
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
356
390
|
#
|
357
391
|
# @param filter [::String]
|
358
|
-
# 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
|
392
|
+
# 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.
|
359
393
|
# @param include_all_scopes [::Boolean]
|
360
394
|
# 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.
|
361
395
|
# @param max_results [::Integer]
|
@@ -368,6 +402,7 @@ module Google
|
|
368
402
|
# Project ID for this request.
|
369
403
|
# @param return_partial_success [::Boolean]
|
370
404
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
405
|
+
# @param service_project_number [::Integer]
|
371
406
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
372
407
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
|
373
408
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -375,6 +410,22 @@ module Google
|
|
375
410
|
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
|
376
411
|
#
|
377
412
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
413
|
+
#
|
414
|
+
# @example Basic example
|
415
|
+
# require "google/cloud/compute/v1"
|
416
|
+
#
|
417
|
+
# # Create a client object. The client can be reused for multiple calls.
|
418
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
419
|
+
#
|
420
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
421
|
+
# request = Google::Cloud::Compute::V1::AggregatedListTargetPoolsRequest.new
|
422
|
+
#
|
423
|
+
# # Call the aggregated_list method.
|
424
|
+
# result = client.aggregated_list request
|
425
|
+
#
|
426
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TargetPoolAggregatedList.
|
427
|
+
# p result
|
428
|
+
#
|
378
429
|
def aggregated_list request, options = nil
|
379
430
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
380
431
|
|
@@ -444,6 +495,22 @@ module Google
|
|
444
495
|
# @return [::Gapic::GenericLRO::Operation]
|
445
496
|
#
|
446
497
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
498
|
+
#
|
499
|
+
# @example Basic example
|
500
|
+
# require "google/cloud/compute/v1"
|
501
|
+
#
|
502
|
+
# # Create a client object. The client can be reused for multiple calls.
|
503
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
504
|
+
#
|
505
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
506
|
+
# request = Google::Cloud::Compute::V1::DeleteTargetPoolRequest.new
|
507
|
+
#
|
508
|
+
# # Call the delete method.
|
509
|
+
# result = client.delete request
|
510
|
+
#
|
511
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
512
|
+
# p result
|
513
|
+
#
|
447
514
|
def delete request, options = nil
|
448
515
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
516
|
|
@@ -519,6 +586,22 @@ module Google
|
|
519
586
|
# @return [::Google::Cloud::Compute::V1::TargetPool]
|
520
587
|
#
|
521
588
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
589
|
+
#
|
590
|
+
# @example Basic example
|
591
|
+
# require "google/cloud/compute/v1"
|
592
|
+
#
|
593
|
+
# # Create a client object. The client can be reused for multiple calls.
|
594
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
595
|
+
#
|
596
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
597
|
+
# request = Google::Cloud::Compute::V1::GetTargetPoolRequest.new
|
598
|
+
#
|
599
|
+
# # Call the get method.
|
600
|
+
# result = client.get request
|
601
|
+
#
|
602
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TargetPool.
|
603
|
+
# p result
|
604
|
+
#
|
522
605
|
def get request, options = nil
|
523
606
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
524
607
|
|
@@ -587,6 +670,22 @@ module Google
|
|
587
670
|
# @return [::Google::Cloud::Compute::V1::TargetPoolInstanceHealth]
|
588
671
|
#
|
589
672
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
673
|
+
#
|
674
|
+
# @example Basic example
|
675
|
+
# require "google/cloud/compute/v1"
|
676
|
+
#
|
677
|
+
# # Create a client object. The client can be reused for multiple calls.
|
678
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
679
|
+
#
|
680
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
681
|
+
# request = Google::Cloud::Compute::V1::GetHealthTargetPoolRequest.new
|
682
|
+
#
|
683
|
+
# # Call the get_health method.
|
684
|
+
# result = client.get_health request
|
685
|
+
#
|
686
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TargetPoolInstanceHealth.
|
687
|
+
# p result
|
688
|
+
#
|
590
689
|
def get_health request, options = nil
|
591
690
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
592
691
|
|
@@ -655,6 +754,22 @@ module Google
|
|
655
754
|
# @return [::Gapic::GenericLRO::Operation]
|
656
755
|
#
|
657
756
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
757
|
+
#
|
758
|
+
# @example Basic example
|
759
|
+
# require "google/cloud/compute/v1"
|
760
|
+
#
|
761
|
+
# # Create a client object. The client can be reused for multiple calls.
|
762
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
763
|
+
#
|
764
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
765
|
+
# request = Google::Cloud::Compute::V1::InsertTargetPoolRequest.new
|
766
|
+
#
|
767
|
+
# # Call the insert method.
|
768
|
+
# result = client.insert request
|
769
|
+
#
|
770
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
771
|
+
# p result
|
772
|
+
#
|
658
773
|
def insert request, options = nil
|
659
774
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
660
775
|
|
@@ -718,7 +833,7 @@ module Google
|
|
718
833
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
719
834
|
#
|
720
835
|
# @param filter [::String]
|
721
|
-
# 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
|
836
|
+
# 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.
|
722
837
|
# @param max_results [::Integer]
|
723
838
|
# 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`)
|
724
839
|
# @param order_by [::String]
|
@@ -738,6 +853,22 @@ module Google
|
|
738
853
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetPool>]
|
739
854
|
#
|
740
855
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
856
|
+
#
|
857
|
+
# @example Basic example
|
858
|
+
# require "google/cloud/compute/v1"
|
859
|
+
#
|
860
|
+
# # Create a client object. The client can be reused for multiple calls.
|
861
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
862
|
+
#
|
863
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
864
|
+
# request = Google::Cloud::Compute::V1::ListTargetPoolsRequest.new
|
865
|
+
#
|
866
|
+
# # Call the list method.
|
867
|
+
# result = client.list request
|
868
|
+
#
|
869
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TargetPoolList.
|
870
|
+
# p result
|
871
|
+
#
|
741
872
|
def list request, options = nil
|
742
873
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
743
874
|
|
@@ -809,6 +940,22 @@ module Google
|
|
809
940
|
# @return [::Gapic::GenericLRO::Operation]
|
810
941
|
#
|
811
942
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
943
|
+
#
|
944
|
+
# @example Basic example
|
945
|
+
# require "google/cloud/compute/v1"
|
946
|
+
#
|
947
|
+
# # Create a client object. The client can be reused for multiple calls.
|
948
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
949
|
+
#
|
950
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
951
|
+
# request = Google::Cloud::Compute::V1::RemoveHealthCheckTargetPoolRequest.new
|
952
|
+
#
|
953
|
+
# # Call the remove_health_check method.
|
954
|
+
# result = client.remove_health_check request
|
955
|
+
#
|
956
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
957
|
+
# p result
|
958
|
+
#
|
812
959
|
def remove_health_check request, options = nil
|
813
960
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
814
961
|
|
@@ -888,6 +1035,22 @@ module Google
|
|
888
1035
|
# @return [::Gapic::GenericLRO::Operation]
|
889
1036
|
#
|
890
1037
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1038
|
+
#
|
1039
|
+
# @example Basic example
|
1040
|
+
# require "google/cloud/compute/v1"
|
1041
|
+
#
|
1042
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1043
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
1044
|
+
#
|
1045
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1046
|
+
# request = Google::Cloud::Compute::V1::RemoveInstanceTargetPoolRequest.new
|
1047
|
+
#
|
1048
|
+
# # Call the remove_instance method.
|
1049
|
+
# result = client.remove_instance request
|
1050
|
+
#
|
1051
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
1052
|
+
# p result
|
1053
|
+
#
|
891
1054
|
def remove_instance request, options = nil
|
892
1055
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
893
1056
|
|
@@ -969,6 +1132,22 @@ module Google
|
|
969
1132
|
# @return [::Gapic::GenericLRO::Operation]
|
970
1133
|
#
|
971
1134
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1135
|
+
#
|
1136
|
+
# @example Basic example
|
1137
|
+
# require "google/cloud/compute/v1"
|
1138
|
+
#
|
1139
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1140
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
1141
|
+
#
|
1142
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1143
|
+
# request = Google::Cloud::Compute::V1::SetBackupTargetPoolRequest.new
|
1144
|
+
#
|
1145
|
+
# # Call the set_backup method.
|
1146
|
+
# result = client.set_backup request
|
1147
|
+
#
|
1148
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
1149
|
+
# p result
|
1150
|
+
#
|
972
1151
|
def set_backup request, options = nil
|
973
1152
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
974
1153
|
|
@@ -1013,6 +1192,101 @@ module Google
|
|
1013
1192
|
raise ::Google::Cloud::Error.from_error(e)
|
1014
1193
|
end
|
1015
1194
|
|
1195
|
+
##
|
1196
|
+
# Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview
|
1197
|
+
#
|
1198
|
+
# @overload set_security_policy(request, options = nil)
|
1199
|
+
# Pass arguments to `set_security_policy` via a request object, either of type
|
1200
|
+
# {::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest} or an equivalent Hash.
|
1201
|
+
#
|
1202
|
+
# @param request [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest, ::Hash]
|
1203
|
+
# A request object representing the call parameters. Required. To specify no
|
1204
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1205
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1206
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1207
|
+
#
|
1208
|
+
# @overload set_security_policy(project: nil, region: nil, request_id: nil, security_policy_reference_resource: nil, target_pool: nil)
|
1209
|
+
# Pass arguments to `set_security_policy` via keyword arguments. Note that at
|
1210
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1211
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1212
|
+
#
|
1213
|
+
# @param project [::String]
|
1214
|
+
# Project ID for this request.
|
1215
|
+
# @param region [::String]
|
1216
|
+
# Name of the region scoping this request.
|
1217
|
+
# @param request_id [::String]
|
1218
|
+
# 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).
|
1219
|
+
# @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
|
1220
|
+
# The body resource for this request
|
1221
|
+
# @param target_pool [::String]
|
1222
|
+
# Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.
|
1223
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1224
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
1225
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1226
|
+
#
|
1227
|
+
# @return [::Gapic::GenericLRO::Operation]
|
1228
|
+
#
|
1229
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1230
|
+
#
|
1231
|
+
# @example Basic example
|
1232
|
+
# require "google/cloud/compute/v1"
|
1233
|
+
#
|
1234
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1235
|
+
# client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
1236
|
+
#
|
1237
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1238
|
+
# request = Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest.new
|
1239
|
+
#
|
1240
|
+
# # Call the set_security_policy method.
|
1241
|
+
# result = client.set_security_policy request
|
1242
|
+
#
|
1243
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
1244
|
+
# p result
|
1245
|
+
#
|
1246
|
+
def set_security_policy request, options = nil
|
1247
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1248
|
+
|
1249
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest
|
1250
|
+
|
1251
|
+
# Converts hash and nil to an options object
|
1252
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1253
|
+
|
1254
|
+
# Customize the options with defaults
|
1255
|
+
call_metadata = @config.rpcs.set_security_policy.metadata.to_h
|
1256
|
+
|
1257
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1258
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1259
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1260
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1261
|
+
transports_version_send: [:rest]
|
1262
|
+
|
1263
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1264
|
+
|
1265
|
+
options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
|
1266
|
+
metadata: call_metadata,
|
1267
|
+
retry_policy: @config.rpcs.set_security_policy.retry_policy
|
1268
|
+
|
1269
|
+
options.apply_defaults timeout: @config.timeout,
|
1270
|
+
metadata: @config.metadata,
|
1271
|
+
retry_policy: @config.retry_policy
|
1272
|
+
|
1273
|
+
@target_pools_stub.set_security_policy request, options do |result, response|
|
1274
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
1275
|
+
operation: result,
|
1276
|
+
client: region_operations,
|
1277
|
+
request_values: {
|
1278
|
+
"project" => request.project,
|
1279
|
+
"region" => request.region
|
1280
|
+
},
|
1281
|
+
options: options
|
1282
|
+
)
|
1283
|
+
yield result, response if block_given?
|
1284
|
+
return result
|
1285
|
+
end
|
1286
|
+
rescue ::Gapic::Rest::Error => e
|
1287
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1288
|
+
end
|
1289
|
+
|
1016
1290
|
##
|
1017
1291
|
# Configuration class for the TargetPools REST API.
|
1018
1292
|
#
|
@@ -1193,6 +1467,11 @@ module Google
|
|
1193
1467
|
# @return [::Gapic::Config::Method]
|
1194
1468
|
#
|
1195
1469
|
attr_reader :set_backup
|
1470
|
+
##
|
1471
|
+
# RPC-specific configuration for `set_security_policy`
|
1472
|
+
# @return [::Gapic::Config::Method]
|
1473
|
+
#
|
1474
|
+
attr_reader :set_security_policy
|
1196
1475
|
|
1197
1476
|
# @private
|
1198
1477
|
def initialize parent_rpcs = nil
|
@@ -1218,6 +1497,8 @@ module Google
|
|
1218
1497
|
@remove_instance = ::Gapic::Config::Method.new remove_instance_config
|
1219
1498
|
set_backup_config = parent_rpcs.set_backup if parent_rpcs.respond_to? :set_backup
|
1220
1499
|
@set_backup = ::Gapic::Config::Method.new set_backup_config
|
1500
|
+
set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
|
1501
|
+
@set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
|
1221
1502
|
|
1222
1503
|
yield self if block_given?
|
1223
1504
|
end
|
@@ -458,6 +458,44 @@ module Google
|
|
458
458
|
result
|
459
459
|
end
|
460
460
|
|
461
|
+
##
|
462
|
+
# Baseline implementation for the set_security_policy REST call
|
463
|
+
#
|
464
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest]
|
465
|
+
# A request object representing the call parameters. Required.
|
466
|
+
# @param options [::Gapic::CallOptions]
|
467
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
468
|
+
#
|
469
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
470
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
471
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
472
|
+
#
|
473
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
474
|
+
# A result object deserialized from the server's reply
|
475
|
+
def set_security_policy request_pb, options = nil
|
476
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
477
|
+
|
478
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_set_security_policy_request request_pb
|
479
|
+
query_string_params = if query_string_params.any?
|
480
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
481
|
+
else
|
482
|
+
{}
|
483
|
+
end
|
484
|
+
|
485
|
+
response = @client_stub.make_http_request(
|
486
|
+
verb,
|
487
|
+
uri: uri,
|
488
|
+
body: body || "",
|
489
|
+
params: query_string_params,
|
490
|
+
options: options
|
491
|
+
)
|
492
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
493
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
494
|
+
|
495
|
+
yield result, operation if block_given?
|
496
|
+
result
|
497
|
+
end
|
498
|
+
|
461
499
|
##
|
462
500
|
# @private
|
463
501
|
#
|
@@ -713,6 +751,30 @@ module Google
|
|
713
751
|
)
|
714
752
|
transcoder.transcode request_pb
|
715
753
|
end
|
754
|
+
|
755
|
+
##
|
756
|
+
# @private
|
757
|
+
#
|
758
|
+
# GRPC transcoding helper method for the set_security_policy REST call
|
759
|
+
#
|
760
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest]
|
761
|
+
# A request object representing the call parameters. Required.
|
762
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
763
|
+
# Uri, Body, Query string parameters
|
764
|
+
def self.transcode_set_security_policy_request request_pb
|
765
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
766
|
+
.with_bindings(
|
767
|
+
uri_method: :post,
|
768
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetPools/{target_pool}/setSecurityPolicy",
|
769
|
+
body: "security_policy_reference_resource",
|
770
|
+
matches: [
|
771
|
+
["project", %r{^[^/]+/?$}, false],
|
772
|
+
["region", %r{^[^/]+/?$}, false],
|
773
|
+
["target_pool", %r{^[^/]+/?$}, false]
|
774
|
+
]
|
775
|
+
)
|
776
|
+
transcoder.transcode request_pb
|
777
|
+
end
|
716
778
|
end
|
717
779
|
end
|
718
780
|
end
|