google-cloud-compute-v1 2.4.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +52 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +116 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +116 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +421 -1
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
  7. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +420 -3
  8. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
  9. data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
  10. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +52 -3
  11. data/lib/google/cloud/compute/v1/disks/rest/client.rb +292 -3
  12. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +97 -1
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +289 -1
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +97 -1
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +132 -3
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +97 -1
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -1
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +114 -2
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +84 -3
  20. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +49 -1
  21. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +81 -1
  22. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +116 -3
  23. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +16 -0
  24. data/lib/google/cloud/compute/v1/images/rest/client.rb +177 -1
  25. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +327 -6
  26. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +149 -4
  27. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +132 -3
  28. data/lib/google/cloud/compute/v1/instances/rest/client.rb +845 -4
  29. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  30. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +116 -3
  31. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +33 -1
  32. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +33 -1
  33. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +206 -2
  34. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
  35. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +32 -0
  36. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -1
  37. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -1
  38. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +52 -3
  39. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +236 -3
  40. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
  41. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +83 -2
  42. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +149 -4
  43. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +257 -1
  44. data/lib/google/cloud/compute/v1/networks/rest/client.rb +178 -2
  45. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +229 -4
  46. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +132 -3
  47. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +52 -3
  48. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +116 -3
  49. data/lib/google/cloud/compute/v1/projects/rest/client.rb +210 -2
  50. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +282 -4
  51. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
  52. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +304 -3
  53. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
  54. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +97 -1
  55. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +445 -1
  56. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
  57. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -3
  58. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +33 -1
  59. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +273 -1
  60. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +81 -1
  61. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +97 -1
  62. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +308 -4
  63. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +66 -2
  64. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +65 -1
  65. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +16 -0
  66. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +378 -4
  67. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
  68. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +273 -1
  69. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +65 -1
  70. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +65 -1
  71. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +497 -5
  72. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
  73. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +65 -1
  74. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +98 -2
  75. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +81 -1
  76. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -1
  77. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +65 -1
  78. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -1
  79. data/lib/google/cloud/compute/v1/regions/rest/client.rb +33 -1
  80. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +164 -3
  81. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +148 -3
  82. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  83. data/lib/google/cloud/compute/v1/routers/rest/client.rb +261 -4
  84. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
  85. data/lib/google/cloud/compute/v1/routes/rest/client.rb +65 -1
  86. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +203 -6
  87. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +148 -3
  88. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  89. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
  90. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
  91. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  92. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  93. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +129 -1
  94. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +84 -3
  95. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +117 -4
  96. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +197 -4
  97. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +81 -1
  98. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +116 -3
  99. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +180 -3
  100. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +188 -3
  101. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
  102. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +284 -3
  103. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
  104. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +145 -1
  105. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +116 -3
  106. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +100 -3
  107. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +148 -3
  108. data/lib/google/cloud/compute/v1/version.rb +1 -1
  109. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +132 -3
  110. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +100 -3
  111. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +65 -1
  112. data/lib/google/cloud/compute/v1/zones/rest/client.rb +33 -1
  113. data/lib/google/cloud/compute/v1.rb +1 -0
  114. data/proto_docs/google/api/client.rb +13 -0
  115. data/proto_docs/google/api/field_behavior.rb +14 -0
  116. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  117. data/proto_docs/google/protobuf/any.rb +144 -0
  118. metadata +11 -5
@@ -159,6 +159,8 @@ module Google
159
159
 
160
160
  default_config.rpcs.set_scheduling.timeout = 600.0
161
161
 
162
+ default_config.rpcs.set_security_policy.timeout = 600.0
163
+
162
164
  default_config.rpcs.set_service_account.timeout = 600.0
163
165
 
164
166
  default_config.rpcs.set_shielded_instance_integrity_policy.timeout = 600.0
@@ -306,6 +308,22 @@ module Google
306
308
  # @return [::Gapic::GenericLRO::Operation]
307
309
  #
308
310
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
311
+ #
312
+ # @example Basic example
313
+ # require "google/cloud/compute/v1"
314
+ #
315
+ # # Create a client object. The client can be reused for multiple calls.
316
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
317
+ #
318
+ # # Create a request. To set request fields, pass in keyword arguments.
319
+ # request = Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest.new
320
+ #
321
+ # # Call the add_access_config method.
322
+ # result = client.add_access_config request
323
+ #
324
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
325
+ # p result
326
+ #
309
327
  def add_access_config request, options = nil
310
328
  raise ::ArgumentError, "request must be provided" if request.nil?
311
329
 
@@ -385,6 +403,22 @@ module Google
385
403
  # @return [::Gapic::GenericLRO::Operation]
386
404
  #
387
405
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
406
+ #
407
+ # @example Basic example
408
+ # require "google/cloud/compute/v1"
409
+ #
410
+ # # Create a client object. The client can be reused for multiple calls.
411
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
412
+ #
413
+ # # Create a request. To set request fields, pass in keyword arguments.
414
+ # request = Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest.new
415
+ #
416
+ # # Call the add_resource_policies method.
417
+ # result = client.add_resource_policies request
418
+ #
419
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
420
+ # p result
421
+ #
388
422
  def add_resource_policies request, options = nil
389
423
  raise ::ArgumentError, "request must be provided" if request.nil?
390
424
 
@@ -442,13 +476,13 @@ module Google
442
476
  # @param options [::Gapic::CallOptions, ::Hash]
443
477
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
444
478
  #
445
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
479
+ # @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)
446
480
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
447
481
  # least one keyword argument is required. To specify no parameters, or to keep all
448
482
  # the default parameter values, pass an empty Hash as a request object (see above).
449
483
  #
450
484
  # @param filter [::String]
451
- # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
485
+ # 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.
452
486
  # @param include_all_scopes [::Boolean]
453
487
  # 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.
454
488
  # @param max_results [::Integer]
@@ -461,6 +495,7 @@ module Google
461
495
  # Project ID for this request.
462
496
  # @param return_partial_success [::Boolean]
463
497
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
498
+ # @param service_project_number [::Integer]
464
499
  # @yield [result, operation] Access the result along with the TransportOperation object
465
500
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>]
466
501
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -468,6 +503,22 @@ module Google
468
503
  # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>]
469
504
  #
470
505
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
506
+ #
507
+ # @example Basic example
508
+ # require "google/cloud/compute/v1"
509
+ #
510
+ # # Create a client object. The client can be reused for multiple calls.
511
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
512
+ #
513
+ # # Create a request. To set request fields, pass in keyword arguments.
514
+ # request = Google::Cloud::Compute::V1::AggregatedListInstancesRequest.new
515
+ #
516
+ # # Call the aggregated_list method.
517
+ # result = client.aggregated_list request
518
+ #
519
+ # # The returned object is of type Google::Cloud::Compute::V1::InstanceAggregatedList.
520
+ # p result
521
+ #
471
522
  def aggregated_list request, options = nil
472
523
  raise ::ArgumentError, "request must be provided" if request.nil?
473
524
 
@@ -541,6 +592,22 @@ module Google
541
592
  # @return [::Gapic::GenericLRO::Operation]
542
593
  #
543
594
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
595
+ #
596
+ # @example Basic example
597
+ # require "google/cloud/compute/v1"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::Compute::V1::AttachDiskInstanceRequest.new
604
+ #
605
+ # # Call the attach_disk method.
606
+ # result = client.attach_disk request
607
+ #
608
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
609
+ # p result
610
+ #
544
611
  def attach_disk request, options = nil
545
612
  raise ::ArgumentError, "request must be provided" if request.nil?
546
613
 
@@ -618,6 +685,22 @@ module Google
618
685
  # @return [::Gapic::GenericLRO::Operation]
619
686
  #
620
687
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
688
+ #
689
+ # @example Basic example
690
+ # require "google/cloud/compute/v1"
691
+ #
692
+ # # Create a client object. The client can be reused for multiple calls.
693
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
694
+ #
695
+ # # Create a request. To set request fields, pass in keyword arguments.
696
+ # request = Google::Cloud::Compute::V1::BulkInsertInstanceRequest.new
697
+ #
698
+ # # Call the bulk_insert method.
699
+ # result = client.bulk_insert request
700
+ #
701
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
702
+ # p result
703
+ #
621
704
  def bulk_insert request, options = nil
622
705
  raise ::ArgumentError, "request must be provided" if request.nil?
623
706
 
@@ -695,6 +778,22 @@ module Google
695
778
  # @return [::Gapic::GenericLRO::Operation]
696
779
  #
697
780
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
781
+ #
782
+ # @example Basic example
783
+ # require "google/cloud/compute/v1"
784
+ #
785
+ # # Create a client object. The client can be reused for multiple calls.
786
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
787
+ #
788
+ # # Create a request. To set request fields, pass in keyword arguments.
789
+ # request = Google::Cloud::Compute::V1::DeleteInstanceRequest.new
790
+ #
791
+ # # Call the delete method.
792
+ # result = client.delete request
793
+ #
794
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
795
+ # p result
796
+ #
698
797
  def delete request, options = nil
699
798
  raise ::ArgumentError, "request must be provided" if request.nil?
700
799
 
@@ -776,6 +875,22 @@ module Google
776
875
  # @return [::Gapic::GenericLRO::Operation]
777
876
  #
778
877
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
878
+ #
879
+ # @example Basic example
880
+ # require "google/cloud/compute/v1"
881
+ #
882
+ # # Create a client object. The client can be reused for multiple calls.
883
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
884
+ #
885
+ # # Create a request. To set request fields, pass in keyword arguments.
886
+ # request = Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest.new
887
+ #
888
+ # # Call the delete_access_config method.
889
+ # result = client.delete_access_config request
890
+ #
891
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
892
+ # p result
893
+ #
779
894
  def delete_access_config request, options = nil
780
895
  raise ::ArgumentError, "request must be provided" if request.nil?
781
896
 
@@ -855,6 +970,22 @@ module Google
855
970
  # @return [::Gapic::GenericLRO::Operation]
856
971
  #
857
972
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
973
+ #
974
+ # @example Basic example
975
+ # require "google/cloud/compute/v1"
976
+ #
977
+ # # Create a client object. The client can be reused for multiple calls.
978
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
979
+ #
980
+ # # Create a request. To set request fields, pass in keyword arguments.
981
+ # request = Google::Cloud::Compute::V1::DetachDiskInstanceRequest.new
982
+ #
983
+ # # Call the detach_disk method.
984
+ # result = client.detach_disk request
985
+ #
986
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
987
+ # p result
988
+ #
858
989
  def detach_disk request, options = nil
859
990
  raise ::ArgumentError, "request must be provided" if request.nil?
860
991
 
@@ -930,6 +1061,22 @@ module Google
930
1061
  # @return [::Google::Cloud::Compute::V1::Instance]
931
1062
  #
932
1063
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1064
+ #
1065
+ # @example Basic example
1066
+ # require "google/cloud/compute/v1"
1067
+ #
1068
+ # # Create a client object. The client can be reused for multiple calls.
1069
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1070
+ #
1071
+ # # Create a request. To set request fields, pass in keyword arguments.
1072
+ # request = Google::Cloud::Compute::V1::GetInstanceRequest.new
1073
+ #
1074
+ # # Call the get method.
1075
+ # result = client.get request
1076
+ #
1077
+ # # The returned object is of type Google::Cloud::Compute::V1::Instance.
1078
+ # p result
1079
+ #
933
1080
  def get request, options = nil
934
1081
  raise ::ArgumentError, "request must be provided" if request.nil?
935
1082
 
@@ -998,6 +1145,22 @@ module Google
998
1145
  # @return [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse]
999
1146
  #
1000
1147
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1148
+ #
1149
+ # @example Basic example
1150
+ # require "google/cloud/compute/v1"
1151
+ #
1152
+ # # Create a client object. The client can be reused for multiple calls.
1153
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1154
+ #
1155
+ # # Create a request. To set request fields, pass in keyword arguments.
1156
+ # request = Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest.new
1157
+ #
1158
+ # # Call the get_effective_firewalls method.
1159
+ # result = client.get_effective_firewalls request
1160
+ #
1161
+ # # The returned object is of type Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse.
1162
+ # p result
1163
+ #
1001
1164
  def get_effective_firewalls request, options = nil
1002
1165
  raise ::ArgumentError, "request must be provided" if request.nil?
1003
1166
 
@@ -1068,6 +1231,22 @@ module Google
1068
1231
  # @return [::Google::Cloud::Compute::V1::GuestAttributes]
1069
1232
  #
1070
1233
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1234
+ #
1235
+ # @example Basic example
1236
+ # require "google/cloud/compute/v1"
1237
+ #
1238
+ # # Create a client object. The client can be reused for multiple calls.
1239
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1240
+ #
1241
+ # # Create a request. To set request fields, pass in keyword arguments.
1242
+ # request = Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest.new
1243
+ #
1244
+ # # Call the get_guest_attributes method.
1245
+ # result = client.get_guest_attributes request
1246
+ #
1247
+ # # The returned object is of type Google::Cloud::Compute::V1::GuestAttributes.
1248
+ # p result
1249
+ #
1071
1250
  def get_guest_attributes request, options = nil
1072
1251
  raise ::ArgumentError, "request must be provided" if request.nil?
1073
1252
 
@@ -1136,6 +1315,22 @@ module Google
1136
1315
  # @return [::Google::Cloud::Compute::V1::Policy]
1137
1316
  #
1138
1317
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1318
+ #
1319
+ # @example Basic example
1320
+ # require "google/cloud/compute/v1"
1321
+ #
1322
+ # # Create a client object. The client can be reused for multiple calls.
1323
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1324
+ #
1325
+ # # Create a request. To set request fields, pass in keyword arguments.
1326
+ # request = Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest.new
1327
+ #
1328
+ # # Call the get_iam_policy method.
1329
+ # result = client.get_iam_policy request
1330
+ #
1331
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
1332
+ # p result
1333
+ #
1139
1334
  def get_iam_policy request, options = nil
1140
1335
  raise ::ArgumentError, "request must be provided" if request.nil?
1141
1336
 
@@ -1202,6 +1397,22 @@ module Google
1202
1397
  # @return [::Google::Cloud::Compute::V1::Screenshot]
1203
1398
  #
1204
1399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1400
+ #
1401
+ # @example Basic example
1402
+ # require "google/cloud/compute/v1"
1403
+ #
1404
+ # # Create a client object. The client can be reused for multiple calls.
1405
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1406
+ #
1407
+ # # Create a request. To set request fields, pass in keyword arguments.
1408
+ # request = Google::Cloud::Compute::V1::GetScreenshotInstanceRequest.new
1409
+ #
1410
+ # # Call the get_screenshot method.
1411
+ # result = client.get_screenshot request
1412
+ #
1413
+ # # The returned object is of type Google::Cloud::Compute::V1::Screenshot.
1414
+ # p result
1415
+ #
1205
1416
  def get_screenshot request, options = nil
1206
1417
  raise ::ArgumentError, "request must be provided" if request.nil?
1207
1418
 
@@ -1272,6 +1483,22 @@ module Google
1272
1483
  # @return [::Google::Cloud::Compute::V1::SerialPortOutput]
1273
1484
  #
1274
1485
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1486
+ #
1487
+ # @example Basic example
1488
+ # require "google/cloud/compute/v1"
1489
+ #
1490
+ # # Create a client object. The client can be reused for multiple calls.
1491
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1492
+ #
1493
+ # # Create a request. To set request fields, pass in keyword arguments.
1494
+ # request = Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest.new
1495
+ #
1496
+ # # Call the get_serial_port_output method.
1497
+ # result = client.get_serial_port_output request
1498
+ #
1499
+ # # The returned object is of type Google::Cloud::Compute::V1::SerialPortOutput.
1500
+ # p result
1501
+ #
1275
1502
  def get_serial_port_output request, options = nil
1276
1503
  raise ::ArgumentError, "request must be provided" if request.nil?
1277
1504
 
@@ -1338,6 +1565,22 @@ module Google
1338
1565
  # @return [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity]
1339
1566
  #
1340
1567
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1568
+ #
1569
+ # @example Basic example
1570
+ # require "google/cloud/compute/v1"
1571
+ #
1572
+ # # Create a client object. The client can be reused for multiple calls.
1573
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1574
+ #
1575
+ # # Create a request. To set request fields, pass in keyword arguments.
1576
+ # request = Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest.new
1577
+ #
1578
+ # # Call the get_shielded_instance_identity method.
1579
+ # result = client.get_shielded_instance_identity request
1580
+ #
1581
+ # # The returned object is of type Google::Cloud::Compute::V1::ShieldedInstanceIdentity.
1582
+ # p result
1583
+ #
1341
1584
  def get_shielded_instance_identity request, options = nil
1342
1585
  raise ::ArgumentError, "request must be provided" if request.nil?
1343
1586
 
@@ -1410,6 +1653,22 @@ module Google
1410
1653
  # @return [::Gapic::GenericLRO::Operation]
1411
1654
  #
1412
1655
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1656
+ #
1657
+ # @example Basic example
1658
+ # require "google/cloud/compute/v1"
1659
+ #
1660
+ # # Create a client object. The client can be reused for multiple calls.
1661
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1662
+ #
1663
+ # # Create a request. To set request fields, pass in keyword arguments.
1664
+ # request = Google::Cloud::Compute::V1::InsertInstanceRequest.new
1665
+ #
1666
+ # # Call the insert method.
1667
+ # result = client.insert request
1668
+ #
1669
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1670
+ # p result
1671
+ #
1413
1672
  def insert request, options = nil
1414
1673
  raise ::ArgumentError, "request must be provided" if request.nil?
1415
1674
 
@@ -1473,7 +1732,7 @@ module Google
1473
1732
  # the default parameter values, pass an empty Hash as a request object (see above).
1474
1733
  #
1475
1734
  # @param filter [::String]
1476
- # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
1735
+ # 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.
1477
1736
  # @param max_results [::Integer]
1478
1737
  # 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`)
1479
1738
  # @param order_by [::String]
@@ -1493,6 +1752,22 @@ module Google
1493
1752
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>]
1494
1753
  #
1495
1754
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1755
+ #
1756
+ # @example Basic example
1757
+ # require "google/cloud/compute/v1"
1758
+ #
1759
+ # # Create a client object. The client can be reused for multiple calls.
1760
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1761
+ #
1762
+ # # Create a request. To set request fields, pass in keyword arguments.
1763
+ # request = Google::Cloud::Compute::V1::ListInstancesRequest.new
1764
+ #
1765
+ # # Call the list method.
1766
+ # result = client.list request
1767
+ #
1768
+ # # The returned object is of type Google::Cloud::Compute::V1::InstanceList.
1769
+ # p result
1770
+ #
1496
1771
  def list request, options = nil
1497
1772
  raise ::ArgumentError, "request must be provided" if request.nil?
1498
1773
 
@@ -1548,7 +1823,7 @@ module Google
1548
1823
  # the default parameter values, pass an empty Hash as a request object (see above).
1549
1824
  #
1550
1825
  # @param filter [::String]
1551
- # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
1826
+ # 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.
1552
1827
  # @param instance [::String]
1553
1828
  # Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
1554
1829
  # @param max_results [::Integer]
@@ -1570,6 +1845,22 @@ module Google
1570
1845
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>]
1571
1846
  #
1572
1847
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1848
+ #
1849
+ # @example Basic example
1850
+ # require "google/cloud/compute/v1"
1851
+ #
1852
+ # # Create a client object. The client can be reused for multiple calls.
1853
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1854
+ #
1855
+ # # Create a request. To set request fields, pass in keyword arguments.
1856
+ # request = Google::Cloud::Compute::V1::ListReferrersInstancesRequest.new
1857
+ #
1858
+ # # Call the list_referrers method.
1859
+ # result = client.list_referrers request
1860
+ #
1861
+ # # The returned object is of type Google::Cloud::Compute::V1::InstanceListReferrers.
1862
+ # p result
1863
+ #
1573
1864
  def list_referrers request, options = nil
1574
1865
  raise ::ArgumentError, "request must be provided" if request.nil?
1575
1866
 
@@ -1641,6 +1932,22 @@ module Google
1641
1932
  # @return [::Gapic::GenericLRO::Operation]
1642
1933
  #
1643
1934
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1935
+ #
1936
+ # @example Basic example
1937
+ # require "google/cloud/compute/v1"
1938
+ #
1939
+ # # Create a client object. The client can be reused for multiple calls.
1940
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
1941
+ #
1942
+ # # Create a request. To set request fields, pass in keyword arguments.
1943
+ # request = Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest.new
1944
+ #
1945
+ # # Call the remove_resource_policies method.
1946
+ # result = client.remove_resource_policies request
1947
+ #
1948
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1949
+ # p result
1950
+ #
1644
1951
  def remove_resource_policies request, options = nil
1645
1952
  raise ::ArgumentError, "request must be provided" if request.nil?
1646
1953
 
@@ -1718,6 +2025,22 @@ module Google
1718
2025
  # @return [::Gapic::GenericLRO::Operation]
1719
2026
  #
1720
2027
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2028
+ #
2029
+ # @example Basic example
2030
+ # require "google/cloud/compute/v1"
2031
+ #
2032
+ # # Create a client object. The client can be reused for multiple calls.
2033
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2034
+ #
2035
+ # # Create a request. To set request fields, pass in keyword arguments.
2036
+ # request = Google::Cloud::Compute::V1::ResetInstanceRequest.new
2037
+ #
2038
+ # # Call the reset method.
2039
+ # result = client.reset request
2040
+ #
2041
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2042
+ # p result
2043
+ #
1721
2044
  def reset request, options = nil
1722
2045
  raise ::ArgumentError, "request must be provided" if request.nil?
1723
2046
 
@@ -1795,6 +2118,22 @@ module Google
1795
2118
  # @return [::Gapic::GenericLRO::Operation]
1796
2119
  #
1797
2120
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2121
+ #
2122
+ # @example Basic example
2123
+ # require "google/cloud/compute/v1"
2124
+ #
2125
+ # # Create a client object. The client can be reused for multiple calls.
2126
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2127
+ #
2128
+ # # Create a request. To set request fields, pass in keyword arguments.
2129
+ # request = Google::Cloud::Compute::V1::ResumeInstanceRequest.new
2130
+ #
2131
+ # # Call the resume method.
2132
+ # result = client.resume request
2133
+ #
2134
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2135
+ # p result
2136
+ #
1798
2137
  def resume request, options = nil
1799
2138
  raise ::ArgumentError, "request must be provided" if request.nil?
1800
2139
 
@@ -1870,6 +2209,22 @@ module Google
1870
2209
  # @return [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse]
1871
2210
  #
1872
2211
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2212
+ #
2213
+ # @example Basic example
2214
+ # require "google/cloud/compute/v1"
2215
+ #
2216
+ # # Create a client object. The client can be reused for multiple calls.
2217
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2218
+ #
2219
+ # # Create a request. To set request fields, pass in keyword arguments.
2220
+ # request = Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest.new
2221
+ #
2222
+ # # Call the send_diagnostic_interrupt method.
2223
+ # result = client.send_diagnostic_interrupt request
2224
+ #
2225
+ # # The returned object is of type Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse.
2226
+ # p result
2227
+ #
1873
2228
  def send_diagnostic_interrupt request, options = nil
1874
2229
  raise ::ArgumentError, "request must be provided" if request.nil?
1875
2230
 
@@ -1940,6 +2295,22 @@ module Google
1940
2295
  # @return [::Gapic::GenericLRO::Operation]
1941
2296
  #
1942
2297
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2298
+ #
2299
+ # @example Basic example
2300
+ # require "google/cloud/compute/v1"
2301
+ #
2302
+ # # Create a client object. The client can be reused for multiple calls.
2303
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2304
+ #
2305
+ # # Create a request. To set request fields, pass in keyword arguments.
2306
+ # request = Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest.new
2307
+ #
2308
+ # # Call the set_deletion_protection method.
2309
+ # result = client.set_deletion_protection request
2310
+ #
2311
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2312
+ # p result
2313
+ #
1943
2314
  def set_deletion_protection request, options = nil
1944
2315
  raise ::ArgumentError, "request must be provided" if request.nil?
1945
2316
 
@@ -2021,6 +2392,22 @@ module Google
2021
2392
  # @return [::Gapic::GenericLRO::Operation]
2022
2393
  #
2023
2394
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2395
+ #
2396
+ # @example Basic example
2397
+ # require "google/cloud/compute/v1"
2398
+ #
2399
+ # # Create a client object. The client can be reused for multiple calls.
2400
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2401
+ #
2402
+ # # Create a request. To set request fields, pass in keyword arguments.
2403
+ # request = Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest.new
2404
+ #
2405
+ # # Call the set_disk_auto_delete method.
2406
+ # result = client.set_disk_auto_delete request
2407
+ #
2408
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2409
+ # p result
2410
+ #
2024
2411
  def set_disk_auto_delete request, options = nil
2025
2412
  raise ::ArgumentError, "request must be provided" if request.nil?
2026
2413
 
@@ -2098,6 +2485,22 @@ module Google
2098
2485
  # @return [::Google::Cloud::Compute::V1::Policy]
2099
2486
  #
2100
2487
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2488
+ #
2489
+ # @example Basic example
2490
+ # require "google/cloud/compute/v1"
2491
+ #
2492
+ # # Create a client object. The client can be reused for multiple calls.
2493
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2494
+ #
2495
+ # # Create a request. To set request fields, pass in keyword arguments.
2496
+ # request = Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest.new
2497
+ #
2498
+ # # Call the set_iam_policy method.
2499
+ # result = client.set_iam_policy request
2500
+ #
2501
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
2502
+ # p result
2503
+ #
2101
2504
  def set_iam_policy request, options = nil
2102
2505
  raise ::ArgumentError, "request must be provided" if request.nil?
2103
2506
 
@@ -2168,6 +2571,22 @@ module Google
2168
2571
  # @return [::Gapic::GenericLRO::Operation]
2169
2572
  #
2170
2573
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2574
+ #
2575
+ # @example Basic example
2576
+ # require "google/cloud/compute/v1"
2577
+ #
2578
+ # # Create a client object. The client can be reused for multiple calls.
2579
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2580
+ #
2581
+ # # Create a request. To set request fields, pass in keyword arguments.
2582
+ # request = Google::Cloud::Compute::V1::SetLabelsInstanceRequest.new
2583
+ #
2584
+ # # Call the set_labels method.
2585
+ # result = client.set_labels request
2586
+ #
2587
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2588
+ # p result
2589
+ #
2171
2590
  def set_labels request, options = nil
2172
2591
  raise ::ArgumentError, "request must be provided" if request.nil?
2173
2592
 
@@ -2247,6 +2666,22 @@ module Google
2247
2666
  # @return [::Gapic::GenericLRO::Operation]
2248
2667
  #
2249
2668
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2669
+ #
2670
+ # @example Basic example
2671
+ # require "google/cloud/compute/v1"
2672
+ #
2673
+ # # Create a client object. The client can be reused for multiple calls.
2674
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2675
+ #
2676
+ # # Create a request. To set request fields, pass in keyword arguments.
2677
+ # request = Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest.new
2678
+ #
2679
+ # # Call the set_machine_resources method.
2680
+ # result = client.set_machine_resources request
2681
+ #
2682
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2683
+ # p result
2684
+ #
2250
2685
  def set_machine_resources request, options = nil
2251
2686
  raise ::ArgumentError, "request must be provided" if request.nil?
2252
2687
 
@@ -2326,6 +2761,22 @@ module Google
2326
2761
  # @return [::Gapic::GenericLRO::Operation]
2327
2762
  #
2328
2763
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2764
+ #
2765
+ # @example Basic example
2766
+ # require "google/cloud/compute/v1"
2767
+ #
2768
+ # # Create a client object. The client can be reused for multiple calls.
2769
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2770
+ #
2771
+ # # Create a request. To set request fields, pass in keyword arguments.
2772
+ # request = Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest.new
2773
+ #
2774
+ # # Call the set_machine_type method.
2775
+ # result = client.set_machine_type request
2776
+ #
2777
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2778
+ # p result
2779
+ #
2329
2780
  def set_machine_type request, options = nil
2330
2781
  raise ::ArgumentError, "request must be provided" if request.nil?
2331
2782
 
@@ -2405,6 +2856,22 @@ module Google
2405
2856
  # @return [::Gapic::GenericLRO::Operation]
2406
2857
  #
2407
2858
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2859
+ #
2860
+ # @example Basic example
2861
+ # require "google/cloud/compute/v1"
2862
+ #
2863
+ # # Create a client object. The client can be reused for multiple calls.
2864
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2865
+ #
2866
+ # # Create a request. To set request fields, pass in keyword arguments.
2867
+ # request = Google::Cloud::Compute::V1::SetMetadataInstanceRequest.new
2868
+ #
2869
+ # # Call the set_metadata method.
2870
+ # result = client.set_metadata request
2871
+ #
2872
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2873
+ # p result
2874
+ #
2408
2875
  def set_metadata request, options = nil
2409
2876
  raise ::ArgumentError, "request must be provided" if request.nil?
2410
2877
 
@@ -2484,6 +2951,22 @@ module Google
2484
2951
  # @return [::Gapic::GenericLRO::Operation]
2485
2952
  #
2486
2953
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2954
+ #
2955
+ # @example Basic example
2956
+ # require "google/cloud/compute/v1"
2957
+ #
2958
+ # # Create a client object. The client can be reused for multiple calls.
2959
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
2960
+ #
2961
+ # # Create a request. To set request fields, pass in keyword arguments.
2962
+ # request = Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest.new
2963
+ #
2964
+ # # Call the set_min_cpu_platform method.
2965
+ # result = client.set_min_cpu_platform request
2966
+ #
2967
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
2968
+ # p result
2969
+ #
2487
2970
  def set_min_cpu_platform request, options = nil
2488
2971
  raise ::ArgumentError, "request must be provided" if request.nil?
2489
2972
 
@@ -2563,6 +3046,22 @@ module Google
2563
3046
  # @return [::Gapic::GenericLRO::Operation]
2564
3047
  #
2565
3048
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3049
+ #
3050
+ # @example Basic example
3051
+ # require "google/cloud/compute/v1"
3052
+ #
3053
+ # # Create a client object. The client can be reused for multiple calls.
3054
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3055
+ #
3056
+ # # Create a request. To set request fields, pass in keyword arguments.
3057
+ # request = Google::Cloud::Compute::V1::SetNameInstanceRequest.new
3058
+ #
3059
+ # # Call the set_name method.
3060
+ # result = client.set_name request
3061
+ #
3062
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3063
+ # p result
3064
+ #
2566
3065
  def set_name request, options = nil
2567
3066
  raise ::ArgumentError, "request must be provided" if request.nil?
2568
3067
 
@@ -2642,6 +3141,22 @@ module Google
2642
3141
  # @return [::Gapic::GenericLRO::Operation]
2643
3142
  #
2644
3143
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3144
+ #
3145
+ # @example Basic example
3146
+ # require "google/cloud/compute/v1"
3147
+ #
3148
+ # # Create a client object. The client can be reused for multiple calls.
3149
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3150
+ #
3151
+ # # Create a request. To set request fields, pass in keyword arguments.
3152
+ # request = Google::Cloud::Compute::V1::SetSchedulingInstanceRequest.new
3153
+ #
3154
+ # # Call the set_scheduling method.
3155
+ # result = client.set_scheduling request
3156
+ #
3157
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3158
+ # p result
3159
+ #
2645
3160
  def set_scheduling request, options = nil
2646
3161
  raise ::ArgumentError, "request must be provided" if request.nil?
2647
3162
 
@@ -2686,6 +3201,101 @@ module Google
2686
3201
  raise ::Google::Cloud::Error.from_error(e)
2687
3202
  end
2688
3203
 
3204
+ ##
3205
+ # Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview
3206
+ #
3207
+ # @overload set_security_policy(request, options = nil)
3208
+ # Pass arguments to `set_security_policy` via a request object, either of type
3209
+ # {::Google::Cloud::Compute::V1::SetSecurityPolicyInstanceRequest} or an equivalent Hash.
3210
+ #
3211
+ # @param request [::Google::Cloud::Compute::V1::SetSecurityPolicyInstanceRequest, ::Hash]
3212
+ # A request object representing the call parameters. Required. To specify no
3213
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3214
+ # @param options [::Gapic::CallOptions, ::Hash]
3215
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3216
+ #
3217
+ # @overload set_security_policy(instance: nil, instances_set_security_policy_request_resource: nil, project: nil, request_id: nil, zone: nil)
3218
+ # Pass arguments to `set_security_policy` via keyword arguments. Note that at
3219
+ # least one keyword argument is required. To specify no parameters, or to keep all
3220
+ # the default parameter values, pass an empty Hash as a request object (see above).
3221
+ #
3222
+ # @param instance [::String]
3223
+ # Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.
3224
+ # @param instances_set_security_policy_request_resource [::Google::Cloud::Compute::V1::InstancesSetSecurityPolicyRequest, ::Hash]
3225
+ # The body resource for this request
3226
+ # @param project [::String]
3227
+ # Project ID for this request.
3228
+ # @param request_id [::String]
3229
+ # 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).
3230
+ # @param zone [::String]
3231
+ # Name of the zone scoping this request.
3232
+ # @yield [result, operation] Access the result along with the TransportOperation object
3233
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
3234
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3235
+ #
3236
+ # @return [::Gapic::GenericLRO::Operation]
3237
+ #
3238
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3239
+ #
3240
+ # @example Basic example
3241
+ # require "google/cloud/compute/v1"
3242
+ #
3243
+ # # Create a client object. The client can be reused for multiple calls.
3244
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3245
+ #
3246
+ # # Create a request. To set request fields, pass in keyword arguments.
3247
+ # request = Google::Cloud::Compute::V1::SetSecurityPolicyInstanceRequest.new
3248
+ #
3249
+ # # Call the set_security_policy method.
3250
+ # result = client.set_security_policy request
3251
+ #
3252
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3253
+ # p result
3254
+ #
3255
+ def set_security_policy request, options = nil
3256
+ raise ::ArgumentError, "request must be provided" if request.nil?
3257
+
3258
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetSecurityPolicyInstanceRequest
3259
+
3260
+ # Converts hash and nil to an options object
3261
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3262
+
3263
+ # Customize the options with defaults
3264
+ call_metadata = @config.rpcs.set_security_policy.metadata.to_h
3265
+
3266
+ # Set x-goog-api-client and x-goog-user-project headers
3267
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3268
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3269
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3270
+ transports_version_send: [:rest]
3271
+
3272
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3273
+
3274
+ options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
3275
+ metadata: call_metadata,
3276
+ retry_policy: @config.rpcs.set_security_policy.retry_policy
3277
+
3278
+ options.apply_defaults timeout: @config.timeout,
3279
+ metadata: @config.metadata,
3280
+ retry_policy: @config.retry_policy
3281
+
3282
+ @instances_stub.set_security_policy request, options do |result, response|
3283
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
3284
+ operation: result,
3285
+ client: zone_operations,
3286
+ request_values: {
3287
+ "project" => request.project,
3288
+ "zone" => request.zone
3289
+ },
3290
+ options: options
3291
+ )
3292
+ yield result, response if block_given?
3293
+ return result
3294
+ end
3295
+ rescue ::Gapic::Rest::Error => e
3296
+ raise ::Google::Cloud::Error.from_error(e)
3297
+ end
3298
+
2689
3299
  ##
2690
3300
  # Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
2691
3301
  #
@@ -2721,6 +3331,22 @@ module Google
2721
3331
  # @return [::Gapic::GenericLRO::Operation]
2722
3332
  #
2723
3333
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3334
+ #
3335
+ # @example Basic example
3336
+ # require "google/cloud/compute/v1"
3337
+ #
3338
+ # # Create a client object. The client can be reused for multiple calls.
3339
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3340
+ #
3341
+ # # Create a request. To set request fields, pass in keyword arguments.
3342
+ # request = Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest.new
3343
+ #
3344
+ # # Call the set_service_account method.
3345
+ # result = client.set_service_account request
3346
+ #
3347
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3348
+ # p result
3349
+ #
2724
3350
  def set_service_account request, options = nil
2725
3351
  raise ::ArgumentError, "request must be provided" if request.nil?
2726
3352
 
@@ -2800,6 +3426,22 @@ module Google
2800
3426
  # @return [::Gapic::GenericLRO::Operation]
2801
3427
  #
2802
3428
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3429
+ #
3430
+ # @example Basic example
3431
+ # require "google/cloud/compute/v1"
3432
+ #
3433
+ # # Create a client object. The client can be reused for multiple calls.
3434
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3435
+ #
3436
+ # # Create a request. To set request fields, pass in keyword arguments.
3437
+ # request = Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest.new
3438
+ #
3439
+ # # Call the set_shielded_instance_integrity_policy method.
3440
+ # result = client.set_shielded_instance_integrity_policy request
3441
+ #
3442
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3443
+ # p result
3444
+ #
2803
3445
  def set_shielded_instance_integrity_policy request, options = nil
2804
3446
  raise ::ArgumentError, "request must be provided" if request.nil?
2805
3447
 
@@ -2879,6 +3521,22 @@ module Google
2879
3521
  # @return [::Gapic::GenericLRO::Operation]
2880
3522
  #
2881
3523
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3524
+ #
3525
+ # @example Basic example
3526
+ # require "google/cloud/compute/v1"
3527
+ #
3528
+ # # Create a client object. The client can be reused for multiple calls.
3529
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3530
+ #
3531
+ # # Create a request. To set request fields, pass in keyword arguments.
3532
+ # request = Google::Cloud::Compute::V1::SetTagsInstanceRequest.new
3533
+ #
3534
+ # # Call the set_tags method.
3535
+ # result = client.set_tags request
3536
+ #
3537
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3538
+ # p result
3539
+ #
2882
3540
  def set_tags request, options = nil
2883
3541
  raise ::ArgumentError, "request must be provided" if request.nil?
2884
3542
 
@@ -2956,6 +3614,22 @@ module Google
2956
3614
  # @return [::Gapic::GenericLRO::Operation]
2957
3615
  #
2958
3616
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3617
+ #
3618
+ # @example Basic example
3619
+ # require "google/cloud/compute/v1"
3620
+ #
3621
+ # # Create a client object. The client can be reused for multiple calls.
3622
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3623
+ #
3624
+ # # Create a request. To set request fields, pass in keyword arguments.
3625
+ # request = Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest.new
3626
+ #
3627
+ # # Call the simulate_maintenance_event method.
3628
+ # result = client.simulate_maintenance_event request
3629
+ #
3630
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3631
+ # p result
3632
+ #
2959
3633
  def simulate_maintenance_event request, options = nil
2960
3634
  raise ::ArgumentError, "request must be provided" if request.nil?
2961
3635
 
@@ -3033,6 +3707,22 @@ module Google
3033
3707
  # @return [::Gapic::GenericLRO::Operation]
3034
3708
  #
3035
3709
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3710
+ #
3711
+ # @example Basic example
3712
+ # require "google/cloud/compute/v1"
3713
+ #
3714
+ # # Create a client object. The client can be reused for multiple calls.
3715
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3716
+ #
3717
+ # # Create a request. To set request fields, pass in keyword arguments.
3718
+ # request = Google::Cloud::Compute::V1::StartInstanceRequest.new
3719
+ #
3720
+ # # Call the start method.
3721
+ # result = client.start request
3722
+ #
3723
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3724
+ # p result
3725
+ #
3036
3726
  def start request, options = nil
3037
3727
  raise ::ArgumentError, "request must be provided" if request.nil?
3038
3728
 
@@ -3112,6 +3802,22 @@ module Google
3112
3802
  # @return [::Gapic::GenericLRO::Operation]
3113
3803
  #
3114
3804
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3805
+ #
3806
+ # @example Basic example
3807
+ # require "google/cloud/compute/v1"
3808
+ #
3809
+ # # Create a client object. The client can be reused for multiple calls.
3810
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3811
+ #
3812
+ # # Create a request. To set request fields, pass in keyword arguments.
3813
+ # request = Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest.new
3814
+ #
3815
+ # # Call the start_with_encryption_key method.
3816
+ # result = client.start_with_encryption_key request
3817
+ #
3818
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3819
+ # p result
3820
+ #
3115
3821
  def start_with_encryption_key request, options = nil
3116
3822
  raise ::ArgumentError, "request must be provided" if request.nil?
3117
3823
 
@@ -3191,6 +3897,22 @@ module Google
3191
3897
  # @return [::Gapic::GenericLRO::Operation]
3192
3898
  #
3193
3899
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3900
+ #
3901
+ # @example Basic example
3902
+ # require "google/cloud/compute/v1"
3903
+ #
3904
+ # # Create a client object. The client can be reused for multiple calls.
3905
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
3906
+ #
3907
+ # # Create a request. To set request fields, pass in keyword arguments.
3908
+ # request = Google::Cloud::Compute::V1::StopInstanceRequest.new
3909
+ #
3910
+ # # Call the stop method.
3911
+ # result = client.stop request
3912
+ #
3913
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
3914
+ # p result
3915
+ #
3194
3916
  def stop request, options = nil
3195
3917
  raise ::ArgumentError, "request must be provided" if request.nil?
3196
3918
 
@@ -3270,6 +3992,22 @@ module Google
3270
3992
  # @return [::Gapic::GenericLRO::Operation]
3271
3993
  #
3272
3994
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3995
+ #
3996
+ # @example Basic example
3997
+ # require "google/cloud/compute/v1"
3998
+ #
3999
+ # # Create a client object. The client can be reused for multiple calls.
4000
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4001
+ #
4002
+ # # Create a request. To set request fields, pass in keyword arguments.
4003
+ # request = Google::Cloud::Compute::V1::SuspendInstanceRequest.new
4004
+ #
4005
+ # # Call the suspend method.
4006
+ # result = client.suspend request
4007
+ #
4008
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
4009
+ # p result
4010
+ #
3273
4011
  def suspend request, options = nil
3274
4012
  raise ::ArgumentError, "request must be provided" if request.nil?
3275
4013
 
@@ -3347,6 +4085,22 @@ module Google
3347
4085
  # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
3348
4086
  #
3349
4087
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
4088
+ #
4089
+ # @example Basic example
4090
+ # require "google/cloud/compute/v1"
4091
+ #
4092
+ # # Create a client object. The client can be reused for multiple calls.
4093
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4094
+ #
4095
+ # # Create a request. To set request fields, pass in keyword arguments.
4096
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest.new
4097
+ #
4098
+ # # Call the test_iam_permissions method.
4099
+ # result = client.test_iam_permissions request
4100
+ #
4101
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
4102
+ # p result
4103
+ #
3350
4104
  def test_iam_permissions request, options = nil
3351
4105
  raise ::ArgumentError, "request must be provided" if request.nil?
3352
4106
 
@@ -3423,6 +4177,22 @@ module Google
3423
4177
  # @return [::Gapic::GenericLRO::Operation]
3424
4178
  #
3425
4179
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
4180
+ #
4181
+ # @example Basic example
4182
+ # require "google/cloud/compute/v1"
4183
+ #
4184
+ # # Create a client object. The client can be reused for multiple calls.
4185
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4186
+ #
4187
+ # # Create a request. To set request fields, pass in keyword arguments.
4188
+ # request = Google::Cloud::Compute::V1::UpdateInstanceRequest.new
4189
+ #
4190
+ # # Call the update method.
4191
+ # result = client.update request
4192
+ #
4193
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
4194
+ # p result
4195
+ #
3426
4196
  def update request, options = nil
3427
4197
  raise ::ArgumentError, "request must be provided" if request.nil?
3428
4198
 
@@ -3504,6 +4274,22 @@ module Google
3504
4274
  # @return [::Gapic::GenericLRO::Operation]
3505
4275
  #
3506
4276
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
4277
+ #
4278
+ # @example Basic example
4279
+ # require "google/cloud/compute/v1"
4280
+ #
4281
+ # # Create a client object. The client can be reused for multiple calls.
4282
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4283
+ #
4284
+ # # Create a request. To set request fields, pass in keyword arguments.
4285
+ # request = Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest.new
4286
+ #
4287
+ # # Call the update_access_config method.
4288
+ # result = client.update_access_config request
4289
+ #
4290
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
4291
+ # p result
4292
+ #
3507
4293
  def update_access_config request, options = nil
3508
4294
  raise ::ArgumentError, "request must be provided" if request.nil?
3509
4295
 
@@ -3583,6 +4369,22 @@ module Google
3583
4369
  # @return [::Gapic::GenericLRO::Operation]
3584
4370
  #
3585
4371
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
4372
+ #
4373
+ # @example Basic example
4374
+ # require "google/cloud/compute/v1"
4375
+ #
4376
+ # # Create a client object. The client can be reused for multiple calls.
4377
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4378
+ #
4379
+ # # Create a request. To set request fields, pass in keyword arguments.
4380
+ # request = Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest.new
4381
+ #
4382
+ # # Call the update_display_device method.
4383
+ # result = client.update_display_device request
4384
+ #
4385
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
4386
+ # p result
4387
+ #
3586
4388
  def update_display_device request, options = nil
3587
4389
  raise ::ArgumentError, "request must be provided" if request.nil?
3588
4390
 
@@ -3664,6 +4466,22 @@ module Google
3664
4466
  # @return [::Gapic::GenericLRO::Operation]
3665
4467
  #
3666
4468
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
4469
+ #
4470
+ # @example Basic example
4471
+ # require "google/cloud/compute/v1"
4472
+ #
4473
+ # # Create a client object. The client can be reused for multiple calls.
4474
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4475
+ #
4476
+ # # Create a request. To set request fields, pass in keyword arguments.
4477
+ # request = Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest.new
4478
+ #
4479
+ # # Call the update_network_interface method.
4480
+ # result = client.update_network_interface request
4481
+ #
4482
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
4483
+ # p result
4484
+ #
3667
4485
  def update_network_interface request, options = nil
3668
4486
  raise ::ArgumentError, "request must be provided" if request.nil?
3669
4487
 
@@ -3743,6 +4561,22 @@ module Google
3743
4561
  # @return [::Gapic::GenericLRO::Operation]
3744
4562
  #
3745
4563
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
4564
+ #
4565
+ # @example Basic example
4566
+ # require "google/cloud/compute/v1"
4567
+ #
4568
+ # # Create a client object. The client can be reused for multiple calls.
4569
+ # client = Google::Cloud::Compute::V1::Instances::Rest::Client.new
4570
+ #
4571
+ # # Create a request. To set request fields, pass in keyword arguments.
4572
+ # request = Google::Cloud::Compute::V1::UpdateShieldedInstanceConfigInstanceRequest.new
4573
+ #
4574
+ # # Call the update_shielded_instance_config method.
4575
+ # result = client.update_shielded_instance_config request
4576
+ #
4577
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
4578
+ # p result
4579
+ #
3746
4580
  def update_shielded_instance_config request, options = nil
3747
4581
  raise ::ArgumentError, "request must be provided" if request.nil?
3748
4582
 
@@ -4073,6 +4907,11 @@ module Google
4073
4907
  #
4074
4908
  attr_reader :set_scheduling
4075
4909
  ##
4910
+ # RPC-specific configuration for `set_security_policy`
4911
+ # @return [::Gapic::Config::Method]
4912
+ #
4913
+ attr_reader :set_security_policy
4914
+ ##
4076
4915
  # RPC-specific configuration for `set_service_account`
4077
4916
  # @return [::Gapic::Config::Method]
4078
4917
  #
@@ -4209,6 +5048,8 @@ module Google
4209
5048
  @set_name = ::Gapic::Config::Method.new set_name_config
4210
5049
  set_scheduling_config = parent_rpcs.set_scheduling if parent_rpcs.respond_to? :set_scheduling
4211
5050
  @set_scheduling = ::Gapic::Config::Method.new set_scheduling_config
5051
+ set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
5052
+ @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
4212
5053
  set_service_account_config = parent_rpcs.set_service_account if parent_rpcs.respond_to? :set_service_account
4213
5054
  @set_service_account = ::Gapic::Config::Method.new set_service_account_config
4214
5055
  set_shielded_instance_integrity_policy_config = parent_rpcs.set_shielded_instance_integrity_policy if parent_rpcs.respond_to? :set_shielded_instance_integrity_policy