google-cloud-compute-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (379) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +73 -0
  6. data/lib/google-cloud-compute-v1.rb +21 -0
  7. data/lib/google/cloud/compute/v1.rb +110 -0
  8. data/lib/google/cloud/compute/v1/accelerator_types.rb +44 -0
  9. data/lib/google/cloud/compute/v1/accelerator_types/credentials.rb +53 -0
  10. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +35 -0
  11. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +452 -0
  12. data/lib/google/cloud/compute/v1/accelerator_types/rest/grpc_transcoding.rb +81 -0
  13. data/lib/google/cloud/compute/v1/addresses.rb +44 -0
  14. data/lib/google/cloud/compute/v1/addresses/credentials.rb +52 -0
  15. data/lib/google/cloud/compute/v1/addresses/rest.rb +35 -0
  16. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +596 -0
  17. data/lib/google/cloud/compute/v1/addresses/rest/grpc_transcoding.rb +106 -0
  18. data/lib/google/cloud/compute/v1/autoscalers.rb +44 -0
  19. data/lib/google/cloud/compute/v1/autoscalers/credentials.rb +52 -0
  20. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +35 -0
  21. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +746 -0
  22. data/lib/google/cloud/compute/v1/autoscalers/rest/grpc_transcoding.rb +130 -0
  23. data/lib/google/cloud/compute/v1/backend_buckets.rb +44 -0
  24. data/lib/google/cloud/compute/v1/backend_buckets/credentials.rb +52 -0
  25. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +35 -0
  26. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +795 -0
  27. data/lib/google/cloud/compute/v1/backend_buckets/rest/grpc_transcoding.rb +138 -0
  28. data/lib/google/cloud/compute/v1/backend_services.rb +44 -0
  29. data/lib/google/cloud/compute/v1/backend_services/credentials.rb +52 -0
  30. data/lib/google/cloud/compute/v1/backend_services/rest.rb +35 -0
  31. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +1023 -0
  32. data/lib/google/cloud/compute/v1/backend_services/rest/grpc_transcoding.rb +180 -0
  33. data/lib/google/cloud/compute/v1/compute_pb.rb +9482 -0
  34. data/lib/google/cloud/compute/v1/disk_types.rb +44 -0
  35. data/lib/google/cloud/compute/v1/disk_types/credentials.rb +53 -0
  36. data/lib/google/cloud/compute/v1/disk_types/rest.rb +35 -0
  37. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +450 -0
  38. data/lib/google/cloud/compute/v1/disk_types/rest/grpc_transcoding.rb +81 -0
  39. data/lib/google/cloud/compute/v1/disks.rb +44 -0
  40. data/lib/google/cloud/compute/v1/disks/credentials.rb +52 -0
  41. data/lib/google/cloud/compute/v1/disks/rest.rb +35 -0
  42. data/lib/google/cloud/compute/v1/disks/rest/client.rb +1182 -0
  43. data/lib/google/cloud/compute/v1/disks/rest/grpc_transcoding.rb +203 -0
  44. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +44 -0
  45. data/lib/google/cloud/compute/v1/external_vpn_gateways/credentials.rb +52 -0
  46. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +35 -0
  47. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +637 -0
  48. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/grpc_transcoding.rb +112 -0
  49. data/lib/google/cloud/compute/v1/firewalls.rb +44 -0
  50. data/lib/google/cloud/compute/v1/firewalls/credentials.rb +52 -0
  51. data/lib/google/cloud/compute/v1/firewalls/rest.rb +35 -0
  52. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +649 -0
  53. data/lib/google/cloud/compute/v1/firewalls/rest/grpc_transcoding.rb +112 -0
  54. data/lib/google/cloud/compute/v1/forwarding_rules.rb +44 -0
  55. data/lib/google/cloud/compute/v1/forwarding_rules/credentials.rb +52 -0
  56. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +35 -0
  57. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +746 -0
  58. data/lib/google/cloud/compute/v1/forwarding_rules/rest/grpc_transcoding.rb +130 -0
  59. data/lib/google/cloud/compute/v1/global_addresses.rb +44 -0
  60. data/lib/google/cloud/compute/v1/global_addresses/credentials.rb +52 -0
  61. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +35 -0
  62. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +503 -0
  63. data/lib/google/cloud/compute/v1/global_addresses/rest/grpc_transcoding.rb +88 -0
  64. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +44 -0
  65. data/lib/google/cloud/compute/v1/global_forwarding_rules/credentials.rb +52 -0
  66. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +35 -0
  67. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +649 -0
  68. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/grpc_transcoding.rb +112 -0
  69. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +44 -0
  70. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/credentials.rb +52 -0
  71. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +35 -0
  72. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +734 -0
  73. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/grpc_transcoding.rb +129 -0
  74. data/lib/google/cloud/compute/v1/global_operations.rb +44 -0
  75. data/lib/google/cloud/compute/v1/global_operations/credentials.rb +52 -0
  76. data/lib/google/cloud/compute/v1/global_operations/rest.rb +35 -0
  77. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +578 -0
  78. data/lib/google/cloud/compute/v1/global_operations/rest/grpc_transcoding.rb +105 -0
  79. data/lib/google/cloud/compute/v1/global_organization_operations.rb +44 -0
  80. data/lib/google/cloud/compute/v1/global_organization_operations/credentials.rb +52 -0
  81. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +35 -0
  82. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +427 -0
  83. data/lib/google/cloud/compute/v1/global_organization_operations/rest/grpc_transcoding.rb +78 -0
  84. data/lib/google/cloud/compute/v1/health_checks.rb +44 -0
  85. data/lib/google/cloud/compute/v1/health_checks/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/health_checks/rest.rb +35 -0
  87. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +734 -0
  88. data/lib/google/cloud/compute/v1/health_checks/rest/grpc_transcoding.rb +130 -0
  89. data/lib/google/cloud/compute/v1/images.rb +44 -0
  90. data/lib/google/cloud/compute/v1/images/credentials.rb +52 -0
  91. data/lib/google/cloud/compute/v1/images/rest.rb +35 -0
  92. data/lib/google/cloud/compute/v1/images/rest/client.rb +985 -0
  93. data/lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb +173 -0
  94. data/lib/google/cloud/compute/v1/instance_group_managers.rb +44 -0
  95. data/lib/google/cloud/compute/v1/instance_group_managers/credentials.rb +52 -0
  96. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +35 -0
  97. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +1767 -0
  98. data/lib/google/cloud/compute/v1/instance_group_managers/rest/grpc_transcoding.rb +303 -0
  99. data/lib/google/cloud/compute/v1/instance_groups.rb +44 -0
  100. data/lib/google/cloud/compute/v1/instance_groups/credentials.rb +52 -0
  101. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +35 -0
  102. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +916 -0
  103. data/lib/google/cloud/compute/v1/instance_groups/rest/grpc_transcoding.rb +154 -0
  104. data/lib/google/cloud/compute/v1/instance_templates.rb +44 -0
  105. data/lib/google/cloud/compute/v1/instance_templates/credentials.rb +52 -0
  106. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +35 -0
  107. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +704 -0
  108. data/lib/google/cloud/compute/v1/instance_templates/rest/grpc_transcoding.rb +125 -0
  109. data/lib/google/cloud/compute/v1/instances.rb +44 -0
  110. data/lib/google/cloud/compute/v1/instances/credentials.rb +52 -0
  111. data/lib/google/cloud/compute/v1/instances/rest.rb +35 -0
  112. data/lib/google/cloud/compute/v1/instances/rest/client.rb +3201 -0
  113. data/lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb +549 -0
  114. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +44 -0
  115. data/lib/google/cloud/compute/v1/interconnect_attachments/credentials.rb +52 -0
  116. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +35 -0
  117. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +673 -0
  118. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/grpc_transcoding.rb +118 -0
  119. data/lib/google/cloud/compute/v1/interconnect_locations.rb +44 -0
  120. data/lib/google/cloud/compute/v1/interconnect_locations/credentials.rb +53 -0
  121. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +35 -0
  122. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +361 -0
  123. data/lib/google/cloud/compute/v1/interconnect_locations/rest/grpc_transcoding.rb +63 -0
  124. data/lib/google/cloud/compute/v1/interconnects.rb +44 -0
  125. data/lib/google/cloud/compute/v1/interconnects/credentials.rb +52 -0
  126. data/lib/google/cloud/compute/v1/interconnects/rest.rb +35 -0
  127. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +640 -0
  128. data/lib/google/cloud/compute/v1/interconnects/rest/grpc_transcoding.rb +112 -0
  129. data/lib/google/cloud/compute/v1/license_codes.rb +44 -0
  130. data/lib/google/cloud/compute/v1/license_codes/credentials.rb +53 -0
  131. data/lib/google/cloud/compute/v1/license_codes/rest.rb +35 -0
  132. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +345 -0
  133. data/lib/google/cloud/compute/v1/license_codes/rest/grpc_transcoding.rb +58 -0
  134. data/lib/google/cloud/compute/v1/licenses.rb +44 -0
  135. data/lib/google/cloud/compute/v1/licenses/credentials.rb +52 -0
  136. data/lib/google/cloud/compute/v1/licenses/rest.rb +35 -0
  137. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +704 -0
  138. data/lib/google/cloud/compute/v1/licenses/rest/grpc_transcoding.rb +125 -0
  139. data/lib/google/cloud/compute/v1/machine_types.rb +44 -0
  140. data/lib/google/cloud/compute/v1/machine_types/credentials.rb +53 -0
  141. data/lib/google/cloud/compute/v1/machine_types/rest.rb +35 -0
  142. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +450 -0
  143. data/lib/google/cloud/compute/v1/machine_types/rest/grpc_transcoding.rb +81 -0
  144. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +44 -0
  145. data/lib/google/cloud/compute/v1/network_endpoint_groups/credentials.rb +52 -0
  146. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +35 -0
  147. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +904 -0
  148. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/grpc_transcoding.rb +154 -0
  149. data/lib/google/cloud/compute/v1/networks.rb +44 -0
  150. data/lib/google/cloud/compute/v1/networks/credentials.rb +52 -0
  151. data/lib/google/cloud/compute/v1/networks/rest.rb +35 -0
  152. data/lib/google/cloud/compute/v1/networks/rest/client.rb +957 -0
  153. data/lib/google/cloud/compute/v1/networks/rest/grpc_transcoding.rb +169 -0
  154. data/lib/google/cloud/compute/v1/node_groups.rb +44 -0
  155. data/lib/google/cloud/compute/v1/node_groups/credentials.rb +52 -0
  156. data/lib/google/cloud/compute/v1/node_groups/rest.rb +35 -0
  157. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +1192 -0
  158. data/lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb +208 -0
  159. data/lib/google/cloud/compute/v1/node_templates.rb +44 -0
  160. data/lib/google/cloud/compute/v1/node_templates/credentials.rb +52 -0
  161. data/lib/google/cloud/compute/v1/node_templates/rest.rb +35 -0
  162. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +803 -0
  163. data/lib/google/cloud/compute/v1/node_templates/rest/grpc_transcoding.rb +143 -0
  164. data/lib/google/cloud/compute/v1/node_types.rb +44 -0
  165. data/lib/google/cloud/compute/v1/node_types/credentials.rb +53 -0
  166. data/lib/google/cloud/compute/v1/node_types/rest.rb +35 -0
  167. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +450 -0
  168. data/lib/google/cloud/compute/v1/node_types/rest/grpc_transcoding.rb +81 -0
  169. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +44 -0
  170. data/lib/google/cloud/compute/v1/packet_mirrorings/credentials.rb +52 -0
  171. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +35 -0
  172. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +740 -0
  173. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/grpc_transcoding.rb +130 -0
  174. data/lib/google/cloud/compute/v1/projects.rb +44 -0
  175. data/lib/google/cloud/compute/v1/projects/credentials.rb +52 -0
  176. data/lib/google/cloud/compute/v1/projects/rest.rb +35 -0
  177. data/lib/google/cloud/compute/v1/projects/rest/client.rb +1141 -0
  178. data/lib/google/cloud/compute/v1/projects/rest/grpc_transcoding.rb +197 -0
  179. data/lib/google/cloud/compute/v1/region_autoscalers.rb +44 -0
  180. data/lib/google/cloud/compute/v1/region_autoscalers/credentials.rb +52 -0
  181. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +35 -0
  182. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +661 -0
  183. data/lib/google/cloud/compute/v1/region_autoscalers/rest/grpc_transcoding.rb +112 -0
  184. data/lib/google/cloud/compute/v1/region_backend_services.rb +44 -0
  185. data/lib/google/cloud/compute/v1/region_backend_services/credentials.rb +52 -0
  186. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +35 -0
  187. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +729 -0
  188. data/lib/google/cloud/compute/v1/region_backend_services/rest/grpc_transcoding.rb +124 -0
  189. data/lib/google/cloud/compute/v1/region_commitments.rb +44 -0
  190. data/lib/google/cloud/compute/v1/region_commitments/credentials.rb +52 -0
  191. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +35 -0
  192. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +523 -0
  193. data/lib/google/cloud/compute/v1/region_commitments/rest/grpc_transcoding.rb +93 -0
  194. data/lib/google/cloud/compute/v1/region_disk_types.rb +44 -0
  195. data/lib/google/cloud/compute/v1/region_disk_types/credentials.rb +53 -0
  196. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +35 -0
  197. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +365 -0
  198. data/lib/google/cloud/compute/v1/region_disk_types/rest/grpc_transcoding.rb +63 -0
  199. data/lib/google/cloud/compute/v1/region_disks.rb +44 -0
  200. data/lib/google/cloud/compute/v1/region_disks/credentials.rb +52 -0
  201. data/lib/google/cloud/compute/v1/region_disks/rest.rb +35 -0
  202. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1095 -0
  203. data/lib/google/cloud/compute/v1/region_disks/rest/grpc_transcoding.rb +185 -0
  204. data/lib/google/cloud/compute/v1/region_health_check_services.rb +44 -0
  205. data/lib/google/cloud/compute/v1/region_health_check_services/credentials.rb +52 -0
  206. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +35 -0
  207. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +586 -0
  208. data/lib/google/cloud/compute/v1/region_health_check_services/rest/grpc_transcoding.rb +100 -0
  209. data/lib/google/cloud/compute/v1/region_health_checks.rb +44 -0
  210. data/lib/google/cloud/compute/v1/region_health_checks/credentials.rb +52 -0
  211. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +35 -0
  212. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +661 -0
  213. data/lib/google/cloud/compute/v1/region_health_checks/rest/grpc_transcoding.rb +112 -0
  214. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +44 -0
  215. data/lib/google/cloud/compute/v1/region_instance_group_managers/credentials.rb +52 -0
  216. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +35 -0
  217. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +1678 -0
  218. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/grpc_transcoding.rb +285 -0
  219. data/lib/google/cloud/compute/v1/region_instance_groups.rb +44 -0
  220. data/lib/google/cloud/compute/v1/region_instance_groups/credentials.rb +52 -0
  221. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +35 -0
  222. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +529 -0
  223. data/lib/google/cloud/compute/v1/region_instance_groups/rest/grpc_transcoding.rb +87 -0
  224. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +44 -0
  225. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/credentials.rb +52 -0
  226. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +35 -0
  227. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +511 -0
  228. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/grpc_transcoding.rb +88 -0
  229. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +44 -0
  230. data/lib/google/cloud/compute/v1/region_notification_endpoints/credentials.rb +52 -0
  231. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +35 -0
  232. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +511 -0
  233. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/grpc_transcoding.rb +88 -0
  234. data/lib/google/cloud/compute/v1/region_operations.rb +44 -0
  235. data/lib/google/cloud/compute/v1/region_operations/credentials.rb +52 -0
  236. data/lib/google/cloud/compute/v1/region_operations/rest.rb +35 -0
  237. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +501 -0
  238. data/lib/google/cloud/compute/v1/region_operations/rest/grpc_transcoding.rb +87 -0
  239. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +44 -0
  240. data/lib/google/cloud/compute/v1/region_ssl_certificates/credentials.rb +52 -0
  241. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +35 -0
  242. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +511 -0
  243. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/grpc_transcoding.rb +88 -0
  244. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +44 -0
  245. data/lib/google/cloud/compute/v1/region_target_http_proxies/credentials.rb +52 -0
  246. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +35 -0
  247. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +586 -0
  248. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/grpc_transcoding.rb +100 -0
  249. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +44 -0
  250. data/lib/google/cloud/compute/v1/region_target_https_proxies/credentials.rb +52 -0
  251. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +35 -0
  252. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +661 -0
  253. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/grpc_transcoding.rb +112 -0
  254. data/lib/google/cloud/compute/v1/region_url_maps.rb +44 -0
  255. data/lib/google/cloud/compute/v1/region_url_maps/credentials.rb +52 -0
  256. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +35 -0
  257. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +714 -0
  258. data/lib/google/cloud/compute/v1/region_url_maps/rest/grpc_transcoding.rb +124 -0
  259. data/lib/google/cloud/compute/v1/regions.rb +44 -0
  260. data/lib/google/cloud/compute/v1/regions/credentials.rb +53 -0
  261. data/lib/google/cloud/compute/v1/regions/rest.rb +35 -0
  262. data/lib/google/cloud/compute/v1/regions/rest/client.rb +361 -0
  263. data/lib/google/cloud/compute/v1/regions/rest/grpc_transcoding.rb +63 -0
  264. data/lib/google/cloud/compute/v1/reservations.rb +44 -0
  265. data/lib/google/cloud/compute/v1/reservations/credentials.rb +52 -0
  266. data/lib/google/cloud/compute/v1/reservations/rest.rb +35 -0
  267. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +878 -0
  268. data/lib/google/cloud/compute/v1/reservations/rest/grpc_transcoding.rb +155 -0
  269. data/lib/google/cloud/compute/v1/resource_policies.rb +44 -0
  270. data/lib/google/cloud/compute/v1/resource_policies/credentials.rb +52 -0
  271. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +35 -0
  272. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +803 -0
  273. data/lib/google/cloud/compute/v1/resource_policies/rest/grpc_transcoding.rb +143 -0
  274. data/lib/google/cloud/compute/v1/routers.rb +44 -0
  275. data/lib/google/cloud/compute/v1/routers/credentials.rb +52 -0
  276. data/lib/google/cloud/compute/v1/routers/rest.rb +35 -0
  277. data/lib/google/cloud/compute/v1/routers/rest/client.rb +968 -0
  278. data/lib/google/cloud/compute/v1/routers/rest/grpc_transcoding.rb +171 -0
  279. data/lib/google/cloud/compute/v1/routes.rb +44 -0
  280. data/lib/google/cloud/compute/v1/routes/credentials.rb +52 -0
  281. data/lib/google/cloud/compute/v1/routes/rest.rb +35 -0
  282. data/lib/google/cloud/compute/v1/routes/rest/client.rb +503 -0
  283. data/lib/google/cloud/compute/v1/routes/rest/grpc_transcoding.rb +88 -0
  284. data/lib/google/cloud/compute/v1/security_policies.rb +44 -0
  285. data/lib/google/cloud/compute/v1/security_policies/credentials.rb +52 -0
  286. data/lib/google/cloud/compute/v1/security_policies/rest.rb +35 -0
  287. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +929 -0
  288. data/lib/google/cloud/compute/v1/security_policies/rest/grpc_transcoding.rb +167 -0
  289. data/lib/google/cloud/compute/v1/snapshots.rb +44 -0
  290. data/lib/google/cloud/compute/v1/snapshots/credentials.rb +52 -0
  291. data/lib/google/cloud/compute/v1/snapshots/rest.rb +35 -0
  292. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +702 -0
  293. data/lib/google/cloud/compute/v1/snapshots/rest/grpc_transcoding.rb +125 -0
  294. data/lib/google/cloud/compute/v1/ssl_certificates.rb +44 -0
  295. data/lib/google/cloud/compute/v1/ssl_certificates/credentials.rb +52 -0
  296. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +35 -0
  297. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +588 -0
  298. data/lib/google/cloud/compute/v1/ssl_certificates/rest/grpc_transcoding.rb +106 -0
  299. data/lib/google/cloud/compute/v1/ssl_policies.rb +44 -0
  300. data/lib/google/cloud/compute/v1/ssl_policies/credentials.rb +52 -0
  301. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +35 -0
  302. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +659 -0
  303. data/lib/google/cloud/compute/v1/ssl_policies/rest/grpc_transcoding.rb +117 -0
  304. data/lib/google/cloud/compute/v1/subnetworks.rb +44 -0
  305. data/lib/google/cloud/compute/v1/subnetworks/credentials.rb +52 -0
  306. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +35 -0
  307. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +1113 -0
  308. data/lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb +196 -0
  309. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +44 -0
  310. data/lib/google/cloud/compute/v1/target_grpc_proxies/credentials.rb +52 -0
  311. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +35 -0
  312. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +576 -0
  313. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/grpc_transcoding.rb +100 -0
  314. data/lib/google/cloud/compute/v1/target_http_proxies.rb +44 -0
  315. data/lib/google/cloud/compute/v1/target_http_proxies/credentials.rb +52 -0
  316. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +35 -0
  317. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +734 -0
  318. data/lib/google/cloud/compute/v1/target_http_proxies/rest/grpc_transcoding.rb +130 -0
  319. data/lib/google/cloud/compute/v1/target_https_proxies.rb +44 -0
  320. data/lib/google/cloud/compute/v1/target_https_proxies/credentials.rb +52 -0
  321. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +35 -0
  322. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +880 -0
  323. data/lib/google/cloud/compute/v1/target_https_proxies/rest/grpc_transcoding.rb +154 -0
  324. data/lib/google/cloud/compute/v1/target_instances.rb +44 -0
  325. data/lib/google/cloud/compute/v1/target_instances/credentials.rb +52 -0
  326. data/lib/google/cloud/compute/v1/target_instances/rest.rb +35 -0
  327. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +596 -0
  328. data/lib/google/cloud/compute/v1/target_instances/rest/grpc_transcoding.rb +106 -0
  329. data/lib/google/cloud/compute/v1/target_pools.rb +44 -0
  330. data/lib/google/cloud/compute/v1/target_pools/credentials.rb +52 -0
  331. data/lib/google/cloud/compute/v1/target_pools/rest.rb +35 -0
  332. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +1042 -0
  333. data/lib/google/cloud/compute/v1/target_pools/rest/grpc_transcoding.rb +178 -0
  334. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +44 -0
  335. data/lib/google/cloud/compute/v1/target_ssl_proxies/credentials.rb +52 -0
  336. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +35 -0
  337. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +795 -0
  338. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/grpc_transcoding.rb +136 -0
  339. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +44 -0
  340. data/lib/google/cloud/compute/v1/target_tcp_proxies/credentials.rb +52 -0
  341. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +35 -0
  342. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +649 -0
  343. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/grpc_transcoding.rb +112 -0
  344. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +44 -0
  345. data/lib/google/cloud/compute/v1/target_vpn_gateways/credentials.rb +52 -0
  346. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +35 -0
  347. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +596 -0
  348. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/grpc_transcoding.rb +106 -0
  349. data/lib/google/cloud/compute/v1/url_maps.rb +44 -0
  350. data/lib/google/cloud/compute/v1/url_maps/credentials.rb +52 -0
  351. data/lib/google/cloud/compute/v1/url_maps/rest.rb +35 -0
  352. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +876 -0
  353. data/lib/google/cloud/compute/v1/url_maps/rest/grpc_transcoding.rb +154 -0
  354. data/lib/google/cloud/compute/v1/version.rb +28 -0
  355. data/lib/google/cloud/compute/v1/vpn_gateways.rb +44 -0
  356. data/lib/google/cloud/compute/v1/vpn_gateways/credentials.rb +52 -0
  357. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +35 -0
  358. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +806 -0
  359. data/lib/google/cloud/compute/v1/vpn_gateways/rest/grpc_transcoding.rb +142 -0
  360. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +44 -0
  361. data/lib/google/cloud/compute/v1/vpn_tunnels/credentials.rb +52 -0
  362. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +35 -0
  363. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +596 -0
  364. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/grpc_transcoding.rb +106 -0
  365. data/lib/google/cloud/compute/v1/zone_operations.rb +44 -0
  366. data/lib/google/cloud/compute/v1/zone_operations/credentials.rb +52 -0
  367. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +35 -0
  368. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +501 -0
  369. data/lib/google/cloud/compute/v1/zone_operations/rest/grpc_transcoding.rb +87 -0
  370. data/lib/google/cloud/compute/v1/zones.rb +44 -0
  371. data/lib/google/cloud/compute/v1/zones/credentials.rb +53 -0
  372. data/lib/google/cloud/compute/v1/zones/rest.rb +35 -0
  373. data/lib/google/cloud/compute/v1/zones/rest/client.rb +361 -0
  374. data/lib/google/cloud/compute/v1/zones/rest/grpc_transcoding.rb +63 -0
  375. data/proto_docs/README.md +4 -0
  376. data/proto_docs/google/api/field_behavior.rb +65 -0
  377. data/proto_docs/google/api/resource.rb +283 -0
  378. data/proto_docs/google/cloud/compute/v1/compute.rb +27425 -0
  379. metadata +568 -0
@@ -0,0 +1,173 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Compute
23
+ module V1
24
+ module Images
25
+ module Rest
26
+ # GRPC transcoding helper methods for the Images REST API.
27
+ module GrpcTranscoding
28
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteImageRequest]
29
+ # A request object representing the call parameters. Required.
30
+ # @return [Array(String, [String, nil], Hash{String => String})]
31
+ # Uri, Body, Query string parameters
32
+ def transcode_delete request_pb
33
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}"
34
+ body = nil
35
+ query_string_params = {}
36
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
37
+
38
+ [uri, body, query_string_params]
39
+ end
40
+
41
+ # @param request_pb [::Google::Cloud::Compute::V1::DeprecateImageRequest]
42
+ # A request object representing the call parameters. Required.
43
+ # @return [Array(String, [String, nil], Hash{String => String})]
44
+ # Uri, Body, Query string parameters
45
+ def transcode_deprecate request_pb
46
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}/deprecate"
47
+ body = request_pb.deprecation_status_resource.to_json
48
+ query_string_params = {}
49
+
50
+ [uri, body, query_string_params]
51
+ end
52
+
53
+ # @param request_pb [::Google::Cloud::Compute::V1::GetImageRequest]
54
+ # A request object representing the call parameters. Required.
55
+ # @return [Array(String, [String, nil], Hash{String => String})]
56
+ # Uri, Body, Query string parameters
57
+ def transcode_get request_pb
58
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}"
59
+ body = nil
60
+ query_string_params = {}
61
+
62
+ [uri, body, query_string_params]
63
+ end
64
+
65
+ # @param request_pb [::Google::Cloud::Compute::V1::GetFromFamilyImageRequest]
66
+ # A request object representing the call parameters. Required.
67
+ # @return [Array(String, [String, nil], Hash{String => String})]
68
+ # Uri, Body, Query string parameters
69
+ def transcode_get_from_family request_pb
70
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/family/#{request_pb.family}"
71
+ body = nil
72
+ query_string_params = {}
73
+
74
+ [uri, body, query_string_params]
75
+ end
76
+
77
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyImageRequest]
78
+ # A request object representing the call parameters. Required.
79
+ # @return [Array(String, [String, nil], Hash{String => String})]
80
+ # Uri, Body, Query string parameters
81
+ def transcode_get_iam_policy request_pb
82
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.resource}/getIamPolicy"
83
+ body = nil
84
+ query_string_params = {}
85
+ query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?
86
+
87
+ [uri, body, query_string_params]
88
+ end
89
+
90
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertImageRequest]
91
+ # A request object representing the call parameters. Required.
92
+ # @return [Array(String, [String, nil], Hash{String => String})]
93
+ # Uri, Body, Query string parameters
94
+ def transcode_insert request_pb
95
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images"
96
+ body = request_pb.image_resource.to_json
97
+ query_string_params = {}
98
+
99
+ [uri, body, query_string_params]
100
+ end
101
+
102
+ # @param request_pb [::Google::Cloud::Compute::V1::ListImagesRequest]
103
+ # A request object representing the call parameters. Required.
104
+ # @return [Array(String, [String, nil], Hash{String => String})]
105
+ # Uri, Body, Query string parameters
106
+ def transcode_list request_pb
107
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images"
108
+ body = nil
109
+ query_string_params = {}
110
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
111
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
112
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
113
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
114
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
115
+
116
+ [uri, body, query_string_params]
117
+ end
118
+
119
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchImageRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @return [Array(String, [String, nil], Hash{String => String})]
122
+ # Uri, Body, Query string parameters
123
+ def transcode_patch request_pb
124
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.image}"
125
+ body = request_pb.image_resource.to_json
126
+ query_string_params = {}
127
+
128
+ [uri, body, query_string_params]
129
+ end
130
+
131
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyImageRequest]
132
+ # A request object representing the call parameters. Required.
133
+ # @return [Array(String, [String, nil], Hash{String => String})]
134
+ # Uri, Body, Query string parameters
135
+ def transcode_set_iam_policy request_pb
136
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.resource}/setIamPolicy"
137
+ body = request_pb.global_set_policy_request_resource.to_json
138
+ query_string_params = {}
139
+
140
+ [uri, body, query_string_params]
141
+ end
142
+
143
+ # @param request_pb [::Google::Cloud::Compute::V1::SetLabelsImageRequest]
144
+ # A request object representing the call parameters. Required.
145
+ # @return [Array(String, [String, nil], Hash{String => String})]
146
+ # Uri, Body, Query string parameters
147
+ def transcode_set_labels request_pb
148
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.resource}/setLabels"
149
+ body = request_pb.global_set_labels_request_resource.to_json
150
+ query_string_params = {}
151
+
152
+ [uri, body, query_string_params]
153
+ end
154
+
155
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsImageRequest]
156
+ # A request object representing the call parameters. Required.
157
+ # @return [Array(String, [String, nil], Hash{String => String})]
158
+ # Uri, Body, Query string parameters
159
+ def transcode_test_iam_permissions request_pb
160
+ uri = "/compute/v1/projects/#{request_pb.project}/global/images/#{request_pb.resource}/testIamPermissions"
161
+ body = request_pb.test_permissions_request_resource.to_json
162
+ query_string_params = {}
163
+
164
+ [uri, body, query_string_params]
165
+ end
166
+ extend self
167
+ end
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
173
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+ require "gapic/config/method"
21
+
22
+ require "google/cloud/compute/v1/version"
23
+
24
+ require "google/cloud/compute/v1/instance_group_managers/credentials"
25
+ require "google/cloud/compute/v1/instance_group_managers/rest"
26
+
27
+ module Google
28
+ module Cloud
29
+ module Compute
30
+ module V1
31
+ # To load this service and instantiate a REST client:
32
+ #
33
+ # require "google/cloud/compute/v1/instance_group_managers"
34
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.new
35
+ #
36
+ module InstanceGroupManagers
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ helper_path = ::File.join __dir__, "instance_group_managers", "helpers.rb"
44
+ require "google/cloud/compute/v1/instance_group_managers/helpers" if ::File.file? helper_path
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module InstanceGroupManagers
26
+ # Credentials for the InstanceGroupManagers API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/compute",
30
+ "https://www.googleapis.com/auth/cloud-platform"
31
+ ]
32
+ self.env_vars = [
33
+ "COMPUTE_CREDENTIALS",
34
+ "COMPUTE_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "COMPUTE_CREDENTIALS_JSON",
39
+ "COMPUTE_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "google/cloud/compute/v1/instance_group_managers/rest/grpc_transcoding"
21
+ require "google/cloud/compute/v1/instance_group_managers/rest/client"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Compute
26
+ module V1
27
+ module InstanceGroupManagers
28
+ # Client for the REST transport
29
+ module Rest
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,1767 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Compute
25
+ module V1
26
+ module InstanceGroupManagers
27
+ module Rest
28
+ ##
29
+ # REST client for the InstanceGroupManagers service.
30
+ #
31
+ # The InstanceGroupManagers API.
32
+ #
33
+ class Client
34
+ include GrpcTranscoding
35
+
36
+ # @private
37
+ attr_reader :instance_group_managers_stub
38
+
39
+ ##
40
+ # Configure the InstanceGroupManagers Client class.
41
+ #
42
+ # See {::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # ## Example
46
+ #
47
+ # To modify the configuration for all InstanceGroupManagers clients:
48
+ #
49
+ # ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "Compute", "V1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config
70
+ end
71
+ yield @configure if block_given?
72
+ @configure
73
+ end
74
+
75
+ ##
76
+ # Configure the InstanceGroupManagers Client instance.
77
+ #
78
+ # The configuration is set to the derived mode, meaning that values can be changed,
79
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
80
+ # should be made on {Client.configure}.
81
+ #
82
+ # See {::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client::Configuration}
83
+ # for a description of the configuration fields.
84
+ #
85
+ # @yield [config] Configure the Client client.
86
+ # @yieldparam config [Client::Configuration]
87
+ #
88
+ # @return [Client::Configuration]
89
+ #
90
+ def configure
91
+ yield @config if block_given?
92
+ @config
93
+ end
94
+
95
+ ##
96
+ # Create a new InstanceGroupManagers REST client object.
97
+ #
98
+ # ## Examples
99
+ #
100
+ # To create a new InstanceGroupManagers REST client with the default
101
+ # configuration:
102
+ #
103
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.new
104
+ #
105
+ # To create a new InstanceGroupManagers REST client with a custom
106
+ # configuration:
107
+ #
108
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Rest::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the InstanceGroupManagers client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ def initialize
116
+ # These require statements are intentionally placed here to initialize
117
+ # the REST modules only when it's required.
118
+ require "gapic/rest"
119
+
120
+ # Create the configuration object
121
+ @config = Configuration.new Client.configure
122
+
123
+ # Yield the configuration if needed
124
+ yield @config if block_given?
125
+
126
+ # Create credentials
127
+ credentials = @config.credentials
128
+ credentials ||= Credentials.default scope: @config.scope
129
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
130
+ credentials = Credentials.new credentials, scope: @config.scope
131
+ end
132
+
133
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
134
+ end
135
+
136
+ # Service calls
137
+
138
+ ##
139
+ # Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
140
+ #
141
+ # If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
142
+ #
143
+ # You can specify a maximum of 1000 instances with this method per request.
144
+ #
145
+ # @overload abandon_instances(request, options = nil)
146
+ # Pass arguments to `abandon_instances` via a request object, either of type
147
+ # {::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest} or an equivalent Hash.
148
+ #
149
+ # @param request [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest, ::Hash]
150
+ # A request object representing the call parameters. Required. To specify no
151
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
152
+ # @param options [::Gapic::CallOptions, ::Hash]
153
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
154
+ # Note: currently retry functionality is not implemented. While it is possible
155
+ # to set it using ::Gapic::CallOptions, it will not be applied
156
+ #
157
+ # @overload abandon_instances(instance_group_manager: nil, instance_group_managers_abandon_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
158
+ # Pass arguments to `abandon_instances` via keyword arguments. Note that at
159
+ # least one keyword argument is required. To specify no parameters, or to keep all
160
+ # the default parameter values, pass an empty Hash as a request object (see above).
161
+ #
162
+ # @param instance_group_manager [::String]
163
+ # The name of the managed instance group.
164
+ # @param instance_group_managers_abandon_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersAbandonInstancesRequest, ::Hash]
165
+ # The body resource for this request
166
+ # @param project [::String]
167
+ # Project ID for this request.
168
+ # @param request_id [::String]
169
+ # 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.
170
+ #
171
+ # 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.
172
+ #
173
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
174
+ # @param zone [::String]
175
+ # The name of the zone where the managed instance group is located.
176
+ # @yield [result, env] Access the result along with the Faraday environment object
177
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
178
+ # @yieldparam response [::Faraday::Response]
179
+ #
180
+ # @return [::Google::Cloud::Compute::V1::Operation]
181
+ #
182
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
183
+ def abandon_instances request, options = nil
184
+ raise ::ArgumentError, "request must be provided" if request.nil?
185
+
186
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest
187
+
188
+ # Converts hash and nil to an options object
189
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
190
+
191
+ # Customize the options with defaults
192
+ call_metadata = {}
193
+
194
+ # Set x-goog-api-client header
195
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
196
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
197
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
198
+
199
+ options.apply_defaults timeout: @config.timeout,
200
+ metadata: call_metadata
201
+
202
+ uri, body, _query_string_params = transcode_abandon_instances request
203
+ response = @client_stub.make_post_request(
204
+ uri: uri,
205
+ body: body,
206
+ options: options
207
+ )
208
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
209
+
210
+ yield result, response if block_given?
211
+ result
212
+ rescue ::Faraday::Error => e
213
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
214
+ raise ::Google::Cloud::Error.from_error(gapic_error)
215
+ end
216
+
217
+ ##
218
+ # Retrieves the list of managed instance groups and groups them by zone.
219
+ #
220
+ # @overload aggregated_list(request, options = nil)
221
+ # Pass arguments to `aggregated_list` via a request object, either of type
222
+ # {::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest} or an equivalent Hash.
223
+ #
224
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest, ::Hash]
225
+ # A request object representing the call parameters. Required. To specify no
226
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
227
+ # @param options [::Gapic::CallOptions, ::Hash]
228
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
229
+ # Note: currently retry functionality is not implemented. While it is possible
230
+ # to set it using ::Gapic::CallOptions, it will not be applied
231
+ #
232
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
233
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
234
+ # least one keyword argument is required. To specify no parameters, or to keep all
235
+ # the default parameter values, pass an empty Hash as a request object (see above).
236
+ #
237
+ # @param filter [::String]
238
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
239
+ #
240
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
241
+ #
242
+ # 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.
243
+ #
244
+ # 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) ```
245
+ # @param include_all_scopes [::Boolean]
246
+ # 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.
247
+ # @param max_results [::Integer]
248
+ # 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`)
249
+ # @param order_by [::String]
250
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
251
+ #
252
+ # 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.
253
+ #
254
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
255
+ # @param page_token [::String]
256
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
257
+ # @param project [::String]
258
+ # Project ID for this request.
259
+ # @param return_partial_success [::Boolean]
260
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
261
+ # @yield [result, env] Access the result along with the Faraday environment object
262
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList]
263
+ # @yieldparam response [::Faraday::Response]
264
+ #
265
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList]
266
+ #
267
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
268
+ def aggregated_list request, options = nil
269
+ raise ::ArgumentError, "request must be provided" if request.nil?
270
+
271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest
272
+
273
+ # Converts hash and nil to an options object
274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
275
+
276
+ # Customize the options with defaults
277
+ call_metadata = {}
278
+
279
+ # Set x-goog-api-client header
280
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
282
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
283
+
284
+ options.apply_defaults timeout: @config.timeout,
285
+ metadata: call_metadata
286
+
287
+ uri, _body, query_string_params = transcode_aggregated_list request
288
+ response = @client_stub.make_get_request(
289
+ uri: uri,
290
+ params: query_string_params,
291
+ options: options
292
+ )
293
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagerAggregatedList.decode_json response.body, ignore_unknown_fields: true
294
+
295
+ yield result, response if block_given?
296
+ result
297
+ rescue ::Faraday::Error => e
298
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
299
+ raise ::Google::Cloud::Error.from_error(gapic_error)
300
+ end
301
+
302
+ ##
303
+ # Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
304
+ #
305
+ # @overload apply_updates_to_instances(request, options = nil)
306
+ # Pass arguments to `apply_updates_to_instances` via a request object, either of type
307
+ # {::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest} or an equivalent Hash.
308
+ #
309
+ # @param request [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest, ::Hash]
310
+ # A request object representing the call parameters. Required. To specify no
311
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
312
+ # @param options [::Gapic::CallOptions, ::Hash]
313
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
314
+ # Note: currently retry functionality is not implemented. While it is possible
315
+ # to set it using ::Gapic::CallOptions, it will not be applied
316
+ #
317
+ # @overload apply_updates_to_instances(instance_group_manager: nil, instance_group_managers_apply_updates_request_resource: nil, project: nil, zone: nil)
318
+ # Pass arguments to `apply_updates_to_instances` via keyword arguments. Note that at
319
+ # least one keyword argument is required. To specify no parameters, or to keep all
320
+ # the default parameter values, pass an empty Hash as a request object (see above).
321
+ #
322
+ # @param instance_group_manager [::String]
323
+ # The name of the managed instance group, should conform to RFC1035.
324
+ # @param instance_group_managers_apply_updates_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersApplyUpdatesRequest, ::Hash]
325
+ # The body resource for this request
326
+ # @param project [::String]
327
+ # Project ID for this request.
328
+ # @param zone [::String]
329
+ # The name of the zone where the managed instance group is located. Should conform to RFC1035.
330
+ # @yield [result, env] Access the result along with the Faraday environment object
331
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
332
+ # @yieldparam response [::Faraday::Response]
333
+ #
334
+ # @return [::Google::Cloud::Compute::V1::Operation]
335
+ #
336
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
337
+ def apply_updates_to_instances request, options = nil
338
+ raise ::ArgumentError, "request must be provided" if request.nil?
339
+
340
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest
341
+
342
+ # Converts hash and nil to an options object
343
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
344
+
345
+ # Customize the options with defaults
346
+ call_metadata = {}
347
+
348
+ # Set x-goog-api-client header
349
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
350
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
351
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
352
+
353
+ options.apply_defaults timeout: @config.timeout,
354
+ metadata: call_metadata
355
+
356
+ uri, body, _query_string_params = transcode_apply_updates_to_instances request
357
+ response = @client_stub.make_post_request(
358
+ uri: uri,
359
+ body: body,
360
+ options: options
361
+ )
362
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
363
+
364
+ yield result, response if block_given?
365
+ result
366
+ rescue ::Faraday::Error => e
367
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
368
+ raise ::Google::Cloud::Error.from_error(gapic_error)
369
+ end
370
+
371
+ ##
372
+ # Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
373
+ #
374
+ # @overload create_instances(request, options = nil)
375
+ # Pass arguments to `create_instances` via a request object, either of type
376
+ # {::Google::Cloud::Compute::V1::CreateInstancesInstanceGroupManagerRequest} or an equivalent Hash.
377
+ #
378
+ # @param request [::Google::Cloud::Compute::V1::CreateInstancesInstanceGroupManagerRequest, ::Hash]
379
+ # A request object representing the call parameters. Required. To specify no
380
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
381
+ # @param options [::Gapic::CallOptions, ::Hash]
382
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
383
+ # Note: currently retry functionality is not implemented. While it is possible
384
+ # to set it using ::Gapic::CallOptions, it will not be applied
385
+ #
386
+ # @overload create_instances(instance_group_manager: nil, instance_group_managers_create_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
387
+ # Pass arguments to `create_instances` via keyword arguments. Note that at
388
+ # least one keyword argument is required. To specify no parameters, or to keep all
389
+ # the default parameter values, pass an empty Hash as a request object (see above).
390
+ #
391
+ # @param instance_group_manager [::String]
392
+ # The name of the managed instance group. It should conform to RFC1035.
393
+ # @param instance_group_managers_create_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersCreateInstancesRequest, ::Hash]
394
+ # The body resource for this request
395
+ # @param project [::String]
396
+ # Project ID for this request.
397
+ # @param request_id [::String]
398
+ # 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.
399
+ #
400
+ # 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.
401
+ #
402
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
403
+ # @param zone [::String]
404
+ # The name of the zone where the managed instance group is located. It should conform to RFC1035.
405
+ # @yield [result, env] Access the result along with the Faraday environment object
406
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
407
+ # @yieldparam response [::Faraday::Response]
408
+ #
409
+ # @return [::Google::Cloud::Compute::V1::Operation]
410
+ #
411
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
412
+ def create_instances request, options = nil
413
+ raise ::ArgumentError, "request must be provided" if request.nil?
414
+
415
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CreateInstancesInstanceGroupManagerRequest
416
+
417
+ # Converts hash and nil to an options object
418
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
419
+
420
+ # Customize the options with defaults
421
+ call_metadata = {}
422
+
423
+ # Set x-goog-api-client header
424
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
425
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
426
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
427
+
428
+ options.apply_defaults timeout: @config.timeout,
429
+ metadata: call_metadata
430
+
431
+ uri, body, _query_string_params = transcode_create_instances request
432
+ response = @client_stub.make_post_request(
433
+ uri: uri,
434
+ body: body,
435
+ options: options
436
+ )
437
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
438
+
439
+ yield result, response if block_given?
440
+ result
441
+ rescue ::Faraday::Error => e
442
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
443
+ raise ::Google::Cloud::Error.from_error(gapic_error)
444
+ end
445
+
446
+ ##
447
+ # Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
448
+ #
449
+ # @overload delete(request, options = nil)
450
+ # Pass arguments to `delete` via a request object, either of type
451
+ # {::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest} or an equivalent Hash.
452
+ #
453
+ # @param request [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest, ::Hash]
454
+ # A request object representing the call parameters. Required. To specify no
455
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
456
+ # @param options [::Gapic::CallOptions, ::Hash]
457
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
458
+ # Note: currently retry functionality is not implemented. While it is possible
459
+ # to set it using ::Gapic::CallOptions, it will not be applied
460
+ #
461
+ # @overload delete(instance_group_manager: nil, project: nil, request_id: nil, zone: nil)
462
+ # Pass arguments to `delete` via keyword arguments. Note that at
463
+ # least one keyword argument is required. To specify no parameters, or to keep all
464
+ # the default parameter values, pass an empty Hash as a request object (see above).
465
+ #
466
+ # @param instance_group_manager [::String]
467
+ # The name of the managed instance group to delete.
468
+ # @param project [::String]
469
+ # Project ID for this request.
470
+ # @param request_id [::String]
471
+ # 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.
472
+ #
473
+ # 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.
474
+ #
475
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
476
+ # @param zone [::String]
477
+ # The name of the zone where the managed instance group is located.
478
+ # @yield [result, env] Access the result along with the Faraday environment object
479
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
480
+ # @yieldparam response [::Faraday::Response]
481
+ #
482
+ # @return [::Google::Cloud::Compute::V1::Operation]
483
+ #
484
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
485
+ def delete request, options = nil
486
+ raise ::ArgumentError, "request must be provided" if request.nil?
487
+
488
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest
489
+
490
+ # Converts hash and nil to an options object
491
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
492
+
493
+ # Customize the options with defaults
494
+ call_metadata = {}
495
+
496
+ # Set x-goog-api-client header
497
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
498
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
499
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
500
+
501
+ options.apply_defaults timeout: @config.timeout,
502
+ metadata: call_metadata
503
+
504
+ uri, _body, query_string_params = transcode_delete request
505
+ response = @client_stub.make_delete_request(
506
+ uri: uri,
507
+ params: query_string_params,
508
+ options: options
509
+ )
510
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
511
+
512
+ yield result, response if block_given?
513
+ result
514
+ rescue ::Faraday::Error => e
515
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
516
+ raise ::Google::Cloud::Error.from_error(gapic_error)
517
+ end
518
+
519
+ ##
520
+ # Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
521
+ #
522
+ # If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
523
+ #
524
+ # You can specify a maximum of 1000 instances with this method per request.
525
+ #
526
+ # @overload delete_instances(request, options = nil)
527
+ # Pass arguments to `delete_instances` via a request object, either of type
528
+ # {::Google::Cloud::Compute::V1::DeleteInstancesInstanceGroupManagerRequest} or an equivalent Hash.
529
+ #
530
+ # @param request [::Google::Cloud::Compute::V1::DeleteInstancesInstanceGroupManagerRequest, ::Hash]
531
+ # A request object representing the call parameters. Required. To specify no
532
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
533
+ # @param options [::Gapic::CallOptions, ::Hash]
534
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
535
+ # Note: currently retry functionality is not implemented. While it is possible
536
+ # to set it using ::Gapic::CallOptions, it will not be applied
537
+ #
538
+ # @overload delete_instances(instance_group_manager: nil, instance_group_managers_delete_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
539
+ # Pass arguments to `delete_instances` via keyword arguments. Note that at
540
+ # least one keyword argument is required. To specify no parameters, or to keep all
541
+ # the default parameter values, pass an empty Hash as a request object (see above).
542
+ #
543
+ # @param instance_group_manager [::String]
544
+ # The name of the managed instance group.
545
+ # @param instance_group_managers_delete_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersDeleteInstancesRequest, ::Hash]
546
+ # The body resource for this request
547
+ # @param project [::String]
548
+ # Project ID for this request.
549
+ # @param request_id [::String]
550
+ # 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.
551
+ #
552
+ # 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.
553
+ #
554
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
555
+ # @param zone [::String]
556
+ # The name of the zone where the managed instance group is located.
557
+ # @yield [result, env] Access the result along with the Faraday environment object
558
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
559
+ # @yieldparam response [::Faraday::Response]
560
+ #
561
+ # @return [::Google::Cloud::Compute::V1::Operation]
562
+ #
563
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
564
+ def delete_instances request, options = nil
565
+ raise ::ArgumentError, "request must be provided" if request.nil?
566
+
567
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstancesInstanceGroupManagerRequest
568
+
569
+ # Converts hash and nil to an options object
570
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
571
+
572
+ # Customize the options with defaults
573
+ call_metadata = {}
574
+
575
+ # Set x-goog-api-client header
576
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
577
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
578
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
579
+
580
+ options.apply_defaults timeout: @config.timeout,
581
+ metadata: call_metadata
582
+
583
+ uri, body, _query_string_params = transcode_delete_instances request
584
+ response = @client_stub.make_post_request(
585
+ uri: uri,
586
+ body: body,
587
+ options: options
588
+ )
589
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
590
+
591
+ yield result, response if block_given?
592
+ result
593
+ rescue ::Faraday::Error => e
594
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
595
+ raise ::Google::Cloud::Error.from_error(gapic_error)
596
+ end
597
+
598
+ ##
599
+ # Deletes selected per-instance configs for the managed instance group.
600
+ #
601
+ # @overload delete_per_instance_configs(request, options = nil)
602
+ # Pass arguments to `delete_per_instance_configs` via a request object, either of type
603
+ # {::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest} or an equivalent Hash.
604
+ #
605
+ # @param request [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest, ::Hash]
606
+ # A request object representing the call parameters. Required. To specify no
607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
608
+ # @param options [::Gapic::CallOptions, ::Hash]
609
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
610
+ # Note: currently retry functionality is not implemented. While it is possible
611
+ # to set it using ::Gapic::CallOptions, it will not be applied
612
+ #
613
+ # @overload delete_per_instance_configs(instance_group_manager: nil, instance_group_managers_delete_per_instance_configs_req_resource: nil, project: nil, zone: nil)
614
+ # Pass arguments to `delete_per_instance_configs` via keyword arguments. Note that at
615
+ # least one keyword argument is required. To specify no parameters, or to keep all
616
+ # the default parameter values, pass an empty Hash as a request object (see above).
617
+ #
618
+ # @param instance_group_manager [::String]
619
+ # The name of the managed instance group. It should conform to RFC1035.
620
+ # @param instance_group_managers_delete_per_instance_configs_req_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersDeletePerInstanceConfigsReq, ::Hash]
621
+ # The body resource for this request
622
+ # @param project [::String]
623
+ # Project ID for this request.
624
+ # @param zone [::String]
625
+ # The name of the zone where the managed instance group is located. It should conform to RFC1035.
626
+ # @yield [result, env] Access the result along with the Faraday environment object
627
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
628
+ # @yieldparam response [::Faraday::Response]
629
+ #
630
+ # @return [::Google::Cloud::Compute::V1::Operation]
631
+ #
632
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
633
+ def delete_per_instance_configs request, options = nil
634
+ raise ::ArgumentError, "request must be provided" if request.nil?
635
+
636
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest
637
+
638
+ # Converts hash and nil to an options object
639
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
640
+
641
+ # Customize the options with defaults
642
+ call_metadata = {}
643
+
644
+ # Set x-goog-api-client header
645
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
646
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
647
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
648
+
649
+ options.apply_defaults timeout: @config.timeout,
650
+ metadata: call_metadata
651
+
652
+ uri, body, _query_string_params = transcode_delete_per_instance_configs request
653
+ response = @client_stub.make_post_request(
654
+ uri: uri,
655
+ body: body,
656
+ options: options
657
+ )
658
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
659
+
660
+ yield result, response if block_given?
661
+ result
662
+ rescue ::Faraday::Error => e
663
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
664
+ raise ::Google::Cloud::Error.from_error(gapic_error)
665
+ end
666
+
667
+ ##
668
+ # Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
669
+ #
670
+ # @overload get(request, options = nil)
671
+ # Pass arguments to `get` via a request object, either of type
672
+ # {::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest} or an equivalent Hash.
673
+ #
674
+ # @param request [::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest, ::Hash]
675
+ # A request object representing the call parameters. Required. To specify no
676
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
677
+ # @param options [::Gapic::CallOptions, ::Hash]
678
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
679
+ # Note: currently retry functionality is not implemented. While it is possible
680
+ # to set it using ::Gapic::CallOptions, it will not be applied
681
+ #
682
+ # @overload get(instance_group_manager: nil, project: nil, zone: nil)
683
+ # Pass arguments to `get` via keyword arguments. Note that at
684
+ # least one keyword argument is required. To specify no parameters, or to keep all
685
+ # the default parameter values, pass an empty Hash as a request object (see above).
686
+ #
687
+ # @param instance_group_manager [::String]
688
+ # The name of the managed instance group.
689
+ # @param project [::String]
690
+ # Project ID for this request.
691
+ # @param zone [::String]
692
+ # The name of the zone where the managed instance group is located.
693
+ # @yield [result, env] Access the result along with the Faraday environment object
694
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManager]
695
+ # @yieldparam response [::Faraday::Response]
696
+ #
697
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManager]
698
+ #
699
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
700
+ def get request, options = nil
701
+ raise ::ArgumentError, "request must be provided" if request.nil?
702
+
703
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest
704
+
705
+ # Converts hash and nil to an options object
706
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
707
+
708
+ # Customize the options with defaults
709
+ call_metadata = {}
710
+
711
+ # Set x-goog-api-client header
712
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
713
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
714
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
715
+
716
+ options.apply_defaults timeout: @config.timeout,
717
+ metadata: call_metadata
718
+
719
+ uri, _body, _query_string_params = transcode_get request
720
+ response = @client_stub.make_get_request(
721
+ uri: uri,
722
+ options: options
723
+ )
724
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManager.decode_json response.body, ignore_unknown_fields: true
725
+
726
+ yield result, response if block_given?
727
+ result
728
+ rescue ::Faraday::Error => e
729
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
730
+ raise ::Google::Cloud::Error.from_error(gapic_error)
731
+ end
732
+
733
+ ##
734
+ # Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
735
+ #
736
+ # A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
737
+ #
738
+ # @overload insert(request, options = nil)
739
+ # Pass arguments to `insert` via a request object, either of type
740
+ # {::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest} or an equivalent Hash.
741
+ #
742
+ # @param request [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest, ::Hash]
743
+ # A request object representing the call parameters. Required. To specify no
744
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
745
+ # @param options [::Gapic::CallOptions, ::Hash]
746
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
747
+ # Note: currently retry functionality is not implemented. While it is possible
748
+ # to set it using ::Gapic::CallOptions, it will not be applied
749
+ #
750
+ # @overload insert(instance_group_manager_resource: nil, project: nil, request_id: nil, zone: nil)
751
+ # Pass arguments to `insert` via keyword arguments. Note that at
752
+ # least one keyword argument is required. To specify no parameters, or to keep all
753
+ # the default parameter values, pass an empty Hash as a request object (see above).
754
+ #
755
+ # @param instance_group_manager_resource [::Google::Cloud::Compute::V1::InstanceGroupManager, ::Hash]
756
+ # The body resource for this request
757
+ # @param project [::String]
758
+ # Project ID for this request.
759
+ # @param request_id [::String]
760
+ # 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.
761
+ #
762
+ # 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.
763
+ #
764
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
765
+ # @param zone [::String]
766
+ # The name of the zone where you want to create the managed instance group.
767
+ # @yield [result, env] Access the result along with the Faraday environment object
768
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
769
+ # @yieldparam response [::Faraday::Response]
770
+ #
771
+ # @return [::Google::Cloud::Compute::V1::Operation]
772
+ #
773
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
774
+ def insert request, options = nil
775
+ raise ::ArgumentError, "request must be provided" if request.nil?
776
+
777
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest
778
+
779
+ # Converts hash and nil to an options object
780
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
781
+
782
+ # Customize the options with defaults
783
+ call_metadata = {}
784
+
785
+ # Set x-goog-api-client header
786
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
787
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
788
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
789
+
790
+ options.apply_defaults timeout: @config.timeout,
791
+ metadata: call_metadata
792
+
793
+ uri, body, _query_string_params = transcode_insert request
794
+ response = @client_stub.make_post_request(
795
+ uri: uri,
796
+ body: body,
797
+ options: options
798
+ )
799
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
800
+
801
+ yield result, response if block_given?
802
+ result
803
+ rescue ::Faraday::Error => e
804
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
805
+ raise ::Google::Cloud::Error.from_error(gapic_error)
806
+ end
807
+
808
+ ##
809
+ # Retrieves a list of managed instance groups that are contained within the specified project and zone.
810
+ #
811
+ # @overload list(request, options = nil)
812
+ # Pass arguments to `list` via a request object, either of type
813
+ # {::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest} or an equivalent Hash.
814
+ #
815
+ # @param request [::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest, ::Hash]
816
+ # A request object representing the call parameters. Required. To specify no
817
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
818
+ # @param options [::Gapic::CallOptions, ::Hash]
819
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
820
+ # Note: currently retry functionality is not implemented. While it is possible
821
+ # to set it using ::Gapic::CallOptions, it will not be applied
822
+ #
823
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
824
+ # Pass arguments to `list` via keyword arguments. Note that at
825
+ # least one keyword argument is required. To specify no parameters, or to keep all
826
+ # the default parameter values, pass an empty Hash as a request object (see above).
827
+ #
828
+ # @param filter [::String]
829
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
830
+ #
831
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
832
+ #
833
+ # 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.
834
+ #
835
+ # 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) ```
836
+ # @param max_results [::Integer]
837
+ # 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`)
838
+ # @param order_by [::String]
839
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
840
+ #
841
+ # 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.
842
+ #
843
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
844
+ # @param page_token [::String]
845
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
846
+ # @param project [::String]
847
+ # Project ID for this request.
848
+ # @param return_partial_success [::Boolean]
849
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
850
+ # @param zone [::String]
851
+ # The name of the zone where the managed instance group is located.
852
+ # @yield [result, env] Access the result along with the Faraday environment object
853
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerList]
854
+ # @yieldparam response [::Faraday::Response]
855
+ #
856
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagerList]
857
+ #
858
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
859
+ def list request, options = nil
860
+ raise ::ArgumentError, "request must be provided" if request.nil?
861
+
862
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest
863
+
864
+ # Converts hash and nil to an options object
865
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
866
+
867
+ # Customize the options with defaults
868
+ call_metadata = {}
869
+
870
+ # Set x-goog-api-client header
871
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
872
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
873
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
874
+
875
+ options.apply_defaults timeout: @config.timeout,
876
+ metadata: call_metadata
877
+
878
+ uri, _body, query_string_params = transcode_list request
879
+ response = @client_stub.make_get_request(
880
+ uri: uri,
881
+ params: query_string_params,
882
+ options: options
883
+ )
884
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagerList.decode_json response.body, ignore_unknown_fields: true
885
+
886
+ yield result, response if block_given?
887
+ result
888
+ rescue ::Faraday::Error => e
889
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
890
+ raise ::Google::Cloud::Error.from_error(gapic_error)
891
+ end
892
+
893
+ ##
894
+ # Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.
895
+ #
896
+ # @overload list_errors(request, options = nil)
897
+ # Pass arguments to `list_errors` via a request object, either of type
898
+ # {::Google::Cloud::Compute::V1::ListErrorsInstanceGroupManagersRequest} or an equivalent Hash.
899
+ #
900
+ # @param request [::Google::Cloud::Compute::V1::ListErrorsInstanceGroupManagersRequest, ::Hash]
901
+ # A request object representing the call parameters. Required. To specify no
902
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
903
+ # @param options [::Gapic::CallOptions, ::Hash]
904
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
905
+ # Note: currently retry functionality is not implemented. While it is possible
906
+ # to set it using ::Gapic::CallOptions, it will not be applied
907
+ #
908
+ # @overload list_errors(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
909
+ # Pass arguments to `list_errors` via keyword arguments. Note that at
910
+ # least one keyword argument is required. To specify no parameters, or to keep all
911
+ # the default parameter values, pass an empty Hash as a request object (see above).
912
+ #
913
+ # @param filter [::String]
914
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
915
+ #
916
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
917
+ #
918
+ # 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.
919
+ #
920
+ # 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) ```
921
+ # @param instance_group_manager [::String]
922
+ # The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]\\{0,61}[a-z0-9])?)|[1-9][0-9]\\{0,19}.
923
+ # @param max_results [::Integer]
924
+ # 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`)
925
+ # @param order_by [::String]
926
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
927
+ #
928
+ # 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.
929
+ #
930
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
931
+ # @param page_token [::String]
932
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
933
+ # @param project [::String]
934
+ # Project ID for this request.
935
+ # @param return_partial_success [::Boolean]
936
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
937
+ # @param zone [::String]
938
+ # The name of the zone where the managed instance group is located. It should conform to RFC1035.
939
+ # @yield [result, env] Access the result along with the Faraday environment object
940
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse]
941
+ # @yieldparam response [::Faraday::Response]
942
+ #
943
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse]
944
+ #
945
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
946
+ def list_errors request, options = nil
947
+ raise ::ArgumentError, "request must be provided" if request.nil?
948
+
949
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListErrorsInstanceGroupManagersRequest
950
+
951
+ # Converts hash and nil to an options object
952
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
953
+
954
+ # Customize the options with defaults
955
+ call_metadata = {}
956
+
957
+ # Set x-goog-api-client header
958
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
959
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
960
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
961
+
962
+ options.apply_defaults timeout: @config.timeout,
963
+ metadata: call_metadata
964
+
965
+ uri, _body, query_string_params = transcode_list_errors request
966
+ response = @client_stub.make_get_request(
967
+ uri: uri,
968
+ params: query_string_params,
969
+ options: options
970
+ )
971
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListErrorsResponse.decode_json response.body, ignore_unknown_fields: true
972
+
973
+ yield result, response if block_given?
974
+ result
975
+ rescue ::Faraday::Error => e
976
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
977
+ raise ::Google::Cloud::Error.from_error(gapic_error)
978
+ end
979
+
980
+ ##
981
+ # Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.
982
+ #
983
+ # @overload list_managed_instances(request, options = nil)
984
+ # Pass arguments to `list_managed_instances` via a request object, either of type
985
+ # {::Google::Cloud::Compute::V1::ListManagedInstancesInstanceGroupManagersRequest} or an equivalent Hash.
986
+ #
987
+ # @param request [::Google::Cloud::Compute::V1::ListManagedInstancesInstanceGroupManagersRequest, ::Hash]
988
+ # A request object representing the call parameters. Required. To specify no
989
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
990
+ # @param options [::Gapic::CallOptions, ::Hash]
991
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
992
+ # Note: currently retry functionality is not implemented. While it is possible
993
+ # to set it using ::Gapic::CallOptions, it will not be applied
994
+ #
995
+ # @overload list_managed_instances(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
996
+ # Pass arguments to `list_managed_instances` via keyword arguments. Note that at
997
+ # least one keyword argument is required. To specify no parameters, or to keep all
998
+ # the default parameter values, pass an empty Hash as a request object (see above).
999
+ #
1000
+ # @param filter [::String]
1001
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
1002
+ #
1003
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1004
+ #
1005
+ # 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.
1006
+ #
1007
+ # 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) ```
1008
+ # @param instance_group_manager [::String]
1009
+ # The name of the managed instance group.
1010
+ # @param max_results [::Integer]
1011
+ # 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`)
1012
+ # @param order_by [::String]
1013
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1014
+ #
1015
+ # 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.
1016
+ #
1017
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1018
+ # @param page_token [::String]
1019
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
1020
+ # @param project [::String]
1021
+ # Project ID for this request.
1022
+ # @param return_partial_success [::Boolean]
1023
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1024
+ # @param zone [::String]
1025
+ # The name of the zone where the managed instance group is located.
1026
+ # @yield [result, env] Access the result along with the Faraday environment object
1027
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse]
1028
+ # @yieldparam response [::Faraday::Response]
1029
+ #
1030
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse]
1031
+ #
1032
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1033
+ def list_managed_instances request, options = nil
1034
+ raise ::ArgumentError, "request must be provided" if request.nil?
1035
+
1036
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListManagedInstancesInstanceGroupManagersRequest
1037
+
1038
+ # Converts hash and nil to an options object
1039
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1040
+
1041
+ # Customize the options with defaults
1042
+ call_metadata = {}
1043
+
1044
+ # Set x-goog-api-client header
1045
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1046
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1047
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1048
+
1049
+ options.apply_defaults timeout: @config.timeout,
1050
+ metadata: call_metadata
1051
+
1052
+ uri, _body, query_string_params = transcode_list_managed_instances request
1053
+ response = @client_stub.make_post_request(
1054
+ uri: uri,
1055
+ params: query_string_params,
1056
+ options: options
1057
+ )
1058
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListManagedInstancesResponse.decode_json response.body, ignore_unknown_fields: true
1059
+
1060
+ yield result, response if block_given?
1061
+ result
1062
+ rescue ::Faraday::Error => e
1063
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1064
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1065
+ end
1066
+
1067
+ ##
1068
+ # Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
1069
+ #
1070
+ # @overload list_per_instance_configs(request, options = nil)
1071
+ # Pass arguments to `list_per_instance_configs` via a request object, either of type
1072
+ # {::Google::Cloud::Compute::V1::ListPerInstanceConfigsInstanceGroupManagersRequest} or an equivalent Hash.
1073
+ #
1074
+ # @param request [::Google::Cloud::Compute::V1::ListPerInstanceConfigsInstanceGroupManagersRequest, ::Hash]
1075
+ # A request object representing the call parameters. Required. To specify no
1076
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1077
+ # @param options [::Gapic::CallOptions, ::Hash]
1078
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1079
+ # Note: currently retry functionality is not implemented. While it is possible
1080
+ # to set it using ::Gapic::CallOptions, it will not be applied
1081
+ #
1082
+ # @overload list_per_instance_configs(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
1083
+ # Pass arguments to `list_per_instance_configs` via keyword arguments. Note that at
1084
+ # least one keyword argument is required. To specify no parameters, or to keep all
1085
+ # the default parameter values, pass an empty Hash as a request object (see above).
1086
+ #
1087
+ # @param filter [::String]
1088
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
1089
+ #
1090
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1091
+ #
1092
+ # 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.
1093
+ #
1094
+ # 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) ```
1095
+ # @param instance_group_manager [::String]
1096
+ # The name of the managed instance group. It should conform to RFC1035.
1097
+ # @param max_results [::Integer]
1098
+ # 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`)
1099
+ # @param order_by [::String]
1100
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1101
+ #
1102
+ # 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.
1103
+ #
1104
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1105
+ # @param page_token [::String]
1106
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
1107
+ # @param project [::String]
1108
+ # Project ID for this request.
1109
+ # @param return_partial_success [::Boolean]
1110
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1111
+ # @param zone [::String]
1112
+ # The name of the zone where the managed instance group is located. It should conform to RFC1035.
1113
+ # @yield [result, env] Access the result along with the Faraday environment object
1114
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp]
1115
+ # @yieldparam response [::Faraday::Response]
1116
+ #
1117
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp]
1118
+ #
1119
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1120
+ def list_per_instance_configs request, options = nil
1121
+ raise ::ArgumentError, "request must be provided" if request.nil?
1122
+
1123
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListPerInstanceConfigsInstanceGroupManagersRequest
1124
+
1125
+ # Converts hash and nil to an options object
1126
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1127
+
1128
+ # Customize the options with defaults
1129
+ call_metadata = {}
1130
+
1131
+ # Set x-goog-api-client header
1132
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1133
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1134
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1135
+
1136
+ options.apply_defaults timeout: @config.timeout,
1137
+ metadata: call_metadata
1138
+
1139
+ uri, _body, query_string_params = transcode_list_per_instance_configs request
1140
+ response = @client_stub.make_post_request(
1141
+ uri: uri,
1142
+ params: query_string_params,
1143
+ options: options
1144
+ )
1145
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagersListPerInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true
1146
+
1147
+ yield result, response if block_given?
1148
+ result
1149
+ rescue ::Faraday::Error => e
1150
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1151
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1152
+ end
1153
+
1154
+ ##
1155
+ # Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
1156
+ #
1157
+ # @overload patch(request, options = nil)
1158
+ # Pass arguments to `patch` via a request object, either of type
1159
+ # {::Google::Cloud::Compute::V1::PatchInstanceGroupManagerRequest} or an equivalent Hash.
1160
+ #
1161
+ # @param request [::Google::Cloud::Compute::V1::PatchInstanceGroupManagerRequest, ::Hash]
1162
+ # A request object representing the call parameters. Required. To specify no
1163
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1164
+ # @param options [::Gapic::CallOptions, ::Hash]
1165
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1166
+ # Note: currently retry functionality is not implemented. While it is possible
1167
+ # to set it using ::Gapic::CallOptions, it will not be applied
1168
+ #
1169
+ # @overload patch(instance_group_manager: nil, instance_group_manager_resource: nil, project: nil, request_id: nil, zone: nil)
1170
+ # Pass arguments to `patch` via keyword arguments. Note that at
1171
+ # least one keyword argument is required. To specify no parameters, or to keep all
1172
+ # the default parameter values, pass an empty Hash as a request object (see above).
1173
+ #
1174
+ # @param instance_group_manager [::String]
1175
+ # The name of the instance group manager.
1176
+ # @param instance_group_manager_resource [::Google::Cloud::Compute::V1::InstanceGroupManager, ::Hash]
1177
+ # The body resource for this request
1178
+ # @param project [::String]
1179
+ # Project ID for this request.
1180
+ # @param request_id [::String]
1181
+ # 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.
1182
+ #
1183
+ # 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.
1184
+ #
1185
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1186
+ # @param zone [::String]
1187
+ # The name of the zone where you want to create the managed instance group.
1188
+ # @yield [result, env] Access the result along with the Faraday environment object
1189
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1190
+ # @yieldparam response [::Faraday::Response]
1191
+ #
1192
+ # @return [::Google::Cloud::Compute::V1::Operation]
1193
+ #
1194
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1195
+ def patch request, options = nil
1196
+ raise ::ArgumentError, "request must be provided" if request.nil?
1197
+
1198
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchInstanceGroupManagerRequest
1199
+
1200
+ # Converts hash and nil to an options object
1201
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1202
+
1203
+ # Customize the options with defaults
1204
+ call_metadata = {}
1205
+
1206
+ # Set x-goog-api-client header
1207
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1208
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1209
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1210
+
1211
+ options.apply_defaults timeout: @config.timeout,
1212
+ metadata: call_metadata
1213
+
1214
+ uri, body, _query_string_params = transcode_patch request
1215
+ response = @client_stub.make_patch_request(
1216
+ uri: uri,
1217
+ body: body,
1218
+ options: options
1219
+ )
1220
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1221
+
1222
+ yield result, response if block_given?
1223
+ result
1224
+ rescue ::Faraday::Error => e
1225
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1226
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1227
+ end
1228
+
1229
+ ##
1230
+ # Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
1231
+ #
1232
+ # @overload patch_per_instance_configs(request, options = nil)
1233
+ # Pass arguments to `patch_per_instance_configs` via a request object, either of type
1234
+ # {::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest} or an equivalent Hash.
1235
+ #
1236
+ # @param request [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest, ::Hash]
1237
+ # A request object representing the call parameters. Required. To specify no
1238
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1239
+ # @param options [::Gapic::CallOptions, ::Hash]
1240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1241
+ # Note: currently retry functionality is not implemented. While it is possible
1242
+ # to set it using ::Gapic::CallOptions, it will not be applied
1243
+ #
1244
+ # @overload patch_per_instance_configs(instance_group_manager: nil, instance_group_managers_patch_per_instance_configs_req_resource: nil, project: nil, request_id: nil, zone: nil)
1245
+ # Pass arguments to `patch_per_instance_configs` via keyword arguments. Note that at
1246
+ # least one keyword argument is required. To specify no parameters, or to keep all
1247
+ # the default parameter values, pass an empty Hash as a request object (see above).
1248
+ #
1249
+ # @param instance_group_manager [::String]
1250
+ # The name of the managed instance group. It should conform to RFC1035.
1251
+ # @param instance_group_managers_patch_per_instance_configs_req_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersPatchPerInstanceConfigsReq, ::Hash]
1252
+ # The body resource for this request
1253
+ # @param project [::String]
1254
+ # Project ID for this request.
1255
+ # @param request_id [::String]
1256
+ # 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.
1257
+ #
1258
+ # 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.
1259
+ #
1260
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1261
+ # @param zone [::String]
1262
+ # The name of the zone where the managed instance group is located. It should conform to RFC1035.
1263
+ # @yield [result, env] Access the result along with the Faraday environment object
1264
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1265
+ # @yieldparam response [::Faraday::Response]
1266
+ #
1267
+ # @return [::Google::Cloud::Compute::V1::Operation]
1268
+ #
1269
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1270
+ def patch_per_instance_configs request, options = nil
1271
+ raise ::ArgumentError, "request must be provided" if request.nil?
1272
+
1273
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest
1274
+
1275
+ # Converts hash and nil to an options object
1276
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1277
+
1278
+ # Customize the options with defaults
1279
+ call_metadata = {}
1280
+
1281
+ # Set x-goog-api-client header
1282
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1283
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1284
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1285
+
1286
+ options.apply_defaults timeout: @config.timeout,
1287
+ metadata: call_metadata
1288
+
1289
+ uri, body, _query_string_params = transcode_patch_per_instance_configs request
1290
+ response = @client_stub.make_post_request(
1291
+ uri: uri,
1292
+ body: body,
1293
+ options: options
1294
+ )
1295
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1296
+
1297
+ yield result, response if block_given?
1298
+ result
1299
+ rescue ::Faraday::Error => e
1300
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1301
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1302
+ end
1303
+
1304
+ ##
1305
+ # Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
1306
+ #
1307
+ # If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
1308
+ #
1309
+ # You can specify a maximum of 1000 instances with this method per request.
1310
+ #
1311
+ # @overload recreate_instances(request, options = nil)
1312
+ # Pass arguments to `recreate_instances` via a request object, either of type
1313
+ # {::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest} or an equivalent Hash.
1314
+ #
1315
+ # @param request [::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest, ::Hash]
1316
+ # A request object representing the call parameters. Required. To specify no
1317
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1318
+ # @param options [::Gapic::CallOptions, ::Hash]
1319
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1320
+ # Note: currently retry functionality is not implemented. While it is possible
1321
+ # to set it using ::Gapic::CallOptions, it will not be applied
1322
+ #
1323
+ # @overload recreate_instances(instance_group_manager: nil, instance_group_managers_recreate_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
1324
+ # Pass arguments to `recreate_instances` via keyword arguments. Note that at
1325
+ # least one keyword argument is required. To specify no parameters, or to keep all
1326
+ # the default parameter values, pass an empty Hash as a request object (see above).
1327
+ #
1328
+ # @param instance_group_manager [::String]
1329
+ # The name of the managed instance group.
1330
+ # @param instance_group_managers_recreate_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersRecreateInstancesRequest, ::Hash]
1331
+ # The body resource for this request
1332
+ # @param project [::String]
1333
+ # Project ID for this request.
1334
+ # @param request_id [::String]
1335
+ # 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.
1336
+ #
1337
+ # 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.
1338
+ #
1339
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1340
+ # @param zone [::String]
1341
+ # The name of the zone where the managed instance group is located.
1342
+ # @yield [result, env] Access the result along with the Faraday environment object
1343
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1344
+ # @yieldparam response [::Faraday::Response]
1345
+ #
1346
+ # @return [::Google::Cloud::Compute::V1::Operation]
1347
+ #
1348
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1349
+ def recreate_instances request, options = nil
1350
+ raise ::ArgumentError, "request must be provided" if request.nil?
1351
+
1352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest
1353
+
1354
+ # Converts hash and nil to an options object
1355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1356
+
1357
+ # Customize the options with defaults
1358
+ call_metadata = {}
1359
+
1360
+ # Set x-goog-api-client header
1361
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1363
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1364
+
1365
+ options.apply_defaults timeout: @config.timeout,
1366
+ metadata: call_metadata
1367
+
1368
+ uri, body, _query_string_params = transcode_recreate_instances request
1369
+ response = @client_stub.make_post_request(
1370
+ uri: uri,
1371
+ body: body,
1372
+ options: options
1373
+ )
1374
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1375
+
1376
+ yield result, response if block_given?
1377
+ result
1378
+ rescue ::Faraday::Error => e
1379
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1380
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1381
+ end
1382
+
1383
+ ##
1384
+ # Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
1385
+ #
1386
+ # When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:
1387
+ #
1388
+ # + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.
1389
+ #
1390
+ # This list is subject to change.
1391
+ #
1392
+ # If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
1393
+ #
1394
+ # @overload resize(request, options = nil)
1395
+ # Pass arguments to `resize` via a request object, either of type
1396
+ # {::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest} or an equivalent Hash.
1397
+ #
1398
+ # @param request [::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest, ::Hash]
1399
+ # A request object representing the call parameters. Required. To specify no
1400
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1401
+ # @param options [::Gapic::CallOptions, ::Hash]
1402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1403
+ # Note: currently retry functionality is not implemented. While it is possible
1404
+ # to set it using ::Gapic::CallOptions, it will not be applied
1405
+ #
1406
+ # @overload resize(instance_group_manager: nil, project: nil, request_id: nil, size: nil, zone: nil)
1407
+ # Pass arguments to `resize` via keyword arguments. Note that at
1408
+ # least one keyword argument is required. To specify no parameters, or to keep all
1409
+ # the default parameter values, pass an empty Hash as a request object (see above).
1410
+ #
1411
+ # @param instance_group_manager [::String]
1412
+ # The name of the managed instance group.
1413
+ # @param project [::String]
1414
+ # Project ID for this request.
1415
+ # @param request_id [::String]
1416
+ # 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.
1417
+ #
1418
+ # 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.
1419
+ #
1420
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1421
+ # @param size [::Integer]
1422
+ # The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
1423
+ # @param zone [::String]
1424
+ # The name of the zone where the managed instance group is located.
1425
+ # @yield [result, env] Access the result along with the Faraday environment object
1426
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1427
+ # @yieldparam response [::Faraday::Response]
1428
+ #
1429
+ # @return [::Google::Cloud::Compute::V1::Operation]
1430
+ #
1431
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1432
+ def resize request, options = nil
1433
+ raise ::ArgumentError, "request must be provided" if request.nil?
1434
+
1435
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest
1436
+
1437
+ # Converts hash and nil to an options object
1438
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1439
+
1440
+ # Customize the options with defaults
1441
+ call_metadata = {}
1442
+
1443
+ # Set x-goog-api-client header
1444
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1445
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1446
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1447
+
1448
+ options.apply_defaults timeout: @config.timeout,
1449
+ metadata: call_metadata
1450
+
1451
+ uri, _body, query_string_params = transcode_resize request
1452
+ response = @client_stub.make_post_request(
1453
+ uri: uri,
1454
+ params: query_string_params,
1455
+ options: options
1456
+ )
1457
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1458
+
1459
+ yield result, response if block_given?
1460
+ result
1461
+ rescue ::Faraday::Error => e
1462
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1463
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1464
+ end
1465
+
1466
+ ##
1467
+ # Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
1468
+ #
1469
+ # @overload set_instance_template(request, options = nil)
1470
+ # Pass arguments to `set_instance_template` via a request object, either of type
1471
+ # {::Google::Cloud::Compute::V1::SetInstanceTemplateInstanceGroupManagerRequest} or an equivalent Hash.
1472
+ #
1473
+ # @param request [::Google::Cloud::Compute::V1::SetInstanceTemplateInstanceGroupManagerRequest, ::Hash]
1474
+ # A request object representing the call parameters. Required. To specify no
1475
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1476
+ # @param options [::Gapic::CallOptions, ::Hash]
1477
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1478
+ # Note: currently retry functionality is not implemented. While it is possible
1479
+ # to set it using ::Gapic::CallOptions, it will not be applied
1480
+ #
1481
+ # @overload set_instance_template(instance_group_manager: nil, instance_group_managers_set_instance_template_request_resource: nil, project: nil, request_id: nil, zone: nil)
1482
+ # Pass arguments to `set_instance_template` via keyword arguments. Note that at
1483
+ # least one keyword argument is required. To specify no parameters, or to keep all
1484
+ # the default parameter values, pass an empty Hash as a request object (see above).
1485
+ #
1486
+ # @param instance_group_manager [::String]
1487
+ # The name of the managed instance group.
1488
+ # @param instance_group_managers_set_instance_template_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersSetInstanceTemplateRequest, ::Hash]
1489
+ # The body resource for this request
1490
+ # @param project [::String]
1491
+ # Project ID for this request.
1492
+ # @param request_id [::String]
1493
+ # 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.
1494
+ #
1495
+ # 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.
1496
+ #
1497
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1498
+ # @param zone [::String]
1499
+ # The name of the zone where the managed instance group is located.
1500
+ # @yield [result, env] Access the result along with the Faraday environment object
1501
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1502
+ # @yieldparam response [::Faraday::Response]
1503
+ #
1504
+ # @return [::Google::Cloud::Compute::V1::Operation]
1505
+ #
1506
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1507
+ def set_instance_template request, options = nil
1508
+ raise ::ArgumentError, "request must be provided" if request.nil?
1509
+
1510
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetInstanceTemplateInstanceGroupManagerRequest
1511
+
1512
+ # Converts hash and nil to an options object
1513
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1514
+
1515
+ # Customize the options with defaults
1516
+ call_metadata = {}
1517
+
1518
+ # Set x-goog-api-client header
1519
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1520
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1521
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1522
+
1523
+ options.apply_defaults timeout: @config.timeout,
1524
+ metadata: call_metadata
1525
+
1526
+ uri, body, _query_string_params = transcode_set_instance_template request
1527
+ response = @client_stub.make_post_request(
1528
+ uri: uri,
1529
+ body: body,
1530
+ options: options
1531
+ )
1532
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1533
+
1534
+ yield result, response if block_given?
1535
+ result
1536
+ rescue ::Faraday::Error => e
1537
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1538
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1539
+ end
1540
+
1541
+ ##
1542
+ # Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
1543
+ #
1544
+ # @overload set_target_pools(request, options = nil)
1545
+ # Pass arguments to `set_target_pools` via a request object, either of type
1546
+ # {::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest} or an equivalent Hash.
1547
+ #
1548
+ # @param request [::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest, ::Hash]
1549
+ # A request object representing the call parameters. Required. To specify no
1550
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1551
+ # @param options [::Gapic::CallOptions, ::Hash]
1552
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1553
+ # Note: currently retry functionality is not implemented. While it is possible
1554
+ # to set it using ::Gapic::CallOptions, it will not be applied
1555
+ #
1556
+ # @overload set_target_pools(instance_group_manager: nil, instance_group_managers_set_target_pools_request_resource: nil, project: nil, request_id: nil, zone: nil)
1557
+ # Pass arguments to `set_target_pools` via keyword arguments. Note that at
1558
+ # least one keyword argument is required. To specify no parameters, or to keep all
1559
+ # the default parameter values, pass an empty Hash as a request object (see above).
1560
+ #
1561
+ # @param instance_group_manager [::String]
1562
+ # The name of the managed instance group.
1563
+ # @param instance_group_managers_set_target_pools_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersSetTargetPoolsRequest, ::Hash]
1564
+ # The body resource for this request
1565
+ # @param project [::String]
1566
+ # Project ID for this request.
1567
+ # @param request_id [::String]
1568
+ # 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.
1569
+ #
1570
+ # 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.
1571
+ #
1572
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1573
+ # @param zone [::String]
1574
+ # The name of the zone where the managed instance group is located.
1575
+ # @yield [result, env] Access the result along with the Faraday environment object
1576
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1577
+ # @yieldparam response [::Faraday::Response]
1578
+ #
1579
+ # @return [::Google::Cloud::Compute::V1::Operation]
1580
+ #
1581
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1582
+ def set_target_pools request, options = nil
1583
+ raise ::ArgumentError, "request must be provided" if request.nil?
1584
+
1585
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest
1586
+
1587
+ # Converts hash and nil to an options object
1588
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1589
+
1590
+ # Customize the options with defaults
1591
+ call_metadata = {}
1592
+
1593
+ # Set x-goog-api-client header
1594
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1595
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1596
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1597
+
1598
+ options.apply_defaults timeout: @config.timeout,
1599
+ metadata: call_metadata
1600
+
1601
+ uri, body, _query_string_params = transcode_set_target_pools request
1602
+ response = @client_stub.make_post_request(
1603
+ uri: uri,
1604
+ body: body,
1605
+ options: options
1606
+ )
1607
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1608
+
1609
+ yield result, response if block_given?
1610
+ result
1611
+ rescue ::Faraday::Error => e
1612
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1613
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1614
+ end
1615
+
1616
+ ##
1617
+ # Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
1618
+ #
1619
+ # @overload update_per_instance_configs(request, options = nil)
1620
+ # Pass arguments to `update_per_instance_configs` via a request object, either of type
1621
+ # {::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest} or an equivalent Hash.
1622
+ #
1623
+ # @param request [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest, ::Hash]
1624
+ # A request object representing the call parameters. Required. To specify no
1625
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1626
+ # @param options [::Gapic::CallOptions, ::Hash]
1627
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1628
+ # Note: currently retry functionality is not implemented. While it is possible
1629
+ # to set it using ::Gapic::CallOptions, it will not be applied
1630
+ #
1631
+ # @overload update_per_instance_configs(instance_group_manager: nil, instance_group_managers_update_per_instance_configs_req_resource: nil, project: nil, request_id: nil, zone: nil)
1632
+ # Pass arguments to `update_per_instance_configs` via keyword arguments. Note that at
1633
+ # least one keyword argument is required. To specify no parameters, or to keep all
1634
+ # the default parameter values, pass an empty Hash as a request object (see above).
1635
+ #
1636
+ # @param instance_group_manager [::String]
1637
+ # The name of the managed instance group. It should conform to RFC1035.
1638
+ # @param instance_group_managers_update_per_instance_configs_req_resource [::Google::Cloud::Compute::V1::InstanceGroupManagersUpdatePerInstanceConfigsReq, ::Hash]
1639
+ # The body resource for this request
1640
+ # @param project [::String]
1641
+ # Project ID for this request.
1642
+ # @param request_id [::String]
1643
+ # 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.
1644
+ #
1645
+ # 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.
1646
+ #
1647
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1648
+ # @param zone [::String]
1649
+ # The name of the zone where the managed instance group is located. It should conform to RFC1035.
1650
+ # @yield [result, env] Access the result along with the Faraday environment object
1651
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1652
+ # @yieldparam response [::Faraday::Response]
1653
+ #
1654
+ # @return [::Google::Cloud::Compute::V1::Operation]
1655
+ #
1656
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1657
+ def update_per_instance_configs request, options = nil
1658
+ raise ::ArgumentError, "request must be provided" if request.nil?
1659
+
1660
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest
1661
+
1662
+ # Converts hash and nil to an options object
1663
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1664
+
1665
+ # Customize the options with defaults
1666
+ call_metadata = {}
1667
+
1668
+ # Set x-goog-api-client header
1669
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1670
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1671
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1672
+
1673
+ options.apply_defaults timeout: @config.timeout,
1674
+ metadata: call_metadata
1675
+
1676
+ uri, body, _query_string_params = transcode_update_per_instance_configs request
1677
+ response = @client_stub.make_post_request(
1678
+ uri: uri,
1679
+ body: body,
1680
+ options: options
1681
+ )
1682
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1683
+
1684
+ yield result, response if block_given?
1685
+ result
1686
+ rescue ::Faraday::Error => e
1687
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1688
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1689
+ end
1690
+
1691
+ ##
1692
+ # Configuration class for the InstanceGroupManagers REST API.
1693
+ #
1694
+ # This class represents the configuration for InstanceGroupManagers REST,
1695
+ # providing control over credentials, timeouts, retry behavior, logging.
1696
+ #
1697
+ # Configuration can be applied globally to all clients, or to a single client
1698
+ # on construction.
1699
+ #
1700
+ # # Examples
1701
+ #
1702
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
1703
+ #
1704
+ # ::Google::Cloud::Compute::V1::InstanceGroupManagers::Client.configure do |config|
1705
+ # config.timeout = 10.0
1706
+ # end
1707
+ #
1708
+ # To apply the above configuration only to a new client:
1709
+ #
1710
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagers::Client.new do |config|
1711
+ # config.timeout = 10.0
1712
+ # end
1713
+ #
1714
+ # @!attribute [rw] endpoint
1715
+ # The hostname or hostname:port of the service endpoint.
1716
+ # Defaults to `"compute.googleapis.com"`.
1717
+ # @return [::String]
1718
+ # @!attribute [rw] credentials
1719
+ # Credentials to send with calls. You may provide any of the following types:
1720
+ # * (`String`) The path to a service account key file in JSON format
1721
+ # * (`Hash`) A service account key as a Hash
1722
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1723
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1724
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1725
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1726
+ # * (`nil`) indicating no credentials
1727
+ # @return [::Object]
1728
+ # @!attribute [rw] scope
1729
+ # The OAuth scopes
1730
+ # @return [::Array<::String>]
1731
+ # @!attribute [rw] lib_name
1732
+ # The library name as recorded in instrumentation and logging
1733
+ # @return [::String]
1734
+ # @!attribute [rw] lib_version
1735
+ # The library version as recorded in instrumentation and logging
1736
+ # @return [::String]
1737
+ # @!attribute [rw] timeout
1738
+ # The call timeout in seconds.
1739
+ # @return [::Numeric]
1740
+ #
1741
+ class Configuration
1742
+ extend ::Gapic::Config
1743
+
1744
+ config_attr :endpoint, "compute.googleapis.com", ::String
1745
+ config_attr :credentials, nil do |value|
1746
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1747
+ allowed.any? { |klass| klass === value }
1748
+ end
1749
+ config_attr :scope, nil, ::String, ::Array, nil
1750
+ config_attr :lib_name, nil, ::String, nil
1751
+ config_attr :lib_version, nil, ::String, nil
1752
+ config_attr :timeout, nil, ::Numeric, nil
1753
+
1754
+ # @private
1755
+ def initialize parent_config = nil
1756
+ @parent_config = parent_config unless parent_config.nil?
1757
+
1758
+ yield self if block_given?
1759
+ end
1760
+ end
1761
+ end
1762
+ end
1763
+ end
1764
+ end
1765
+ end
1766
+ end
1767
+ end