google-cloud-compute-v1 3.4.0 → 3.6.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 (214) 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 +237 -20
  4. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  5. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  7. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  8. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  9. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  11. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +573 -23
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +122 -0
  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 +357 -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 +508 -42
  23. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +64 -0
  24. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  25. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  26. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  27. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  28. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  29. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  31. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  32. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  33. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  34. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +126 -10
  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 +380 -40
  47. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  48. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  49. data/lib/google/cloud/compute/v1/instances/rest/client.rb +939 -104
  50. data/lib/google/cloud/compute/v1/instant_snapshot_groups/credentials.rb +52 -0
  51. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest/client.rb +1145 -0
  52. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest/service_stub.rb +523 -0
  53. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest.rb +51 -0
  54. data/lib/google/cloud/compute/v1/instant_snapshot_groups.rb +47 -0
  55. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  56. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  57. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  58. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  59. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  60. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  61. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  62. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  63. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  64. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  65. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  66. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  67. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  68. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  69. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  70. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  71. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  72. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  73. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  74. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  75. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  76. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  77. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  78. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  79. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  80. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  81. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  82. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  83. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  84. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  85. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  86. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  87. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  88. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  89. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  90. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  91. data/lib/google/cloud/compute/v1/region_backend_buckets/credentials.rb +52 -0
  92. data/lib/google/cloud/compute/v1/region_backend_buckets/rest/client.rb +1450 -0
  93. data/lib/google/cloud/compute/v1/region_backend_buckets/rest/service_stub.rb +649 -0
  94. data/lib/google/cloud/compute/v1/region_backend_buckets/rest.rb +51 -0
  95. data/lib/google/cloud/compute/v1/region_backend_buckets.rb +47 -0
  96. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  97. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  98. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  99. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1363 -0
  100. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +584 -0
  101. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  102. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  103. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  104. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +387 -29
  105. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +64 -0
  106. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  107. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  108. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  109. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  110. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  111. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  112. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  113. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  114. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  115. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  116. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1363 -0
  117. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +584 -0
  118. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  119. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  120. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/credentials.rb +52 -0
  121. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest/client.rb +1002 -0
  122. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest/service_stub.rb +400 -0
  123. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest.rb +51 -0
  124. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests.rb +47 -0
  125. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  126. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +187 -14
  127. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  128. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  129. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/credentials.rb +52 -0
  130. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest/client.rb +1146 -0
  131. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest/service_stub.rb +523 -0
  132. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest.rb +51 -0
  133. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups.rb +47 -0
  134. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  135. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  136. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  137. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  138. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  139. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  140. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  141. data/lib/google/cloud/compute/v1/region_snapshot_settings/credentials.rb +52 -0
  142. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest/client.rb +561 -0
  143. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest/service_stub.rb +206 -0
  144. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest.rb +51 -0
  145. data/lib/google/cloud/compute/v1/region_snapshot_settings.rb +47 -0
  146. data/lib/google/cloud/compute/v1/region_snapshots/credentials.rb +52 -0
  147. data/lib/google/cloud/compute/v1/region_snapshots/rest/client.rb +1388 -0
  148. data/lib/google/cloud/compute/v1/region_snapshots/rest/service_stub.rb +651 -0
  149. data/lib/google/cloud/compute/v1/region_snapshots/rest.rb +51 -0
  150. data/lib/google/cloud/compute/v1/region_snapshots.rb +47 -0
  151. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  152. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  153. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  154. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  155. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  156. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  157. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  158. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  159. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  160. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  161. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  162. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  163. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  164. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  165. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  166. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  167. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  168. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  169. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  170. data/lib/google/cloud/compute/v1/rest.rb +17 -0
  171. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  172. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  173. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  174. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  175. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +231 -21
  176. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  177. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +245 -13
  178. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +63 -0
  179. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  180. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  181. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  182. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  183. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  184. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  185. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  186. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  187. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +227 -20
  188. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -26
  189. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  190. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  191. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  192. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  193. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  194. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  195. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  196. data/lib/google/cloud/compute/v1/version.rb +1 -1
  197. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  198. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  199. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  200. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  201. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  202. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  203. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  204. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  205. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/credentials.rb +52 -0
  206. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest/client.rb +975 -0
  207. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest/service_stub.rb +396 -0
  208. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest.rb +51 -0
  209. data/lib/google/cloud/compute/v1/zone_vm_extension_policies.rb +47 -0
  210. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  211. data/lib/google/cloud/compute/v1.rb +17 -0
  212. data/proto_docs/google/api/client.rb +149 -29
  213. data/proto_docs/google/cloud/compute/v1/compute.rb +47064 -5503
  214. metadata +87 -2
@@ -96,6 +96,8 @@ module Google
96
96
 
97
97
  default_config.rpcs.test_iam_permissions.timeout = 600.0
98
98
 
99
+ default_config.rpcs.update_kms_key.timeout = 600.0
100
+
99
101
  default_config
100
102
  end
101
103
  yield @configure if block_given?
@@ -215,7 +217,14 @@ module Google
215
217
  # Service calls
216
218
 
217
219
  ##
218
- # Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.
220
+ # Deletes the specified Snapshot resource. Keep in mind that deleting
221
+ # a single snapshot might not necessarily delete all the data on that
222
+ # snapshot. If any data on the snapshot that is marked for deletion is
223
+ # needed for subsequent snapshots, the data will be moved to the next
224
+ # corresponding snapshot.
225
+ #
226
+ # For more information, seeDeleting
227
+ # snapshots.
219
228
  #
220
229
  # @overload delete(request, options = nil)
221
230
  # Pass arguments to `delete` via a request object, either of type
@@ -235,7 +244,19 @@ module Google
235
244
  # @param project [::String]
236
245
  # Project ID for this request.
237
246
  # @param request_id [::String]
238
- # 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).
247
+ # An optional request ID to identify requests. Specify a unique request ID so
248
+ # that if you must retry your request, the server will know to ignore the
249
+ # request if it has already been completed.
250
+ #
251
+ # For example, consider a situation where you make an initial request and
252
+ # the request times out. If you make the request again with the same
253
+ # request ID, the server can check if original operation with the same
254
+ # request ID was received, and if so, will ignore the second request. This
255
+ # prevents clients from accidentally creating duplicate commitments.
256
+ #
257
+ # The request ID must be
258
+ # a valid UUID with the exception that zero UUID is not supported
259
+ # (00000000-0000-0000-0000-000000000000).
239
260
  # @param snapshot [::String]
240
261
  # Name of the Snapshot resource to delete.
241
262
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -386,7 +407,8 @@ module Google
386
407
  end
387
408
 
388
409
  ##
389
- # Gets the access control policy for a resource. May be empty if no such policy or resource exists.
410
+ # Gets the access control policy for a resource. May be empty if no such
411
+ # policy or resource exists.
390
412
  #
391
413
  # @overload get_iam_policy(request, options = nil)
392
414
  # Pass arguments to `get_iam_policy` via a request object, either of type
@@ -468,7 +490,11 @@ module Google
468
490
  end
469
491
 
470
492
  ##
471
- # Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.
493
+ # Creates a snapshot in the specified project using the data included
494
+ # in the request. For regular snapshot creation, consider using this method
495
+ # instead of disks.createSnapshot,
496
+ # as this method supports more features, such as creating snapshots in a
497
+ # project different from the source disk project.
472
498
  #
473
499
  # @overload insert(request, options = nil)
474
500
  # Pass arguments to `insert` via a request object, either of type
@@ -488,7 +514,19 @@ module Google
488
514
  # @param project [::String]
489
515
  # Project ID for this request.
490
516
  # @param request_id [::String]
491
- # 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).
517
+ # An optional request ID to identify requests. Specify a unique request ID so
518
+ # that if you must retry your request, the server will know to ignore the
519
+ # request if it has already been completed.
520
+ #
521
+ # For example, consider a situation where you make an initial request and
522
+ # the request times out. If you make the request again with the same
523
+ # request ID, the server can check if original operation with the same
524
+ # request ID was received, and if so, will ignore the second request. This
525
+ # prevents clients from accidentally creating duplicate commitments.
526
+ #
527
+ # The request ID must be
528
+ # a valid UUID with the exception that zero UUID is not supported
529
+ # (00000000-0000-0000-0000-000000000000).
492
530
  # @param snapshot_resource [::Google::Cloud::Compute::V1::Snapshot, ::Hash]
493
531
  # The body resource for this request
494
532
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -559,7 +597,8 @@ module Google
559
597
  end
560
598
 
561
599
  ##
562
- # Retrieves the list of Snapshot resources contained within the specified project.
600
+ # Retrieves the list of Snapshot resources contained within
601
+ # the specified project.
563
602
  #
564
603
  # @overload list(request, options = nil)
565
604
  # Pass arguments to `list` via a request object, either of type
@@ -577,17 +616,95 @@ module Google
577
616
  # the default parameter values, pass an empty Hash as a request object (see above).
578
617
  #
579
618
  # @param filter [::String]
580
- # 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.
619
+ # A filter expression that filters resources listed in the response. Most
620
+ # Compute resources support two types of filter expressions:
621
+ # expressions that support regular expressions and expressions that follow
622
+ # API improvement proposal AIP-160.
623
+ # These two types of filter expressions cannot be mixed in one request.
624
+ #
625
+ # If you want to use AIP-160, your expression must specify the field name, an
626
+ # operator, and the value that you want to use for filtering. The value
627
+ # must be a string, a number, or a boolean. The operator
628
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
629
+ #
630
+ # For example, if you are filtering Compute Engine instances, you can
631
+ # exclude instances named `example-instance` by specifying
632
+ # `name != example-instance`.
633
+ #
634
+ # The `:*` comparison can be used to test whether a key has been defined.
635
+ # For example, to find all objects with `owner` label use:
636
+ # ```
637
+ # labels.owner:*
638
+ # ```
639
+ #
640
+ # You can also filter nested fields. For example, you could specify
641
+ # `scheduling.automaticRestart = false` to include instances only
642
+ # if they are not scheduled for automatic restarts. You can use filtering
643
+ # on nested fields to filter based onresource labels.
644
+ #
645
+ # To filter on multiple expressions, provide each separate expression within
646
+ # parentheses. For example:
647
+ # ```
648
+ # (scheduling.automaticRestart = true)
649
+ # (cpuPlatform = "Intel Skylake")
650
+ # ```
651
+ # By default, each expression is an `AND` expression. However, you
652
+ # can include `AND` and `OR` expressions explicitly.
653
+ # For example:
654
+ # ```
655
+ # (cpuPlatform = "Intel Skylake") OR
656
+ # (cpuPlatform = "Intel Broadwell") AND
657
+ # (scheduling.automaticRestart = true)
658
+ # ```
659
+ #
660
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
661
+ # (not equal) operator against a single un-parenthesized expression with or
662
+ # without quotes or against multiple parenthesized expressions. Examples:
663
+ #
664
+ # `fieldname eq unquoted literal`
665
+ # `fieldname eq 'single quoted literal'`
666
+ # `fieldname eq "double quoted literal"`
667
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
668
+ #
669
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
670
+ # The literal value must match the entire field.
671
+ #
672
+ # For example, to filter for instances that do not end with name "instance",
673
+ # you would use `name ne .*instance`.
674
+ #
675
+ # You cannot combine constraints on multiple fields using regular
676
+ # expressions.
581
677
  # @param max_results [::Integer]
582
- # 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`)
678
+ # The maximum number of results per page that should be returned.
679
+ # If the number of available results is larger than `maxResults`,
680
+ # Compute Engine returns a `nextPageToken` that can be used to get
681
+ # the next page of results in subsequent list requests. Acceptable values are
682
+ # `0` to `500`, inclusive. (Default: `500`)
583
683
  # @param order_by [::String]
584
- # 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.
684
+ # Sorts list results by a certain order. By default, results
685
+ # are returned in alphanumerical order based on the resource name.
686
+ #
687
+ # You can also sort results in descending order based on the creation
688
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
689
+ # results based on the `creationTimestamp` field in
690
+ # reverse chronological order (newest result first). Use this to sort
691
+ # resources like operations so that the newest operation is returned first.
692
+ #
693
+ # Currently, only sorting by `name` or
694
+ # `creationTimestamp desc` is supported.
585
695
  # @param page_token [::String]
586
- # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
696
+ # Specifies a page token to use. Set `pageToken` to the
697
+ # `nextPageToken` returned by a previous list request to get
698
+ # the next page of results.
587
699
  # @param project [::String]
588
700
  # Project ID for this request.
589
701
  # @param return_partial_success [::Boolean]
590
- # 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.
702
+ # Opt-in for partial success behavior which provides partial results in case
703
+ # of failure. The default value is false.
704
+ #
705
+ # For example, when partial success behavior is enabled, aggregatedList for a
706
+ # single zone scope either returns all resources in the zone or no resources,
707
+ # with an error code.
591
708
  # @yield [result, operation] Access the result along with the TransportOperation object
592
709
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Snapshot>]
593
710
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -649,7 +766,8 @@ module Google
649
766
  end
650
767
 
651
768
  ##
652
- # Sets the access control policy on the specified resource. Replaces any existing policy.
769
+ # Sets the access control policy on the specified resource.
770
+ # Replaces any existing policy.
653
771
  #
654
772
  # @overload set_iam_policy(request, options = nil)
655
773
  # Pass arguments to `set_iam_policy` via a request object, either of type
@@ -731,7 +849,8 @@ module Google
731
849
  end
732
850
 
733
851
  ##
734
- # Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
852
+ # Sets the labels on a snapshot. To learn more about labels, read theLabeling
853
+ # Resources documentation.
735
854
  #
736
855
  # @overload set_labels(request, options = nil)
737
856
  # Pass arguments to `set_labels` via a request object, either of type
@@ -903,6 +1022,112 @@ module Google
903
1022
  raise ::Google::Cloud::Error.from_error(e)
904
1023
  end
905
1024
 
1025
+ ##
1026
+ # Rotates the customer-managed
1027
+ # encryption key to the latest version for the specified snapshot.
1028
+ #
1029
+ # @overload update_kms_key(request, options = nil)
1030
+ # Pass arguments to `update_kms_key` via a request object, either of type
1031
+ # {::Google::Cloud::Compute::V1::UpdateKmsKeySnapshotRequest} or an equivalent Hash.
1032
+ #
1033
+ # @param request [::Google::Cloud::Compute::V1::UpdateKmsKeySnapshotRequest, ::Hash]
1034
+ # A request object representing the call parameters. Required. To specify no
1035
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1036
+ # @param options [::Gapic::CallOptions, ::Hash]
1037
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1038
+ #
1039
+ # @overload update_kms_key(project: nil, request_id: nil, snapshot: nil, snapshot_update_kms_key_request_resource: nil)
1040
+ # Pass arguments to `update_kms_key` via keyword arguments. Note that at
1041
+ # least one keyword argument is required. To specify no parameters, or to keep all
1042
+ # the default parameter values, pass an empty Hash as a request object (see above).
1043
+ #
1044
+ # @param project [::String]
1045
+ # Project ID for this request.
1046
+ # @param request_id [::String]
1047
+ # An optional request ID to identify requests. Specify a unique request ID so
1048
+ # that if you must retry your request, the server will know to ignore the
1049
+ # request if it has already been completed.
1050
+ #
1051
+ # For example, consider a situation where you make an initial request and
1052
+ # the request times out. If you make the request again with the same
1053
+ # request ID, the server can check if original operation with the same
1054
+ # request ID was received, and if so, will ignore the second request. This
1055
+ # prevents clients from accidentally creating duplicate commitments.
1056
+ #
1057
+ # The request ID must be
1058
+ # a valid UUID with the exception that zero UUID is not supported
1059
+ # (00000000-0000-0000-0000-000000000000).
1060
+ # @param snapshot [::String]
1061
+ # Name of the snapshot resource to update. Should conform to RFC1035.
1062
+ # @param snapshot_update_kms_key_request_resource [::Google::Cloud::Compute::V1::SnapshotUpdateKmsKeyRequest, ::Hash]
1063
+ # The body resource for this request
1064
+ # @yield [result, operation] Access the result along with the TransportOperation object
1065
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1066
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1067
+ #
1068
+ # @return [::Gapic::GenericLRO::Operation]
1069
+ #
1070
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1071
+ #
1072
+ # @example Basic example
1073
+ # require "google/cloud/compute/v1"
1074
+ #
1075
+ # # Create a client object. The client can be reused for multiple calls.
1076
+ # client = Google::Cloud::Compute::V1::Snapshots::Rest::Client.new
1077
+ #
1078
+ # # Create a request. To set request fields, pass in keyword arguments.
1079
+ # request = Google::Cloud::Compute::V1::UpdateKmsKeySnapshotRequest.new
1080
+ #
1081
+ # # Call the update_kms_key method.
1082
+ # result = client.update_kms_key request
1083
+ #
1084
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1085
+ # p result
1086
+ #
1087
+ def update_kms_key request, options = nil
1088
+ raise ::ArgumentError, "request must be provided" if request.nil?
1089
+
1090
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateKmsKeySnapshotRequest
1091
+
1092
+ # Converts hash and nil to an options object
1093
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1094
+
1095
+ # Customize the options with defaults
1096
+ call_metadata = @config.rpcs.update_kms_key.metadata.to_h
1097
+
1098
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1099
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1100
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1101
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1102
+ transports_version_send: [:rest]
1103
+
1104
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1105
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1106
+
1107
+ options.apply_defaults timeout: @config.rpcs.update_kms_key.timeout,
1108
+ metadata: call_metadata,
1109
+ retry_policy: @config.rpcs.update_kms_key.retry_policy
1110
+
1111
+ options.apply_defaults timeout: @config.timeout,
1112
+ metadata: @config.metadata,
1113
+ retry_policy: @config.retry_policy
1114
+
1115
+ @snapshots_stub.update_kms_key request, options do |result, response|
1116
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
1117
+ operation: result,
1118
+ client: global_operations,
1119
+ request_values: {
1120
+ "project" => request.project
1121
+ },
1122
+ options: options
1123
+ )
1124
+ yield result, response if block_given?
1125
+ throw :response, result
1126
+ end
1127
+ rescue ::Gapic::Rest::Error => e
1128
+ raise ::Google::Cloud::Error.from_error(e)
1129
+ end
1130
+
906
1131
  ##
907
1132
  # Configuration class for the Snapshots REST API.
908
1133
  #
@@ -1089,6 +1314,11 @@ module Google
1089
1314
  # @return [::Gapic::Config::Method]
1090
1315
  #
1091
1316
  attr_reader :test_iam_permissions
1317
+ ##
1318
+ # RPC-specific configuration for `update_kms_key`
1319
+ # @return [::Gapic::Config::Method]
1320
+ #
1321
+ attr_reader :update_kms_key
1092
1322
 
1093
1323
  # @private
1094
1324
  def initialize parent_rpcs = nil
@@ -1108,6 +1338,8 @@ module Google
1108
1338
  @set_labels = ::Gapic::Config::Method.new set_labels_config
1109
1339
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1110
1340
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1341
+ update_kms_key_config = parent_rpcs.update_kms_key if parent_rpcs.respond_to? :update_kms_key
1342
+ @update_kms_key = ::Gapic::Config::Method.new update_kms_key_config
1111
1343
 
1112
1344
  yield self if block_given?
1113
1345
  end
@@ -393,6 +393,46 @@ module Google
393
393
  end
394
394
  end
395
395
 
396
+ ##
397
+ # Baseline implementation for the update_kms_key REST call
398
+ #
399
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateKmsKeySnapshotRequest]
400
+ # A request object representing the call parameters. Required.
401
+ # @param options [::Gapic::CallOptions]
402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
403
+ #
404
+ # @yield [result, operation] Access the result along with the TransportOperation object
405
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
407
+ #
408
+ # @return [::Google::Cloud::Compute::V1::Operation]
409
+ # A result object deserialized from the server's reply
410
+ def update_kms_key request_pb, options = nil
411
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
412
+
413
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_kms_key_request request_pb
414
+ query_string_params = if query_string_params.any?
415
+ query_string_params.to_h { |p| p.split "=", 2 }
416
+ else
417
+ {}
418
+ end
419
+
420
+ response = @client_stub.make_http_request(
421
+ verb,
422
+ uri: uri,
423
+ body: body || "",
424
+ params: query_string_params,
425
+ method_name: "update_kms_key",
426
+ options: options
427
+ )
428
+ operation = ::Gapic::Rest::TransportOperation.new response
429
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
430
+ catch :response do
431
+ yield result, operation if block_given?
432
+ result
433
+ end
434
+ end
435
+
396
436
  ##
397
437
  # @private
398
438
  #
@@ -570,6 +610,29 @@ module Google
570
610
  )
571
611
  transcoder.transcode request_pb
572
612
  end
613
+
614
+ ##
615
+ # @private
616
+ #
617
+ # GRPC transcoding helper method for the update_kms_key REST call
618
+ #
619
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateKmsKeySnapshotRequest]
620
+ # A request object representing the call parameters. Required.
621
+ # @return [Array(String, [String, nil], Hash{String => String})]
622
+ # Uri, Body, Query string parameters
623
+ def self.transcode_update_kms_key_request request_pb
624
+ transcoder = Gapic::Rest::GrpcTranscoder.new
625
+ .with_bindings(
626
+ uri_method: :post,
627
+ uri_template: "/compute/v1/projects/{project}/global/snapshots/{snapshot}/updateKmsKey",
628
+ body: "snapshot_update_kms_key_request_resource",
629
+ matches: [
630
+ ["project", %r{^[^/]+/?$}, false],
631
+ ["snapshot", %r{^[^/]+/?$}, false]
632
+ ]
633
+ )
634
+ transcoder.transcode request_pb
635
+ end
573
636
  end
574
637
  end
575
638
  end