azure_mgmt_container_instance 0.17.1 → 0.17.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
  3. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  4. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  5. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
  6. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
  7. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  8. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  9. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
  10. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
  11. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  12. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
  13. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  14. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  15. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
  16. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
  17. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  18. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +16 -0
  19. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  20. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  21. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
  22. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
  23. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/start_container.rb +2 -0
  24. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  25. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_groups.rb +16 -0
  26. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  27. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  28. data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
  29. data/lib/2018-04-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
  30. data/lib/2018-04-01/generated/azure_mgmt_container_instance/start_container.rb +2 -0
  31. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  32. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb +241 -0
  33. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  34. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_operations.rb +4 -0
  35. data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
  36. data/lib/2018-06-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
  37. data/lib/2018-09-01/generated/azure_mgmt_container_instance.rb +74 -0
  38. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_group_usage.rb +115 -0
  39. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_groups.rb +1225 -0
  40. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
  41. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_operations.rb +262 -0
  42. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  43. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
  44. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
  45. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
  46. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
  47. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
  48. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group.rb +242 -0
  49. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
  50. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
  51. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  52. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
  53. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  54. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  55. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  56. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
  57. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  58. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  59. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  60. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
  61. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  62. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
  63. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
  64. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/event.rb +101 -0
  65. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
  66. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  67. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/ip_address.rb +101 -0
  68. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
  69. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
  70. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  71. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  72. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
  73. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  74. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
  75. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  76. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
  77. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
  78. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
  79. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  80. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
  81. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
  82. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
  83. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
  84. data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  85. data/lib/2018-09-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  86. data/lib/2018-09-01/generated/azure_mgmt_container_instance/operations.rb +109 -0
  87. data/lib/2018-10-01/generated/azure_mgmt_container_instance.rb +86 -0
  88. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_group_usage.rb +115 -0
  89. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_groups.rb +1354 -0
  90. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +344 -0
  91. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_operations.rb +262 -0
  92. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  93. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/cached_images.rb +68 -0
  94. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +66 -0
  95. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
  96. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
  97. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +66 -0
  98. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
  99. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
  100. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
  101. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
  102. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
  103. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group.rb +268 -0
  104. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
  105. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb +102 -0
  106. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb +61 -0
  107. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
  108. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  109. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
  110. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  111. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  112. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  113. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
  114. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  115. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  116. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  117. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
  118. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  119. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
  120. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb +77 -0
  121. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
  122. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/event.rb +101 -0
  123. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
  124. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb +58 -0
  125. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb +17 -0
  126. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  127. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/ip_address.rb +102 -0
  128. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
  129. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
  130. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  131. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  132. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation.rb +81 -0
  133. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  134. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
  135. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  136. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
  137. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb +18 -0
  138. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +69 -0
  139. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +69 -0
  140. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  141. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
  142. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
  143. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
  144. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
  145. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  146. data/lib/2018-10-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  147. data/lib/2018-10-01/generated/azure_mgmt_container_instance/operations.rb +109 -0
  148. data/lib/2018-10-01/generated/azure_mgmt_container_instance/service_association_link.rb +121 -0
  149. data/lib/2019-12-01/generated/azure_mgmt_container_instance.rb +90 -0
  150. data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_groups.rb +1404 -0
  151. data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
  152. data/lib/2019-12-01/generated/azure_mgmt_container_instance/containers.rb +262 -0
  153. data/lib/2019-12-01/generated/azure_mgmt_container_instance/location.rb +552 -0
  154. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  155. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/cached_images.rb +57 -0
  156. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +98 -0
  157. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
  158. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
  159. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +98 -0
  160. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
  161. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
  162. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
  163. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
  164. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
  165. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group.rb +314 -0
  166. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
  167. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb +102 -0
  168. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb +61 -0
  169. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
  170. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  171. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
  172. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  173. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  174. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  175. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_sku.rb +16 -0
  176. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
  177. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  178. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  179. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  180. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
  181. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  182. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_state.rb +99 -0
  183. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb +77 -0
  184. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/encryption_properties.rb +68 -0
  185. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
  186. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/event.rb +107 -0
  187. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
  188. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb +58 -0
  189. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb +17 -0
  190. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  191. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/init_container_definition.rb +133 -0
  192. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/init_container_properties_definition_instance_view.rb +96 -0
  193. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/ip_address.rb +102 -0
  194. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
  195. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
  196. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  197. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  198. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation.rb +81 -0
  199. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  200. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +99 -0
  201. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  202. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
  203. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb +18 -0
  204. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +69 -0
  205. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +69 -0
  206. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  207. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/scheme.rb +16 -0
  208. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
  209. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
  210. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
  211. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
  212. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  213. data/lib/2019-12-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  214. data/lib/2019-12-01/generated/azure_mgmt_container_instance/operations.rb +219 -0
  215. data/lib/azure_mgmt_container_instance.rb +5 -2
  216. data/lib/profiles/latest/modules/containerinstance_profile_module.rb +183 -107
  217. data/lib/version.rb +1 -1
  218. metadata +183 -5
@@ -31,7 +31,7 @@ module Azure::ContainerInstance::Mgmt::V2018_06_01
31
31
  def get_all_items
32
32
  items = @value
33
33
  page = self
34
- while page.next_link != nil do
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
35
  page = page.get_next_page
36
36
  items.concat(page.value)
37
37
  end
@@ -86,6 +86,8 @@ module Azure::ContainerInstance::Mgmt::V2018_06_01
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -0,0 +1,74 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-09-01/generated/azure_mgmt_container_instance/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ContainerInstance::Mgmt::V2018_09_01
23
+ autoload :ContainerGroups, '2018-09-01/generated/azure_mgmt_container_instance/container_groups.rb'
24
+ autoload :Operations, '2018-09-01/generated/azure_mgmt_container_instance/operations.rb'
25
+ autoload :ContainerGroupUsage, '2018-09-01/generated/azure_mgmt_container_instance/container_group_usage.rb'
26
+ autoload :ContainerOperations, '2018-09-01/generated/azure_mgmt_container_instance/container_operations.rb'
27
+ autoload :ContainerInstanceManagementClient, '2018-09-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb'
28
+
29
+ module Models
30
+ autoload :IpAddress, '2018-09-01/generated/azure_mgmt_container_instance/models/ip_address.rb'
31
+ autoload :ContainerPort, '2018-09-01/generated/azure_mgmt_container_instance/models/container_port.rb'
32
+ autoload :ContainerGroupPropertiesInstanceView, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb'
33
+ autoload :ContainerState, '2018-09-01/generated/azure_mgmt_container_instance/models/container_state.rb'
34
+ autoload :LogAnalytics, '2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics.rb'
35
+ autoload :ContainerPropertiesInstanceView, '2018-09-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb'
36
+ autoload :ContainerGroupDiagnostics, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb'
37
+ autoload :ResourceLimits, '2018-09-01/generated/azure_mgmt_container_instance/models/resource_limits.rb'
38
+ autoload :ContainerGroupNetworkProfile, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb'
39
+ autoload :VolumeMount, '2018-09-01/generated/azure_mgmt_container_instance/models/volume_mount.rb'
40
+ autoload :ContainerExec, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec.rb'
41
+ autoload :ContainerProbe, '2018-09-01/generated/azure_mgmt_container_instance/models/container_probe.rb'
42
+ autoload :OperationDisplay, '2018-09-01/generated/azure_mgmt_container_instance/models/operation_display.rb'
43
+ autoload :AzureFileVolume, '2018-09-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb'
44
+ autoload :Operation, '2018-09-01/generated/azure_mgmt_container_instance/models/operation.rb'
45
+ autoload :Volume, '2018-09-01/generated/azure_mgmt_container_instance/models/volume.rb'
46
+ autoload :OperationListResult, '2018-09-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb'
47
+ autoload :Port, '2018-09-01/generated/azure_mgmt_container_instance/models/port.rb'
48
+ autoload :UsageName, '2018-09-01/generated/azure_mgmt_container_instance/models/usage_name.rb'
49
+ autoload :Event, '2018-09-01/generated/azure_mgmt_container_instance/models/event.rb'
50
+ autoload :Usage, '2018-09-01/generated/azure_mgmt_container_instance/models/usage.rb'
51
+ autoload :ResourceRequirements, '2018-09-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb'
52
+ autoload :UsageListResult, '2018-09-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb'
53
+ autoload :Container, '2018-09-01/generated/azure_mgmt_container_instance/models/container.rb'
54
+ autoload :ContainerGroupListResult, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb'
55
+ autoload :ImageRegistryCredential, '2018-09-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb'
56
+ autoload :Logs, '2018-09-01/generated/azure_mgmt_container_instance/models/logs.rb'
57
+ autoload :ResourceRequests, '2018-09-01/generated/azure_mgmt_container_instance/models/resource_requests.rb'
58
+ autoload :ContainerExecRequestTerminalSize, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb'
59
+ autoload :GitRepoVolume, '2018-09-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb'
60
+ autoload :ContainerExecRequest, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb'
61
+ autoload :ContainerHttpGet, '2018-09-01/generated/azure_mgmt_container_instance/models/container_http_get.rb'
62
+ autoload :ContainerExecResponse, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb'
63
+ autoload :EnvironmentVariable, '2018-09-01/generated/azure_mgmt_container_instance/models/environment_variable.rb'
64
+ autoload :Resource, '2018-09-01/generated/azure_mgmt_container_instance/models/resource.rb'
65
+ autoload :ContainerGroup, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group.rb'
66
+ autoload :ContainerNetworkProtocol, '2018-09-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb'
67
+ autoload :ContainerGroupRestartPolicy, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb'
68
+ autoload :ContainerGroupNetworkProtocol, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb'
69
+ autoload :ContainerGroupIpAddressType, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb'
70
+ autoload :OperatingSystemTypes, '2018-09-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb'
71
+ autoload :LogAnalyticsLogType, '2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb'
72
+ autoload :ContainerInstanceOperationsOrigin, '2018-09-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb'
73
+ end
74
+ end
@@ -0,0 +1,115 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerInstance::Mgmt::V2018_09_01
7
+ #
8
+ # ContainerGroupUsage
9
+ #
10
+ class ContainerGroupUsage
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ContainerGroupUsage class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get the usage for a subscription
26
+ #
27
+ # @param location [String] The identifier for the physical azure location.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [UsageListResult] operation results.
32
+ #
33
+ def list(location, custom_headers:nil)
34
+ response = list_async(location, custom_headers:custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # Get the usage for a subscription
40
+ #
41
+ # @param location [String] The identifier for the physical azure location.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(location, custom_headers:nil)
48
+ list_async(location, custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Get the usage for a subscription
53
+ #
54
+ # @param location [String] The identifier for the physical azure location.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(location, custom_headers:nil)
61
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
62
+ fail ArgumentError, 'location is nil' if location.nil?
63
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
64
+
65
+
66
+ request_headers = {}
67
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
68
+
69
+ # Set Headers
70
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'
73
+
74
+ request_url = @base_url || @client.base_url
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
96
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::UsageListResult.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ end
115
+ end
@@ -0,0 +1,1225 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerInstance::Mgmt::V2018_09_01
7
+ #
8
+ # ContainerGroups
9
+ #
10
+ class ContainerGroups
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ContainerGroups class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get a list of container groups in the specified subscription.
26
+ #
27
+ # Get a list of container groups in the specified subscription. This operation
28
+ # returns properties of each container group including containers, image
29
+ # registry credentials, restart policy, IP address type, OS type, state, and
30
+ # volumes.
31
+ #
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<ContainerGroup>] operation results.
36
+ #
37
+ def list(custom_headers:nil)
38
+ first_page = list_as_lazy(custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Get a list of container groups in the specified subscription.
44
+ #
45
+ # Get a list of container groups in the specified subscription. This operation
46
+ # returns properties of each container group including containers, image
47
+ # registry credentials, restart policy, IP address type, OS type, state, and
48
+ # volumes.
49
+ #
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(custom_headers:nil)
56
+ list_async(custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get a list of container groups in the specified subscription.
61
+ #
62
+ # Get a list of container groups in the specified subscription. This operation
63
+ # returns properties of each container group including containers, image
64
+ # registry credentials, restart policy, IP address type, OS type, state, and
65
+ # volumes.
66
+ #
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'subscriptionId' => @client.subscription_id},
90
+ query_params: {'api-version' => @client.api_version},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroupListResult.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Get a list of container groups in the specified subscription and resource
127
+ # group.
128
+ #
129
+ # Get a list of container groups in a specified subscription and resource
130
+ # group. This operation returns properties of each container group including
131
+ # containers, image registry credentials, restart policy, IP address type, OS
132
+ # type, state, and volumes.
133
+ #
134
+ # @param resource_group_name [String] The name of the resource group.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [Array<ContainerGroup>] operation results.
139
+ #
140
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
141
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
142
+ first_page.get_all_items
143
+ end
144
+
145
+ #
146
+ # Get a list of container groups in the specified subscription and resource
147
+ # group.
148
+ #
149
+ # Get a list of container groups in a specified subscription and resource
150
+ # group. This operation returns properties of each container group including
151
+ # containers, image registry credentials, restart policy, IP address type, OS
152
+ # type, state, and volumes.
153
+ #
154
+ # @param resource_group_name [String] The name of the resource group.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
159
+ #
160
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
161
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
162
+ end
163
+
164
+ #
165
+ # Get a list of container groups in the specified subscription and resource
166
+ # group.
167
+ #
168
+ # Get a list of container groups in a specified subscription and resource
169
+ # group. This operation returns properties of each container group including
170
+ # containers, image registry credentials, restart policy, IP address type, OS
171
+ # type, state, and volumes.
172
+ #
173
+ # @param resource_group_name [String] The name of the resource group.
174
+ # @param [Hash{String => String}] A hash of custom headers that will be added
175
+ # to the HTTP request.
176
+ #
177
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
178
+ #
179
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
180
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
181
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
182
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups'
192
+
193
+ request_url = @base_url || @client.base_url
194
+
195
+ options = {
196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
197
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
198
+ query_params: {'api-version' => @client.api_version},
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:get, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200
209
+ error_model = JSON.load(response_content)
210
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
215
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
216
+ # Deserialize Response
217
+ if status_code == 200
218
+ begin
219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
220
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroupListResult.mapper()
221
+ result.body = @client.deserialize(result_mapper, parsed_response)
222
+ rescue Exception => e
223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
+ end
225
+ end
226
+
227
+ result
228
+ end
229
+
230
+ promise.execute
231
+ end
232
+
233
+ #
234
+ # Get the properties of the specified container group.
235
+ #
236
+ # Gets the properties of the specified container group in the specified
237
+ # subscription and resource group. The operation returns the properties of each
238
+ # container group including containers, image registry credentials, restart
239
+ # policy, IP address type, OS type, state, and volumes.
240
+ #
241
+ # @param resource_group_name [String] The name of the resource group.
242
+ # @param container_group_name [String] The name of the container group.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [ContainerGroup] operation results.
247
+ #
248
+ def get(resource_group_name, container_group_name, custom_headers:nil)
249
+ response = get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
250
+ response.body unless response.nil?
251
+ end
252
+
253
+ #
254
+ # Get the properties of the specified container group.
255
+ #
256
+ # Gets the properties of the specified container group in the specified
257
+ # subscription and resource group. The operation returns the properties of each
258
+ # container group including containers, image registry credentials, restart
259
+ # policy, IP address type, OS type, state, and volumes.
260
+ #
261
+ # @param resource_group_name [String] The name of the resource group.
262
+ # @param container_group_name [String] The name of the container group.
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
267
+ #
268
+ def get_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
269
+ get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
270
+ end
271
+
272
+ #
273
+ # Get the properties of the specified container group.
274
+ #
275
+ # Gets the properties of the specified container group in the specified
276
+ # subscription and resource group. The operation returns the properties of each
277
+ # container group including containers, image registry credentials, restart
278
+ # policy, IP address type, OS type, state, and volumes.
279
+ #
280
+ # @param resource_group_name [String] The name of the resource group.
281
+ # @param container_group_name [String] The name of the container group.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def get_async(resource_group_name, container_group_name, custom_headers:nil)
288
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
289
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
290
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
291
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
292
+
293
+
294
+ request_headers = {}
295
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
296
+
297
+ # Set Headers
298
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
299
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
300
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
301
+
302
+ request_url = @base_url || @client.base_url
303
+
304
+ options = {
305
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
306
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
307
+ query_params: {'api-version' => @client.api_version},
308
+ headers: request_headers.merge(custom_headers || {}),
309
+ base_url: request_url
310
+ }
311
+ promise = @client.make_request_async(:get, path_template, options)
312
+
313
+ promise = promise.then do |result|
314
+ http_response = result.response
315
+ status_code = http_response.status
316
+ response_content = http_response.body
317
+ unless status_code == 200
318
+ error_model = JSON.load(response_content)
319
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
320
+ end
321
+
322
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
323
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
324
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
325
+ # Deserialize Response
326
+ if status_code == 200
327
+ begin
328
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
329
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
330
+ result.body = @client.deserialize(result_mapper, parsed_response)
331
+ rescue Exception => e
332
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
333
+ end
334
+ end
335
+
336
+ result
337
+ end
338
+
339
+ promise.execute
340
+ end
341
+
342
+ #
343
+ # Create or update container groups.
344
+ #
345
+ # Create or update container groups with specified configurations.
346
+ #
347
+ # @param resource_group_name [String] The name of the resource group.
348
+ # @param container_group_name [String] The name of the container group.
349
+ # @param container_group [ContainerGroup] The properties of the container group
350
+ # to be created or updated.
351
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
352
+ # will be added to the HTTP request.
353
+ #
354
+ # @return [ContainerGroup] operation results.
355
+ #
356
+ def create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil)
357
+ response = create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
358
+ response.body unless response.nil?
359
+ end
360
+
361
+ #
362
+ # @param resource_group_name [String] The name of the resource group.
363
+ # @param container_group_name [String] The name of the container group.
364
+ # @param container_group [ContainerGroup] The properties of the container group
365
+ # to be created or updated.
366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
+ # will be added to the HTTP request.
368
+ #
369
+ # @return [Concurrent::Promise] promise which provides async access to http
370
+ # response.
371
+ #
372
+ def create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:nil)
373
+ # Send request
374
+ promise = begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers)
375
+
376
+ promise = promise.then do |response|
377
+ # Defining deserialization method.
378
+ deserialize_method = lambda do |parsed_response|
379
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
380
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
381
+ end
382
+
383
+ # Waiting for response.
384
+ @client.get_long_running_operation_result(response, deserialize_method)
385
+ end
386
+
387
+ promise
388
+ end
389
+
390
+ #
391
+ # Update container groups.
392
+ #
393
+ # Updates container group tags with specified values.
394
+ #
395
+ # @param resource_group_name [String] The name of the resource group.
396
+ # @param container_group_name [String] The name of the container group.
397
+ # @param resource [Resource] The container group resource with just the tags to
398
+ # be updated.
399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
400
+ # will be added to the HTTP request.
401
+ #
402
+ # @return [ContainerGroup] operation results.
403
+ #
404
+ def update(resource_group_name, container_group_name, resource, custom_headers:nil)
405
+ response = update_async(resource_group_name, container_group_name, resource, custom_headers:custom_headers).value!
406
+ response.body unless response.nil?
407
+ end
408
+
409
+ #
410
+ # Update container groups.
411
+ #
412
+ # Updates container group tags with specified values.
413
+ #
414
+ # @param resource_group_name [String] The name of the resource group.
415
+ # @param container_group_name [String] The name of the container group.
416
+ # @param resource [Resource] The container group resource with just the tags to
417
+ # be updated.
418
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
419
+ # will be added to the HTTP request.
420
+ #
421
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
422
+ #
423
+ def update_with_http_info(resource_group_name, container_group_name, resource, custom_headers:nil)
424
+ update_async(resource_group_name, container_group_name, resource, custom_headers:custom_headers).value!
425
+ end
426
+
427
+ #
428
+ # Update container groups.
429
+ #
430
+ # Updates container group tags with specified values.
431
+ #
432
+ # @param resource_group_name [String] The name of the resource group.
433
+ # @param container_group_name [String] The name of the container group.
434
+ # @param resource [Resource] The container group resource with just the tags to
435
+ # be updated.
436
+ # @param [Hash{String => String}] A hash of custom headers that will be added
437
+ # to the HTTP request.
438
+ #
439
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
440
+ #
441
+ def update_async(resource_group_name, container_group_name, resource, custom_headers:nil)
442
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
443
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
444
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
445
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
446
+ fail ArgumentError, 'resource is nil' if resource.nil?
447
+
448
+
449
+ request_headers = {}
450
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
451
+
452
+ # Set Headers
453
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
454
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
455
+
456
+ # Serialize Request
457
+ request_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::Resource.mapper()
458
+ request_content = @client.serialize(request_mapper, resource)
459
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
460
+
461
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
462
+
463
+ request_url = @base_url || @client.base_url
464
+
465
+ options = {
466
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
467
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
468
+ query_params: {'api-version' => @client.api_version},
469
+ body: request_content,
470
+ headers: request_headers.merge(custom_headers || {}),
471
+ base_url: request_url
472
+ }
473
+ promise = @client.make_request_async(:patch, path_template, options)
474
+
475
+ promise = promise.then do |result|
476
+ http_response = result.response
477
+ status_code = http_response.status
478
+ response_content = http_response.body
479
+ unless status_code == 200
480
+ error_model = JSON.load(response_content)
481
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
482
+ end
483
+
484
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
485
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
486
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
487
+ # Deserialize Response
488
+ if status_code == 200
489
+ begin
490
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
491
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
492
+ result.body = @client.deserialize(result_mapper, parsed_response)
493
+ rescue Exception => e
494
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
495
+ end
496
+ end
497
+
498
+ result
499
+ end
500
+
501
+ promise.execute
502
+ end
503
+
504
+ #
505
+ # Delete the specified container group.
506
+ #
507
+ # Delete the specified container group in the specified subscription and
508
+ # resource group. The operation does not delete other resources provided by the
509
+ # user, such as volumes.
510
+ #
511
+ # @param resource_group_name [String] The name of the resource group.
512
+ # @param container_group_name [String] The name of the container group.
513
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
514
+ # will be added to the HTTP request.
515
+ #
516
+ # @return [ContainerGroup] operation results.
517
+ #
518
+ def delete(resource_group_name, container_group_name, custom_headers:nil)
519
+ response = delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
520
+ response.body unless response.nil?
521
+ end
522
+
523
+ #
524
+ # Delete the specified container group.
525
+ #
526
+ # Delete the specified container group in the specified subscription and
527
+ # resource group. The operation does not delete other resources provided by the
528
+ # user, such as volumes.
529
+ #
530
+ # @param resource_group_name [String] The name of the resource group.
531
+ # @param container_group_name [String] The name of the container group.
532
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
533
+ # will be added to the HTTP request.
534
+ #
535
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
536
+ #
537
+ def delete_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
538
+ delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
539
+ end
540
+
541
+ #
542
+ # Delete the specified container group.
543
+ #
544
+ # Delete the specified container group in the specified subscription and
545
+ # resource group. The operation does not delete other resources provided by the
546
+ # user, such as volumes.
547
+ #
548
+ # @param resource_group_name [String] The name of the resource group.
549
+ # @param container_group_name [String] The name of the container group.
550
+ # @param [Hash{String => String}] A hash of custom headers that will be added
551
+ # to the HTTP request.
552
+ #
553
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
554
+ #
555
+ def delete_async(resource_group_name, container_group_name, custom_headers:nil)
556
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
557
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
558
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
559
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
560
+
561
+
562
+ request_headers = {}
563
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
564
+
565
+ # Set Headers
566
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
567
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
568
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
569
+
570
+ request_url = @base_url || @client.base_url
571
+
572
+ options = {
573
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
574
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
575
+ query_params: {'api-version' => @client.api_version},
576
+ headers: request_headers.merge(custom_headers || {}),
577
+ base_url: request_url
578
+ }
579
+ promise = @client.make_request_async(:delete, path_template, options)
580
+
581
+ promise = promise.then do |result|
582
+ http_response = result.response
583
+ status_code = http_response.status
584
+ response_content = http_response.body
585
+ unless status_code == 200 || status_code == 204
586
+ error_model = JSON.load(response_content)
587
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
588
+ end
589
+
590
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
591
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
592
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
593
+ # Deserialize Response
594
+ if status_code == 200
595
+ begin
596
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
597
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
598
+ result.body = @client.deserialize(result_mapper, parsed_response)
599
+ rescue Exception => e
600
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
601
+ end
602
+ end
603
+
604
+ result
605
+ end
606
+
607
+ promise.execute
608
+ end
609
+
610
+ #
611
+ # Restarts all containers in a container group.
612
+ #
613
+ # Restarts all containers in a container group in place. If container image has
614
+ # updates, new image will be downloaded.
615
+ #
616
+ # @param resource_group_name [String] The name of the resource group.
617
+ # @param container_group_name [String] The name of the container group.
618
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
619
+ # will be added to the HTTP request.
620
+ #
621
+ def restart(resource_group_name, container_group_name, custom_headers:nil)
622
+ response = restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
623
+ nil
624
+ end
625
+
626
+ #
627
+ # @param resource_group_name [String] The name of the resource group.
628
+ # @param container_group_name [String] The name of the container group.
629
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
630
+ # will be added to the HTTP request.
631
+ #
632
+ # @return [Concurrent::Promise] promise which provides async access to http
633
+ # response.
634
+ #
635
+ def restart_async(resource_group_name, container_group_name, custom_headers:nil)
636
+ # Send request
637
+ promise = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers)
638
+
639
+ promise = promise.then do |response|
640
+ # Defining deserialization method.
641
+ deserialize_method = lambda do |parsed_response|
642
+ end
643
+
644
+ # Waiting for response.
645
+ @client.get_long_running_operation_result(response, deserialize_method)
646
+ end
647
+
648
+ promise
649
+ end
650
+
651
+ #
652
+ # Stops all containers in a container group.
653
+ #
654
+ # Stops all containers in a container group. Compute resources will be
655
+ # deallocated and billing will stop.
656
+ #
657
+ # @param resource_group_name [String] The name of the resource group.
658
+ # @param container_group_name [String] The name of the container group.
659
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
660
+ # will be added to the HTTP request.
661
+ #
662
+ #
663
+ def stop(resource_group_name, container_group_name, custom_headers:nil)
664
+ response = stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
665
+ nil
666
+ end
667
+
668
+ #
669
+ # Stops all containers in a container group.
670
+ #
671
+ # Stops all containers in a container group. Compute resources will be
672
+ # deallocated and billing will stop.
673
+ #
674
+ # @param resource_group_name [String] The name of the resource group.
675
+ # @param container_group_name [String] The name of the container group.
676
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
677
+ # will be added to the HTTP request.
678
+ #
679
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
680
+ #
681
+ def stop_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
682
+ stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
683
+ end
684
+
685
+ #
686
+ # Stops all containers in a container group.
687
+ #
688
+ # Stops all containers in a container group. Compute resources will be
689
+ # deallocated and billing will stop.
690
+ #
691
+ # @param resource_group_name [String] The name of the resource group.
692
+ # @param container_group_name [String] The name of the container group.
693
+ # @param [Hash{String => String}] A hash of custom headers that will be added
694
+ # to the HTTP request.
695
+ #
696
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
697
+ #
698
+ def stop_async(resource_group_name, container_group_name, custom_headers:nil)
699
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
700
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
701
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
702
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
703
+
704
+
705
+ request_headers = {}
706
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
707
+
708
+ # Set Headers
709
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
710
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
711
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop'
712
+
713
+ request_url = @base_url || @client.base_url
714
+
715
+ options = {
716
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
717
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
718
+ query_params: {'api-version' => @client.api_version},
719
+ headers: request_headers.merge(custom_headers || {}),
720
+ base_url: request_url
721
+ }
722
+ promise = @client.make_request_async(:post, path_template, options)
723
+
724
+ promise = promise.then do |result|
725
+ http_response = result.response
726
+ status_code = http_response.status
727
+ response_content = http_response.body
728
+ unless status_code == 204
729
+ error_model = JSON.load(response_content)
730
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
731
+ end
732
+
733
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
734
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
735
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
736
+
737
+ result
738
+ end
739
+
740
+ promise.execute
741
+ end
742
+
743
+ #
744
+ # Create or update container groups.
745
+ #
746
+ # Create or update container groups with specified configurations.
747
+ #
748
+ # @param resource_group_name [String] The name of the resource group.
749
+ # @param container_group_name [String] The name of the container group.
750
+ # @param container_group [ContainerGroup] The properties of the container group
751
+ # to be created or updated.
752
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
753
+ # will be added to the HTTP request.
754
+ #
755
+ # @return [ContainerGroup] operation results.
756
+ #
757
+ def begin_create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil)
758
+ response = begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
759
+ response.body unless response.nil?
760
+ end
761
+
762
+ #
763
+ # Create or update container groups.
764
+ #
765
+ # Create or update container groups with specified configurations.
766
+ #
767
+ # @param resource_group_name [String] The name of the resource group.
768
+ # @param container_group_name [String] The name of the container group.
769
+ # @param container_group [ContainerGroup] The properties of the container group
770
+ # to be created or updated.
771
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
772
+ # will be added to the HTTP request.
773
+ #
774
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
775
+ #
776
+ def begin_create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers:nil)
777
+ begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
778
+ end
779
+
780
+ #
781
+ # Create or update container groups.
782
+ #
783
+ # Create or update container groups with specified configurations.
784
+ #
785
+ # @param resource_group_name [String] The name of the resource group.
786
+ # @param container_group_name [String] The name of the container group.
787
+ # @param container_group [ContainerGroup] The properties of the container group
788
+ # to be created or updated.
789
+ # @param [Hash{String => String}] A hash of custom headers that will be added
790
+ # to the HTTP request.
791
+ #
792
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
793
+ #
794
+ def begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:nil)
795
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
796
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
797
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
798
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
799
+ fail ArgumentError, 'container_group is nil' if container_group.nil?
800
+
801
+
802
+ request_headers = {}
803
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
804
+
805
+ # Set Headers
806
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
807
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
808
+
809
+ # Serialize Request
810
+ request_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
811
+ request_content = @client.serialize(request_mapper, container_group)
812
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
813
+
814
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
815
+
816
+ request_url = @base_url || @client.base_url
817
+
818
+ options = {
819
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
820
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
821
+ query_params: {'api-version' => @client.api_version},
822
+ body: request_content,
823
+ headers: request_headers.merge(custom_headers || {}),
824
+ base_url: request_url
825
+ }
826
+ promise = @client.make_request_async(:put, path_template, options)
827
+
828
+ promise = promise.then do |result|
829
+ http_response = result.response
830
+ status_code = http_response.status
831
+ response_content = http_response.body
832
+ unless status_code == 200 || status_code == 201
833
+ error_model = JSON.load(response_content)
834
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
835
+ end
836
+
837
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
838
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
839
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
840
+ # Deserialize Response
841
+ if status_code == 200
842
+ begin
843
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
844
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
845
+ result.body = @client.deserialize(result_mapper, parsed_response)
846
+ rescue Exception => e
847
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
848
+ end
849
+ end
850
+ # Deserialize Response
851
+ if status_code == 201
852
+ begin
853
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
854
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroup.mapper()
855
+ result.body = @client.deserialize(result_mapper, parsed_response)
856
+ rescue Exception => e
857
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
858
+ end
859
+ end
860
+
861
+ result
862
+ end
863
+
864
+ promise.execute
865
+ end
866
+
867
+ #
868
+ # Restarts all containers in a container group.
869
+ #
870
+ # Restarts all containers in a container group in place. If container image has
871
+ # updates, new image will be downloaded.
872
+ #
873
+ # @param resource_group_name [String] The name of the resource group.
874
+ # @param container_group_name [String] The name of the container group.
875
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
876
+ # will be added to the HTTP request.
877
+ #
878
+ #
879
+ def begin_restart(resource_group_name, container_group_name, custom_headers:nil)
880
+ response = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
881
+ nil
882
+ end
883
+
884
+ #
885
+ # Restarts all containers in a container group.
886
+ #
887
+ # Restarts all containers in a container group in place. If container image has
888
+ # updates, new image will be downloaded.
889
+ #
890
+ # @param resource_group_name [String] The name of the resource group.
891
+ # @param container_group_name [String] The name of the container group.
892
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
893
+ # will be added to the HTTP request.
894
+ #
895
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
896
+ #
897
+ def begin_restart_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
898
+ begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
899
+ end
900
+
901
+ #
902
+ # Restarts all containers in a container group.
903
+ #
904
+ # Restarts all containers in a container group in place. If container image has
905
+ # updates, new image will be downloaded.
906
+ #
907
+ # @param resource_group_name [String] The name of the resource group.
908
+ # @param container_group_name [String] The name of the container group.
909
+ # @param [Hash{String => String}] A hash of custom headers that will be added
910
+ # to the HTTP request.
911
+ #
912
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
913
+ #
914
+ def begin_restart_async(resource_group_name, container_group_name, custom_headers:nil)
915
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
916
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
917
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
918
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
919
+
920
+
921
+ request_headers = {}
922
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
923
+
924
+ # Set Headers
925
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
926
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
927
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart'
928
+
929
+ request_url = @base_url || @client.base_url
930
+
931
+ options = {
932
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
933
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
934
+ query_params: {'api-version' => @client.api_version},
935
+ headers: request_headers.merge(custom_headers || {}),
936
+ base_url: request_url
937
+ }
938
+ promise = @client.make_request_async(:post, path_template, options)
939
+
940
+ promise = promise.then do |result|
941
+ http_response = result.response
942
+ status_code = http_response.status
943
+ response_content = http_response.body
944
+ unless status_code == 204
945
+ error_model = JSON.load(response_content)
946
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
947
+ end
948
+
949
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
950
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
951
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
952
+
953
+ result
954
+ end
955
+
956
+ promise.execute
957
+ end
958
+
959
+ #
960
+ # Get a list of container groups in the specified subscription.
961
+ #
962
+ # Get a list of container groups in the specified subscription. This operation
963
+ # returns properties of each container group including containers, image
964
+ # registry credentials, restart policy, IP address type, OS type, state, and
965
+ # volumes.
966
+ #
967
+ # @param next_page_link [String] The NextLink from the previous successful call
968
+ # to List operation.
969
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
970
+ # will be added to the HTTP request.
971
+ #
972
+ # @return [ContainerGroupListResult] operation results.
973
+ #
974
+ def list_next(next_page_link, custom_headers:nil)
975
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
976
+ response.body unless response.nil?
977
+ end
978
+
979
+ #
980
+ # Get a list of container groups in the specified subscription.
981
+ #
982
+ # Get a list of container groups in the specified subscription. This operation
983
+ # returns properties of each container group including containers, image
984
+ # registry credentials, restart policy, IP address type, OS type, state, and
985
+ # volumes.
986
+ #
987
+ # @param next_page_link [String] The NextLink from the previous successful call
988
+ # to List operation.
989
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
990
+ # will be added to the HTTP request.
991
+ #
992
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
993
+ #
994
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
995
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
996
+ end
997
+
998
+ #
999
+ # Get a list of container groups in the specified subscription.
1000
+ #
1001
+ # Get a list of container groups in the specified subscription. This operation
1002
+ # returns properties of each container group including containers, image
1003
+ # registry credentials, restart policy, IP address type, OS type, state, and
1004
+ # volumes.
1005
+ #
1006
+ # @param next_page_link [String] The NextLink from the previous successful call
1007
+ # to List operation.
1008
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1009
+ # to the HTTP request.
1010
+ #
1011
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1012
+ #
1013
+ def list_next_async(next_page_link, custom_headers:nil)
1014
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1015
+
1016
+
1017
+ request_headers = {}
1018
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1019
+
1020
+ # Set Headers
1021
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1022
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1023
+ path_template = '{nextLink}'
1024
+
1025
+ request_url = @base_url || @client.base_url
1026
+
1027
+ options = {
1028
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1029
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1030
+ headers: request_headers.merge(custom_headers || {}),
1031
+ base_url: request_url
1032
+ }
1033
+ promise = @client.make_request_async(:get, path_template, options)
1034
+
1035
+ promise = promise.then do |result|
1036
+ http_response = result.response
1037
+ status_code = http_response.status
1038
+ response_content = http_response.body
1039
+ unless status_code == 200
1040
+ error_model = JSON.load(response_content)
1041
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1042
+ end
1043
+
1044
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1045
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1046
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1047
+ # Deserialize Response
1048
+ if status_code == 200
1049
+ begin
1050
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1051
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroupListResult.mapper()
1052
+ result.body = @client.deserialize(result_mapper, parsed_response)
1053
+ rescue Exception => e
1054
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1055
+ end
1056
+ end
1057
+
1058
+ result
1059
+ end
1060
+
1061
+ promise.execute
1062
+ end
1063
+
1064
+ #
1065
+ # Get a list of container groups in the specified subscription and resource
1066
+ # group.
1067
+ #
1068
+ # Get a list of container groups in a specified subscription and resource
1069
+ # group. This operation returns properties of each container group including
1070
+ # containers, image registry credentials, restart policy, IP address type, OS
1071
+ # type, state, and volumes.
1072
+ #
1073
+ # @param next_page_link [String] The NextLink from the previous successful call
1074
+ # to List operation.
1075
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1076
+ # will be added to the HTTP request.
1077
+ #
1078
+ # @return [ContainerGroupListResult] operation results.
1079
+ #
1080
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1081
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1082
+ response.body unless response.nil?
1083
+ end
1084
+
1085
+ #
1086
+ # Get a list of container groups in the specified subscription and resource
1087
+ # group.
1088
+ #
1089
+ # Get a list of container groups in a specified subscription and resource
1090
+ # group. This operation returns properties of each container group including
1091
+ # containers, image registry credentials, restart policy, IP address type, OS
1092
+ # type, state, and volumes.
1093
+ #
1094
+ # @param next_page_link [String] The NextLink from the previous successful call
1095
+ # to List operation.
1096
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1097
+ # will be added to the HTTP request.
1098
+ #
1099
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1100
+ #
1101
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1102
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1103
+ end
1104
+
1105
+ #
1106
+ # Get a list of container groups in the specified subscription and resource
1107
+ # group.
1108
+ #
1109
+ # Get a list of container groups in a specified subscription and resource
1110
+ # group. This operation returns properties of each container group including
1111
+ # containers, image registry credentials, restart policy, IP address type, OS
1112
+ # type, state, and volumes.
1113
+ #
1114
+ # @param next_page_link [String] The NextLink from the previous successful call
1115
+ # to List operation.
1116
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1117
+ # to the HTTP request.
1118
+ #
1119
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1120
+ #
1121
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1122
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1123
+
1124
+
1125
+ request_headers = {}
1126
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1127
+
1128
+ # Set Headers
1129
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1130
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1131
+ path_template = '{nextLink}'
1132
+
1133
+ request_url = @base_url || @client.base_url
1134
+
1135
+ options = {
1136
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1137
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1138
+ headers: request_headers.merge(custom_headers || {}),
1139
+ base_url: request_url
1140
+ }
1141
+ promise = @client.make_request_async(:get, path_template, options)
1142
+
1143
+ promise = promise.then do |result|
1144
+ http_response = result.response
1145
+ status_code = http_response.status
1146
+ response_content = http_response.body
1147
+ unless status_code == 200
1148
+ error_model = JSON.load(response_content)
1149
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1150
+ end
1151
+
1152
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1153
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1154
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1155
+ # Deserialize Response
1156
+ if status_code == 200
1157
+ begin
1158
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1159
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::ContainerGroupListResult.mapper()
1160
+ result.body = @client.deserialize(result_mapper, parsed_response)
1161
+ rescue Exception => e
1162
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1163
+ end
1164
+ end
1165
+
1166
+ result
1167
+ end
1168
+
1169
+ promise.execute
1170
+ end
1171
+
1172
+ #
1173
+ # Get a list of container groups in the specified subscription.
1174
+ #
1175
+ # Get a list of container groups in the specified subscription. This operation
1176
+ # returns properties of each container group including containers, image
1177
+ # registry credentials, restart policy, IP address type, OS type, state, and
1178
+ # volumes.
1179
+ #
1180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1181
+ # will be added to the HTTP request.
1182
+ #
1183
+ # @return [ContainerGroupListResult] which provide lazy access to pages of the
1184
+ # response.
1185
+ #
1186
+ def list_as_lazy(custom_headers:nil)
1187
+ response = list_async(custom_headers:custom_headers).value!
1188
+ unless response.nil?
1189
+ page = response.body
1190
+ page.next_method = Proc.new do |next_page_link|
1191
+ list_next_async(next_page_link, custom_headers:custom_headers)
1192
+ end
1193
+ page
1194
+ end
1195
+ end
1196
+
1197
+ #
1198
+ # Get a list of container groups in the specified subscription and resource
1199
+ # group.
1200
+ #
1201
+ # Get a list of container groups in a specified subscription and resource
1202
+ # group. This operation returns properties of each container group including
1203
+ # containers, image registry credentials, restart policy, IP address type, OS
1204
+ # type, state, and volumes.
1205
+ #
1206
+ # @param resource_group_name [String] The name of the resource group.
1207
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1208
+ # will be added to the HTTP request.
1209
+ #
1210
+ # @return [ContainerGroupListResult] which provide lazy access to pages of the
1211
+ # response.
1212
+ #
1213
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1214
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1215
+ unless response.nil?
1216
+ page = response.body
1217
+ page.next_method = Proc.new do |next_page_link|
1218
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1219
+ end
1220
+ page
1221
+ end
1222
+ end
1223
+
1224
+ end
1225
+ end