azure_mgmt_kusto 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +20 -20
  3. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto.rb +0 -0
  4. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/clusters.rb +0 -0
  5. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/databases.rb +0 -0
  6. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/event_hub_connections.rb +0 -0
  7. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  8. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_capacity.rb +0 -0
  9. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +0 -0
  10. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +0 -0
  11. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_scale_type.rb +0 -0
  12. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_sku.rb +0 -0
  13. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/azure_sku_name.rb +0 -0
  14. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/check_name_result.rb +0 -0
  15. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster.rb +0 -0
  16. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +0 -0
  17. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster_list_result.rb +0 -0
  18. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/cluster_update.rb +0 -0
  19. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/data_format.rb +0 -0
  20. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database.rb +0 -0
  21. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_check_name_request.rb +0 -0
  22. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_list_result.rb +0 -0
  23. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal.rb +0 -0
  24. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +0 -0
  25. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +0 -0
  26. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_role.rb +0 -0
  27. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_principal_type.rb +0 -0
  28. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_statistics.rb +0 -0
  29. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/database_update.rb +0 -0
  30. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection.rb +0 -0
  31. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_list_result.rb +0 -0
  32. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_update.rb +0 -0
  33. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_validation.rb +0 -0
  34. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_list_result.rb +0 -0
  35. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_result.rb +0 -0
  36. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +0 -0
  37. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/list_skus_result.rb +0 -0
  38. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/operation.rb +0 -0
  39. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/operation_display.rb +0 -0
  40. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/operation_list_result.rb +0 -0
  41. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/provisioning_state.rb +0 -0
  42. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/proxy_resource.rb +0 -0
  43. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/resource.rb +0 -0
  44. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/state.rb +0 -0
  45. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/tracked_resource.rb +0 -0
  46. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +0 -0
  47. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/module_definition.rb +0 -0
  48. data/lib/2017-09-07-privatepreview/generated/azure_mgmt_kusto/operations.rb +0 -0
  49. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto.rb +0 -0
  50. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/clusters.rb +0 -0
  51. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/databases.rb +0 -0
  52. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/event_hub_connections.rb +0 -0
  53. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  54. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_capacity.rb +0 -0
  55. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +0 -0
  56. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +0 -0
  57. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_scale_type.rb +0 -0
  58. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_sku.rb +0 -0
  59. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/azure_sku_name.rb +0 -0
  60. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/check_name_result.rb +0 -0
  61. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster.rb +0 -0
  62. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +0 -0
  63. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster_list_result.rb +0 -0
  64. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/cluster_update.rb +0 -0
  65. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/data_format.rb +0 -0
  66. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database.rb +0 -0
  67. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_check_name_request.rb +0 -0
  68. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_list_result.rb +0 -0
  69. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal.rb +0 -0
  70. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +0 -0
  71. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +0 -0
  72. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_role.rb +0 -0
  73. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_principal_type.rb +0 -0
  74. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_statistics.rb +0 -0
  75. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/database_update.rb +0 -0
  76. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection.rb +0 -0
  77. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_list_result.rb +0 -0
  78. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_update.rb +0 -0
  79. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_validation.rb +0 -0
  80. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_list_result.rb +0 -0
  81. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/event_hub_connection_validation_result.rb +0 -0
  82. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +0 -0
  83. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/list_skus_result.rb +0 -0
  84. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/operation.rb +0 -0
  85. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/operation_display.rb +0 -0
  86. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/operation_list_result.rb +0 -0
  87. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/provisioning_state.rb +0 -0
  88. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/proxy_resource.rb +0 -0
  89. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/resource.rb +0 -0
  90. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/state.rb +0 -0
  91. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/tracked_resource.rb +0 -0
  92. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +0 -0
  93. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/module_definition.rb +0 -0
  94. data/lib/2018-09-07-preview/generated/azure_mgmt_kusto/operations.rb +0 -0
  95. data/lib/2019-01-21/generated/azure_mgmt_kusto.rb +0 -0
  96. data/lib/2019-01-21/generated/azure_mgmt_kusto/clusters.rb +0 -0
  97. data/lib/2019-01-21/generated/azure_mgmt_kusto/data_connections.rb +0 -0
  98. data/lib/2019-01-21/generated/azure_mgmt_kusto/databases.rb +0 -0
  99. data/lib/2019-01-21/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  100. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_capacity.rb +0 -0
  101. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +0 -0
  102. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +0 -0
  103. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_scale_type.rb +0 -0
  104. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_sku.rb +0 -0
  105. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_sku_name.rb +0 -0
  106. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/azure_sku_tier.rb +0 -0
  107. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/check_name_result.rb +0 -0
  108. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/cluster.rb +0 -0
  109. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +0 -0
  110. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/cluster_list_result.rb +0 -0
  111. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/cluster_update.rb +0 -0
  112. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection.rb +0 -0
  113. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb +0 -0
  114. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection_list_result.rb +0 -0
  115. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection_validation.rb +0 -0
  116. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection_validation_list_result.rb +0 -0
  117. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_connection_validation_result.rb +0 -0
  118. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/data_format.rb +0 -0
  119. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database.rb +0 -0
  120. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_check_name_request.rb +0 -0
  121. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_list_result.rb +0 -0
  122. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_principal.rb +0 -0
  123. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +0 -0
  124. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +0 -0
  125. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_principal_role.rb +0 -0
  126. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_principal_type.rb +0 -0
  127. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_statistics.rb +0 -0
  128. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/database_update.rb +0 -0
  129. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/event_grid_data_connection.rb +0 -0
  130. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/event_hub_data_connection.rb +0 -0
  131. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +0 -0
  132. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/list_skus_result.rb +0 -0
  133. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/operation.rb +0 -0
  134. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/operation_display.rb +0 -0
  135. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/operation_list_result.rb +0 -0
  136. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/provisioning_state.rb +0 -0
  137. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/proxy_resource.rb +0 -0
  138. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/reason.rb +0 -0
  139. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/resource.rb +0 -0
  140. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/state.rb +0 -0
  141. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/tracked_resource.rb +0 -0
  142. data/lib/2019-01-21/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +0 -0
  143. data/lib/2019-01-21/generated/azure_mgmt_kusto/module_definition.rb +0 -0
  144. data/lib/2019-01-21/generated/azure_mgmt_kusto/operations.rb +0 -0
  145. data/lib/2019-05-15/generated/azure_mgmt_kusto.rb +0 -0
  146. data/lib/2019-05-15/generated/azure_mgmt_kusto/clusters.rb +0 -0
  147. data/lib/2019-05-15/generated/azure_mgmt_kusto/data_connections.rb +0 -0
  148. data/lib/2019-05-15/generated/azure_mgmt_kusto/databases.rb +0 -0
  149. data/lib/2019-05-15/generated/azure_mgmt_kusto/kusto_management_client.rb +1 -1
  150. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_capacity.rb +0 -0
  151. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +0 -0
  152. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +0 -0
  153. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_scale_type.rb +0 -0
  154. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_sku.rb +0 -0
  155. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_sku_name.rb +0 -0
  156. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/azure_sku_tier.rb +0 -0
  157. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/check_name_result.rb +0 -0
  158. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster.rb +0 -0
  159. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +0 -0
  160. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster_list_result.rb +0 -0
  161. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/cluster_update.rb +0 -0
  162. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection.rb +0 -0
  163. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb +0 -0
  164. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_list_result.rb +0 -0
  165. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation.rb +0 -0
  166. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation_list_result.rb +0 -0
  167. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_connection_validation_result.rb +0 -0
  168. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/data_format.rb +0 -0
  169. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database.rb +0 -0
  170. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_check_name_request.rb +0 -0
  171. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_list_result.rb +0 -0
  172. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal.rb +0 -0
  173. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +0 -0
  174. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +0 -0
  175. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_role.rb +0 -0
  176. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_principal_type.rb +0 -0
  177. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_statistics.rb +0 -0
  178. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/database_update.rb +0 -0
  179. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/event_grid_data_connection.rb +0 -0
  180. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/event_hub_data_connection.rb +0 -0
  181. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/iot_hub_data_connection.rb +0 -0
  182. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +0 -0
  183. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/operation.rb +0 -0
  184. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/operation_display.rb +0 -0
  185. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/operation_list_result.rb +0 -0
  186. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/optimized_autoscale.rb +0 -0
  187. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/provisioning_state.rb +0 -0
  188. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/proxy_resource.rb +0 -0
  189. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/reason.rb +0 -0
  190. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/resource.rb +0 -0
  191. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/sku_description.rb +0 -0
  192. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/sku_description_list.rb +0 -0
  193. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/sku_location_info_item.rb +0 -0
  194. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/state.rb +0 -0
  195. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/tracked_resource.rb +0 -0
  196. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +0 -0
  197. data/lib/2019-05-15/generated/azure_mgmt_kusto/models/virtual_network_configuration.rb +0 -0
  198. data/lib/2019-05-15/generated/azure_mgmt_kusto/module_definition.rb +0 -0
  199. data/lib/2019-05-15/generated/azure_mgmt_kusto/operations.rb +0 -0
  200. data/lib/2019-09-07/generated/azure_mgmt_kusto.rb +92 -0
  201. data/lib/2019-09-07/generated/azure_mgmt_kusto/attached_database_configurations.rb +558 -0
  202. data/lib/2019-09-07/generated/azure_mgmt_kusto/clusters.rb +1557 -0
  203. data/lib/2019-09-07/generated/azure_mgmt_kusto/data_connections.rb +983 -0
  204. data/lib/2019-09-07/generated/azure_mgmt_kusto/databases.rb +1169 -0
  205. data/lib/2019-09-07/generated/azure_mgmt_kusto/kusto_management_client.rb +149 -0
  206. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/attached_database_configuration.rb +144 -0
  207. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/attached_database_configuration_list_result.rb +56 -0
  208. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_capacity.rb +80 -0
  209. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_entity_resource.rb +75 -0
  210. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_resource_sku.rb +70 -0
  211. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_scale_type.rb +17 -0
  212. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_sku.rb +74 -0
  213. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_sku_name.rb +26 -0
  214. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/azure_sku_tier.rb +16 -0
  215. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/check_name_request.rb +61 -0
  216. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/check_name_result.rb +82 -0
  217. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/cluster.rb +263 -0
  218. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/cluster_check_name_request.rb +60 -0
  219. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/cluster_list_result.rb +55 -0
  220. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/cluster_update.rb +250 -0
  221. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_connection.rb +82 -0
  222. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_connection_check_name_request.rb +62 -0
  223. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_connection_list_result.rb +57 -0
  224. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_connection_validation.rb +60 -0
  225. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_connection_validation_list_result.rb +56 -0
  226. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_connection_validation_result.rb +47 -0
  227. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/data_format.rb +26 -0
  228. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database.rb +82 -0
  229. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_list_result.rb +57 -0
  230. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_principal.rb +117 -0
  231. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_principal_list_request.rb +56 -0
  232. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_principal_list_result.rb +56 -0
  233. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_principal_role.rb +20 -0
  234. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_principal_type.rb +17 -0
  235. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/database_statistics.rb +47 -0
  236. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/default_principals_modification_kind.rb +17 -0
  237. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/event_grid_data_connection.rb +158 -0
  238. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/event_hub_data_connection.rb +165 -0
  239. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/follower_database_definition.rb +72 -0
  240. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/follower_database_list_result.rb +56 -0
  241. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/identity.rb +95 -0
  242. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/identity_type.rb +16 -0
  243. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/identity_user_assigned_identities_value.rb +60 -0
  244. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/iot_hub_data_connection.rb +176 -0
  245. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/key_vault_properties.rb +68 -0
  246. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/list_resource_skus_result.rb +56 -0
  247. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/operation.rb +82 -0
  248. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/operation_display.rb +80 -0
  249. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/operation_list_result.rb +98 -0
  250. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/optimized_autoscale.rb +80 -0
  251. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/principals_modification_kind.rb +17 -0
  252. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/provisioning_state.rb +20 -0
  253. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/proxy_resource.rb +63 -0
  254. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/read_only_following_database.rb +174 -0
  255. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/read_write_database.rb +135 -0
  256. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/reason.rb +16 -0
  257. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/resource.rb +83 -0
  258. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/sku_description.rb +132 -0
  259. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/sku_description_list.rb +56 -0
  260. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/sku_location_info_item.rb +65 -0
  261. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/state.rb +23 -0
  262. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/tracked_resource.rb +92 -0
  263. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/trusted_external_tenant.rb +46 -0
  264. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/type.rb +16 -0
  265. data/lib/2019-09-07/generated/azure_mgmt_kusto/models/virtual_network_configuration.rb +69 -0
  266. data/lib/2019-09-07/generated/azure_mgmt_kusto/module_definition.rb +9 -0
  267. data/lib/2019-09-07/generated/azure_mgmt_kusto/operations.rb +221 -0
  268. data/lib/azure_mgmt_kusto.rb +10 -9
  269. data/lib/module_definition.rb +7 -7
  270. data/lib/profiles/latest/kusto_latest_profile_client.rb +40 -40
  271. data/lib/profiles/latest/kusto_module_definition.rb +8 -8
  272. data/lib/profiles/latest/modules/kusto_profile_module.rb +309 -259
  273. data/lib/version.rb +7 -7
  274. metadata +71 -3
@@ -0,0 +1,1557 @@
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::Kusto::Mgmt::V2019_09_07
7
+ #
8
+ # The Azure Kusto management API provides a RESTful set of web services that
9
+ # interact with Azure Kusto services to manage your clusters and databases.
10
+ # The API enables you to create, update, and delete clusters and databases.
11
+ #
12
+ class Clusters
13
+ include MsRestAzure
14
+
15
+ #
16
+ # Creates and initializes a new instance of the Clusters class.
17
+ # @param client service class for accessing basic functionality.
18
+ #
19
+ def initialize(client)
20
+ @client = client
21
+ end
22
+
23
+ # @return [KustoManagementClient] reference to the KustoManagementClient
24
+ attr_reader :client
25
+
26
+ #
27
+ # Gets a Kusto cluster.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group containing
30
+ # the Kusto cluster.
31
+ # @param cluster_name [String] The name of the Kusto cluster.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Cluster] operation results.
36
+ #
37
+ def get(resource_group_name, cluster_name, custom_headers:nil)
38
+ response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Gets a Kusto cluster.
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group containing
46
+ # the Kusto cluster.
47
+ # @param cluster_name [String] The name of the Kusto cluster.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
54
+ get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets a Kusto cluster.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group containing
61
+ # the Kusto cluster.
62
+ # @param cluster_name [String] The name of the Kusto cluster.
63
+ # @param [Hash{String => String}] A hash of custom headers that will be added
64
+ # to the HTTP request.
65
+ #
66
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
67
+ #
68
+ def get_async(resource_group_name, cluster_name, custom_headers:nil)
69
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
73
+
74
+
75
+ request_headers = {}
76
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
+
78
+ # Set Headers
79
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
80
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
81
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
82
+
83
+ request_url = @base_url || @client.base_url
84
+
85
+ options = {
86
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
88
+ query_params: {'api-version' => @client.api_version},
89
+ headers: request_headers.merge(custom_headers || {}),
90
+ base_url: request_url
91
+ }
92
+ promise = @client.make_request_async(:get, path_template, options)
93
+
94
+ promise = promise.then do |result|
95
+ http_response = result.response
96
+ status_code = http_response.status
97
+ response_content = http_response.body
98
+ unless status_code == 200
99
+ error_model = JSON.load(response_content)
100
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
101
+ end
102
+
103
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
104
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
105
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+
117
+ result
118
+ end
119
+
120
+ promise.execute
121
+ end
122
+
123
+ #
124
+ # Create or update a Kusto cluster.
125
+ #
126
+ # @param resource_group_name [String] The name of the resource group containing
127
+ # the Kusto cluster.
128
+ # @param cluster_name [String] The name of the Kusto cluster.
129
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
130
+ # CreateOrUpdate operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Cluster] operation results.
135
+ #
136
+ def create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
137
+ response = create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # @param resource_group_name [String] The name of the resource group containing
143
+ # the Kusto cluster.
144
+ # @param cluster_name [String] The name of the Kusto cluster.
145
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
146
+ # CreateOrUpdate operation.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [Concurrent::Promise] promise which provides async access to http
151
+ # response.
152
+ #
153
+ def create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
154
+ # Send request
155
+ promise = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
156
+
157
+ promise = promise.then do |response|
158
+ # Defining deserialization method.
159
+ deserialize_method = lambda do |parsed_response|
160
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
161
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
162
+ end
163
+
164
+ # Waiting for response.
165
+ @client.get_long_running_operation_result(response, deserialize_method)
166
+ end
167
+
168
+ promise
169
+ end
170
+
171
+ #
172
+ # Update a Kusto cluster.
173
+ #
174
+ # @param resource_group_name [String] The name of the resource group containing
175
+ # the Kusto cluster.
176
+ # @param cluster_name [String] The name of the Kusto cluster.
177
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
178
+ # the Update operation.
179
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
180
+ # will be added to the HTTP request.
181
+ #
182
+ # @return [Cluster] operation results.
183
+ #
184
+ def update(resource_group_name, cluster_name, parameters, custom_headers:nil)
185
+ response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
186
+ response.body unless response.nil?
187
+ end
188
+
189
+ #
190
+ # @param resource_group_name [String] The name of the resource group containing
191
+ # the Kusto cluster.
192
+ # @param cluster_name [String] The name of the Kusto cluster.
193
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
194
+ # the Update operation.
195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
196
+ # will be added to the HTTP request.
197
+ #
198
+ # @return [Concurrent::Promise] promise which provides async access to http
199
+ # response.
200
+ #
201
+ def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
202
+ # Send request
203
+ promise = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
204
+
205
+ promise = promise.then do |response|
206
+ # Defining deserialization method.
207
+ deserialize_method = lambda do |parsed_response|
208
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
209
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
210
+ end
211
+
212
+ # Waiting for response.
213
+ @client.get_long_running_operation_result(response, deserialize_method)
214
+ end
215
+
216
+ promise
217
+ end
218
+
219
+ #
220
+ # Deletes a Kusto cluster.
221
+ #
222
+ # @param resource_group_name [String] The name of the resource group containing
223
+ # the Kusto cluster.
224
+ # @param cluster_name [String] The name of the Kusto cluster.
225
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
226
+ # will be added to the HTTP request.
227
+ #
228
+ def delete(resource_group_name, cluster_name, custom_headers:nil)
229
+ response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
230
+ nil
231
+ end
232
+
233
+ #
234
+ # @param resource_group_name [String] The name of the resource group containing
235
+ # the Kusto cluster.
236
+ # @param cluster_name [String] The name of the Kusto cluster.
237
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
238
+ # will be added to the HTTP request.
239
+ #
240
+ # @return [Concurrent::Promise] promise which provides async access to http
241
+ # response.
242
+ #
243
+ def delete_async(resource_group_name, cluster_name, custom_headers:nil)
244
+ # Send request
245
+ promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers)
246
+
247
+ promise = promise.then do |response|
248
+ # Defining deserialization method.
249
+ deserialize_method = lambda do |parsed_response|
250
+ end
251
+
252
+ # Waiting for response.
253
+ @client.get_long_running_operation_result(response, deserialize_method)
254
+ end
255
+
256
+ promise
257
+ end
258
+
259
+ #
260
+ # Stops a Kusto cluster.
261
+ #
262
+ # @param resource_group_name [String] The name of the resource group containing
263
+ # the Kusto cluster.
264
+ # @param cluster_name [String] The name of the Kusto cluster.
265
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
266
+ # will be added to the HTTP request.
267
+ #
268
+ def stop(resource_group_name, cluster_name, custom_headers:nil)
269
+ response = stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
270
+ nil
271
+ end
272
+
273
+ #
274
+ # @param resource_group_name [String] The name of the resource group containing
275
+ # the Kusto cluster.
276
+ # @param cluster_name [String] The name of the Kusto cluster.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [Concurrent::Promise] promise which provides async access to http
281
+ # response.
282
+ #
283
+ def stop_async(resource_group_name, cluster_name, custom_headers:nil)
284
+ # Send request
285
+ promise = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers)
286
+
287
+ promise = promise.then do |response|
288
+ # Defining deserialization method.
289
+ deserialize_method = lambda do |parsed_response|
290
+ end
291
+
292
+ # Waiting for response.
293
+ @client.get_long_running_operation_result(response, deserialize_method)
294
+ end
295
+
296
+ promise
297
+ end
298
+
299
+ #
300
+ # Starts a Kusto cluster.
301
+ #
302
+ # @param resource_group_name [String] The name of the resource group containing
303
+ # the Kusto cluster.
304
+ # @param cluster_name [String] The name of the Kusto cluster.
305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
+ # will be added to the HTTP request.
307
+ #
308
+ def start(resource_group_name, cluster_name, custom_headers:nil)
309
+ response = start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
310
+ nil
311
+ end
312
+
313
+ #
314
+ # @param resource_group_name [String] The name of the resource group containing
315
+ # the Kusto cluster.
316
+ # @param cluster_name [String] The name of the Kusto cluster.
317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
318
+ # will be added to the HTTP request.
319
+ #
320
+ # @return [Concurrent::Promise] promise which provides async access to http
321
+ # response.
322
+ #
323
+ def start_async(resource_group_name, cluster_name, custom_headers:nil)
324
+ # Send request
325
+ promise = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers)
326
+
327
+ promise = promise.then do |response|
328
+ # Defining deserialization method.
329
+ deserialize_method = lambda do |parsed_response|
330
+ end
331
+
332
+ # Waiting for response.
333
+ @client.get_long_running_operation_result(response, deserialize_method)
334
+ end
335
+
336
+ promise
337
+ end
338
+
339
+ #
340
+ # Returns a list of databases that are owned by this cluster and were followed
341
+ # by another cluster.
342
+ #
343
+ # @param resource_group_name [String] The name of the resource group containing
344
+ # the Kusto cluster.
345
+ # @param cluster_name [String] The name of the Kusto cluster.
346
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
347
+ # will be added to the HTTP request.
348
+ #
349
+ # @return [FollowerDatabaseListResult] operation results.
350
+ #
351
+ def list_follower_databases(resource_group_name, cluster_name, custom_headers:nil)
352
+ response = list_follower_databases_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
353
+ response.body unless response.nil?
354
+ end
355
+
356
+ #
357
+ # Returns a list of databases that are owned by this cluster and were followed
358
+ # by another cluster.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group containing
361
+ # the Kusto cluster.
362
+ # @param cluster_name [String] The name of the Kusto cluster.
363
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
364
+ # will be added to the HTTP request.
365
+ #
366
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
367
+ #
368
+ def list_follower_databases_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
369
+ list_follower_databases_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
370
+ end
371
+
372
+ #
373
+ # Returns a list of databases that are owned by this cluster and were followed
374
+ # by another cluster.
375
+ #
376
+ # @param resource_group_name [String] The name of the resource group containing
377
+ # the Kusto cluster.
378
+ # @param cluster_name [String] The name of the Kusto cluster.
379
+ # @param [Hash{String => String}] A hash of custom headers that will be added
380
+ # to the HTTP request.
381
+ #
382
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
383
+ #
384
+ def list_follower_databases_async(resource_group_name, cluster_name, custom_headers:nil)
385
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
386
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
387
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
388
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
389
+
390
+
391
+ request_headers = {}
392
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
393
+
394
+ # Set Headers
395
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
396
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
397
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases'
398
+
399
+ request_url = @base_url || @client.base_url
400
+
401
+ options = {
402
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
403
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
404
+ query_params: {'api-version' => @client.api_version},
405
+ headers: request_headers.merge(custom_headers || {}),
406
+ base_url: request_url
407
+ }
408
+ promise = @client.make_request_async(:post, path_template, options)
409
+
410
+ promise = promise.then do |result|
411
+ http_response = result.response
412
+ status_code = http_response.status
413
+ response_content = http_response.body
414
+ unless status_code == 200
415
+ error_model = JSON.load(response_content)
416
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
417
+ end
418
+
419
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
420
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
421
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
422
+ # Deserialize Response
423
+ if status_code == 200
424
+ begin
425
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
426
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::FollowerDatabaseListResult.mapper()
427
+ result.body = @client.deserialize(result_mapper, parsed_response)
428
+ rescue Exception => e
429
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
430
+ end
431
+ end
432
+
433
+ result
434
+ end
435
+
436
+ promise.execute
437
+ end
438
+
439
+ #
440
+ # Detaches all followers of a database owned by this cluster.
441
+ #
442
+ # @param resource_group_name [String] The name of the resource group containing
443
+ # the Kusto cluster.
444
+ # @param cluster_name [String] The name of the Kusto cluster.
445
+ # @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
446
+ # databases properties to remove.
447
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
+ # will be added to the HTTP request.
449
+ #
450
+ def detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
451
+ response = detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value!
452
+ nil
453
+ end
454
+
455
+ #
456
+ # @param resource_group_name [String] The name of the resource group containing
457
+ # the Kusto cluster.
458
+ # @param cluster_name [String] The name of the Kusto cluster.
459
+ # @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
460
+ # databases properties to remove.
461
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
462
+ # will be added to the HTTP request.
463
+ #
464
+ # @return [Concurrent::Promise] promise which provides async access to http
465
+ # response.
466
+ #
467
+ def detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
468
+ # Send request
469
+ promise = begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers)
470
+
471
+ promise = promise.then do |response|
472
+ # Defining deserialization method.
473
+ deserialize_method = lambda do |parsed_response|
474
+ end
475
+
476
+ # Waiting for response.
477
+ @client.get_long_running_operation_result(response, deserialize_method)
478
+ end
479
+
480
+ promise
481
+ end
482
+
483
+ #
484
+ # Lists all Kusto clusters within a resource group.
485
+ #
486
+ # @param resource_group_name [String] The name of the resource group containing
487
+ # the Kusto cluster.
488
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
489
+ # will be added to the HTTP request.
490
+ #
491
+ # @return [ClusterListResult] operation results.
492
+ #
493
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
494
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
495
+ response.body unless response.nil?
496
+ end
497
+
498
+ #
499
+ # Lists all Kusto clusters within a resource group.
500
+ #
501
+ # @param resource_group_name [String] The name of the resource group containing
502
+ # the Kusto cluster.
503
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
504
+ # will be added to the HTTP request.
505
+ #
506
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
507
+ #
508
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
509
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
510
+ end
511
+
512
+ #
513
+ # Lists all Kusto clusters within a resource group.
514
+ #
515
+ # @param resource_group_name [String] The name of the resource group containing
516
+ # the Kusto cluster.
517
+ # @param [Hash{String => String}] A hash of custom headers that will be added
518
+ # to the HTTP request.
519
+ #
520
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
521
+ #
522
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
523
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
524
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
525
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
526
+
527
+
528
+ request_headers = {}
529
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
530
+
531
+ # Set Headers
532
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
533
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
534
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters'
535
+
536
+ request_url = @base_url || @client.base_url
537
+
538
+ options = {
539
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
540
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
541
+ query_params: {'api-version' => @client.api_version},
542
+ headers: request_headers.merge(custom_headers || {}),
543
+ base_url: request_url
544
+ }
545
+ promise = @client.make_request_async(:get, path_template, options)
546
+
547
+ promise = promise.then do |result|
548
+ http_response = result.response
549
+ status_code = http_response.status
550
+ response_content = http_response.body
551
+ unless status_code == 200
552
+ error_model = JSON.load(response_content)
553
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
554
+ end
555
+
556
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
557
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
558
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
559
+ # Deserialize Response
560
+ if status_code == 200
561
+ begin
562
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
563
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterListResult.mapper()
564
+ result.body = @client.deserialize(result_mapper, parsed_response)
565
+ rescue Exception => e
566
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
567
+ end
568
+ end
569
+
570
+ result
571
+ end
572
+
573
+ promise.execute
574
+ end
575
+
576
+ #
577
+ # Lists all Kusto clusters within a subscription.
578
+ #
579
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
580
+ # will be added to the HTTP request.
581
+ #
582
+ # @return [ClusterListResult] operation results.
583
+ #
584
+ def list(custom_headers:nil)
585
+ response = list_async(custom_headers:custom_headers).value!
586
+ response.body unless response.nil?
587
+ end
588
+
589
+ #
590
+ # Lists all Kusto clusters within a subscription.
591
+ #
592
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
593
+ # will be added to the HTTP request.
594
+ #
595
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
596
+ #
597
+ def list_with_http_info(custom_headers:nil)
598
+ list_async(custom_headers:custom_headers).value!
599
+ end
600
+
601
+ #
602
+ # Lists all Kusto clusters within a subscription.
603
+ #
604
+ # @param [Hash{String => String}] A hash of custom headers that will be added
605
+ # to the HTTP request.
606
+ #
607
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
608
+ #
609
+ def list_async(custom_headers:nil)
610
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
611
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
612
+
613
+
614
+ request_headers = {}
615
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
616
+
617
+ # Set Headers
618
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
619
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
620
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters'
621
+
622
+ request_url = @base_url || @client.base_url
623
+
624
+ options = {
625
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
626
+ path_params: {'subscriptionId' => @client.subscription_id},
627
+ query_params: {'api-version' => @client.api_version},
628
+ headers: request_headers.merge(custom_headers || {}),
629
+ base_url: request_url
630
+ }
631
+ promise = @client.make_request_async(:get, path_template, options)
632
+
633
+ promise = promise.then do |result|
634
+ http_response = result.response
635
+ status_code = http_response.status
636
+ response_content = http_response.body
637
+ unless status_code == 200
638
+ error_model = JSON.load(response_content)
639
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
640
+ end
641
+
642
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
643
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
644
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
645
+ # Deserialize Response
646
+ if status_code == 200
647
+ begin
648
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
649
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterListResult.mapper()
650
+ result.body = @client.deserialize(result_mapper, parsed_response)
651
+ rescue Exception => e
652
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
653
+ end
654
+ end
655
+
656
+ result
657
+ end
658
+
659
+ promise.execute
660
+ end
661
+
662
+ #
663
+ # Lists eligible SKUs for Kusto resource provider.
664
+ #
665
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
666
+ # will be added to the HTTP request.
667
+ #
668
+ # @return [SkuDescriptionList] operation results.
669
+ #
670
+ def list_skus(custom_headers:nil)
671
+ response = list_skus_async(custom_headers:custom_headers).value!
672
+ response.body unless response.nil?
673
+ end
674
+
675
+ #
676
+ # Lists eligible SKUs for Kusto resource provider.
677
+ #
678
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
679
+ # will be added to the HTTP request.
680
+ #
681
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
682
+ #
683
+ def list_skus_with_http_info(custom_headers:nil)
684
+ list_skus_async(custom_headers:custom_headers).value!
685
+ end
686
+
687
+ #
688
+ # Lists eligible SKUs for Kusto resource provider.
689
+ #
690
+ # @param [Hash{String => String}] A hash of custom headers that will be added
691
+ # to the HTTP request.
692
+ #
693
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
694
+ #
695
+ def list_skus_async(custom_headers:nil)
696
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
697
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
698
+
699
+
700
+ request_headers = {}
701
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
702
+
703
+ # Set Headers
704
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
705
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
706
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus'
707
+
708
+ request_url = @base_url || @client.base_url
709
+
710
+ options = {
711
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
712
+ path_params: {'subscriptionId' => @client.subscription_id},
713
+ query_params: {'api-version' => @client.api_version},
714
+ headers: request_headers.merge(custom_headers || {}),
715
+ base_url: request_url
716
+ }
717
+ promise = @client.make_request_async(:get, path_template, options)
718
+
719
+ promise = promise.then do |result|
720
+ http_response = result.response
721
+ status_code = http_response.status
722
+ response_content = http_response.body
723
+ unless status_code == 200
724
+ error_model = JSON.load(response_content)
725
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
726
+ end
727
+
728
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
729
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
730
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
731
+ # Deserialize Response
732
+ if status_code == 200
733
+ begin
734
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
735
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::SkuDescriptionList.mapper()
736
+ result.body = @client.deserialize(result_mapper, parsed_response)
737
+ rescue Exception => e
738
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
739
+ end
740
+ end
741
+
742
+ result
743
+ end
744
+
745
+ promise.execute
746
+ end
747
+
748
+ #
749
+ # Checks that the cluster name is valid and is not already in use.
750
+ #
751
+ # @param location [String] Azure location.
752
+ # @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
753
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
754
+ # will be added to the HTTP request.
755
+ #
756
+ # @return [CheckNameResult] operation results.
757
+ #
758
+ def check_name_availability(location, cluster_name, custom_headers:nil)
759
+ response = check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value!
760
+ response.body unless response.nil?
761
+ end
762
+
763
+ #
764
+ # Checks that the cluster name is valid and is not already in use.
765
+ #
766
+ # @param location [String] Azure location.
767
+ # @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
768
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
769
+ # will be added to the HTTP request.
770
+ #
771
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
772
+ #
773
+ def check_name_availability_with_http_info(location, cluster_name, custom_headers:nil)
774
+ check_name_availability_async(location, cluster_name, custom_headers:custom_headers).value!
775
+ end
776
+
777
+ #
778
+ # Checks that the cluster name is valid and is not already in use.
779
+ #
780
+ # @param location [String] Azure location.
781
+ # @param cluster_name [ClusterCheckNameRequest] The name of the cluster.
782
+ # @param [Hash{String => String}] A hash of custom headers that will be added
783
+ # to the HTTP request.
784
+ #
785
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
786
+ #
787
+ def check_name_availability_async(location, cluster_name, custom_headers:nil)
788
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
789
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
790
+ fail ArgumentError, 'location is nil' if location.nil?
791
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
792
+
793
+
794
+ request_headers = {}
795
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
796
+
797
+ # Set Headers
798
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
799
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
800
+
801
+ # Serialize Request
802
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterCheckNameRequest.mapper()
803
+ request_content = @client.serialize(request_mapper, cluster_name)
804
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
805
+
806
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability'
807
+
808
+ request_url = @base_url || @client.base_url
809
+
810
+ options = {
811
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
812
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
813
+ query_params: {'api-version' => @client.api_version},
814
+ body: request_content,
815
+ headers: request_headers.merge(custom_headers || {}),
816
+ base_url: request_url
817
+ }
818
+ promise = @client.make_request_async(:post, path_template, options)
819
+
820
+ promise = promise.then do |result|
821
+ http_response = result.response
822
+ status_code = http_response.status
823
+ response_content = http_response.body
824
+ unless status_code == 200
825
+ error_model = JSON.load(response_content)
826
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
827
+ end
828
+
829
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
830
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
831
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
832
+ # Deserialize Response
833
+ if status_code == 200
834
+ begin
835
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
836
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::CheckNameResult.mapper()
837
+ result.body = @client.deserialize(result_mapper, parsed_response)
838
+ rescue Exception => e
839
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
840
+ end
841
+ end
842
+
843
+ result
844
+ end
845
+
846
+ promise.execute
847
+ end
848
+
849
+ #
850
+ # Returns the SKUs available for the provided resource.
851
+ #
852
+ # @param resource_group_name [String] The name of the resource group containing
853
+ # the Kusto cluster.
854
+ # @param cluster_name [String] The name of the Kusto cluster.
855
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
856
+ # will be added to the HTTP request.
857
+ #
858
+ # @return [ListResourceSkusResult] operation results.
859
+ #
860
+ def list_skus_by_resource(resource_group_name, cluster_name, custom_headers:nil)
861
+ response = list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
862
+ response.body unless response.nil?
863
+ end
864
+
865
+ #
866
+ # Returns the SKUs available for the provided resource.
867
+ #
868
+ # @param resource_group_name [String] The name of the resource group containing
869
+ # the Kusto cluster.
870
+ # @param cluster_name [String] The name of the Kusto cluster.
871
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
872
+ # will be added to the HTTP request.
873
+ #
874
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
875
+ #
876
+ def list_skus_by_resource_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
877
+ list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
878
+ end
879
+
880
+ #
881
+ # Returns the SKUs available for the provided resource.
882
+ #
883
+ # @param resource_group_name [String] The name of the resource group containing
884
+ # the Kusto cluster.
885
+ # @param cluster_name [String] The name of the Kusto cluster.
886
+ # @param [Hash{String => String}] A hash of custom headers that will be added
887
+ # to the HTTP request.
888
+ #
889
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
890
+ #
891
+ def list_skus_by_resource_async(resource_group_name, cluster_name, custom_headers:nil)
892
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
893
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
894
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
895
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
896
+
897
+
898
+ request_headers = {}
899
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
900
+
901
+ # Set Headers
902
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
903
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
904
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus'
905
+
906
+ request_url = @base_url || @client.base_url
907
+
908
+ options = {
909
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
910
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
911
+ query_params: {'api-version' => @client.api_version},
912
+ headers: request_headers.merge(custom_headers || {}),
913
+ base_url: request_url
914
+ }
915
+ promise = @client.make_request_async(:get, path_template, options)
916
+
917
+ promise = promise.then do |result|
918
+ http_response = result.response
919
+ status_code = http_response.status
920
+ response_content = http_response.body
921
+ unless status_code == 200
922
+ error_model = JSON.load(response_content)
923
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
924
+ end
925
+
926
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
927
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
928
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
929
+ # Deserialize Response
930
+ if status_code == 200
931
+ begin
932
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
933
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ListResourceSkusResult.mapper()
934
+ result.body = @client.deserialize(result_mapper, parsed_response)
935
+ rescue Exception => e
936
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
937
+ end
938
+ end
939
+
940
+ result
941
+ end
942
+
943
+ promise.execute
944
+ end
945
+
946
+ #
947
+ # Create or update a Kusto cluster.
948
+ #
949
+ # @param resource_group_name [String] The name of the resource group containing
950
+ # the Kusto cluster.
951
+ # @param cluster_name [String] The name of the Kusto cluster.
952
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
953
+ # CreateOrUpdate operation.
954
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
955
+ # will be added to the HTTP request.
956
+ #
957
+ # @return [Cluster] operation results.
958
+ #
959
+ def begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
960
+ response = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
961
+ response.body unless response.nil?
962
+ end
963
+
964
+ #
965
+ # Create or update a Kusto cluster.
966
+ #
967
+ # @param resource_group_name [String] The name of the resource group containing
968
+ # the Kusto cluster.
969
+ # @param cluster_name [String] The name of the Kusto cluster.
970
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
971
+ # CreateOrUpdate operation.
972
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
973
+ # will be added to the HTTP request.
974
+ #
975
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
976
+ #
977
+ def begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
978
+ begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
979
+ end
980
+
981
+ #
982
+ # Create or update a Kusto cluster.
983
+ #
984
+ # @param resource_group_name [String] The name of the resource group containing
985
+ # the Kusto cluster.
986
+ # @param cluster_name [String] The name of the Kusto cluster.
987
+ # @param parameters [Cluster] The Kusto cluster parameters supplied to the
988
+ # CreateOrUpdate operation.
989
+ # @param [Hash{String => String}] A hash of custom headers that will be added
990
+ # to the HTTP request.
991
+ #
992
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
993
+ #
994
+ def begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
995
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
996
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
997
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
998
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
999
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1000
+
1001
+
1002
+ request_headers = {}
1003
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1004
+
1005
+ # Set Headers
1006
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1007
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1008
+
1009
+ # Serialize Request
1010
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
1011
+ request_content = @client.serialize(request_mapper, parameters)
1012
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1013
+
1014
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
1015
+
1016
+ request_url = @base_url || @client.base_url
1017
+
1018
+ options = {
1019
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1020
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1021
+ query_params: {'api-version' => @client.api_version},
1022
+ body: request_content,
1023
+ headers: request_headers.merge(custom_headers || {}),
1024
+ base_url: request_url
1025
+ }
1026
+ promise = @client.make_request_async(:put, path_template, options)
1027
+
1028
+ promise = promise.then do |result|
1029
+ http_response = result.response
1030
+ status_code = http_response.status
1031
+ response_content = http_response.body
1032
+ unless status_code == 200 || status_code == 201
1033
+ error_model = JSON.load(response_content)
1034
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1035
+ end
1036
+
1037
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1038
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1039
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1040
+ # Deserialize Response
1041
+ if status_code == 200
1042
+ begin
1043
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1044
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
1045
+ result.body = @client.deserialize(result_mapper, parsed_response)
1046
+ rescue Exception => e
1047
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1048
+ end
1049
+ end
1050
+ # Deserialize Response
1051
+ if status_code == 201
1052
+ begin
1053
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1054
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
1055
+ result.body = @client.deserialize(result_mapper, parsed_response)
1056
+ rescue Exception => e
1057
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1058
+ end
1059
+ end
1060
+
1061
+ result
1062
+ end
1063
+
1064
+ promise.execute
1065
+ end
1066
+
1067
+ #
1068
+ # Update a Kusto cluster.
1069
+ #
1070
+ # @param resource_group_name [String] The name of the resource group containing
1071
+ # the Kusto cluster.
1072
+ # @param cluster_name [String] The name of the Kusto cluster.
1073
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
1074
+ # the Update 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 [Cluster] operation results.
1079
+ #
1080
+ def begin_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
1081
+ response = begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
1082
+ response.body unless response.nil?
1083
+ end
1084
+
1085
+ #
1086
+ # Update a Kusto cluster.
1087
+ #
1088
+ # @param resource_group_name [String] The name of the resource group containing
1089
+ # the Kusto cluster.
1090
+ # @param cluster_name [String] The name of the Kusto cluster.
1091
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
1092
+ # the Update operation.
1093
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1094
+ # will be added to the HTTP request.
1095
+ #
1096
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1097
+ #
1098
+ def begin_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
1099
+ begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
1100
+ end
1101
+
1102
+ #
1103
+ # Update a Kusto cluster.
1104
+ #
1105
+ # @param resource_group_name [String] The name of the resource group containing
1106
+ # the Kusto cluster.
1107
+ # @param cluster_name [String] The name of the Kusto cluster.
1108
+ # @param parameters [ClusterUpdate] The Kusto cluster parameters supplied to
1109
+ # the Update operation.
1110
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1111
+ # to the HTTP request.
1112
+ #
1113
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1114
+ #
1115
+ def begin_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
1116
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1117
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1118
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1119
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1120
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1121
+
1122
+
1123
+ request_headers = {}
1124
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1125
+
1126
+ # Set Headers
1127
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1128
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1129
+
1130
+ # Serialize Request
1131
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::ClusterUpdate.mapper()
1132
+ request_content = @client.serialize(request_mapper, parameters)
1133
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1134
+
1135
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
1136
+
1137
+ request_url = @base_url || @client.base_url
1138
+
1139
+ options = {
1140
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1141
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1142
+ query_params: {'api-version' => @client.api_version},
1143
+ body: request_content,
1144
+ headers: request_headers.merge(custom_headers || {}),
1145
+ base_url: request_url
1146
+ }
1147
+ promise = @client.make_request_async(:patch, path_template, options)
1148
+
1149
+ promise = promise.then do |result|
1150
+ http_response = result.response
1151
+ status_code = http_response.status
1152
+ response_content = http_response.body
1153
+ unless status_code == 200 || status_code == 201 || status_code == 202
1154
+ error_model = JSON.load(response_content)
1155
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1156
+ end
1157
+
1158
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1159
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1160
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1161
+ # Deserialize Response
1162
+ if status_code == 200
1163
+ begin
1164
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1165
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
1166
+ result.body = @client.deserialize(result_mapper, parsed_response)
1167
+ rescue Exception => e
1168
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1169
+ end
1170
+ end
1171
+ # Deserialize Response
1172
+ if status_code == 201
1173
+ begin
1174
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1175
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
1176
+ result.body = @client.deserialize(result_mapper, parsed_response)
1177
+ rescue Exception => e
1178
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1179
+ end
1180
+ end
1181
+ # Deserialize Response
1182
+ if status_code == 202
1183
+ begin
1184
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1185
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::Cluster.mapper()
1186
+ result.body = @client.deserialize(result_mapper, parsed_response)
1187
+ rescue Exception => e
1188
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1189
+ end
1190
+ end
1191
+
1192
+ result
1193
+ end
1194
+
1195
+ promise.execute
1196
+ end
1197
+
1198
+ #
1199
+ # Deletes a Kusto cluster.
1200
+ #
1201
+ # @param resource_group_name [String] The name of the resource group containing
1202
+ # the Kusto cluster.
1203
+ # @param cluster_name [String] The name of the Kusto cluster.
1204
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1205
+ # will be added to the HTTP request.
1206
+ #
1207
+ #
1208
+ def begin_delete(resource_group_name, cluster_name, custom_headers:nil)
1209
+ response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1210
+ nil
1211
+ end
1212
+
1213
+ #
1214
+ # Deletes a Kusto cluster.
1215
+ #
1216
+ # @param resource_group_name [String] The name of the resource group containing
1217
+ # the Kusto cluster.
1218
+ # @param cluster_name [String] The name of the Kusto cluster.
1219
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1220
+ # will be added to the HTTP request.
1221
+ #
1222
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1223
+ #
1224
+ def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
1225
+ begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1226
+ end
1227
+
1228
+ #
1229
+ # Deletes a Kusto cluster.
1230
+ #
1231
+ # @param resource_group_name [String] The name of the resource group containing
1232
+ # the Kusto cluster.
1233
+ # @param cluster_name [String] The name of the Kusto cluster.
1234
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1235
+ # to the HTTP request.
1236
+ #
1237
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1238
+ #
1239
+ def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil)
1240
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1241
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1242
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1243
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1244
+
1245
+
1246
+ request_headers = {}
1247
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1248
+
1249
+ # Set Headers
1250
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1251
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1252
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}'
1253
+
1254
+ request_url = @base_url || @client.base_url
1255
+
1256
+ options = {
1257
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1258
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1259
+ query_params: {'api-version' => @client.api_version},
1260
+ headers: request_headers.merge(custom_headers || {}),
1261
+ base_url: request_url
1262
+ }
1263
+ promise = @client.make_request_async(:delete, path_template, options)
1264
+
1265
+ promise = promise.then do |result|
1266
+ http_response = result.response
1267
+ status_code = http_response.status
1268
+ response_content = http_response.body
1269
+ unless status_code == 200 || status_code == 202 || status_code == 204
1270
+ error_model = JSON.load(response_content)
1271
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1272
+ end
1273
+
1274
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1275
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1276
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1277
+
1278
+ result
1279
+ end
1280
+
1281
+ promise.execute
1282
+ end
1283
+
1284
+ #
1285
+ # Stops a Kusto cluster.
1286
+ #
1287
+ # @param resource_group_name [String] The name of the resource group containing
1288
+ # the Kusto cluster.
1289
+ # @param cluster_name [String] The name of the Kusto cluster.
1290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1291
+ # will be added to the HTTP request.
1292
+ #
1293
+ #
1294
+ def begin_stop(resource_group_name, cluster_name, custom_headers:nil)
1295
+ response = begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1296
+ nil
1297
+ end
1298
+
1299
+ #
1300
+ # Stops a Kusto cluster.
1301
+ #
1302
+ # @param resource_group_name [String] The name of the resource group containing
1303
+ # the Kusto cluster.
1304
+ # @param cluster_name [String] The name of the Kusto cluster.
1305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1306
+ # will be added to the HTTP request.
1307
+ #
1308
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1309
+ #
1310
+ def begin_stop_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
1311
+ begin_stop_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1312
+ end
1313
+
1314
+ #
1315
+ # Stops a Kusto cluster.
1316
+ #
1317
+ # @param resource_group_name [String] The name of the resource group containing
1318
+ # the Kusto cluster.
1319
+ # @param cluster_name [String] The name of the Kusto cluster.
1320
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1321
+ # to the HTTP request.
1322
+ #
1323
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1324
+ #
1325
+ def begin_stop_async(resource_group_name, cluster_name, custom_headers:nil)
1326
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1327
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1328
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1329
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1330
+
1331
+
1332
+ request_headers = {}
1333
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1334
+
1335
+ # Set Headers
1336
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1337
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1338
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop'
1339
+
1340
+ request_url = @base_url || @client.base_url
1341
+
1342
+ options = {
1343
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1344
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1345
+ query_params: {'api-version' => @client.api_version},
1346
+ headers: request_headers.merge(custom_headers || {}),
1347
+ base_url: request_url
1348
+ }
1349
+ promise = @client.make_request_async(:post, path_template, options)
1350
+
1351
+ promise = promise.then do |result|
1352
+ http_response = result.response
1353
+ status_code = http_response.status
1354
+ response_content = http_response.body
1355
+ unless status_code == 200 || status_code == 202
1356
+ error_model = JSON.load(response_content)
1357
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1358
+ end
1359
+
1360
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1361
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1362
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1363
+
1364
+ result
1365
+ end
1366
+
1367
+ promise.execute
1368
+ end
1369
+
1370
+ #
1371
+ # Starts a Kusto cluster.
1372
+ #
1373
+ # @param resource_group_name [String] The name of the resource group containing
1374
+ # the Kusto cluster.
1375
+ # @param cluster_name [String] The name of the Kusto cluster.
1376
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1377
+ # will be added to the HTTP request.
1378
+ #
1379
+ #
1380
+ def begin_start(resource_group_name, cluster_name, custom_headers:nil)
1381
+ response = begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1382
+ nil
1383
+ end
1384
+
1385
+ #
1386
+ # Starts a Kusto cluster.
1387
+ #
1388
+ # @param resource_group_name [String] The name of the resource group containing
1389
+ # the Kusto cluster.
1390
+ # @param cluster_name [String] The name of the Kusto cluster.
1391
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1392
+ # will be added to the HTTP request.
1393
+ #
1394
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1395
+ #
1396
+ def begin_start_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
1397
+ begin_start_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1398
+ end
1399
+
1400
+ #
1401
+ # Starts a Kusto cluster.
1402
+ #
1403
+ # @param resource_group_name [String] The name of the resource group containing
1404
+ # the Kusto cluster.
1405
+ # @param cluster_name [String] The name of the Kusto cluster.
1406
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1407
+ # to the HTTP request.
1408
+ #
1409
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1410
+ #
1411
+ def begin_start_async(resource_group_name, cluster_name, custom_headers:nil)
1412
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1413
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1414
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1415
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1416
+
1417
+
1418
+ request_headers = {}
1419
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1420
+
1421
+ # Set Headers
1422
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1423
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1424
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start'
1425
+
1426
+ request_url = @base_url || @client.base_url
1427
+
1428
+ options = {
1429
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1430
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1431
+ query_params: {'api-version' => @client.api_version},
1432
+ headers: request_headers.merge(custom_headers || {}),
1433
+ base_url: request_url
1434
+ }
1435
+ promise = @client.make_request_async(:post, path_template, options)
1436
+
1437
+ promise = promise.then do |result|
1438
+ http_response = result.response
1439
+ status_code = http_response.status
1440
+ response_content = http_response.body
1441
+ unless status_code == 200 || status_code == 202
1442
+ error_model = JSON.load(response_content)
1443
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1444
+ end
1445
+
1446
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1447
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1448
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1449
+
1450
+ result
1451
+ end
1452
+
1453
+ promise.execute
1454
+ end
1455
+
1456
+ #
1457
+ # Detaches all followers of a database owned by this cluster.
1458
+ #
1459
+ # @param resource_group_name [String] The name of the resource group containing
1460
+ # the Kusto cluster.
1461
+ # @param cluster_name [String] The name of the Kusto cluster.
1462
+ # @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
1463
+ # databases properties to remove.
1464
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1465
+ # will be added to the HTTP request.
1466
+ #
1467
+ #
1468
+ def begin_detach_follower_databases(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
1469
+ response = begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value!
1470
+ nil
1471
+ end
1472
+
1473
+ #
1474
+ # Detaches all followers of a database owned by this cluster.
1475
+ #
1476
+ # @param resource_group_name [String] The name of the resource group containing
1477
+ # the Kusto cluster.
1478
+ # @param cluster_name [String] The name of the Kusto cluster.
1479
+ # @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
1480
+ # databases properties to remove.
1481
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1482
+ # will be added to the HTTP request.
1483
+ #
1484
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1485
+ #
1486
+ def begin_detach_follower_databases_with_http_info(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
1487
+ begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:custom_headers).value!
1488
+ end
1489
+
1490
+ #
1491
+ # Detaches all followers of a database owned by this cluster.
1492
+ #
1493
+ # @param resource_group_name [String] The name of the resource group containing
1494
+ # the Kusto cluster.
1495
+ # @param cluster_name [String] The name of the Kusto cluster.
1496
+ # @param follower_database_to_remove [FollowerDatabaseDefinition] The follower
1497
+ # databases properties to remove.
1498
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1499
+ # to the HTTP request.
1500
+ #
1501
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1502
+ #
1503
+ def begin_detach_follower_databases_async(resource_group_name, cluster_name, follower_database_to_remove, custom_headers:nil)
1504
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1505
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
1506
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1507
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1508
+ fail ArgumentError, 'follower_database_to_remove is nil' if follower_database_to_remove.nil?
1509
+
1510
+
1511
+ request_headers = {}
1512
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1513
+
1514
+ # Set Headers
1515
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1516
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1517
+
1518
+ # Serialize Request
1519
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::FollowerDatabaseDefinition.mapper()
1520
+ request_content = @client.serialize(request_mapper, follower_database_to_remove)
1521
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1522
+
1523
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases'
1524
+
1525
+ request_url = @base_url || @client.base_url
1526
+
1527
+ options = {
1528
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1529
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
1530
+ query_params: {'api-version' => @client.api_version},
1531
+ body: request_content,
1532
+ headers: request_headers.merge(custom_headers || {}),
1533
+ base_url: request_url
1534
+ }
1535
+ promise = @client.make_request_async(:post, path_template, options)
1536
+
1537
+ promise = promise.then do |result|
1538
+ http_response = result.response
1539
+ status_code = http_response.status
1540
+ response_content = http_response.body
1541
+ unless status_code == 200 || status_code == 202
1542
+ error_model = JSON.load(response_content)
1543
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1544
+ end
1545
+
1546
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1547
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1548
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1549
+
1550
+ result
1551
+ end
1552
+
1553
+ promise.execute
1554
+ end
1555
+
1556
+ end
1557
+ end