google-cloud-compute-v1 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  4. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +2 -2
  5. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +2 -2
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +78 -1
  7. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
  8. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +79 -2
  9. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
  10. data/lib/google/cloud/compute/v1/compute_pb.rb +534 -2
  11. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  12. data/lib/google/cloud/compute/v1/disks/rest/client.rb +3 -3
  13. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  14. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  15. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
  16. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  17. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +2 -2
  18. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  19. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  20. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  21. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  22. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  23. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +4 -4
  24. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +2 -2
  25. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  26. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +5 -5
  27. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +3 -3
  28. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +1 -1
  29. data/lib/google/cloud/compute/v1/instances/rest/client.rb +162 -6
  30. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
  31. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +2 -2
  32. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  33. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +1 -1
  34. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  35. data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
  36. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +777 -0
  37. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
  38. data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
  39. data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
  40. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  41. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +3 -3
  42. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  43. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +3 -3
  44. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +2 -2
  45. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  46. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +2 -2
  47. data/lib/google/cloud/compute/v1/projects/rest/client.rb +4 -4
  48. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +4 -4
  49. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +5 -5
  50. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  51. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +1 -1
  52. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +84 -2
  53. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
  54. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  55. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +2 -2
  56. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  57. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  58. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -4
  59. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  60. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +3 -3
  62. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  63. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +3 -3
  64. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  65. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +5 -5
  66. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  67. data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
  68. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +84 -2
  69. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
  70. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +2 -2
  71. data/lib/google/cloud/compute/v1/routers/rest/client.rb +3 -3
  72. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  73. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +2 -2
  74. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +5 -5
  75. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +76 -1
  76. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
  77. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +4 -4
  78. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +2 -2
  79. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -3
  80. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +4 -4
  81. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +3 -3
  82. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +3 -3
  83. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +2 -2
  84. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +2 -2
  85. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +1 -1
  86. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +1 -1
  87. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +2 -2
  88. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +2 -2
  89. data/lib/google/cloud/compute/v1/version.rb +1 -1
  90. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +2 -2
  91. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +2 -2
  92. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  93. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  94. data/lib/google/cloud/compute/v1.rb +1 -0
  95. data/proto_docs/google/cloud/compute/v1/compute.rb +1647 -330
  96. metadata +8 -3
@@ -134,6 +134,8 @@ module Google
134
134
 
135
135
  default_config.rpcs.reset.timeout = 600.0
136
136
 
137
+ default_config.rpcs.resume.timeout = 600.0
138
+
137
139
  default_config.rpcs.send_diagnostic_interrupt.timeout = 600.0
138
140
 
139
141
  default_config.rpcs.set_deletion_protection.timeout = 600.0
@@ -168,6 +170,8 @@ module Google
168
170
 
169
171
  default_config.rpcs.stop.timeout = 600.0
170
172
 
173
+ default_config.rpcs.suspend.timeout = 600.0
174
+
171
175
  default_config.rpcs.test_iam_permissions.timeout = 600.0
172
176
 
173
177
  default_config.rpcs.update.timeout = 600.0
@@ -404,7 +408,7 @@ module Google
404
408
  # the default parameter values, pass an empty Hash as a request object (see above).
405
409
  #
406
410
  # @param filter [::String]
407
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
411
+ # A filter expression that filters resources listed in the response. The 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) ```
408
412
  # @param include_all_scopes [::Boolean]
409
413
  # 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.
410
414
  # @param max_results [::Integer]
@@ -1289,7 +1293,7 @@ module Google
1289
1293
  # Note: currently retry functionality is not implemented. While it is possible
1290
1294
  # to set it using ::Gapic::CallOptions, it will not be applied
1291
1295
  #
1292
- # @overload insert(instance_resource: nil, project: nil, request_id: nil, source_instance_template: nil, zone: nil)
1296
+ # @overload insert(instance_resource: nil, project: nil, request_id: nil, source_instance_template: nil, source_machine_image: nil, zone: nil)
1293
1297
  # Pass arguments to `insert` via keyword arguments. Note that at
1294
1298
  # least one keyword argument is required. To specify no parameters, or to keep all
1295
1299
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1302,6 +1306,8 @@ module Google
1302
1306
  # 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).
1303
1307
  # @param source_instance_template [::String]
1304
1308
  # Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate
1309
+ # @param source_machine_image [::String]
1310
+ # Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage
1305
1311
  # @param zone [::String]
1306
1312
  # The name of the zone for this request.
1307
1313
  # @yield [result, response] Access the result along with the Faraday response object
@@ -1365,7 +1371,7 @@ module Google
1365
1371
  # the default parameter values, pass an empty Hash as a request object (see above).
1366
1372
  #
1367
1373
  # @param filter [::String]
1368
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
1374
+ # A filter expression that filters resources listed in the response. The 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) ```
1369
1375
  # @param max_results [::Integer]
1370
1376
  # 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`)
1371
1377
  # @param order_by [::String]
@@ -1439,7 +1445,7 @@ module Google
1439
1445
  # the default parameter values, pass an empty Hash as a request object (see above).
1440
1446
  #
1441
1447
  # @param filter [::String]
1442
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
1448
+ # A filter expression that filters resources listed in the response. The 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) ```
1443
1449
  # @param instance [::String]
1444
1450
  # Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
1445
1451
  # @param max_results [::Integer]
@@ -1632,6 +1638,74 @@ module Google
1632
1638
  raise ::Google::Cloud::Error.from_error(gapic_error)
1633
1639
  end
1634
1640
 
1641
+ ##
1642
+ # Resumes an instance that was suspended using the instances().suspend method.
1643
+ #
1644
+ # @overload resume(request, options = nil)
1645
+ # Pass arguments to `resume` via a request object, either of type
1646
+ # {::Google::Cloud::Compute::V1::ResumeInstanceRequest} or an equivalent Hash.
1647
+ #
1648
+ # @param request [::Google::Cloud::Compute::V1::ResumeInstanceRequest, ::Hash]
1649
+ # A request object representing the call parameters. Required. To specify no
1650
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1651
+ # @param options [::Gapic::CallOptions, ::Hash]
1652
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1653
+ # Note: currently retry functionality is not implemented. While it is possible
1654
+ # to set it using ::Gapic::CallOptions, it will not be applied
1655
+ #
1656
+ # @overload resume(instance: nil, project: nil, request_id: nil, zone: nil)
1657
+ # Pass arguments to `resume` via keyword arguments. Note that at
1658
+ # least one keyword argument is required. To specify no parameters, or to keep all
1659
+ # the default parameter values, pass an empty Hash as a request object (see above).
1660
+ #
1661
+ # @param instance [::String]
1662
+ # Name of the instance resource to resume.
1663
+ # @param project [::String]
1664
+ # Project ID for this request.
1665
+ # @param request_id [::String]
1666
+ # 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).
1667
+ # @param zone [::String]
1668
+ # The name of the zone for this request.
1669
+ # @yield [result, response] Access the result along with the Faraday response object
1670
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1671
+ # @yieldparam response [::Faraday::Response]
1672
+ #
1673
+ # @return [::Gapic::Rest::BaseOperation]
1674
+ #
1675
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1676
+ def resume request, options = nil
1677
+ raise ::ArgumentError, "request must be provided" if request.nil?
1678
+
1679
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ResumeInstanceRequest
1680
+
1681
+ # Converts hash and nil to an options object
1682
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1683
+
1684
+ # Customize the options with defaults
1685
+ call_metadata = @config.rpcs.resume.metadata.to_h
1686
+
1687
+ # Set x-goog-api-client header
1688
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1689
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1690
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1691
+ transports_version_send: [:rest]
1692
+
1693
+ options.apply_defaults timeout: @config.rpcs.resume.timeout,
1694
+ metadata: call_metadata
1695
+
1696
+ options.apply_defaults timeout: @config.timeout,
1697
+ metadata: @config.metadata
1698
+
1699
+ @instances_stub.resume request, options do |result, response|
1700
+ result = ::Gapic::Rest::BaseOperation.new result
1701
+ yield result, response if block_given?
1702
+ return result
1703
+ end
1704
+ rescue ::Faraday::Error => e
1705
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1706
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1707
+ end
1708
+
1635
1709
  ##
1636
1710
  # Sends diagnostic interrupt to the instance.
1637
1711
  #
@@ -2257,7 +2331,7 @@ module Google
2257
2331
  end
2258
2332
 
2259
2333
  ##
2260
- # Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
2334
+ # Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM availability policies.
2261
2335
  #
2262
2336
  # @overload set_scheduling(request, options = nil)
2263
2337
  # Pass arguments to `set_scheduling` via a request object, either of type
@@ -2537,7 +2611,7 @@ module Google
2537
2611
  end
2538
2612
 
2539
2613
  ##
2540
- # Simulates a maintenance event on the instance.
2614
+ # Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
2541
2615
  #
2542
2616
  # @overload simulate_maintenance_event(request, options = nil)
2543
2617
  # Pass arguments to `simulate_maintenance_event` via a request object, either of type
@@ -2808,6 +2882,74 @@ module Google
2808
2882
  raise ::Google::Cloud::Error.from_error(gapic_error)
2809
2883
  end
2810
2884
 
2885
+ ##
2886
+ # This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
2887
+ #
2888
+ # @overload suspend(request, options = nil)
2889
+ # Pass arguments to `suspend` via a request object, either of type
2890
+ # {::Google::Cloud::Compute::V1::SuspendInstanceRequest} or an equivalent Hash.
2891
+ #
2892
+ # @param request [::Google::Cloud::Compute::V1::SuspendInstanceRequest, ::Hash]
2893
+ # A request object representing the call parameters. Required. To specify no
2894
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2895
+ # @param options [::Gapic::CallOptions, ::Hash]
2896
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2897
+ # Note: currently retry functionality is not implemented. While it is possible
2898
+ # to set it using ::Gapic::CallOptions, it will not be applied
2899
+ #
2900
+ # @overload suspend(instance: nil, project: nil, request_id: nil, zone: nil)
2901
+ # Pass arguments to `suspend` via keyword arguments. Note that at
2902
+ # least one keyword argument is required. To specify no parameters, or to keep all
2903
+ # the default parameter values, pass an empty Hash as a request object (see above).
2904
+ #
2905
+ # @param instance [::String]
2906
+ # Name of the instance resource to suspend.
2907
+ # @param project [::String]
2908
+ # Project ID for this request.
2909
+ # @param request_id [::String]
2910
+ # 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).
2911
+ # @param zone [::String]
2912
+ # The name of the zone for this request.
2913
+ # @yield [result, response] Access the result along with the Faraday response object
2914
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2915
+ # @yieldparam response [::Faraday::Response]
2916
+ #
2917
+ # @return [::Gapic::Rest::BaseOperation]
2918
+ #
2919
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2920
+ def suspend request, options = nil
2921
+ raise ::ArgumentError, "request must be provided" if request.nil?
2922
+
2923
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SuspendInstanceRequest
2924
+
2925
+ # Converts hash and nil to an options object
2926
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2927
+
2928
+ # Customize the options with defaults
2929
+ call_metadata = @config.rpcs.suspend.metadata.to_h
2930
+
2931
+ # Set x-goog-api-client header
2932
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2933
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2934
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2935
+ transports_version_send: [:rest]
2936
+
2937
+ options.apply_defaults timeout: @config.rpcs.suspend.timeout,
2938
+ metadata: call_metadata
2939
+
2940
+ options.apply_defaults timeout: @config.timeout,
2941
+ metadata: @config.metadata
2942
+
2943
+ @instances_stub.suspend request, options do |result, response|
2944
+ result = ::Gapic::Rest::BaseOperation.new result
2945
+ yield result, response if block_given?
2946
+ return result
2947
+ end
2948
+ rescue ::Faraday::Error => e
2949
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2950
+ raise ::Google::Cloud::Error.from_error(gapic_error)
2951
+ end
2952
+
2811
2953
  ##
2812
2954
  # Returns permissions that a caller has on the specified resource.
2813
2955
  #
@@ -3433,6 +3575,11 @@ module Google
3433
3575
  #
3434
3576
  attr_reader :reset
3435
3577
  ##
3578
+ # RPC-specific configuration for `resume`
3579
+ # @return [::Gapic::Config::Method]
3580
+ #
3581
+ attr_reader :resume
3582
+ ##
3436
3583
  # RPC-specific configuration for `send_diagnostic_interrupt`
3437
3584
  # @return [::Gapic::Config::Method]
3438
3585
  #
@@ -3518,6 +3665,11 @@ module Google
3518
3665
  #
3519
3666
  attr_reader :stop
3520
3667
  ##
3668
+ # RPC-specific configuration for `suspend`
3669
+ # @return [::Gapic::Config::Method]
3670
+ #
3671
+ attr_reader :suspend
3672
+ ##
3521
3673
  # RPC-specific configuration for `test_iam_permissions`
3522
3674
  # @return [::Gapic::Config::Method]
3523
3675
  #
@@ -3590,6 +3742,8 @@ module Google
3590
3742
  @remove_resource_policies = ::Gapic::Config::Method.new remove_resource_policies_config
3591
3743
  reset_config = parent_rpcs.reset if parent_rpcs.respond_to? :reset
3592
3744
  @reset = ::Gapic::Config::Method.new reset_config
3745
+ resume_config = parent_rpcs.resume if parent_rpcs.respond_to? :resume
3746
+ @resume = ::Gapic::Config::Method.new resume_config
3593
3747
  send_diagnostic_interrupt_config = parent_rpcs.send_diagnostic_interrupt if parent_rpcs.respond_to? :send_diagnostic_interrupt
3594
3748
  @send_diagnostic_interrupt = ::Gapic::Config::Method.new send_diagnostic_interrupt_config
3595
3749
  set_deletion_protection_config = parent_rpcs.set_deletion_protection if parent_rpcs.respond_to? :set_deletion_protection
@@ -3624,6 +3778,8 @@ module Google
3624
3778
  @start_with_encryption_key = ::Gapic::Config::Method.new start_with_encryption_key_config
3625
3779
  stop_config = parent_rpcs.stop if parent_rpcs.respond_to? :stop
3626
3780
  @stop = ::Gapic::Config::Method.new stop_config
3781
+ suspend_config = parent_rpcs.suspend if parent_rpcs.respond_to? :suspend
3782
+ @suspend = ::Gapic::Config::Method.new suspend_config
3627
3783
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
3628
3784
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3629
3785
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
@@ -766,6 +766,7 @@ module Google
766
766
  query_string_params = {}
767
767
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
768
768
  query_string_params["sourceInstanceTemplate"] = request_pb.source_instance_template.to_s if request_pb.has_source_instance_template?
769
+ query_string_params["sourceMachineImage"] = request_pb.source_machine_image.to_s if request_pb.has_source_machine_image?
769
770
 
770
771
  [uri, body, query_string_params]
771
772
  end
@@ -959,6 +960,51 @@ module Google
959
960
  [uri, body, query_string_params]
960
961
  end
961
962
 
963
+ ##
964
+ # Baseline implementation for the resume REST call
965
+ #
966
+ # @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
967
+ # A request object representing the call parameters. Required.
968
+ # @param options [::Gapic::CallOptions]
969
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
970
+ #
971
+ # @yield [result, response] Access the result along with the Faraday response object
972
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
973
+ # @yieldparam response [::Faraday::Response]
974
+ #
975
+ # @return [::Google::Cloud::Compute::V1::Operation]
976
+ # A result object deserialized from the server's reply
977
+ def resume request_pb, options = nil
978
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
979
+
980
+ uri, _body, query_string_params = transcode_resume_request request_pb
981
+ response = @client_stub.make_post_request(
982
+ uri: uri,
983
+ params: query_string_params,
984
+ options: options
985
+ )
986
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
987
+
988
+ yield result, response if block_given?
989
+ result
990
+ end
991
+
992
+ ##
993
+ # GRPC transcoding helper method for the resume REST call
994
+ #
995
+ # @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
996
+ # A request object representing the call parameters. Required.
997
+ # @return [Array(String, [String, nil], Hash{String => String})]
998
+ # Uri, Body, Query string parameters
999
+ def transcode_resume_request request_pb
1000
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/resume"
1001
+ body = nil
1002
+ query_string_params = {}
1003
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1004
+
1005
+ [uri, body, query_string_params]
1006
+ end
1007
+
962
1008
  ##
963
1009
  # Baseline implementation for the send_diagnostic_interrupt REST call
964
1010
  #
@@ -1732,6 +1778,51 @@ module Google
1732
1778
  [uri, body, query_string_params]
1733
1779
  end
1734
1780
 
1781
+ ##
1782
+ # Baseline implementation for the suspend REST call
1783
+ #
1784
+ # @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
1785
+ # A request object representing the call parameters. Required.
1786
+ # @param options [::Gapic::CallOptions]
1787
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1788
+ #
1789
+ # @yield [result, response] Access the result along with the Faraday response object
1790
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1791
+ # @yieldparam response [::Faraday::Response]
1792
+ #
1793
+ # @return [::Google::Cloud::Compute::V1::Operation]
1794
+ # A result object deserialized from the server's reply
1795
+ def suspend request_pb, options = nil
1796
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1797
+
1798
+ uri, _body, query_string_params = transcode_suspend_request request_pb
1799
+ response = @client_stub.make_post_request(
1800
+ uri: uri,
1801
+ params: query_string_params,
1802
+ options: options
1803
+ )
1804
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1805
+
1806
+ yield result, response if block_given?
1807
+ result
1808
+ end
1809
+
1810
+ ##
1811
+ # GRPC transcoding helper method for the suspend REST call
1812
+ #
1813
+ # @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
1814
+ # A request object representing the call parameters. Required.
1815
+ # @return [Array(String, [String, nil], Hash{String => String})]
1816
+ # Uri, Body, Query string parameters
1817
+ def transcode_suspend_request request_pb
1818
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/suspend"
1819
+ body = nil
1820
+ query_string_params = {}
1821
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1822
+
1823
+ [uri, body, query_string_params]
1824
+ end
1825
+
1735
1826
  ##
1736
1827
  # Baseline implementation for the test_iam_permissions REST call
1737
1828
  #
@@ -167,7 +167,7 @@ module Google
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. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
170
+ # A filter expression that filters resources listed in the response. The 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) ```
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]
@@ -444,7 +444,7 @@ module Google
444
444
  # the default parameter values, pass an empty Hash as a request object (see above).
445
445
  #
446
446
  # @param filter [::String]
447
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
447
+ # A filter expression that filters resources listed in the response. The 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) ```
448
448
  # @param max_results [::Integer]
449
449
  # 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`)
450
450
  # @param order_by [::String]
@@ -219,7 +219,7 @@ module Google
219
219
  # the default parameter values, pass an empty Hash as a request object (see above).
220
220
  #
221
221
  # @param filter [::String]
222
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
222
+ # A filter expression that filters resources listed in the response. The 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) ```
223
223
  # @param max_results [::Integer]
224
224
  # 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`)
225
225
  # @param order_by [::String]
@@ -425,7 +425,7 @@ module Google
425
425
  # the default parameter values, pass an empty Hash as a request object (see above).
426
426
  #
427
427
  # @param filter [::String]
428
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
428
+ # A filter expression that filters resources listed in the response. The 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) ```
429
429
  # @param max_results [::Integer]
430
430
  # 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`)
431
431
  # @param order_by [::String]
@@ -429,7 +429,7 @@ module Google
429
429
  # the default parameter values, pass an empty Hash as a request object (see above).
430
430
  #
431
431
  # @param filter [::String]
432
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. 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) ```
432
+ # A filter expression that filters resources listed in the response. The 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) ```
433
433
  # @param max_results [::Integer]
434
434
  # 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`)
435
435
  # @param order_by [::String]
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module MachineImages
26
+ # Credentials for the MachineImages API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/compute",
30
+ "https://www.googleapis.com/auth/cloud-platform"
31
+ ]
32
+ self.env_vars = [
33
+ "COMPUTE_CREDENTIALS",
34
+ "COMPUTE_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "COMPUTE_CREDENTIALS_JSON",
39
+ "COMPUTE_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end