google-cloud-compute-v1 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +181 -14
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +330 -20
  4. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +64 -0
  5. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  7. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  8. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  9. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +198 -23
  13. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +499 -40
  14. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +62 -0
  15. data/lib/google/cloud/compute/v1/compute_pb.rb +281 -25
  16. data/lib/google/cloud/compute/v1/cross_site_networks/credentials.rb +52 -0
  17. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +975 -0
  18. data/lib/google/cloud/compute/v1/cross_site_networks/rest/service_stub.rb +391 -0
  19. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +51 -0
  20. data/lib/google/cloud/compute/v1/cross_site_networks.rb +47 -0
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +181 -14
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +390 -42
  23. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  24. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  25. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  26. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  27. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  28. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  29. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  31. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  32. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  33. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +217 -10
  34. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +63 -0
  35. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +151 -15
  36. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +246 -21
  37. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +203 -18
  38. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +91 -9
  39. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +128 -10
  40. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +333 -21
  41. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +63 -0
  42. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -1
  43. data/lib/google/cloud/compute/v1/images/rest/client.rb +161 -18
  44. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +159 -24
  45. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +920 -95
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +473 -40
  47. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +64 -0
  48. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  49. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  50. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1144 -99
  51. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +127 -0
  52. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  53. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  54. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  55. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  56. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  57. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  58. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  59. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  60. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  61. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  62. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  63. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  64. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  65. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  66. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  67. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  68. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  69. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  70. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  71. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  72. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  73. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  74. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  75. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  76. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  77. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  78. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  79. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  80. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  81. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  82. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  83. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  84. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  85. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  86. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  87. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  88. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  89. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  90. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  91. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1268 -0
  92. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +521 -0
  93. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  94. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  95. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  96. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +269 -29
  97. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  98. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  99. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  100. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  101. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  102. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  103. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  104. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  105. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  106. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  107. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1268 -0
  108. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +521 -0
  109. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  110. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  111. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  112. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +280 -14
  113. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +64 -0
  114. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  115. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  116. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  117. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  118. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  119. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  120. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  121. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  122. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  123. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  124. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  125. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  126. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  127. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  128. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  129. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  130. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  131. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  132. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  133. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  134. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  135. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  136. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  137. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  138. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  139. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  140. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  141. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  142. data/lib/google/cloud/compute/v1/rest.rb +10 -0
  143. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  144. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  145. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  146. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  147. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +234 -22
  148. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  149. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +130 -13
  150. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  151. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  152. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  153. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  154. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  155. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  156. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  157. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  158. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +320 -20
  159. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +64 -0
  160. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +387 -26
  161. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +64 -0
  162. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  163. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  164. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  165. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  166. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  167. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  168. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  169. data/lib/google/cloud/compute/v1/version.rb +1 -1
  170. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  171. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  172. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  173. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  174. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  175. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  176. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  177. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  178. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  179. data/lib/google/cloud/compute/v1.rb +10 -0
  180. data/proto_docs/google/api/client.rb +149 -29
  181. data/proto_docs/google/cloud/compute/v1/compute.rb +44226 -5514
  182. metadata +52 -2
@@ -92,6 +92,8 @@ module Google
92
92
 
93
93
  default_config.rpcs.set_security_policy.timeout = 600.0
94
94
 
95
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
96
+
95
97
  default_config
96
98
  end
97
99
  yield @configure if block_given?
@@ -211,7 +213,10 @@ module Google
211
213
  # Service calls
212
214
 
213
215
  ##
214
- # Retrieves an aggregated list of target instances. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
216
+ # Retrieves an aggregated list of target instances.
217
+ #
218
+ # To prevent failure, Google recommends that you set the
219
+ # `returnPartialSuccess` parameter to `true`.
215
220
  #
216
221
  # @overload aggregated_list(request, options = nil)
217
222
  # Pass arguments to `aggregated_list` via a request object, either of type
@@ -229,21 +234,106 @@ module Google
229
234
  # the default parameter values, pass an empty Hash as a request object (see above).
230
235
  #
231
236
  # @param filter [::String]
232
- # 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.
237
+ # A filter expression that filters resources listed in the response. Most
238
+ # Compute resources support two types of filter expressions:
239
+ # expressions that support regular expressions and expressions that follow
240
+ # API improvement proposal AIP-160.
241
+ # These two types of filter expressions cannot be mixed in one request.
242
+ #
243
+ # If you want to use AIP-160, your expression must specify the field name, an
244
+ # operator, and the value that you want to use for filtering. The value
245
+ # must be a string, a number, or a boolean. The operator
246
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
247
+ #
248
+ # For example, if you are filtering Compute Engine instances, you can
249
+ # exclude instances named `example-instance` by specifying
250
+ # `name != example-instance`.
251
+ #
252
+ # The `:*` comparison can be used to test whether a key has been defined.
253
+ # For example, to find all objects with `owner` label use:
254
+ # ```
255
+ # labels.owner:*
256
+ # ```
257
+ #
258
+ # You can also filter nested fields. For example, you could specify
259
+ # `scheduling.automaticRestart = false` to include instances only
260
+ # if they are not scheduled for automatic restarts. You can use filtering
261
+ # on nested fields to filter based onresource labels.
262
+ #
263
+ # To filter on multiple expressions, provide each separate expression within
264
+ # parentheses. For example:
265
+ # ```
266
+ # (scheduling.automaticRestart = true)
267
+ # (cpuPlatform = "Intel Skylake")
268
+ # ```
269
+ # By default, each expression is an `AND` expression. However, you
270
+ # can include `AND` and `OR` expressions explicitly.
271
+ # For example:
272
+ # ```
273
+ # (cpuPlatform = "Intel Skylake") OR
274
+ # (cpuPlatform = "Intel Broadwell") AND
275
+ # (scheduling.automaticRestart = true)
276
+ # ```
277
+ #
278
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
279
+ # (not equal) operator against a single un-parenthesized expression with or
280
+ # without quotes or against multiple parenthesized expressions. Examples:
281
+ #
282
+ # `fieldname eq unquoted literal`
283
+ # `fieldname eq 'single quoted literal'`
284
+ # `fieldname eq "double quoted literal"`
285
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
286
+ #
287
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
288
+ # The literal value must match the entire field.
289
+ #
290
+ # For example, to filter for instances that do not end with name "instance",
291
+ # you would use `name ne .*instance`.
292
+ #
293
+ # You cannot combine constraints on multiple fields using regular
294
+ # expressions.
233
295
  # @param include_all_scopes [::Boolean]
234
- # 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.
296
+ # Indicates whether every visible scope for each scope type (zone, region,
297
+ # global) should be included in the response. For new resource types added
298
+ # after this field, the flag has no effect as new resource types will always
299
+ # include every visible scope for each scope type in response. For resource
300
+ # types which predate this field, if this flag is omitted or false, only
301
+ # scopes of the scope types where the resource type is expected to be found
302
+ # will be included.
235
303
  # @param max_results [::Integer]
236
- # 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`)
304
+ # The maximum number of results per page that should be returned.
305
+ # If the number of available results is larger than `maxResults`,
306
+ # Compute Engine returns a `nextPageToken` that can be used to get
307
+ # the next page of results in subsequent list requests. Acceptable values are
308
+ # `0` to `500`, inclusive. (Default: `500`)
237
309
  # @param order_by [::String]
238
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
310
+ # Sorts list results by a certain order. By default, results
311
+ # are returned in alphanumerical order based on the resource name.
312
+ #
313
+ # You can also sort results in descending order based on the creation
314
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
315
+ # results based on the `creationTimestamp` field in
316
+ # reverse chronological order (newest result first). Use this to sort
317
+ # resources like operations so that the newest operation is returned first.
318
+ #
319
+ # Currently, only sorting by `name` or
320
+ # `creationTimestamp desc` is supported.
239
321
  # @param page_token [::String]
240
- # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
322
+ # Specifies a page token to use. Set `pageToken` to the
323
+ # `nextPageToken` returned by a previous list request to get
324
+ # the next page of results.
241
325
  # @param project [::String]
242
326
  # Project ID for this request.
243
327
  # @param return_partial_success [::Boolean]
244
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
328
+ # Opt-in for partial success behavior which provides partial results in case
329
+ # of failure. The default value is false.
330
+ #
331
+ # For example, when partial success behavior is enabled, aggregatedList for a
332
+ # single zone scope either returns all resources in the zone or no resources,
333
+ # with an error code.
245
334
  # @param service_project_number [::Integer]
246
- # The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.
335
+ # The Shared VPC service project id or service project number for which
336
+ # aggregated list request is invoked for subnetworks list-usable api.
247
337
  # @yield [result, operation] Access the result along with the TransportOperation object
248
338
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetInstancesScopedList>]
249
339
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -325,7 +415,19 @@ module Google
325
415
  # @param project [::String]
326
416
  # Project ID for this request.
327
417
  # @param request_id [::String]
328
- # 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).
418
+ # An optional request ID to identify requests. Specify a unique request ID so
419
+ # that if you must retry your request, the server will know to ignore the
420
+ # request if it has already been completed.
421
+ #
422
+ # For example, consider a situation where you make an initial request and
423
+ # the request times out. If you make the request again with the same
424
+ # request ID, the server can check if original operation with the same
425
+ # request ID was received, and if so, will ignore the second request. This
426
+ # prevents clients from accidentally creating duplicate commitments.
427
+ #
428
+ # The request ID must be
429
+ # a valid UUID with the exception that zero UUID is not supported
430
+ # (00000000-0000-0000-0000-000000000000).
329
431
  # @param target_instance [::String]
330
432
  # Name of the TargetInstance resource to delete.
331
433
  # @param zone [::String]
@@ -481,7 +583,8 @@ module Google
481
583
  end
482
584
 
483
585
  ##
484
- # Creates a TargetInstance resource in the specified project and zone using the data included in the request.
586
+ # Creates a TargetInstance resource in the specified project and zone using
587
+ # the data included in the request.
485
588
  #
486
589
  # @overload insert(request, options = nil)
487
590
  # Pass arguments to `insert` via a request object, either of type
@@ -501,7 +604,19 @@ module Google
501
604
  # @param project [::String]
502
605
  # Project ID for this request.
503
606
  # @param request_id [::String]
504
- # 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).
607
+ # An optional request ID to identify requests. Specify a unique request ID so
608
+ # that if you must retry your request, the server will know to ignore the
609
+ # request if it has already been completed.
610
+ #
611
+ # For example, consider a situation where you make an initial request and
612
+ # the request times out. If you make the request again with the same
613
+ # request ID, the server can check if original operation with the same
614
+ # request ID was received, and if so, will ignore the second request. This
615
+ # prevents clients from accidentally creating duplicate commitments.
616
+ #
617
+ # The request ID must be
618
+ # a valid UUID with the exception that zero UUID is not supported
619
+ # (00000000-0000-0000-0000-000000000000).
505
620
  # @param target_instance_resource [::Google::Cloud::Compute::V1::TargetInstance, ::Hash]
506
621
  # The body resource for this request
507
622
  # @param zone [::String]
@@ -575,7 +690,8 @@ module Google
575
690
  end
576
691
 
577
692
  ##
578
- # Retrieves a list of TargetInstance resources available to the specified project and zone.
693
+ # Retrieves a list of TargetInstance resources available to the specified
694
+ # project and zone.
579
695
  #
580
696
  # @overload list(request, options = nil)
581
697
  # Pass arguments to `list` via a request object, either of type
@@ -593,17 +709,95 @@ module Google
593
709
  # the default parameter values, pass an empty Hash as a request object (see above).
594
710
  #
595
711
  # @param filter [::String]
596
- # 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.
712
+ # A filter expression that filters resources listed in the response. Most
713
+ # Compute resources support two types of filter expressions:
714
+ # expressions that support regular expressions and expressions that follow
715
+ # API improvement proposal AIP-160.
716
+ # These two types of filter expressions cannot be mixed in one request.
717
+ #
718
+ # If you want to use AIP-160, your expression must specify the field name, an
719
+ # operator, and the value that you want to use for filtering. The value
720
+ # must be a string, a number, or a boolean. The operator
721
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
722
+ #
723
+ # For example, if you are filtering Compute Engine instances, you can
724
+ # exclude instances named `example-instance` by specifying
725
+ # `name != example-instance`.
726
+ #
727
+ # The `:*` comparison can be used to test whether a key has been defined.
728
+ # For example, to find all objects with `owner` label use:
729
+ # ```
730
+ # labels.owner:*
731
+ # ```
732
+ #
733
+ # You can also filter nested fields. For example, you could specify
734
+ # `scheduling.automaticRestart = false` to include instances only
735
+ # if they are not scheduled for automatic restarts. You can use filtering
736
+ # on nested fields to filter based onresource labels.
737
+ #
738
+ # To filter on multiple expressions, provide each separate expression within
739
+ # parentheses. For example:
740
+ # ```
741
+ # (scheduling.automaticRestart = true)
742
+ # (cpuPlatform = "Intel Skylake")
743
+ # ```
744
+ # By default, each expression is an `AND` expression. However, you
745
+ # can include `AND` and `OR` expressions explicitly.
746
+ # For example:
747
+ # ```
748
+ # (cpuPlatform = "Intel Skylake") OR
749
+ # (cpuPlatform = "Intel Broadwell") AND
750
+ # (scheduling.automaticRestart = true)
751
+ # ```
752
+ #
753
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
754
+ # (not equal) operator against a single un-parenthesized expression with or
755
+ # without quotes or against multiple parenthesized expressions. Examples:
756
+ #
757
+ # `fieldname eq unquoted literal`
758
+ # `fieldname eq 'single quoted literal'`
759
+ # `fieldname eq "double quoted literal"`
760
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
761
+ #
762
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
763
+ # The literal value must match the entire field.
764
+ #
765
+ # For example, to filter for instances that do not end with name "instance",
766
+ # you would use `name ne .*instance`.
767
+ #
768
+ # You cannot combine constraints on multiple fields using regular
769
+ # expressions.
597
770
  # @param max_results [::Integer]
598
- # 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`)
771
+ # The maximum number of results per page that should be returned.
772
+ # If the number of available results is larger than `maxResults`,
773
+ # Compute Engine returns a `nextPageToken` that can be used to get
774
+ # the next page of results in subsequent list requests. Acceptable values are
775
+ # `0` to `500`, inclusive. (Default: `500`)
599
776
  # @param order_by [::String]
600
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
777
+ # Sorts list results by a certain order. By default, results
778
+ # are returned in alphanumerical order based on the resource name.
779
+ #
780
+ # You can also sort results in descending order based on the creation
781
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
782
+ # results based on the `creationTimestamp` field in
783
+ # reverse chronological order (newest result first). Use this to sort
784
+ # resources like operations so that the newest operation is returned first.
785
+ #
786
+ # Currently, only sorting by `name` or
787
+ # `creationTimestamp desc` is supported.
601
788
  # @param page_token [::String]
602
- # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
789
+ # Specifies a page token to use. Set `pageToken` to the
790
+ # `nextPageToken` returned by a previous list request to get
791
+ # the next page of results.
603
792
  # @param project [::String]
604
793
  # Project ID for this request.
605
794
  # @param return_partial_success [::Boolean]
606
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
795
+ # Opt-in for partial success behavior which provides partial results in case
796
+ # of failure. The default value is false.
797
+ #
798
+ # For example, when partial success behavior is enabled, aggregatedList for a
799
+ # single zone scope either returns all resources in the zone or no resources,
800
+ # with an error code.
607
801
  # @param zone [::String]
608
802
  # Name of the zone scoping this request.
609
803
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -667,7 +861,9 @@ module Google
667
861
  end
668
862
 
669
863
  ##
670
- # Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview
864
+ # Sets the Google Cloud Armor security policy for the specified target
865
+ # instance. For more information, seeGoogle
866
+ # Cloud Armor Overview
671
867
  #
672
868
  # @overload set_security_policy(request, options = nil)
673
869
  # Pass arguments to `set_security_policy` via a request object, either of type
@@ -687,11 +883,24 @@ module Google
687
883
  # @param project [::String]
688
884
  # Project ID for this request.
689
885
  # @param request_id [::String]
690
- # 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).
886
+ # An optional request ID to identify requests. Specify a unique request ID so
887
+ # that if you must retry your request, the server will know to ignore the
888
+ # request if it has already been completed.
889
+ #
890
+ # For example, consider a situation where you make an initial request and
891
+ # the request times out. If you make the request again with the same
892
+ # request ID, the server can check if original operation with the same
893
+ # request ID was received, and if so, will ignore the second request. This
894
+ # prevents clients from accidentally creating duplicate commitments.
895
+ #
896
+ # The request ID must be
897
+ # a valid UUID with the exception that zero UUID is not supported
898
+ # (00000000-0000-0000-0000-000000000000).
691
899
  # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
692
900
  # The body resource for this request
693
901
  # @param target_instance [::String]
694
- # Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.
902
+ # Name of the TargetInstance resource to which the security policy should be
903
+ # set. The name should conform to RFC1035.
695
904
  # @param zone [::String]
696
905
  # Name of the zone scoping this request.
697
906
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -762,6 +971,90 @@ module Google
762
971
  raise ::Google::Cloud::Error.from_error(e)
763
972
  end
764
973
 
974
+ ##
975
+ # Returns permissions that a caller has on the specified resource.
976
+ #
977
+ # @overload test_iam_permissions(request, options = nil)
978
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
979
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsTargetInstanceRequest} or an equivalent Hash.
980
+ #
981
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsTargetInstanceRequest, ::Hash]
982
+ # A request object representing the call parameters. Required. To specify no
983
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
984
+ # @param options [::Gapic::CallOptions, ::Hash]
985
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
986
+ #
987
+ # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil, zone: nil)
988
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
989
+ # least one keyword argument is required. To specify no parameters, or to keep all
990
+ # the default parameter values, pass an empty Hash as a request object (see above).
991
+ #
992
+ # @param project [::String]
993
+ # Project ID for this request.
994
+ # @param resource [::String]
995
+ # Name or id of the resource for this request.
996
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
997
+ # The body resource for this request
998
+ # @param zone [::String]
999
+ # The name of the zone for this request.
1000
+ # @yield [result, operation] Access the result along with the TransportOperation object
1001
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1002
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1003
+ #
1004
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1005
+ #
1006
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1007
+ #
1008
+ # @example Basic example
1009
+ # require "google/cloud/compute/v1"
1010
+ #
1011
+ # # Create a client object. The client can be reused for multiple calls.
1012
+ # client = Google::Cloud::Compute::V1::TargetInstances::Rest::Client.new
1013
+ #
1014
+ # # Create a request. To set request fields, pass in keyword arguments.
1015
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsTargetInstanceRequest.new
1016
+ #
1017
+ # # Call the test_iam_permissions method.
1018
+ # result = client.test_iam_permissions request
1019
+ #
1020
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
1021
+ # p result
1022
+ #
1023
+ def test_iam_permissions request, options = nil
1024
+ raise ::ArgumentError, "request must be provided" if request.nil?
1025
+
1026
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsTargetInstanceRequest
1027
+
1028
+ # Converts hash and nil to an options object
1029
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1030
+
1031
+ # Customize the options with defaults
1032
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1033
+
1034
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1035
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1036
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1037
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1038
+ transports_version_send: [:rest]
1039
+
1040
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1041
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1042
+
1043
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1044
+ metadata: call_metadata,
1045
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1046
+
1047
+ options.apply_defaults timeout: @config.timeout,
1048
+ metadata: @config.metadata,
1049
+ retry_policy: @config.retry_policy
1050
+
1051
+ @target_instances_stub.test_iam_permissions request, options do |result, operation|
1052
+ yield result, operation if block_given?
1053
+ end
1054
+ rescue ::Gapic::Rest::Error => e
1055
+ raise ::Google::Cloud::Error.from_error(e)
1056
+ end
1057
+
765
1058
  ##
766
1059
  # Configuration class for the TargetInstances REST API.
767
1060
  #
@@ -938,6 +1231,11 @@ module Google
938
1231
  # @return [::Gapic::Config::Method]
939
1232
  #
940
1233
  attr_reader :set_security_policy
1234
+ ##
1235
+ # RPC-specific configuration for `test_iam_permissions`
1236
+ # @return [::Gapic::Config::Method]
1237
+ #
1238
+ attr_reader :test_iam_permissions
941
1239
 
942
1240
  # @private
943
1241
  def initialize parent_rpcs = nil
@@ -953,6 +1251,8 @@ module Google
953
1251
  @list = ::Gapic::Config::Method.new list_config
954
1252
  set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
955
1253
  @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
1254
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1255
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
956
1256
 
957
1257
  yield self if block_given?
958
1258
  end
@@ -313,6 +313,46 @@ module Google
313
313
  end
314
314
  end
315
315
 
316
+ ##
317
+ # Baseline implementation for the test_iam_permissions REST call
318
+ #
319
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsTargetInstanceRequest]
320
+ # A request object representing the call parameters. Required.
321
+ # @param options [::Gapic::CallOptions]
322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
+ #
324
+ # @yield [result, operation] Access the result along with the TransportOperation object
325
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
327
+ #
328
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
329
+ # A result object deserialized from the server's reply
330
+ def test_iam_permissions request_pb, options = nil
331
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
332
+
333
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
334
+ query_string_params = if query_string_params.any?
335
+ query_string_params.to_h { |p| p.split "=", 2 }
336
+ else
337
+ {}
338
+ end
339
+
340
+ response = @client_stub.make_http_request(
341
+ verb,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "test_iam_permissions",
346
+ options: options
347
+ )
348
+ operation = ::Gapic::Rest::TransportOperation.new response
349
+ result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
354
+ end
355
+
316
356
  ##
317
357
  # @private
318
358
  #
@@ -448,6 +488,30 @@ module Google
448
488
  )
449
489
  transcoder.transcode request_pb
450
490
  end
491
+
492
+ ##
493
+ # @private
494
+ #
495
+ # GRPC transcoding helper method for the test_iam_permissions REST call
496
+ #
497
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsTargetInstanceRequest]
498
+ # A request object representing the call parameters. Required.
499
+ # @return [Array(String, [String, nil], Hash{String => String})]
500
+ # Uri, Body, Query string parameters
501
+ def self.transcode_test_iam_permissions_request request_pb
502
+ transcoder = Gapic::Rest::GrpcTranscoder.new
503
+ .with_bindings(
504
+ uri_method: :post,
505
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions",
506
+ body: "test_permissions_request_resource",
507
+ matches: [
508
+ ["project", %r{^[^/]+/?$}, false],
509
+ ["zone", %r{^[^/]+/?$}, false],
510
+ ["resource", %r{^[^/]+/?$}, false]
511
+ ]
512
+ )
513
+ transcoder.transcode request_pb
514
+ end
451
515
  end
452
516
  end
453
517
  end