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,112 @@
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 RegionHealthChecks
25
+ module Rest
26
+ # GRPC transcoding helper methods for the RegionHealthChecks REST API.
27
+ module GrpcTranscoding
28
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionHealthCheckRequest]
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}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
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::GetRegionHealthCheckRequest]
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_get request_pb
46
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
47
+ body = nil
48
+ query_string_params = {}
49
+
50
+ [uri, body, query_string_params]
51
+ end
52
+
53
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertRegionHealthCheckRequest]
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_insert request_pb
58
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks"
59
+ body = request_pb.health_check_resource.to_json
60
+ query_string_params = {}
61
+
62
+ [uri, body, query_string_params]
63
+ end
64
+
65
+ # @param request_pb [::Google::Cloud::Compute::V1::ListRegionHealthChecksRequest]
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_list request_pb
70
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks"
71
+ body = nil
72
+ query_string_params = {}
73
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
74
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
75
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
76
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
77
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
78
+
79
+ [uri, body, query_string_params]
80
+ end
81
+
82
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchRegionHealthCheckRequest]
83
+ # A request object representing the call parameters. Required.
84
+ # @return [Array(String, [String, nil], Hash{String => String})]
85
+ # Uri, Body, Query string parameters
86
+ def transcode_patch request_pb
87
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
88
+ body = request_pb.health_check_resource.to_json
89
+ query_string_params = {}
90
+
91
+ [uri, body, query_string_params]
92
+ end
93
+
94
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateRegionHealthCheckRequest]
95
+ # A request object representing the call parameters. Required.
96
+ # @return [Array(String, [String, nil], Hash{String => String})]
97
+ # Uri, Body, Query string parameters
98
+ def transcode_update request_pb
99
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/healthChecks/#{request_pb.health_check}"
100
+ body = request_pb.health_check_resource.to_json
101
+ query_string_params = {}
102
+
103
+ [uri, body, query_string_params]
104
+ end
105
+ extend self
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
112
+ 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/region_instance_group_managers/credentials"
25
+ require "google/cloud/compute/v1/region_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/region_instance_group_managers"
34
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new
35
+ #
36
+ module RegionInstanceGroupManagers
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ helper_path = ::File.join __dir__, "region_instance_group_managers", "helpers.rb"
44
+ require "google/cloud/compute/v1/region_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 RegionInstanceGroupManagers
26
+ # Credentials for the RegionInstanceGroupManagers 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/region_instance_group_managers/rest/grpc_transcoding"
21
+ require "google/cloud/compute/v1/region_instance_group_managers/rest/client"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Compute
26
+ module V1
27
+ module RegionInstanceGroupManagers
28
+ # Client for the REST transport
29
+ module Rest
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,1678 @@
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 RegionInstanceGroupManagers
27
+ module Rest
28
+ ##
29
+ # REST client for the RegionInstanceGroupManagers service.
30
+ #
31
+ # The RegionInstanceGroupManagers API.
32
+ #
33
+ class Client
34
+ include GrpcTranscoding
35
+
36
+ # @private
37
+ attr_reader :region_instance_group_managers_stub
38
+
39
+ ##
40
+ # Configure the RegionInstanceGroupManagers Client class.
41
+ #
42
+ # See {::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # ## Example
46
+ #
47
+ # To modify the configuration for all RegionInstanceGroupManagers clients:
48
+ #
49
+ # ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::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 RegionInstanceGroupManagers 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::RegionInstanceGroupManagers::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 RegionInstanceGroupManagers REST client object.
97
+ #
98
+ # ## Examples
99
+ #
100
+ # To create a new RegionInstanceGroupManagers REST client with the default
101
+ # configuration:
102
+ #
103
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new
104
+ #
105
+ # To create a new RegionInstanceGroupManagers REST client with a custom
106
+ # configuration:
107
+ #
108
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the RegionInstanceGroupManagers 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 immediately 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::AbandonInstancesRegionInstanceGroupManagerRequest} or an equivalent Hash.
148
+ #
149
+ # @param request [::Google::Cloud::Compute::V1::AbandonInstancesRegionInstanceGroupManagerRequest, ::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, project: nil, region: nil, region_instance_group_managers_abandon_instances_request_resource: nil, request_id: 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
+ # Name of the managed instance group.
164
+ # @param project [::String]
165
+ # Project ID for this request.
166
+ # @param region [::String]
167
+ # Name of the region scoping this request.
168
+ # @param region_instance_group_managers_abandon_instances_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersAbandonInstancesRequest, ::Hash]
169
+ # The body resource for this request
170
+ # @param request_id [::String]
171
+ # 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.
172
+ #
173
+ # 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.
174
+ #
175
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
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::AbandonInstancesRegionInstanceGroupManagerRequest
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
+ # Apply updates to selected instances the managed instance group.
219
+ #
220
+ # @overload apply_updates_to_instances(request, options = nil)
221
+ # Pass arguments to `apply_updates_to_instances` via a request object, either of type
222
+ # {::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest} or an equivalent Hash.
223
+ #
224
+ # @param request [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, ::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 apply_updates_to_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_apply_updates_request_resource: nil)
233
+ # Pass arguments to `apply_updates_to_instances` 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 instance_group_manager [::String]
238
+ # The name of the managed instance group, should conform to RFC1035.
239
+ # @param project [::String]
240
+ # Project ID for this request.
241
+ # @param region [::String]
242
+ # Name of the region scoping this request, should conform to RFC1035.
243
+ # @param region_instance_group_managers_apply_updates_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersApplyUpdatesRequest, ::Hash]
244
+ # The body resource for this request
245
+ # @yield [result, env] Access the result along with the Faraday environment object
246
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
247
+ # @yieldparam response [::Faraday::Response]
248
+ #
249
+ # @return [::Google::Cloud::Compute::V1::Operation]
250
+ #
251
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
252
+ def apply_updates_to_instances request, options = nil
253
+ raise ::ArgumentError, "request must be provided" if request.nil?
254
+
255
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest
256
+
257
+ # Converts hash and nil to an options object
258
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
259
+
260
+ # Customize the options with defaults
261
+ call_metadata = {}
262
+
263
+ # Set x-goog-api-client header
264
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
265
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
266
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
267
+
268
+ options.apply_defaults timeout: @config.timeout,
269
+ metadata: call_metadata
270
+
271
+ uri, body, _query_string_params = transcode_apply_updates_to_instances request
272
+ response = @client_stub.make_post_request(
273
+ uri: uri,
274
+ body: body,
275
+ options: options
276
+ )
277
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
278
+
279
+ yield result, response if block_given?
280
+ result
281
+ rescue ::Faraday::Error => e
282
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
283
+ raise ::Google::Cloud::Error.from_error(gapic_error)
284
+ end
285
+
286
+ ##
287
+ # Creates instances with per-instance configs in this regional 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.
288
+ #
289
+ # @overload create_instances(request, options = nil)
290
+ # Pass arguments to `create_instances` via a request object, either of type
291
+ # {::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest} or an equivalent Hash.
292
+ #
293
+ # @param request [::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest, ::Hash]
294
+ # A request object representing the call parameters. Required. To specify no
295
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
296
+ # @param options [::Gapic::CallOptions, ::Hash]
297
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
298
+ # Note: currently retry functionality is not implemented. While it is possible
299
+ # to set it using ::Gapic::CallOptions, it will not be applied
300
+ #
301
+ # @overload create_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_create_instances_request_resource: nil, request_id: nil)
302
+ # Pass arguments to `create_instances` via keyword arguments. Note that at
303
+ # least one keyword argument is required. To specify no parameters, or to keep all
304
+ # the default parameter values, pass an empty Hash as a request object (see above).
305
+ #
306
+ # @param instance_group_manager [::String]
307
+ # The name of the managed instance group. It should conform to RFC1035.
308
+ # @param project [::String]
309
+ # Project ID for this request.
310
+ # @param region [::String]
311
+ # The name of the region where the managed instance group is located. It should conform to RFC1035.
312
+ # @param region_instance_group_managers_create_instances_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersCreateInstancesRequest, ::Hash]
313
+ # The body resource for this request
314
+ # @param request_id [::String]
315
+ # 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.
316
+ #
317
+ # 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.
318
+ #
319
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
320
+ # @yield [result, env] Access the result along with the Faraday environment object
321
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
322
+ # @yieldparam response [::Faraday::Response]
323
+ #
324
+ # @return [::Google::Cloud::Compute::V1::Operation]
325
+ #
326
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
327
+ def create_instances request, options = nil
328
+ raise ::ArgumentError, "request must be provided" if request.nil?
329
+
330
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest
331
+
332
+ # Converts hash and nil to an options object
333
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
334
+
335
+ # Customize the options with defaults
336
+ call_metadata = {}
337
+
338
+ # Set x-goog-api-client header
339
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
340
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
341
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
342
+
343
+ options.apply_defaults timeout: @config.timeout,
344
+ metadata: call_metadata
345
+
346
+ uri, body, _query_string_params = transcode_create_instances request
347
+ response = @client_stub.make_post_request(
348
+ uri: uri,
349
+ body: body,
350
+ options: options
351
+ )
352
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
353
+
354
+ yield result, response if block_given?
355
+ result
356
+ rescue ::Faraday::Error => e
357
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
358
+ raise ::Google::Cloud::Error.from_error(gapic_error)
359
+ end
360
+
361
+ ##
362
+ # Deletes the specified managed instance group and all of the instances in that group.
363
+ #
364
+ # @overload delete(request, options = nil)
365
+ # Pass arguments to `delete` via a request object, either of type
366
+ # {::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest} or an equivalent Hash.
367
+ #
368
+ # @param request [::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest, ::Hash]
369
+ # A request object representing the call parameters. Required. To specify no
370
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
371
+ # @param options [::Gapic::CallOptions, ::Hash]
372
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
373
+ # Note: currently retry functionality is not implemented. While it is possible
374
+ # to set it using ::Gapic::CallOptions, it will not be applied
375
+ #
376
+ # @overload delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil)
377
+ # Pass arguments to `delete` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param instance_group_manager [::String]
382
+ # Name of the managed instance group to delete.
383
+ # @param project [::String]
384
+ # Project ID for this request.
385
+ # @param region [::String]
386
+ # Name of the region scoping this request.
387
+ # @param request_id [::String]
388
+ # 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.
389
+ #
390
+ # 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.
391
+ #
392
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
393
+ # @yield [result, env] Access the result along with the Faraday environment object
394
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
395
+ # @yieldparam response [::Faraday::Response]
396
+ #
397
+ # @return [::Google::Cloud::Compute::V1::Operation]
398
+ #
399
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ def delete request, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request.nil?
402
+
403
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest
404
+
405
+ # Converts hash and nil to an options object
406
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
407
+
408
+ # Customize the options with defaults
409
+ call_metadata = {}
410
+
411
+ # Set x-goog-api-client header
412
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
413
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
414
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
415
+
416
+ options.apply_defaults timeout: @config.timeout,
417
+ metadata: call_metadata
418
+
419
+ uri, _body, query_string_params = transcode_delete request
420
+ response = @client_stub.make_delete_request(
421
+ uri: uri,
422
+ params: query_string_params,
423
+ options: options
424
+ )
425
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
426
+
427
+ yield result, response if block_given?
428
+ result
429
+ rescue ::Faraday::Error => e
430
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
431
+ raise ::Google::Cloud::Error.from_error(gapic_error)
432
+ end
433
+
434
+ ##
435
+ # Flags the specified instances in the managed instance group to be immediately deleted. 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. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.
436
+ #
437
+ # 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.
438
+ #
439
+ # You can specify a maximum of 1000 instances with this method per request.
440
+ #
441
+ # @overload delete_instances(request, options = nil)
442
+ # Pass arguments to `delete_instances` via a request object, either of type
443
+ # {::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest} or an equivalent Hash.
444
+ #
445
+ # @param request [::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest, ::Hash]
446
+ # A request object representing the call parameters. Required. To specify no
447
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
448
+ # @param options [::Gapic::CallOptions, ::Hash]
449
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
450
+ # Note: currently retry functionality is not implemented. While it is possible
451
+ # to set it using ::Gapic::CallOptions, it will not be applied
452
+ #
453
+ # @overload delete_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil)
454
+ # Pass arguments to `delete_instances` via keyword arguments. Note that at
455
+ # least one keyword argument is required. To specify no parameters, or to keep all
456
+ # the default parameter values, pass an empty Hash as a request object (see above).
457
+ #
458
+ # @param instance_group_manager [::String]
459
+ # Name of the managed instance group.
460
+ # @param project [::String]
461
+ # Project ID for this request.
462
+ # @param region [::String]
463
+ # Name of the region scoping this request.
464
+ # @param region_instance_group_managers_delete_instances_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersDeleteInstancesRequest, ::Hash]
465
+ # The body resource for this request
466
+ # @param request_id [::String]
467
+ # 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.
468
+ #
469
+ # 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.
470
+ #
471
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
472
+ # @yield [result, env] Access the result along with the Faraday environment object
473
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
474
+ # @yieldparam response [::Faraday::Response]
475
+ #
476
+ # @return [::Google::Cloud::Compute::V1::Operation]
477
+ #
478
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
479
+ def delete_instances request, options = nil
480
+ raise ::ArgumentError, "request must be provided" if request.nil?
481
+
482
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest
483
+
484
+ # Converts hash and nil to an options object
485
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
486
+
487
+ # Customize the options with defaults
488
+ call_metadata = {}
489
+
490
+ # Set x-goog-api-client header
491
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
492
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
493
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
494
+
495
+ options.apply_defaults timeout: @config.timeout,
496
+ metadata: call_metadata
497
+
498
+ uri, body, _query_string_params = transcode_delete_instances request
499
+ response = @client_stub.make_post_request(
500
+ uri: uri,
501
+ body: body,
502
+ options: options
503
+ )
504
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
505
+
506
+ yield result, response if block_given?
507
+ result
508
+ rescue ::Faraday::Error => e
509
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
510
+ raise ::Google::Cloud::Error.from_error(gapic_error)
511
+ end
512
+
513
+ ##
514
+ # Deletes selected per-instance configs for the managed instance group.
515
+ #
516
+ # @overload delete_per_instance_configs(request, options = nil)
517
+ # Pass arguments to `delete_per_instance_configs` via a request object, either of type
518
+ # {::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest} or an equivalent Hash.
519
+ #
520
+ # @param request [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, ::Hash]
521
+ # A request object representing the call parameters. Required. To specify no
522
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
523
+ # @param options [::Gapic::CallOptions, ::Hash]
524
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
525
+ # Note: currently retry functionality is not implemented. While it is possible
526
+ # to set it using ::Gapic::CallOptions, it will not be applied
527
+ #
528
+ # @overload delete_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_delete_instance_config_req_resource: nil)
529
+ # Pass arguments to `delete_per_instance_configs` via keyword arguments. Note that at
530
+ # least one keyword argument is required. To specify no parameters, or to keep all
531
+ # the default parameter values, pass an empty Hash as a request object (see above).
532
+ #
533
+ # @param instance_group_manager [::String]
534
+ # The name of the managed instance group. It should conform to RFC1035.
535
+ # @param project [::String]
536
+ # Project ID for this request.
537
+ # @param region [::String]
538
+ # Name of the region scoping this request, should conform to RFC1035.
539
+ # @param region_instance_group_manager_delete_instance_config_req_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerDeleteInstanceConfigReq, ::Hash]
540
+ # The body resource for this request
541
+ # @yield [result, env] Access the result along with the Faraday environment object
542
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
543
+ # @yieldparam response [::Faraday::Response]
544
+ #
545
+ # @return [::Google::Cloud::Compute::V1::Operation]
546
+ #
547
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
548
+ def delete_per_instance_configs request, options = nil
549
+ raise ::ArgumentError, "request must be provided" if request.nil?
550
+
551
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest
552
+
553
+ # Converts hash and nil to an options object
554
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
555
+
556
+ # Customize the options with defaults
557
+ call_metadata = {}
558
+
559
+ # Set x-goog-api-client header
560
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
561
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
562
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
563
+
564
+ options.apply_defaults timeout: @config.timeout,
565
+ metadata: call_metadata
566
+
567
+ uri, body, _query_string_params = transcode_delete_per_instance_configs request
568
+ response = @client_stub.make_post_request(
569
+ uri: uri,
570
+ body: body,
571
+ options: options
572
+ )
573
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
574
+
575
+ yield result, response if block_given?
576
+ result
577
+ rescue ::Faraday::Error => e
578
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
579
+ raise ::Google::Cloud::Error.from_error(gapic_error)
580
+ end
581
+
582
+ ##
583
+ # Returns all of the details about the specified managed instance group.
584
+ #
585
+ # @overload get(request, options = nil)
586
+ # Pass arguments to `get` via a request object, either of type
587
+ # {::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest} or an equivalent Hash.
588
+ #
589
+ # @param request [::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest, ::Hash]
590
+ # A request object representing the call parameters. Required. To specify no
591
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
592
+ # @param options [::Gapic::CallOptions, ::Hash]
593
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
594
+ # Note: currently retry functionality is not implemented. While it is possible
595
+ # to set it using ::Gapic::CallOptions, it will not be applied
596
+ #
597
+ # @overload get(instance_group_manager: nil, project: nil, region: nil)
598
+ # Pass arguments to `get` via keyword arguments. Note that at
599
+ # least one keyword argument is required. To specify no parameters, or to keep all
600
+ # the default parameter values, pass an empty Hash as a request object (see above).
601
+ #
602
+ # @param instance_group_manager [::String]
603
+ # Name of the managed instance group to return.
604
+ # @param project [::String]
605
+ # Project ID for this request.
606
+ # @param region [::String]
607
+ # Name of the region scoping this request.
608
+ # @yield [result, env] Access the result along with the Faraday environment object
609
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManager]
610
+ # @yieldparam response [::Faraday::Response]
611
+ #
612
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManager]
613
+ #
614
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
615
+ def get request, options = nil
616
+ raise ::ArgumentError, "request must be provided" if request.nil?
617
+
618
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest
619
+
620
+ # Converts hash and nil to an options object
621
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
622
+
623
+ # Customize the options with defaults
624
+ call_metadata = {}
625
+
626
+ # Set x-goog-api-client header
627
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
628
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
629
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
630
+
631
+ options.apply_defaults timeout: @config.timeout,
632
+ metadata: call_metadata
633
+
634
+ uri, _body, _query_string_params = transcode_get request
635
+ response = @client_stub.make_get_request(
636
+ uri: uri,
637
+ options: options
638
+ )
639
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManager.decode_json response.body, ignore_unknown_fields: true
640
+
641
+ yield result, response if block_given?
642
+ result
643
+ rescue ::Faraday::Error => e
644
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
645
+ raise ::Google::Cloud::Error.from_error(gapic_error)
646
+ end
647
+
648
+ ##
649
+ # 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.
650
+ #
651
+ # A regional managed instance group can contain up to 2000 instances.
652
+ #
653
+ # @overload insert(request, options = nil)
654
+ # Pass arguments to `insert` via a request object, either of type
655
+ # {::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest} or an equivalent Hash.
656
+ #
657
+ # @param request [::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest, ::Hash]
658
+ # A request object representing the call parameters. Required. To specify no
659
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
660
+ # @param options [::Gapic::CallOptions, ::Hash]
661
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
662
+ # Note: currently retry functionality is not implemented. While it is possible
663
+ # to set it using ::Gapic::CallOptions, it will not be applied
664
+ #
665
+ # @overload insert(instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil)
666
+ # Pass arguments to `insert` via keyword arguments. Note that at
667
+ # least one keyword argument is required. To specify no parameters, or to keep all
668
+ # the default parameter values, pass an empty Hash as a request object (see above).
669
+ #
670
+ # @param instance_group_manager_resource [::Google::Cloud::Compute::V1::InstanceGroupManager, ::Hash]
671
+ # The body resource for this request
672
+ # @param project [::String]
673
+ # Project ID for this request.
674
+ # @param region [::String]
675
+ # Name of the region scoping this request.
676
+ # @param request_id [::String]
677
+ # 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.
678
+ #
679
+ # 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.
680
+ #
681
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
682
+ # @yield [result, env] Access the result along with the Faraday environment object
683
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
684
+ # @yieldparam response [::Faraday::Response]
685
+ #
686
+ # @return [::Google::Cloud::Compute::V1::Operation]
687
+ #
688
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
689
+ def insert request, options = nil
690
+ raise ::ArgumentError, "request must be provided" if request.nil?
691
+
692
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest
693
+
694
+ # Converts hash and nil to an options object
695
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
696
+
697
+ # Customize the options with defaults
698
+ call_metadata = {}
699
+
700
+ # Set x-goog-api-client header
701
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
702
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
703
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
704
+
705
+ options.apply_defaults timeout: @config.timeout,
706
+ metadata: call_metadata
707
+
708
+ uri, body, _query_string_params = transcode_insert request
709
+ response = @client_stub.make_post_request(
710
+ uri: uri,
711
+ body: body,
712
+ options: options
713
+ )
714
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
715
+
716
+ yield result, response if block_given?
717
+ result
718
+ rescue ::Faraday::Error => e
719
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
720
+ raise ::Google::Cloud::Error.from_error(gapic_error)
721
+ end
722
+
723
+ ##
724
+ # Retrieves the list of managed instance groups that are contained within the specified region.
725
+ #
726
+ # @overload list(request, options = nil)
727
+ # Pass arguments to `list` via a request object, either of type
728
+ # {::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest} or an equivalent Hash.
729
+ #
730
+ # @param request [::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest, ::Hash]
731
+ # A request object representing the call parameters. Required. To specify no
732
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
733
+ # @param options [::Gapic::CallOptions, ::Hash]
734
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
735
+ # Note: currently retry functionality is not implemented. While it is possible
736
+ # to set it using ::Gapic::CallOptions, it will not be applied
737
+ #
738
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
739
+ # Pass arguments to `list` via keyword arguments. Note that at
740
+ # least one keyword argument is required. To specify no parameters, or to keep all
741
+ # the default parameter values, pass an empty Hash as a request object (see above).
742
+ #
743
+ # @param filter [::String]
744
+ # 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 `<`.
745
+ #
746
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
747
+ #
748
+ # 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.
749
+ #
750
+ # 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) ```
751
+ # @param max_results [::Integer]
752
+ # 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`)
753
+ # @param order_by [::String]
754
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
755
+ #
756
+ # 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.
757
+ #
758
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
759
+ # @param page_token [::String]
760
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
761
+ # @param project [::String]
762
+ # Project ID for this request.
763
+ # @param region [::String]
764
+ # Name of the region scoping this request.
765
+ # @param return_partial_success [::Boolean]
766
+ # 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.
767
+ # @yield [result, env] Access the result along with the Faraday environment object
768
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList]
769
+ # @yieldparam response [::Faraday::Response]
770
+ #
771
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList]
772
+ #
773
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
774
+ def list 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::ListRegionInstanceGroupManagersRequest
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_list request
794
+ response = @client_stub.make_get_request(
795
+ uri: uri,
796
+ params: query_string_params,
797
+ options: options
798
+ )
799
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList.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
+ # Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
810
+ #
811
+ # @overload list_errors(request, options = nil)
812
+ # Pass arguments to `list_errors` via a request object, either of type
813
+ # {::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest} or an equivalent Hash.
814
+ #
815
+ # @param request [::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest, ::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_errors(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
824
+ # Pass arguments to `list_errors` 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 instance_group_manager [::String]
837
+ # 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}.
838
+ # @param max_results [::Integer]
839
+ # 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`)
840
+ # @param order_by [::String]
841
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
842
+ #
843
+ # 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.
844
+ #
845
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
846
+ # @param page_token [::String]
847
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
848
+ # @param project [::String]
849
+ # Project ID for this request.
850
+ # @param region [::String]
851
+ # Name of the region scoping this request. This should conform to RFC1035.
852
+ # @param return_partial_success [::Boolean]
853
+ # 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.
854
+ # @yield [result, env] Access the result along with the Faraday environment object
855
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse]
856
+ # @yieldparam response [::Faraday::Response]
857
+ #
858
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse]
859
+ #
860
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
861
+ def list_errors request, options = nil
862
+ raise ::ArgumentError, "request must be provided" if request.nil?
863
+
864
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest
865
+
866
+ # Converts hash and nil to an options object
867
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
868
+
869
+ # Customize the options with defaults
870
+ call_metadata = {}
871
+
872
+ # Set x-goog-api-client header
873
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
874
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
875
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
876
+
877
+ options.apply_defaults timeout: @config.timeout,
878
+ metadata: call_metadata
879
+
880
+ uri, _body, query_string_params = transcode_list_errors request
881
+ response = @client_stub.make_get_request(
882
+ uri: uri,
883
+ params: query_string_params,
884
+ options: options
885
+ )
886
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse.decode_json response.body, ignore_unknown_fields: true
887
+
888
+ yield result, response if block_given?
889
+ result
890
+ rescue ::Faraday::Error => e
891
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
892
+ raise ::Google::Cloud::Error.from_error(gapic_error)
893
+ end
894
+
895
+ ##
896
+ # Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
897
+ #
898
+ # @overload list_managed_instances(request, options = nil)
899
+ # Pass arguments to `list_managed_instances` via a request object, either of type
900
+ # {::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest} or an equivalent Hash.
901
+ #
902
+ # @param request [::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest, ::Hash]
903
+ # A request object representing the call parameters. Required. To specify no
904
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
905
+ # @param options [::Gapic::CallOptions, ::Hash]
906
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
907
+ # Note: currently retry functionality is not implemented. While it is possible
908
+ # to set it using ::Gapic::CallOptions, it will not be applied
909
+ #
910
+ # @overload list_managed_instances(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
911
+ # Pass arguments to `list_managed_instances` via keyword arguments. Note that at
912
+ # least one keyword argument is required. To specify no parameters, or to keep all
913
+ # the default parameter values, pass an empty Hash as a request object (see above).
914
+ #
915
+ # @param filter [::String]
916
+ # 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 `<`.
917
+ #
918
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
919
+ #
920
+ # 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.
921
+ #
922
+ # 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) ```
923
+ # @param instance_group_manager [::String]
924
+ # The name of the managed instance group.
925
+ # @param max_results [::Integer]
926
+ # 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`)
927
+ # @param order_by [::String]
928
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
929
+ #
930
+ # 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.
931
+ #
932
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
933
+ # @param page_token [::String]
934
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
935
+ # @param project [::String]
936
+ # Project ID for this request.
937
+ # @param region [::String]
938
+ # Name of the region scoping this request.
939
+ # @param return_partial_success [::Boolean]
940
+ # 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.
941
+ # @yield [result, env] Access the result along with the Faraday environment object
942
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse]
943
+ # @yieldparam response [::Faraday::Response]
944
+ #
945
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse]
946
+ #
947
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
948
+ def list_managed_instances request, options = nil
949
+ raise ::ArgumentError, "request must be provided" if request.nil?
950
+
951
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest
952
+
953
+ # Converts hash and nil to an options object
954
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
955
+
956
+ # Customize the options with defaults
957
+ call_metadata = {}
958
+
959
+ # Set x-goog-api-client header
960
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
961
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
962
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
963
+
964
+ options.apply_defaults timeout: @config.timeout,
965
+ metadata: call_metadata
966
+
967
+ uri, _body, query_string_params = transcode_list_managed_instances request
968
+ response = @client_stub.make_post_request(
969
+ uri: uri,
970
+ params: query_string_params,
971
+ options: options
972
+ )
973
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse.decode_json response.body, ignore_unknown_fields: true
974
+
975
+ yield result, response if block_given?
976
+ result
977
+ rescue ::Faraday::Error => e
978
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
979
+ raise ::Google::Cloud::Error.from_error(gapic_error)
980
+ end
981
+
982
+ ##
983
+ # Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
984
+ #
985
+ # @overload list_per_instance_configs(request, options = nil)
986
+ # Pass arguments to `list_per_instance_configs` via a request object, either of type
987
+ # {::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest} or an equivalent Hash.
988
+ #
989
+ # @param request [::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest, ::Hash]
990
+ # A request object representing the call parameters. Required. To specify no
991
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
992
+ # @param options [::Gapic::CallOptions, ::Hash]
993
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
994
+ # Note: currently retry functionality is not implemented. While it is possible
995
+ # to set it using ::Gapic::CallOptions, it will not be applied
996
+ #
997
+ # @overload list_per_instance_configs(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
998
+ # Pass arguments to `list_per_instance_configs` via keyword arguments. Note that at
999
+ # least one keyword argument is required. To specify no parameters, or to keep all
1000
+ # the default parameter values, pass an empty Hash as a request object (see above).
1001
+ #
1002
+ # @param filter [::String]
1003
+ # 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 `<`.
1004
+ #
1005
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1006
+ #
1007
+ # 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.
1008
+ #
1009
+ # 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) ```
1010
+ # @param instance_group_manager [::String]
1011
+ # The name of the managed instance group. It should conform to RFC1035.
1012
+ # @param max_results [::Integer]
1013
+ # 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`)
1014
+ # @param order_by [::String]
1015
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1016
+ #
1017
+ # 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.
1018
+ #
1019
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1020
+ # @param page_token [::String]
1021
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
1022
+ # @param project [::String]
1023
+ # Project ID for this request.
1024
+ # @param region [::String]
1025
+ # Name of the region scoping this request, should conform to RFC1035.
1026
+ # @param return_partial_success [::Boolean]
1027
+ # 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.
1028
+ # @yield [result, env] Access the result along with the Faraday environment object
1029
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp]
1030
+ # @yieldparam response [::Faraday::Response]
1031
+ #
1032
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp]
1033
+ #
1034
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1035
+ def list_per_instance_configs request, options = nil
1036
+ raise ::ArgumentError, "request must be provided" if request.nil?
1037
+
1038
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest
1039
+
1040
+ # Converts hash and nil to an options object
1041
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1042
+
1043
+ # Customize the options with defaults
1044
+ call_metadata = {}
1045
+
1046
+ # Set x-goog-api-client header
1047
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1048
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1049
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1050
+
1051
+ options.apply_defaults timeout: @config.timeout,
1052
+ metadata: call_metadata
1053
+
1054
+ uri, _body, query_string_params = transcode_list_per_instance_configs request
1055
+ response = @client_stub.make_post_request(
1056
+ uri: uri,
1057
+ params: query_string_params,
1058
+ options: options
1059
+ )
1060
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true
1061
+
1062
+ yield result, response if block_given?
1063
+ result
1064
+ rescue ::Faraday::Error => e
1065
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1066
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1067
+ end
1068
+
1069
+ ##
1070
+ # 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.
1071
+ #
1072
+ # @overload patch(request, options = nil)
1073
+ # Pass arguments to `patch` via a request object, either of type
1074
+ # {::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest} or an equivalent Hash.
1075
+ #
1076
+ # @param request [::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest, ::Hash]
1077
+ # A request object representing the call parameters. Required. To specify no
1078
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1079
+ # @param options [::Gapic::CallOptions, ::Hash]
1080
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1081
+ # Note: currently retry functionality is not implemented. While it is possible
1082
+ # to set it using ::Gapic::CallOptions, it will not be applied
1083
+ #
1084
+ # @overload patch(instance_group_manager: nil, instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil)
1085
+ # Pass arguments to `patch` via keyword arguments. Note that at
1086
+ # least one keyword argument is required. To specify no parameters, or to keep all
1087
+ # the default parameter values, pass an empty Hash as a request object (see above).
1088
+ #
1089
+ # @param instance_group_manager [::String]
1090
+ # The name of the instance group manager.
1091
+ # @param instance_group_manager_resource [::Google::Cloud::Compute::V1::InstanceGroupManager, ::Hash]
1092
+ # The body resource for this request
1093
+ # @param project [::String]
1094
+ # Project ID for this request.
1095
+ # @param region [::String]
1096
+ # Name of the region scoping this request.
1097
+ # @param request_id [::String]
1098
+ # 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.
1099
+ #
1100
+ # 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.
1101
+ #
1102
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1103
+ # @yield [result, env] Access the result along with the Faraday environment object
1104
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1105
+ # @yieldparam response [::Faraday::Response]
1106
+ #
1107
+ # @return [::Google::Cloud::Compute::V1::Operation]
1108
+ #
1109
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1110
+ def patch request, options = nil
1111
+ raise ::ArgumentError, "request must be provided" if request.nil?
1112
+
1113
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest
1114
+
1115
+ # Converts hash and nil to an options object
1116
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1117
+
1118
+ # Customize the options with defaults
1119
+ call_metadata = {}
1120
+
1121
+ # Set x-goog-api-client header
1122
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1123
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1124
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1125
+
1126
+ options.apply_defaults timeout: @config.timeout,
1127
+ metadata: call_metadata
1128
+
1129
+ uri, body, _query_string_params = transcode_patch request
1130
+ response = @client_stub.make_patch_request(
1131
+ uri: uri,
1132
+ body: body,
1133
+ options: options
1134
+ )
1135
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1136
+
1137
+ yield result, response if block_given?
1138
+ result
1139
+ rescue ::Faraday::Error => e
1140
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1141
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1142
+ end
1143
+
1144
+ ##
1145
+ # 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.
1146
+ #
1147
+ # @overload patch_per_instance_configs(request, options = nil)
1148
+ # Pass arguments to `patch_per_instance_configs` via a request object, either of type
1149
+ # {::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest} or an equivalent Hash.
1150
+ #
1151
+ # @param request [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, ::Hash]
1152
+ # A request object representing the call parameters. Required. To specify no
1153
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1154
+ # @param options [::Gapic::CallOptions, ::Hash]
1155
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1156
+ # Note: currently retry functionality is not implemented. While it is possible
1157
+ # to set it using ::Gapic::CallOptions, it will not be applied
1158
+ #
1159
+ # @overload patch_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_patch_instance_config_req_resource: nil, request_id: nil)
1160
+ # Pass arguments to `patch_per_instance_configs` via keyword arguments. Note that at
1161
+ # least one keyword argument is required. To specify no parameters, or to keep all
1162
+ # the default parameter values, pass an empty Hash as a request object (see above).
1163
+ #
1164
+ # @param instance_group_manager [::String]
1165
+ # The name of the managed instance group. It should conform to RFC1035.
1166
+ # @param project [::String]
1167
+ # Project ID for this request.
1168
+ # @param region [::String]
1169
+ # Name of the region scoping this request, should conform to RFC1035.
1170
+ # @param region_instance_group_manager_patch_instance_config_req_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerPatchInstanceConfigReq, ::Hash]
1171
+ # The body resource for this request
1172
+ # @param request_id [::String]
1173
+ # 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.
1174
+ #
1175
+ # 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.
1176
+ #
1177
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1178
+ # @yield [result, env] Access the result along with the Faraday environment object
1179
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1180
+ # @yieldparam response [::Faraday::Response]
1181
+ #
1182
+ # @return [::Google::Cloud::Compute::V1::Operation]
1183
+ #
1184
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1185
+ def patch_per_instance_configs request, options = nil
1186
+ raise ::ArgumentError, "request must be provided" if request.nil?
1187
+
1188
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest
1189
+
1190
+ # Converts hash and nil to an options object
1191
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1192
+
1193
+ # Customize the options with defaults
1194
+ call_metadata = {}
1195
+
1196
+ # Set x-goog-api-client header
1197
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1198
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1199
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1200
+
1201
+ options.apply_defaults timeout: @config.timeout,
1202
+ metadata: call_metadata
1203
+
1204
+ uri, body, _query_string_params = transcode_patch_per_instance_configs request
1205
+ response = @client_stub.make_post_request(
1206
+ uri: uri,
1207
+ body: body,
1208
+ options: options
1209
+ )
1210
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1211
+
1212
+ yield result, response if block_given?
1213
+ result
1214
+ rescue ::Faraday::Error => e
1215
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1216
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1217
+ end
1218
+
1219
+ ##
1220
+ # 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.
1221
+ #
1222
+ # 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.
1223
+ #
1224
+ # You can specify a maximum of 1000 instances with this method per request.
1225
+ #
1226
+ # @overload recreate_instances(request, options = nil)
1227
+ # Pass arguments to `recreate_instances` via a request object, either of type
1228
+ # {::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest} or an equivalent Hash.
1229
+ #
1230
+ # @param request [::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest, ::Hash]
1231
+ # A request object representing the call parameters. Required. To specify no
1232
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1233
+ # @param options [::Gapic::CallOptions, ::Hash]
1234
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1235
+ # Note: currently retry functionality is not implemented. While it is possible
1236
+ # to set it using ::Gapic::CallOptions, it will not be applied
1237
+ #
1238
+ # @overload recreate_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil)
1239
+ # Pass arguments to `recreate_instances` via keyword arguments. Note that at
1240
+ # least one keyword argument is required. To specify no parameters, or to keep all
1241
+ # the default parameter values, pass an empty Hash as a request object (see above).
1242
+ #
1243
+ # @param instance_group_manager [::String]
1244
+ # Name of the managed instance group.
1245
+ # @param project [::String]
1246
+ # Project ID for this request.
1247
+ # @param region [::String]
1248
+ # Name of the region scoping this request.
1249
+ # @param region_instance_group_managers_recreate_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersRecreateRequest, ::Hash]
1250
+ # The body resource for this request
1251
+ # @param request_id [::String]
1252
+ # 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.
1253
+ #
1254
+ # 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.
1255
+ #
1256
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1257
+ # @yield [result, env] Access the result along with the Faraday environment object
1258
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1259
+ # @yieldparam response [::Faraday::Response]
1260
+ #
1261
+ # @return [::Google::Cloud::Compute::V1::Operation]
1262
+ #
1263
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1264
+ def recreate_instances request, options = nil
1265
+ raise ::ArgumentError, "request must be provided" if request.nil?
1266
+
1267
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest
1268
+
1269
+ # Converts hash and nil to an options object
1270
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1271
+
1272
+ # Customize the options with defaults
1273
+ call_metadata = {}
1274
+
1275
+ # Set x-goog-api-client header
1276
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1277
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1278
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1279
+
1280
+ options.apply_defaults timeout: @config.timeout,
1281
+ metadata: call_metadata
1282
+
1283
+ uri, body, _query_string_params = transcode_recreate_instances request
1284
+ response = @client_stub.make_post_request(
1285
+ uri: uri,
1286
+ body: body,
1287
+ options: options
1288
+ )
1289
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1290
+
1291
+ yield result, response if block_given?
1292
+ result
1293
+ rescue ::Faraday::Error => e
1294
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1295
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1296
+ end
1297
+
1298
+ ##
1299
+ # Changes the intended size of 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 one or more instances.
1300
+ #
1301
+ # The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
1302
+ #
1303
+ # 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.
1304
+ #
1305
+ # @overload resize(request, options = nil)
1306
+ # Pass arguments to `resize` via a request object, either of type
1307
+ # {::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest} or an equivalent Hash.
1308
+ #
1309
+ # @param request [::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest, ::Hash]
1310
+ # A request object representing the call parameters. Required. To specify no
1311
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1312
+ # @param options [::Gapic::CallOptions, ::Hash]
1313
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1314
+ # Note: currently retry functionality is not implemented. While it is possible
1315
+ # to set it using ::Gapic::CallOptions, it will not be applied
1316
+ #
1317
+ # @overload resize(instance_group_manager: nil, project: nil, region: nil, request_id: nil, size: nil)
1318
+ # Pass arguments to `resize` via keyword arguments. Note that at
1319
+ # least one keyword argument is required. To specify no parameters, or to keep all
1320
+ # the default parameter values, pass an empty Hash as a request object (see above).
1321
+ #
1322
+ # @param instance_group_manager [::String]
1323
+ # Name of the managed instance group.
1324
+ # @param project [::String]
1325
+ # Project ID for this request.
1326
+ # @param region [::String]
1327
+ # Name of the region scoping this request.
1328
+ # @param request_id [::String]
1329
+ # 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.
1330
+ #
1331
+ # 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.
1332
+ #
1333
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1334
+ # @param size [::Integer]
1335
+ # Number of instances that should exist in this instance group manager.
1336
+ # @yield [result, env] Access the result along with the Faraday environment object
1337
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1338
+ # @yieldparam response [::Faraday::Response]
1339
+ #
1340
+ # @return [::Google::Cloud::Compute::V1::Operation]
1341
+ #
1342
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1343
+ def resize request, options = nil
1344
+ raise ::ArgumentError, "request must be provided" if request.nil?
1345
+
1346
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest
1347
+
1348
+ # Converts hash and nil to an options object
1349
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1350
+
1351
+ # Customize the options with defaults
1352
+ call_metadata = {}
1353
+
1354
+ # Set x-goog-api-client header
1355
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1356
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1357
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1358
+
1359
+ options.apply_defaults timeout: @config.timeout,
1360
+ metadata: call_metadata
1361
+
1362
+ uri, _body, query_string_params = transcode_resize request
1363
+ response = @client_stub.make_post_request(
1364
+ uri: uri,
1365
+ params: query_string_params,
1366
+ options: options
1367
+ )
1368
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1369
+
1370
+ yield result, response if block_given?
1371
+ result
1372
+ rescue ::Faraday::Error => e
1373
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1374
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1375
+ end
1376
+
1377
+ ##
1378
+ # Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
1379
+ #
1380
+ # @overload set_instance_template(request, options = nil)
1381
+ # Pass arguments to `set_instance_template` via a request object, either of type
1382
+ # {::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest} or an equivalent Hash.
1383
+ #
1384
+ # @param request [::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest, ::Hash]
1385
+ # A request object representing the call parameters. Required. To specify no
1386
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1387
+ # @param options [::Gapic::CallOptions, ::Hash]
1388
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1389
+ # Note: currently retry functionality is not implemented. While it is possible
1390
+ # to set it using ::Gapic::CallOptions, it will not be applied
1391
+ #
1392
+ # @overload set_instance_template(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_template_request_resource: nil, request_id: nil)
1393
+ # Pass arguments to `set_instance_template` via keyword arguments. Note that at
1394
+ # least one keyword argument is required. To specify no parameters, or to keep all
1395
+ # the default parameter values, pass an empty Hash as a request object (see above).
1396
+ #
1397
+ # @param instance_group_manager [::String]
1398
+ # The name of the managed instance group.
1399
+ # @param project [::String]
1400
+ # Project ID for this request.
1401
+ # @param region [::String]
1402
+ # Name of the region scoping this request.
1403
+ # @param region_instance_group_managers_set_template_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersSetTemplateRequest, ::Hash]
1404
+ # The body resource for this request
1405
+ # @param request_id [::String]
1406
+ # 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.
1407
+ #
1408
+ # 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.
1409
+ #
1410
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1411
+ # @yield [result, env] Access the result along with the Faraday environment object
1412
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1413
+ # @yieldparam response [::Faraday::Response]
1414
+ #
1415
+ # @return [::Google::Cloud::Compute::V1::Operation]
1416
+ #
1417
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1418
+ def set_instance_template request, options = nil
1419
+ raise ::ArgumentError, "request must be provided" if request.nil?
1420
+
1421
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest
1422
+
1423
+ # Converts hash and nil to an options object
1424
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1425
+
1426
+ # Customize the options with defaults
1427
+ call_metadata = {}
1428
+
1429
+ # Set x-goog-api-client header
1430
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1431
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1432
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1433
+
1434
+ options.apply_defaults timeout: @config.timeout,
1435
+ metadata: call_metadata
1436
+
1437
+ uri, body, _query_string_params = transcode_set_instance_template request
1438
+ response = @client_stub.make_post_request(
1439
+ uri: uri,
1440
+ body: body,
1441
+ options: options
1442
+ )
1443
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1444
+
1445
+ yield result, response if block_given?
1446
+ result
1447
+ rescue ::Faraday::Error => e
1448
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1449
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1450
+ end
1451
+
1452
+ ##
1453
+ # Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
1454
+ #
1455
+ # @overload set_target_pools(request, options = nil)
1456
+ # Pass arguments to `set_target_pools` via a request object, either of type
1457
+ # {::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest} or an equivalent Hash.
1458
+ #
1459
+ # @param request [::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest, ::Hash]
1460
+ # A request object representing the call parameters. Required. To specify no
1461
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1462
+ # @param options [::Gapic::CallOptions, ::Hash]
1463
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1464
+ # Note: currently retry functionality is not implemented. While it is possible
1465
+ # to set it using ::Gapic::CallOptions, it will not be applied
1466
+ #
1467
+ # @overload set_target_pools(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_target_pools_request_resource: nil, request_id: nil)
1468
+ # Pass arguments to `set_target_pools` via keyword arguments. Note that at
1469
+ # least one keyword argument is required. To specify no parameters, or to keep all
1470
+ # the default parameter values, pass an empty Hash as a request object (see above).
1471
+ #
1472
+ # @param instance_group_manager [::String]
1473
+ # Name of the managed instance group.
1474
+ # @param project [::String]
1475
+ # Project ID for this request.
1476
+ # @param region [::String]
1477
+ # Name of the region scoping this request.
1478
+ # @param region_instance_group_managers_set_target_pools_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersSetTargetPoolsRequest, ::Hash]
1479
+ # The body resource for this request
1480
+ # @param request_id [::String]
1481
+ # 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.
1482
+ #
1483
+ # 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.
1484
+ #
1485
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1486
+ # @yield [result, env] Access the result along with the Faraday environment object
1487
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1488
+ # @yieldparam response [::Faraday::Response]
1489
+ #
1490
+ # @return [::Google::Cloud::Compute::V1::Operation]
1491
+ #
1492
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1493
+ def set_target_pools request, options = nil
1494
+ raise ::ArgumentError, "request must be provided" if request.nil?
1495
+
1496
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest
1497
+
1498
+ # Converts hash and nil to an options object
1499
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1500
+
1501
+ # Customize the options with defaults
1502
+ call_metadata = {}
1503
+
1504
+ # Set x-goog-api-client header
1505
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1506
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1507
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1508
+
1509
+ options.apply_defaults timeout: @config.timeout,
1510
+ metadata: call_metadata
1511
+
1512
+ uri, body, _query_string_params = transcode_set_target_pools request
1513
+ response = @client_stub.make_post_request(
1514
+ uri: uri,
1515
+ body: body,
1516
+ options: options
1517
+ )
1518
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1519
+
1520
+ yield result, response if block_given?
1521
+ result
1522
+ rescue ::Faraday::Error => e
1523
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1524
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1525
+ end
1526
+
1527
+ ##
1528
+ # 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.
1529
+ #
1530
+ # @overload update_per_instance_configs(request, options = nil)
1531
+ # Pass arguments to `update_per_instance_configs` via a request object, either of type
1532
+ # {::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest} or an equivalent Hash.
1533
+ #
1534
+ # @param request [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, ::Hash]
1535
+ # A request object representing the call parameters. Required. To specify no
1536
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1537
+ # @param options [::Gapic::CallOptions, ::Hash]
1538
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1539
+ # Note: currently retry functionality is not implemented. While it is possible
1540
+ # to set it using ::Gapic::CallOptions, it will not be applied
1541
+ #
1542
+ # @overload update_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_update_instance_config_req_resource: nil, request_id: nil)
1543
+ # Pass arguments to `update_per_instance_configs` via keyword arguments. Note that at
1544
+ # least one keyword argument is required. To specify no parameters, or to keep all
1545
+ # the default parameter values, pass an empty Hash as a request object (see above).
1546
+ #
1547
+ # @param instance_group_manager [::String]
1548
+ # The name of the managed instance group. It should conform to RFC1035.
1549
+ # @param project [::String]
1550
+ # Project ID for this request.
1551
+ # @param region [::String]
1552
+ # Name of the region scoping this request, should conform to RFC1035.
1553
+ # @param region_instance_group_manager_update_instance_config_req_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerUpdateInstanceConfigReq, ::Hash]
1554
+ # The body resource for this request
1555
+ # @param request_id [::String]
1556
+ # 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.
1557
+ #
1558
+ # 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.
1559
+ #
1560
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1561
+ # @yield [result, env] Access the result along with the Faraday environment object
1562
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1563
+ # @yieldparam response [::Faraday::Response]
1564
+ #
1565
+ # @return [::Google::Cloud::Compute::V1::Operation]
1566
+ #
1567
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1568
+ def update_per_instance_configs request, options = nil
1569
+ raise ::ArgumentError, "request must be provided" if request.nil?
1570
+
1571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest
1572
+
1573
+ # Converts hash and nil to an options object
1574
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1575
+
1576
+ # Customize the options with defaults
1577
+ call_metadata = {}
1578
+
1579
+ # Set x-goog-api-client header
1580
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1581
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1582
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1583
+
1584
+ options.apply_defaults timeout: @config.timeout,
1585
+ metadata: call_metadata
1586
+
1587
+ uri, body, _query_string_params = transcode_update_per_instance_configs request
1588
+ response = @client_stub.make_post_request(
1589
+ uri: uri,
1590
+ body: body,
1591
+ options: options
1592
+ )
1593
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1594
+
1595
+ yield result, response if block_given?
1596
+ result
1597
+ rescue ::Faraday::Error => e
1598
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1599
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1600
+ end
1601
+
1602
+ ##
1603
+ # Configuration class for the RegionInstanceGroupManagers REST API.
1604
+ #
1605
+ # This class represents the configuration for RegionInstanceGroupManagers REST,
1606
+ # providing control over credentials, timeouts, retry behavior, logging.
1607
+ #
1608
+ # Configuration can be applied globally to all clients, or to a single client
1609
+ # on construction.
1610
+ #
1611
+ # # Examples
1612
+ #
1613
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
1614
+ #
1615
+ # ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Client.configure do |config|
1616
+ # config.timeout = 10.0
1617
+ # end
1618
+ #
1619
+ # To apply the above configuration only to a new client:
1620
+ #
1621
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Client.new do |config|
1622
+ # config.timeout = 10.0
1623
+ # end
1624
+ #
1625
+ # @!attribute [rw] endpoint
1626
+ # The hostname or hostname:port of the service endpoint.
1627
+ # Defaults to `"compute.googleapis.com"`.
1628
+ # @return [::String]
1629
+ # @!attribute [rw] credentials
1630
+ # Credentials to send with calls. You may provide any of the following types:
1631
+ # * (`String`) The path to a service account key file in JSON format
1632
+ # * (`Hash`) A service account key as a Hash
1633
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1634
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1635
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1636
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1637
+ # * (`nil`) indicating no credentials
1638
+ # @return [::Object]
1639
+ # @!attribute [rw] scope
1640
+ # The OAuth scopes
1641
+ # @return [::Array<::String>]
1642
+ # @!attribute [rw] lib_name
1643
+ # The library name as recorded in instrumentation and logging
1644
+ # @return [::String]
1645
+ # @!attribute [rw] lib_version
1646
+ # The library version as recorded in instrumentation and logging
1647
+ # @return [::String]
1648
+ # @!attribute [rw] timeout
1649
+ # The call timeout in seconds.
1650
+ # @return [::Numeric]
1651
+ #
1652
+ class Configuration
1653
+ extend ::Gapic::Config
1654
+
1655
+ config_attr :endpoint, "compute.googleapis.com", ::String
1656
+ config_attr :credentials, nil do |value|
1657
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1658
+ allowed.any? { |klass| klass === value }
1659
+ end
1660
+ config_attr :scope, nil, ::String, ::Array, nil
1661
+ config_attr :lib_name, nil, ::String, nil
1662
+ config_attr :lib_version, nil, ::String, nil
1663
+ config_attr :timeout, nil, ::Numeric, nil
1664
+
1665
+ # @private
1666
+ def initialize parent_config = nil
1667
+ @parent_config = parent_config unless parent_config.nil?
1668
+
1669
+ yield self if block_given?
1670
+ end
1671
+ end
1672
+ end
1673
+ end
1674
+ end
1675
+ end
1676
+ end
1677
+ end
1678
+ end