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
@@ -201,6 +201,22 @@ module Google
|
|
201
201
|
# @return [::Gapic::GenericLRO::Operation]
|
202
202
|
#
|
203
203
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
204
|
+
#
|
205
|
+
# @example Basic example
|
206
|
+
# require "google/cloud/compute/v1"
|
207
|
+
#
|
208
|
+
# # Create a client object. The client can be reused for multiple calls.
|
209
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
210
|
+
#
|
211
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
212
|
+
# request = Google::Cloud::Compute::V1::DeleteMachineImageRequest.new
|
213
|
+
#
|
214
|
+
# # Call the delete method.
|
215
|
+
# result = client.delete request
|
216
|
+
#
|
217
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
218
|
+
# p result
|
219
|
+
#
|
204
220
|
def delete request, options = nil
|
205
221
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
222
|
|
@@ -273,6 +289,22 @@ module Google
|
|
273
289
|
# @return [::Google::Cloud::Compute::V1::MachineImage]
|
274
290
|
#
|
275
291
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
292
|
+
#
|
293
|
+
# @example Basic example
|
294
|
+
# require "google/cloud/compute/v1"
|
295
|
+
#
|
296
|
+
# # Create a client object. The client can be reused for multiple calls.
|
297
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
298
|
+
#
|
299
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
300
|
+
# request = Google::Cloud::Compute::V1::GetMachineImageRequest.new
|
301
|
+
#
|
302
|
+
# # Call the get method.
|
303
|
+
# result = client.get request
|
304
|
+
#
|
305
|
+
# # The returned object is of type Google::Cloud::Compute::V1::MachineImage.
|
306
|
+
# p result
|
307
|
+
#
|
276
308
|
def get request, options = nil
|
277
309
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
278
310
|
|
@@ -339,6 +371,22 @@ module Google
|
|
339
371
|
# @return [::Google::Cloud::Compute::V1::Policy]
|
340
372
|
#
|
341
373
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
374
|
+
#
|
375
|
+
# @example Basic example
|
376
|
+
# require "google/cloud/compute/v1"
|
377
|
+
#
|
378
|
+
# # Create a client object. The client can be reused for multiple calls.
|
379
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
380
|
+
#
|
381
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
382
|
+
# request = Google::Cloud::Compute::V1::GetIamPolicyMachineImageRequest.new
|
383
|
+
#
|
384
|
+
# # Call the get_iam_policy method.
|
385
|
+
# result = client.get_iam_policy request
|
386
|
+
#
|
387
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Policy.
|
388
|
+
# p result
|
389
|
+
#
|
342
390
|
def get_iam_policy request, options = nil
|
343
391
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
392
|
|
@@ -407,6 +455,22 @@ module Google
|
|
407
455
|
# @return [::Gapic::GenericLRO::Operation]
|
408
456
|
#
|
409
457
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
458
|
+
#
|
459
|
+
# @example Basic example
|
460
|
+
# require "google/cloud/compute/v1"
|
461
|
+
#
|
462
|
+
# # Create a client object. The client can be reused for multiple calls.
|
463
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
464
|
+
#
|
465
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
466
|
+
# request = Google::Cloud::Compute::V1::InsertMachineImageRequest.new
|
467
|
+
#
|
468
|
+
# # Call the insert method.
|
469
|
+
# result = client.insert request
|
470
|
+
#
|
471
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
472
|
+
# p result
|
473
|
+
#
|
410
474
|
def insert request, options = nil
|
411
475
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
412
476
|
|
@@ -469,7 +533,7 @@ module Google
|
|
469
533
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
470
534
|
#
|
471
535
|
# @param filter [::String]
|
472
|
-
# 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
|
536
|
+
# 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.
|
473
537
|
# @param max_results [::Integer]
|
474
538
|
# 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`)
|
475
539
|
# @param order_by [::String]
|
@@ -487,6 +551,22 @@ module Google
|
|
487
551
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::MachineImage>]
|
488
552
|
#
|
489
553
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
554
|
+
#
|
555
|
+
# @example Basic example
|
556
|
+
# require "google/cloud/compute/v1"
|
557
|
+
#
|
558
|
+
# # Create a client object. The client can be reused for multiple calls.
|
559
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
560
|
+
#
|
561
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
562
|
+
# request = Google::Cloud::Compute::V1::ListMachineImagesRequest.new
|
563
|
+
#
|
564
|
+
# # Call the list method.
|
565
|
+
# result = client.list request
|
566
|
+
#
|
567
|
+
# # The returned object is of type Google::Cloud::Compute::V1::MachineImageList.
|
568
|
+
# p result
|
569
|
+
#
|
490
570
|
def list request, options = nil
|
491
571
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
492
572
|
|
@@ -554,6 +634,22 @@ module Google
|
|
554
634
|
# @return [::Google::Cloud::Compute::V1::Policy]
|
555
635
|
#
|
556
636
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
637
|
+
#
|
638
|
+
# @example Basic example
|
639
|
+
# require "google/cloud/compute/v1"
|
640
|
+
#
|
641
|
+
# # Create a client object. The client can be reused for multiple calls.
|
642
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
643
|
+
#
|
644
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
645
|
+
# request = Google::Cloud::Compute::V1::SetIamPolicyMachineImageRequest.new
|
646
|
+
#
|
647
|
+
# # Call the set_iam_policy method.
|
648
|
+
# result = client.set_iam_policy request
|
649
|
+
#
|
650
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Policy.
|
651
|
+
# p result
|
652
|
+
#
|
557
653
|
def set_iam_policy request, options = nil
|
558
654
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
559
655
|
|
@@ -620,6 +716,22 @@ module Google
|
|
620
716
|
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
621
717
|
#
|
622
718
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
719
|
+
#
|
720
|
+
# @example Basic example
|
721
|
+
# require "google/cloud/compute/v1"
|
722
|
+
#
|
723
|
+
# # Create a client object. The client can be reused for multiple calls.
|
724
|
+
# client = Google::Cloud::Compute::V1::MachineImages::Rest::Client.new
|
725
|
+
#
|
726
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
727
|
+
# request = Google::Cloud::Compute::V1::TestIamPermissionsMachineImageRequest.new
|
728
|
+
#
|
729
|
+
# # Call the test_iam_permissions method.
|
730
|
+
# result = client.test_iam_permissions request
|
731
|
+
#
|
732
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
|
733
|
+
# p result
|
734
|
+
#
|
623
735
|
def test_iam_permissions request, options = nil
|
624
736
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
625
737
|
|
@@ -161,13 +161,13 @@ module Google
|
|
161
161
|
# @param options [::Gapic::CallOptions, ::Hash]
|
162
162
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
163
163
|
#
|
164
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
164
|
+
# @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)
|
165
165
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
166
166
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
167
167
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
168
168
|
#
|
169
169
|
# @param filter [::String]
|
170
|
-
# 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
|
170
|
+
# 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.
|
171
171
|
# @param include_all_scopes [::Boolean]
|
172
172
|
# 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.
|
173
173
|
# @param max_results [::Integer]
|
@@ -180,6 +180,7 @@ module Google
|
|
180
180
|
# Project ID for this request.
|
181
181
|
# @param return_partial_success [::Boolean]
|
182
182
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
183
|
+
# @param service_project_number [::Integer]
|
183
184
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
184
185
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::MachineTypesScopedList>]
|
185
186
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -187,6 +188,22 @@ module Google
|
|
187
188
|
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::MachineTypesScopedList>]
|
188
189
|
#
|
189
190
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
191
|
+
#
|
192
|
+
# @example Basic example
|
193
|
+
# require "google/cloud/compute/v1"
|
194
|
+
#
|
195
|
+
# # Create a client object. The client can be reused for multiple calls.
|
196
|
+
# client = Google::Cloud::Compute::V1::MachineTypes::Rest::Client.new
|
197
|
+
#
|
198
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
199
|
+
# request = Google::Cloud::Compute::V1::AggregatedListMachineTypesRequest.new
|
200
|
+
#
|
201
|
+
# # Call the aggregated_list method.
|
202
|
+
# result = client.aggregated_list request
|
203
|
+
#
|
204
|
+
# # The returned object is of type Google::Cloud::Compute::V1::MachineTypeAggregatedList.
|
205
|
+
# p result
|
206
|
+
#
|
190
207
|
def aggregated_list request, options = nil
|
191
208
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
192
209
|
|
@@ -254,6 +271,22 @@ module Google
|
|
254
271
|
# @return [::Google::Cloud::Compute::V1::MachineType]
|
255
272
|
#
|
256
273
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
274
|
+
#
|
275
|
+
# @example Basic example
|
276
|
+
# require "google/cloud/compute/v1"
|
277
|
+
#
|
278
|
+
# # Create a client object. The client can be reused for multiple calls.
|
279
|
+
# client = Google::Cloud::Compute::V1::MachineTypes::Rest::Client.new
|
280
|
+
#
|
281
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
282
|
+
# request = Google::Cloud::Compute::V1::GetMachineTypeRequest.new
|
283
|
+
#
|
284
|
+
# # Call the get method.
|
285
|
+
# result = client.get request
|
286
|
+
#
|
287
|
+
# # The returned object is of type Google::Cloud::Compute::V1::MachineType.
|
288
|
+
# p result
|
289
|
+
#
|
257
290
|
def get request, options = nil
|
258
291
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
259
292
|
|
@@ -308,7 +341,7 @@ module Google
|
|
308
341
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
309
342
|
#
|
310
343
|
# @param filter [::String]
|
311
|
-
# 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
|
344
|
+
# 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.
|
312
345
|
# @param max_results [::Integer]
|
313
346
|
# 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`)
|
314
347
|
# @param order_by [::String]
|
@@ -328,6 +361,22 @@ module Google
|
|
328
361
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::MachineType>]
|
329
362
|
#
|
330
363
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
364
|
+
#
|
365
|
+
# @example Basic example
|
366
|
+
# require "google/cloud/compute/v1"
|
367
|
+
#
|
368
|
+
# # Create a client object. The client can be reused for multiple calls.
|
369
|
+
# client = Google::Cloud::Compute::V1::MachineTypes::Rest::Client.new
|
370
|
+
#
|
371
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
372
|
+
# request = Google::Cloud::Compute::V1::ListMachineTypesRequest.new
|
373
|
+
#
|
374
|
+
# # Call the list method.
|
375
|
+
# result = client.list request
|
376
|
+
#
|
377
|
+
# # The returned object is of type Google::Cloud::Compute::V1::MachineTypeList.
|
378
|
+
# p result
|
379
|
+
#
|
331
380
|
def list request, options = nil
|
332
381
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
333
382
|
|
@@ -89,6 +89,8 @@ module Google
|
|
89
89
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
90
90
|
}
|
91
91
|
|
92
|
+
default_config.rpcs.patch.timeout = 600.0
|
93
|
+
|
92
94
|
default_config.rpcs.set_iam_policy.timeout = 600.0
|
93
95
|
|
94
96
|
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
@@ -188,13 +190,13 @@ module Google
|
|
188
190
|
# @param options [::Gapic::CallOptions, ::Hash]
|
189
191
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
190
192
|
#
|
191
|
-
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
193
|
+
# @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)
|
192
194
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
193
195
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
194
196
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
195
197
|
#
|
196
198
|
# @param filter [::String]
|
197
|
-
# 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
|
199
|
+
# 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.
|
198
200
|
# @param include_all_scopes [::Boolean]
|
199
201
|
# 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.
|
200
202
|
# @param max_results [::Integer]
|
@@ -207,6 +209,7 @@ module Google
|
|
207
209
|
# Project ID for this request.
|
208
210
|
# @param return_partial_success [::Boolean]
|
209
211
|
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
212
|
+
# @param service_project_number [::Integer]
|
210
213
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
211
214
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NetworkAttachmentsScopedList>]
|
212
215
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -214,6 +217,22 @@ module Google
|
|
214
217
|
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NetworkAttachmentsScopedList>]
|
215
218
|
#
|
216
219
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
220
|
+
#
|
221
|
+
# @example Basic example
|
222
|
+
# require "google/cloud/compute/v1"
|
223
|
+
#
|
224
|
+
# # Create a client object. The client can be reused for multiple calls.
|
225
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
226
|
+
#
|
227
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
228
|
+
# request = Google::Cloud::Compute::V1::AggregatedListNetworkAttachmentsRequest.new
|
229
|
+
#
|
230
|
+
# # Call the aggregated_list method.
|
231
|
+
# result = client.aggregated_list request
|
232
|
+
#
|
233
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NetworkAttachmentAggregatedList.
|
234
|
+
# p result
|
235
|
+
#
|
217
236
|
def aggregated_list request, options = nil
|
218
237
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
219
238
|
|
@@ -283,6 +302,22 @@ module Google
|
|
283
302
|
# @return [::Gapic::GenericLRO::Operation]
|
284
303
|
#
|
285
304
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
305
|
+
#
|
306
|
+
# @example Basic example
|
307
|
+
# require "google/cloud/compute/v1"
|
308
|
+
#
|
309
|
+
# # Create a client object. The client can be reused for multiple calls.
|
310
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
311
|
+
#
|
312
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
313
|
+
# request = Google::Cloud::Compute::V1::DeleteNetworkAttachmentRequest.new
|
314
|
+
#
|
315
|
+
# # Call the delete method.
|
316
|
+
# result = client.delete request
|
317
|
+
#
|
318
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
319
|
+
# p result
|
320
|
+
#
|
286
321
|
def delete request, options = nil
|
287
322
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
288
323
|
|
@@ -358,6 +393,22 @@ module Google
|
|
358
393
|
# @return [::Google::Cloud::Compute::V1::NetworkAttachment]
|
359
394
|
#
|
360
395
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
396
|
+
#
|
397
|
+
# @example Basic example
|
398
|
+
# require "google/cloud/compute/v1"
|
399
|
+
#
|
400
|
+
# # Create a client object. The client can be reused for multiple calls.
|
401
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
402
|
+
#
|
403
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
404
|
+
# request = Google::Cloud::Compute::V1::GetNetworkAttachmentRequest.new
|
405
|
+
#
|
406
|
+
# # Call the get method.
|
407
|
+
# result = client.get request
|
408
|
+
#
|
409
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NetworkAttachment.
|
410
|
+
# p result
|
411
|
+
#
|
361
412
|
def get request, options = nil
|
362
413
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
363
414
|
|
@@ -426,6 +477,22 @@ module Google
|
|
426
477
|
# @return [::Google::Cloud::Compute::V1::Policy]
|
427
478
|
#
|
428
479
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
480
|
+
#
|
481
|
+
# @example Basic example
|
482
|
+
# require "google/cloud/compute/v1"
|
483
|
+
#
|
484
|
+
# # Create a client object. The client can be reused for multiple calls.
|
485
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
486
|
+
#
|
487
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
488
|
+
# request = Google::Cloud::Compute::V1::GetIamPolicyNetworkAttachmentRequest.new
|
489
|
+
#
|
490
|
+
# # Call the get_iam_policy method.
|
491
|
+
# result = client.get_iam_policy request
|
492
|
+
#
|
493
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Policy.
|
494
|
+
# p result
|
495
|
+
#
|
429
496
|
def get_iam_policy request, options = nil
|
430
497
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
431
498
|
|
@@ -494,6 +561,22 @@ module Google
|
|
494
561
|
# @return [::Gapic::GenericLRO::Operation]
|
495
562
|
#
|
496
563
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
564
|
+
#
|
565
|
+
# @example Basic example
|
566
|
+
# require "google/cloud/compute/v1"
|
567
|
+
#
|
568
|
+
# # Create a client object. The client can be reused for multiple calls.
|
569
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
570
|
+
#
|
571
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
572
|
+
# request = Google::Cloud::Compute::V1::InsertNetworkAttachmentRequest.new
|
573
|
+
#
|
574
|
+
# # Call the insert method.
|
575
|
+
# result = client.insert request
|
576
|
+
#
|
577
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
578
|
+
# p result
|
579
|
+
#
|
497
580
|
def insert request, options = nil
|
498
581
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
499
582
|
|
@@ -557,7 +640,7 @@ module Google
|
|
557
640
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
558
641
|
#
|
559
642
|
# @param filter [::String]
|
560
|
-
# 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
|
643
|
+
# 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.
|
561
644
|
# @param max_results [::Integer]
|
562
645
|
# 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`)
|
563
646
|
# @param order_by [::String]
|
@@ -577,6 +660,22 @@ module Google
|
|
577
660
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkAttachment>]
|
578
661
|
#
|
579
662
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
663
|
+
#
|
664
|
+
# @example Basic example
|
665
|
+
# require "google/cloud/compute/v1"
|
666
|
+
#
|
667
|
+
# # Create a client object. The client can be reused for multiple calls.
|
668
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
669
|
+
#
|
670
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
671
|
+
# request = Google::Cloud::Compute::V1::ListNetworkAttachmentsRequest.new
|
672
|
+
#
|
673
|
+
# # Call the list method.
|
674
|
+
# result = client.list request
|
675
|
+
#
|
676
|
+
# # The returned object is of type Google::Cloud::Compute::V1::NetworkAttachmentList.
|
677
|
+
# p result
|
678
|
+
#
|
580
679
|
def list request, options = nil
|
581
680
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
582
681
|
|
@@ -613,6 +712,101 @@ module Google
|
|
613
712
|
raise ::Google::Cloud::Error.from_error(e)
|
614
713
|
end
|
615
714
|
|
715
|
+
##
|
716
|
+
# Patches the specified NetworkAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
717
|
+
#
|
718
|
+
# @overload patch(request, options = nil)
|
719
|
+
# Pass arguments to `patch` via a request object, either of type
|
720
|
+
# {::Google::Cloud::Compute::V1::PatchNetworkAttachmentRequest} or an equivalent Hash.
|
721
|
+
#
|
722
|
+
# @param request [::Google::Cloud::Compute::V1::PatchNetworkAttachmentRequest, ::Hash]
|
723
|
+
# A request object representing the call parameters. Required. To specify no
|
724
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
725
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
726
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
727
|
+
#
|
728
|
+
# @overload patch(network_attachment: nil, network_attachment_resource: nil, project: nil, region: nil, request_id: nil)
|
729
|
+
# Pass arguments to `patch` via keyword arguments. Note that at
|
730
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
731
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
732
|
+
#
|
733
|
+
# @param network_attachment [::String]
|
734
|
+
# Name of the NetworkAttachment resource to patch.
|
735
|
+
# @param network_attachment_resource [::Google::Cloud::Compute::V1::NetworkAttachment, ::Hash]
|
736
|
+
# The body resource for this request
|
737
|
+
# @param project [::String]
|
738
|
+
# Project ID for this request.
|
739
|
+
# @param region [::String]
|
740
|
+
# Name of the region for this request.
|
741
|
+
# @param request_id [::String]
|
742
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). end_interface: MixerMutationRequestBuilder
|
743
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
744
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
745
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
746
|
+
#
|
747
|
+
# @return [::Gapic::GenericLRO::Operation]
|
748
|
+
#
|
749
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
750
|
+
#
|
751
|
+
# @example Basic example
|
752
|
+
# require "google/cloud/compute/v1"
|
753
|
+
#
|
754
|
+
# # Create a client object. The client can be reused for multiple calls.
|
755
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
756
|
+
#
|
757
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
758
|
+
# request = Google::Cloud::Compute::V1::PatchNetworkAttachmentRequest.new
|
759
|
+
#
|
760
|
+
# # Call the patch method.
|
761
|
+
# result = client.patch request
|
762
|
+
#
|
763
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Operation.
|
764
|
+
# p result
|
765
|
+
#
|
766
|
+
def patch request, options = nil
|
767
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
768
|
+
|
769
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchNetworkAttachmentRequest
|
770
|
+
|
771
|
+
# Converts hash and nil to an options object
|
772
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
773
|
+
|
774
|
+
# Customize the options with defaults
|
775
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
776
|
+
|
777
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
778
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
779
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
780
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
781
|
+
transports_version_send: [:rest]
|
782
|
+
|
783
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
784
|
+
|
785
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
786
|
+
metadata: call_metadata,
|
787
|
+
retry_policy: @config.rpcs.patch.retry_policy
|
788
|
+
|
789
|
+
options.apply_defaults timeout: @config.timeout,
|
790
|
+
metadata: @config.metadata,
|
791
|
+
retry_policy: @config.retry_policy
|
792
|
+
|
793
|
+
@network_attachments_stub.patch request, options do |result, response|
|
794
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
795
|
+
operation: result,
|
796
|
+
client: region_operations,
|
797
|
+
request_values: {
|
798
|
+
"project" => request.project,
|
799
|
+
"region" => request.region
|
800
|
+
},
|
801
|
+
options: options
|
802
|
+
)
|
803
|
+
yield result, response if block_given?
|
804
|
+
return result
|
805
|
+
end
|
806
|
+
rescue ::Gapic::Rest::Error => e
|
807
|
+
raise ::Google::Cloud::Error.from_error(e)
|
808
|
+
end
|
809
|
+
|
616
810
|
##
|
617
811
|
# Sets the access control policy on the specified resource. Replaces any existing policy.
|
618
812
|
#
|
@@ -646,6 +840,22 @@ module Google
|
|
646
840
|
# @return [::Google::Cloud::Compute::V1::Policy]
|
647
841
|
#
|
648
842
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
843
|
+
#
|
844
|
+
# @example Basic example
|
845
|
+
# require "google/cloud/compute/v1"
|
846
|
+
#
|
847
|
+
# # Create a client object. The client can be reused for multiple calls.
|
848
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
849
|
+
#
|
850
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
851
|
+
# request = Google::Cloud::Compute::V1::SetIamPolicyNetworkAttachmentRequest.new
|
852
|
+
#
|
853
|
+
# # Call the set_iam_policy method.
|
854
|
+
# result = client.set_iam_policy request
|
855
|
+
#
|
856
|
+
# # The returned object is of type Google::Cloud::Compute::V1::Policy.
|
857
|
+
# p result
|
858
|
+
#
|
649
859
|
def set_iam_policy request, options = nil
|
650
860
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
651
861
|
|
@@ -714,6 +924,22 @@ module Google
|
|
714
924
|
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
715
925
|
#
|
716
926
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
927
|
+
#
|
928
|
+
# @example Basic example
|
929
|
+
# require "google/cloud/compute/v1"
|
930
|
+
#
|
931
|
+
# # Create a client object. The client can be reused for multiple calls.
|
932
|
+
# client = Google::Cloud::Compute::V1::NetworkAttachments::Rest::Client.new
|
933
|
+
#
|
934
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
935
|
+
# request = Google::Cloud::Compute::V1::TestIamPermissionsNetworkAttachmentRequest.new
|
936
|
+
#
|
937
|
+
# # Call the test_iam_permissions method.
|
938
|
+
# result = client.test_iam_permissions request
|
939
|
+
#
|
940
|
+
# # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
|
941
|
+
# p result
|
942
|
+
#
|
717
943
|
def test_iam_permissions request, options = nil
|
718
944
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
719
945
|
|
@@ -905,6 +1131,11 @@ module Google
|
|
905
1131
|
#
|
906
1132
|
attr_reader :list
|
907
1133
|
##
|
1134
|
+
# RPC-specific configuration for `patch`
|
1135
|
+
# @return [::Gapic::Config::Method]
|
1136
|
+
#
|
1137
|
+
attr_reader :patch
|
1138
|
+
##
|
908
1139
|
# RPC-specific configuration for `set_iam_policy`
|
909
1140
|
# @return [::Gapic::Config::Method]
|
910
1141
|
#
|
@@ -929,6 +1160,8 @@ module Google
|
|
929
1160
|
@insert = ::Gapic::Config::Method.new insert_config
|
930
1161
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
931
1162
|
@list = ::Gapic::Config::Method.new list_config
|
1163
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1164
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
932
1165
|
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
933
1166
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
934
1167
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|