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,983 @@
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 DataConnections
13
+ include MsRestAzure
14
+
15
+ #
16
+ # Creates and initializes a new instance of the DataConnections 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
+ # Returns the list of data connections of the given Kusto database.
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 database_name [String] The name of the database in the Kusto cluster.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [DataConnectionListResult] operation results.
37
+ #
38
+ def list_by_database(resource_group_name, cluster_name, database_name, custom_headers:nil)
39
+ response = list_by_database_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Returns the list of data connections of the given Kusto database.
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group containing
47
+ # the Kusto cluster.
48
+ # @param cluster_name [String] The name of the Kusto cluster.
49
+ # @param database_name [String] The name of the database in the Kusto cluster.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_by_database_with_http_info(resource_group_name, cluster_name, database_name, custom_headers:nil)
56
+ list_by_database_async(resource_group_name, cluster_name, database_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Returns the list of data connections of the given Kusto database.
61
+ #
62
+ # @param resource_group_name [String] The name of the resource group containing
63
+ # the Kusto cluster.
64
+ # @param cluster_name [String] The name of the Kusto cluster.
65
+ # @param database_name [String] The name of the database in the Kusto cluster.
66
+ # @param [Hash{String => String}] A hash of custom headers that will be added
67
+ # to the HTTP request.
68
+ #
69
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
70
+ #
71
+ def list_by_database_async(resource_group_name, cluster_name, database_name, custom_headers:nil)
72
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
74
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
75
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnectionListResult.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Checks that the data connection parameters are valid.
129
+ #
130
+ # @param resource_group_name [String] The name of the resource group containing
131
+ # the Kusto cluster.
132
+ # @param cluster_name [String] The name of the Kusto cluster.
133
+ # @param database_name [String] The name of the database in the Kusto cluster.
134
+ # @param parameters [DataConnectionValidation] The data connection parameters
135
+ # supplied to the CreateOrUpdate operation.
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [DataConnectionValidationListResult] operation results.
140
+ #
141
+ def data_connection_validation_method(resource_group_name, cluster_name, database_name, parameters, custom_headers:nil)
142
+ response = data_connection_validation_method_async(resource_group_name, cluster_name, database_name, parameters, custom_headers:custom_headers).value!
143
+ response.body unless response.nil?
144
+ end
145
+
146
+ #
147
+ # Checks that the data connection parameters are valid.
148
+ #
149
+ # @param resource_group_name [String] The name of the resource group containing
150
+ # the Kusto cluster.
151
+ # @param cluster_name [String] The name of the Kusto cluster.
152
+ # @param database_name [String] The name of the database in the Kusto cluster.
153
+ # @param parameters [DataConnectionValidation] The data connection parameters
154
+ # supplied to the CreateOrUpdate operation.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
159
+ #
160
+ def data_connection_validation_method_with_http_info(resource_group_name, cluster_name, database_name, parameters, custom_headers:nil)
161
+ data_connection_validation_method_async(resource_group_name, cluster_name, database_name, parameters, custom_headers:custom_headers).value!
162
+ end
163
+
164
+ #
165
+ # Checks that the data connection parameters are valid.
166
+ #
167
+ # @param resource_group_name [String] The name of the resource group containing
168
+ # the Kusto cluster.
169
+ # @param cluster_name [String] The name of the Kusto cluster.
170
+ # @param database_name [String] The name of the database in the Kusto cluster.
171
+ # @param parameters [DataConnectionValidation] The data connection parameters
172
+ # supplied to the CreateOrUpdate operation.
173
+ # @param [Hash{String => String}] A hash of custom headers that will be added
174
+ # to the HTTP request.
175
+ #
176
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
177
+ #
178
+ def data_connection_validation_method_async(resource_group_name, cluster_name, database_name, parameters, custom_headers:nil)
179
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
180
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
181
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
182
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
183
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
184
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
185
+
186
+
187
+ request_headers = {}
188
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
189
+
190
+ # Set Headers
191
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
192
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
193
+
194
+ # Serialize Request
195
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnectionValidation.mapper()
196
+ request_content = @client.serialize(request_mapper, parameters)
197
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
198
+
199
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation'
200
+
201
+ request_url = @base_url || @client.base_url
202
+
203
+ options = {
204
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
205
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id},
206
+ query_params: {'api-version' => @client.api_version},
207
+ body: request_content,
208
+ headers: request_headers.merge(custom_headers || {}),
209
+ base_url: request_url
210
+ }
211
+ promise = @client.make_request_async(:post, path_template, options)
212
+
213
+ promise = promise.then do |result|
214
+ http_response = result.response
215
+ status_code = http_response.status
216
+ response_content = http_response.body
217
+ unless status_code == 200
218
+ error_model = JSON.load(response_content)
219
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
220
+ end
221
+
222
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
223
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
224
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
225
+ # Deserialize Response
226
+ if status_code == 200
227
+ begin
228
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
229
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnectionValidationListResult.mapper()
230
+ result.body = @client.deserialize(result_mapper, parsed_response)
231
+ rescue Exception => e
232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
233
+ end
234
+ end
235
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Checks that the data connection name is valid and is not already in use.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group containing
246
+ # the Kusto cluster.
247
+ # @param cluster_name [String] The name of the Kusto cluster.
248
+ # @param database_name [String] The name of the database in the Kusto cluster.
249
+ # @param data_connection_name [DataConnectionCheckNameRequest] The name of the
250
+ # data connection.
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [CheckNameResult] operation results.
255
+ #
256
+ def check_name_availability(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
257
+ response = check_name_availability_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
258
+ response.body unless response.nil?
259
+ end
260
+
261
+ #
262
+ # Checks that the data connection name is valid and is not already in use.
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group containing
265
+ # the Kusto cluster.
266
+ # @param cluster_name [String] The name of the Kusto cluster.
267
+ # @param database_name [String] The name of the database in the Kusto cluster.
268
+ # @param data_connection_name [DataConnectionCheckNameRequest] The name of the
269
+ # data connection.
270
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
271
+ # will be added to the HTTP request.
272
+ #
273
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
274
+ #
275
+ def check_name_availability_with_http_info(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
276
+ check_name_availability_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
277
+ end
278
+
279
+ #
280
+ # Checks that the data connection name is valid and is not already in use.
281
+ #
282
+ # @param resource_group_name [String] The name of the resource group containing
283
+ # the Kusto cluster.
284
+ # @param cluster_name [String] The name of the Kusto cluster.
285
+ # @param database_name [String] The name of the database in the Kusto cluster.
286
+ # @param data_connection_name [DataConnectionCheckNameRequest] The name of the
287
+ # data connection.
288
+ # @param [Hash{String => String}] A hash of custom headers that will be added
289
+ # to the HTTP request.
290
+ #
291
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
292
+ #
293
+ def check_name_availability_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
294
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
295
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
296
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
297
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
298
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
299
+ fail ArgumentError, 'data_connection_name is nil' if data_connection_name.nil?
300
+
301
+
302
+ request_headers = {}
303
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
304
+
305
+ # Set Headers
306
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
307
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
308
+
309
+ # Serialize Request
310
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnectionCheckNameRequest.mapper()
311
+ request_content = @client.serialize(request_mapper, data_connection_name)
312
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
313
+
314
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability'
315
+
316
+ request_url = @base_url || @client.base_url
317
+
318
+ options = {
319
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
320
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id},
321
+ query_params: {'api-version' => @client.api_version},
322
+ body: request_content,
323
+ headers: request_headers.merge(custom_headers || {}),
324
+ base_url: request_url
325
+ }
326
+ promise = @client.make_request_async(:post, path_template, options)
327
+
328
+ promise = promise.then do |result|
329
+ http_response = result.response
330
+ status_code = http_response.status
331
+ response_content = http_response.body
332
+ unless status_code == 200
333
+ error_model = JSON.load(response_content)
334
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
335
+ end
336
+
337
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
338
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
339
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
340
+ # Deserialize Response
341
+ if status_code == 200
342
+ begin
343
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
344
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::CheckNameResult.mapper()
345
+ result.body = @client.deserialize(result_mapper, parsed_response)
346
+ rescue Exception => e
347
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
348
+ end
349
+ end
350
+
351
+ result
352
+ end
353
+
354
+ promise.execute
355
+ end
356
+
357
+ #
358
+ # Returns a data connection.
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 database_name [String] The name of the database in the Kusto cluster.
364
+ # @param data_connection_name [String] The name of the data connection.
365
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
366
+ # will be added to the HTTP request.
367
+ #
368
+ # @return [DataConnection] operation results.
369
+ #
370
+ def get(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
371
+ response = get_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
372
+ response.body unless response.nil?
373
+ end
374
+
375
+ #
376
+ # Returns a data connection.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group containing
379
+ # the Kusto cluster.
380
+ # @param cluster_name [String] The name of the Kusto cluster.
381
+ # @param database_name [String] The name of the database in the Kusto cluster.
382
+ # @param data_connection_name [String] The name of the data connection.
383
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
384
+ # will be added to the HTTP request.
385
+ #
386
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
387
+ #
388
+ def get_with_http_info(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
389
+ get_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
390
+ end
391
+
392
+ #
393
+ # Returns a data connection.
394
+ #
395
+ # @param resource_group_name [String] The name of the resource group containing
396
+ # the Kusto cluster.
397
+ # @param cluster_name [String] The name of the Kusto cluster.
398
+ # @param database_name [String] The name of the database in the Kusto cluster.
399
+ # @param data_connection_name [String] The name of the data connection.
400
+ # @param [Hash{String => String}] A hash of custom headers that will be added
401
+ # to the HTTP request.
402
+ #
403
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
404
+ #
405
+ def get_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
406
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
407
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
408
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
409
+ fail ArgumentError, 'data_connection_name is nil' if data_connection_name.nil?
410
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
411
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
412
+
413
+
414
+ request_headers = {}
415
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
416
+
417
+ # Set Headers
418
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
419
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
420
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}'
421
+
422
+ request_url = @base_url || @client.base_url
423
+
424
+ options = {
425
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
426
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'dataConnectionName' => data_connection_name,'subscriptionId' => @client.subscription_id},
427
+ query_params: {'api-version' => @client.api_version},
428
+ headers: request_headers.merge(custom_headers || {}),
429
+ base_url: request_url
430
+ }
431
+ promise = @client.make_request_async(:get, path_template, options)
432
+
433
+ promise = promise.then do |result|
434
+ http_response = result.response
435
+ status_code = http_response.status
436
+ response_content = http_response.body
437
+ unless status_code == 200
438
+ error_model = JSON.load(response_content)
439
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
440
+ end
441
+
442
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
443
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
444
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
445
+ # Deserialize Response
446
+ if status_code == 200
447
+ begin
448
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
449
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
450
+ result.body = @client.deserialize(result_mapper, parsed_response)
451
+ rescue Exception => e
452
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
453
+ end
454
+ end
455
+
456
+ result
457
+ end
458
+
459
+ promise.execute
460
+ end
461
+
462
+ #
463
+ # Creates or updates a data connection.
464
+ #
465
+ # @param resource_group_name [String] The name of the resource group containing
466
+ # the Kusto cluster.
467
+ # @param cluster_name [String] The name of the Kusto cluster.
468
+ # @param database_name [String] The name of the database in the Kusto cluster.
469
+ # @param data_connection_name [String] The name of the data connection.
470
+ # @param parameters [DataConnection] The data connection parameters supplied to
471
+ # the CreateOrUpdate operation.
472
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
473
+ # will be added to the HTTP request.
474
+ #
475
+ # @return [DataConnection] operation results.
476
+ #
477
+ def create_or_update(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
478
+ response = create_or_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers).value!
479
+ response.body unless response.nil?
480
+ end
481
+
482
+ #
483
+ # @param resource_group_name [String] The name of the resource group containing
484
+ # the Kusto cluster.
485
+ # @param cluster_name [String] The name of the Kusto cluster.
486
+ # @param database_name [String] The name of the database in the Kusto cluster.
487
+ # @param data_connection_name [String] The name of the data connection.
488
+ # @param parameters [DataConnection] The data connection parameters supplied to
489
+ # the CreateOrUpdate operation.
490
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
491
+ # will be added to the HTTP request.
492
+ #
493
+ # @return [Concurrent::Promise] promise which provides async access to http
494
+ # response.
495
+ #
496
+ def create_or_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
497
+ # Send request
498
+ promise = begin_create_or_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers)
499
+
500
+ promise = promise.then do |response|
501
+ # Defining deserialization method.
502
+ deserialize_method = lambda do |parsed_response|
503
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
504
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
505
+ end
506
+
507
+ # Waiting for response.
508
+ @client.get_long_running_operation_result(response, deserialize_method)
509
+ end
510
+
511
+ promise
512
+ end
513
+
514
+ #
515
+ # Updates a data connection.
516
+ #
517
+ # @param resource_group_name [String] The name of the resource group containing
518
+ # the Kusto cluster.
519
+ # @param cluster_name [String] The name of the Kusto cluster.
520
+ # @param database_name [String] The name of the database in the Kusto cluster.
521
+ # @param data_connection_name [String] The name of the data connection.
522
+ # @param parameters [DataConnection] The data connection parameters supplied to
523
+ # the Update operation.
524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
525
+ # will be added to the HTTP request.
526
+ #
527
+ # @return [DataConnection] operation results.
528
+ #
529
+ def update(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
530
+ response = update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers).value!
531
+ response.body unless response.nil?
532
+ end
533
+
534
+ #
535
+ # @param resource_group_name [String] The name of the resource group containing
536
+ # the Kusto cluster.
537
+ # @param cluster_name [String] The name of the Kusto cluster.
538
+ # @param database_name [String] The name of the database in the Kusto cluster.
539
+ # @param data_connection_name [String] The name of the data connection.
540
+ # @param parameters [DataConnection] The data connection parameters supplied to
541
+ # the Update operation.
542
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
543
+ # will be added to the HTTP request.
544
+ #
545
+ # @return [Concurrent::Promise] promise which provides async access to http
546
+ # response.
547
+ #
548
+ def update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
549
+ # Send request
550
+ promise = begin_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers)
551
+
552
+ promise = promise.then do |response|
553
+ # Defining deserialization method.
554
+ deserialize_method = lambda do |parsed_response|
555
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
556
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
557
+ end
558
+
559
+ # Waiting for response.
560
+ @client.get_long_running_operation_result(response, deserialize_method)
561
+ end
562
+
563
+ promise
564
+ end
565
+
566
+ #
567
+ # Deletes the data connection with the given name.
568
+ #
569
+ # @param resource_group_name [String] The name of the resource group containing
570
+ # the Kusto cluster.
571
+ # @param cluster_name [String] The name of the Kusto cluster.
572
+ # @param database_name [String] The name of the database in the Kusto cluster.
573
+ # @param data_connection_name [String] The name of the data connection.
574
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
575
+ # will be added to the HTTP request.
576
+ #
577
+ def delete(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
578
+ response = delete_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
579
+ nil
580
+ end
581
+
582
+ #
583
+ # @param resource_group_name [String] The name of the resource group containing
584
+ # the Kusto cluster.
585
+ # @param cluster_name [String] The name of the Kusto cluster.
586
+ # @param database_name [String] The name of the database in the Kusto cluster.
587
+ # @param data_connection_name [String] The name of the data connection.
588
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
589
+ # will be added to the HTTP request.
590
+ #
591
+ # @return [Concurrent::Promise] promise which provides async access to http
592
+ # response.
593
+ #
594
+ def delete_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
595
+ # Send request
596
+ promise = begin_delete_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers)
597
+
598
+ promise = promise.then do |response|
599
+ # Defining deserialization method.
600
+ deserialize_method = lambda do |parsed_response|
601
+ end
602
+
603
+ # Waiting for response.
604
+ @client.get_long_running_operation_result(response, deserialize_method)
605
+ end
606
+
607
+ promise
608
+ end
609
+
610
+ #
611
+ # Creates or updates a data connection.
612
+ #
613
+ # @param resource_group_name [String] The name of the resource group containing
614
+ # the Kusto cluster.
615
+ # @param cluster_name [String] The name of the Kusto cluster.
616
+ # @param database_name [String] The name of the database in the Kusto cluster.
617
+ # @param data_connection_name [String] The name of the data connection.
618
+ # @param parameters [DataConnection] The data connection parameters supplied to
619
+ # the CreateOrUpdate operation.
620
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
621
+ # will be added to the HTTP request.
622
+ #
623
+ # @return [DataConnection] operation results.
624
+ #
625
+ def begin_create_or_update(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
626
+ response = begin_create_or_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers).value!
627
+ response.body unless response.nil?
628
+ end
629
+
630
+ #
631
+ # Creates or updates a data connection.
632
+ #
633
+ # @param resource_group_name [String] The name of the resource group containing
634
+ # the Kusto cluster.
635
+ # @param cluster_name [String] The name of the Kusto cluster.
636
+ # @param database_name [String] The name of the database in the Kusto cluster.
637
+ # @param data_connection_name [String] The name of the data connection.
638
+ # @param parameters [DataConnection] The data connection parameters supplied to
639
+ # the CreateOrUpdate operation.
640
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
641
+ # will be added to the HTTP request.
642
+ #
643
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
644
+ #
645
+ def begin_create_or_update_with_http_info(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
646
+ begin_create_or_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers).value!
647
+ end
648
+
649
+ #
650
+ # Creates or updates a data connection.
651
+ #
652
+ # @param resource_group_name [String] The name of the resource group containing
653
+ # the Kusto cluster.
654
+ # @param cluster_name [String] The name of the Kusto cluster.
655
+ # @param database_name [String] The name of the database in the Kusto cluster.
656
+ # @param data_connection_name [String] The name of the data connection.
657
+ # @param parameters [DataConnection] The data connection parameters supplied to
658
+ # the CreateOrUpdate operation.
659
+ # @param [Hash{String => String}] A hash of custom headers that will be added
660
+ # to the HTTP request.
661
+ #
662
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
663
+ #
664
+ def begin_create_or_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
665
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
666
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
667
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
668
+ fail ArgumentError, 'data_connection_name is nil' if data_connection_name.nil?
669
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
670
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
671
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
672
+
673
+
674
+ request_headers = {}
675
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
676
+
677
+ # Set Headers
678
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
679
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
680
+
681
+ # Serialize Request
682
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
683
+ request_content = @client.serialize(request_mapper, parameters)
684
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
685
+
686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}'
687
+
688
+ request_url = @base_url || @client.base_url
689
+
690
+ options = {
691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
692
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'dataConnectionName' => data_connection_name,'subscriptionId' => @client.subscription_id},
693
+ query_params: {'api-version' => @client.api_version},
694
+ body: request_content,
695
+ headers: request_headers.merge(custom_headers || {}),
696
+ base_url: request_url
697
+ }
698
+ promise = @client.make_request_async(:put, path_template, options)
699
+
700
+ promise = promise.then do |result|
701
+ http_response = result.response
702
+ status_code = http_response.status
703
+ response_content = http_response.body
704
+ unless status_code == 200 || status_code == 201 || status_code == 202
705
+ error_model = JSON.load(response_content)
706
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
707
+ end
708
+
709
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
710
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
711
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
712
+ # Deserialize Response
713
+ if status_code == 200
714
+ begin
715
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
716
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
717
+ result.body = @client.deserialize(result_mapper, parsed_response)
718
+ rescue Exception => e
719
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
720
+ end
721
+ end
722
+ # Deserialize Response
723
+ if status_code == 201
724
+ begin
725
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
726
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
727
+ result.body = @client.deserialize(result_mapper, parsed_response)
728
+ rescue Exception => e
729
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
730
+ end
731
+ end
732
+ # Deserialize Response
733
+ if status_code == 202
734
+ begin
735
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
736
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
737
+ result.body = @client.deserialize(result_mapper, parsed_response)
738
+ rescue Exception => e
739
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
740
+ end
741
+ end
742
+
743
+ result
744
+ end
745
+
746
+ promise.execute
747
+ end
748
+
749
+ #
750
+ # Updates a data connection.
751
+ #
752
+ # @param resource_group_name [String] The name of the resource group containing
753
+ # the Kusto cluster.
754
+ # @param cluster_name [String] The name of the Kusto cluster.
755
+ # @param database_name [String] The name of the database in the Kusto cluster.
756
+ # @param data_connection_name [String] The name of the data connection.
757
+ # @param parameters [DataConnection] The data connection parameters supplied to
758
+ # the Update operation.
759
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
760
+ # will be added to the HTTP request.
761
+ #
762
+ # @return [DataConnection] operation results.
763
+ #
764
+ def begin_update(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
765
+ response = begin_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers).value!
766
+ response.body unless response.nil?
767
+ end
768
+
769
+ #
770
+ # Updates a data connection.
771
+ #
772
+ # @param resource_group_name [String] The name of the resource group containing
773
+ # the Kusto cluster.
774
+ # @param cluster_name [String] The name of the Kusto cluster.
775
+ # @param database_name [String] The name of the database in the Kusto cluster.
776
+ # @param data_connection_name [String] The name of the data connection.
777
+ # @param parameters [DataConnection] The data connection parameters supplied to
778
+ # the Update operation.
779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
780
+ # will be added to the HTTP request.
781
+ #
782
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
783
+ #
784
+ def begin_update_with_http_info(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
785
+ begin_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:custom_headers).value!
786
+ end
787
+
788
+ #
789
+ # Updates a data connection.
790
+ #
791
+ # @param resource_group_name [String] The name of the resource group containing
792
+ # the Kusto cluster.
793
+ # @param cluster_name [String] The name of the Kusto cluster.
794
+ # @param database_name [String] The name of the database in the Kusto cluster.
795
+ # @param data_connection_name [String] The name of the data connection.
796
+ # @param parameters [DataConnection] The data connection parameters supplied to
797
+ # the Update operation.
798
+ # @param [Hash{String => String}] A hash of custom headers that will be added
799
+ # to the HTTP request.
800
+ #
801
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
802
+ #
803
+ def begin_update_async(resource_group_name, cluster_name, database_name, data_connection_name, parameters, custom_headers:nil)
804
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
805
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
806
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
807
+ fail ArgumentError, 'data_connection_name is nil' if data_connection_name.nil?
808
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
809
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
810
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
811
+
812
+
813
+ request_headers = {}
814
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
815
+
816
+ # Set Headers
817
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
818
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
819
+
820
+ # Serialize Request
821
+ request_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
822
+ request_content = @client.serialize(request_mapper, parameters)
823
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
824
+
825
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}'
826
+
827
+ request_url = @base_url || @client.base_url
828
+
829
+ options = {
830
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
831
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'dataConnectionName' => data_connection_name,'subscriptionId' => @client.subscription_id},
832
+ query_params: {'api-version' => @client.api_version},
833
+ body: request_content,
834
+ headers: request_headers.merge(custom_headers || {}),
835
+ base_url: request_url
836
+ }
837
+ promise = @client.make_request_async(:patch, path_template, options)
838
+
839
+ promise = promise.then do |result|
840
+ http_response = result.response
841
+ status_code = http_response.status
842
+ response_content = http_response.body
843
+ unless status_code == 200 || status_code == 201 || status_code == 202
844
+ error_model = JSON.load(response_content)
845
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
846
+ end
847
+
848
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
849
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
850
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
851
+ # Deserialize Response
852
+ if status_code == 200
853
+ begin
854
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
855
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
856
+ result.body = @client.deserialize(result_mapper, parsed_response)
857
+ rescue Exception => e
858
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
859
+ end
860
+ end
861
+ # Deserialize Response
862
+ if status_code == 201
863
+ begin
864
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
865
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
866
+ result.body = @client.deserialize(result_mapper, parsed_response)
867
+ rescue Exception => e
868
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
869
+ end
870
+ end
871
+ # Deserialize Response
872
+ if status_code == 202
873
+ begin
874
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
875
+ result_mapper = Azure::Kusto::Mgmt::V2019_09_07::Models::DataConnection.mapper()
876
+ result.body = @client.deserialize(result_mapper, parsed_response)
877
+ rescue Exception => e
878
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
879
+ end
880
+ end
881
+
882
+ result
883
+ end
884
+
885
+ promise.execute
886
+ end
887
+
888
+ #
889
+ # Deletes the data connection with the given name.
890
+ #
891
+ # @param resource_group_name [String] The name of the resource group containing
892
+ # the Kusto cluster.
893
+ # @param cluster_name [String] The name of the Kusto cluster.
894
+ # @param database_name [String] The name of the database in the Kusto cluster.
895
+ # @param data_connection_name [String] The name of the data connection.
896
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
897
+ # will be added to the HTTP request.
898
+ #
899
+ #
900
+ def begin_delete(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
901
+ response = begin_delete_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
902
+ nil
903
+ end
904
+
905
+ #
906
+ # Deletes the data connection with the given name.
907
+ #
908
+ # @param resource_group_name [String] The name of the resource group containing
909
+ # the Kusto cluster.
910
+ # @param cluster_name [String] The name of the Kusto cluster.
911
+ # @param database_name [String] The name of the database in the Kusto cluster.
912
+ # @param data_connection_name [String] The name of the data connection.
913
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
914
+ # will be added to the HTTP request.
915
+ #
916
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
917
+ #
918
+ def begin_delete_with_http_info(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
919
+ begin_delete_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:custom_headers).value!
920
+ end
921
+
922
+ #
923
+ # Deletes the data connection with the given name.
924
+ #
925
+ # @param resource_group_name [String] The name of the resource group containing
926
+ # the Kusto cluster.
927
+ # @param cluster_name [String] The name of the Kusto cluster.
928
+ # @param database_name [String] The name of the database in the Kusto cluster.
929
+ # @param data_connection_name [String] The name of the data connection.
930
+ # @param [Hash{String => String}] A hash of custom headers that will be added
931
+ # to the HTTP request.
932
+ #
933
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
934
+ #
935
+ def begin_delete_async(resource_group_name, cluster_name, database_name, data_connection_name, custom_headers:nil)
936
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
937
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
938
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
939
+ fail ArgumentError, 'data_connection_name is nil' if data_connection_name.nil?
940
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
941
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
942
+
943
+
944
+ request_headers = {}
945
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
946
+
947
+ # Set Headers
948
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
949
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
950
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}'
951
+
952
+ request_url = @base_url || @client.base_url
953
+
954
+ options = {
955
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
956
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'databaseName' => database_name,'dataConnectionName' => data_connection_name,'subscriptionId' => @client.subscription_id},
957
+ query_params: {'api-version' => @client.api_version},
958
+ headers: request_headers.merge(custom_headers || {}),
959
+ base_url: request_url
960
+ }
961
+ promise = @client.make_request_async(:delete, path_template, options)
962
+
963
+ promise = promise.then do |result|
964
+ http_response = result.response
965
+ status_code = http_response.status
966
+ response_content = http_response.body
967
+ unless status_code == 200 || status_code == 202 || status_code == 204
968
+ error_model = JSON.load(response_content)
969
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
970
+ end
971
+
972
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
973
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
974
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
975
+
976
+ result
977
+ end
978
+
979
+ promise.execute
980
+ end
981
+
982
+ end
983
+ end