azure_mgmt_alerts_management 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management.rb +76 -0
  4. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/alerts.rb +708 -0
  5. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/alerts_management_client.rb +150 -0
  6. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert.rb +259 -0
  7. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
  8. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
  9. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
  10. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
  11. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
  12. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
  13. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
  14. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +147 -0
  15. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_monitor_condition.rb +57 -0
  16. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_monitor_service.rb +189 -0
  17. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition.rb +101 -0
  18. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev0.rb +52 -0
  19. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev1.rb +52 -0
  20. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev2.rb +52 -0
  21. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev3.rb +52 -0
  22. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev4.rb +52 -0
  23. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_state.rb +68 -0
  24. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_monitor_service.rb +148 -0
  25. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity.rb +100 -0
  26. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_and_monitor_condition.rb +81 -0
  27. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev0.rb +60 -0
  28. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev1.rb +60 -0
  29. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev2.rb +60 -0
  30. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev3.rb +60 -0
  31. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev4.rb +60 -0
  32. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_state.rb +59 -0
  33. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/api_version.rb +16 -0
  34. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
  35. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_service.rb +28 -0
  36. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
  37. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
  38. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
  39. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/resource.rb +80 -0
  40. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
  41. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
  42. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
  43. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
  44. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
  45. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
  46. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
  47. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
  48. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +66 -0
  49. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
  50. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
  51. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
  52. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
  53. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/operations.rb +225 -0
  54. data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/smart_groups.rb +460 -0
  55. data/lib/2018-05-05/generated/azure_mgmt_alerts_management.rb +64 -0
  56. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/alerts.rb +908 -0
  57. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/alerts_management_client.rb +141 -0
  58. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert.rb +74 -0
  59. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
  60. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
  61. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
  62. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
  63. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_properties.rb +69 -0
  64. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
  65. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
  66. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
  67. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +74 -0
  68. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary_group.rb +88 -0
  69. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary_group_by_fields.rb +20 -0
  70. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary_group_item.rb +88 -0
  71. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/error_response.rb +47 -0
  72. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/error_response_body.rb +91 -0
  73. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/essentials.rb +257 -0
  74. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
  75. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/monitor_service.rb +28 -0
  76. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
  77. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
  78. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
  79. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/resource.rb +80 -0
  80. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
  81. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
  82. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
  83. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
  84. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
  85. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
  86. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
  87. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
  88. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +98 -0
  89. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
  90. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
  91. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
  92. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
  93. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/operations.rb +225 -0
  94. data/lib/2018-05-05/generated/azure_mgmt_alerts_management/smart_groups.rb +648 -0
  95. data/lib/2019-03-01/generated/azure_mgmt_alerts_management.rb +71 -0
  96. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/alerts.rb +977 -0
  97. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/alerts_management_client.rb +154 -0
  98. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/action_groups_information.rb +78 -0
  99. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert.rb +74 -0
  100. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
  101. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
  102. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
  103. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
  104. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_properties.rb +69 -0
  105. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_rule.rb +164 -0
  106. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_rule_state.rb +16 -0
  107. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_rules_list.rb +98 -0
  108. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
  109. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
  110. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
  111. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +74 -0
  112. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary_group.rb +88 -0
  113. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary_group_by_fields.rb +20 -0
  114. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary_group_item.rb +88 -0
  115. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/azure_resource.rb +71 -0
  116. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/detector.rb +130 -0
  117. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/error_response1.rb +57 -0
  118. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/essentials.rb +257 -0
  119. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
  120. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/monitor_service.rb +29 -0
  121. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
  122. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
  123. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
  124. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/proxy_resource.rb +71 -0
  125. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
  126. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
  127. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
  128. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
  129. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
  130. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
  131. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
  132. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
  133. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +66 -0
  134. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
  135. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
  136. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/throttling_information.rb +48 -0
  137. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
  138. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
  139. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/operations.rb +225 -0
  140. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/smart_detector_alert_rules.rb +725 -0
  141. data/lib/2019-03-01/generated/azure_mgmt_alerts_management/smart_groups.rb +499 -0
  142. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management.rb +82 -0
  143. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/action_rules.rb +1082 -0
  144. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/alerts.rb +911 -0
  145. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/alerts_management_client.rb +145 -0
  146. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_group.rb +133 -0
  147. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rule.rb +101 -0
  148. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rule_properties.rb +146 -0
  149. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rule_status.rb +16 -0
  150. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rules_list.rb +98 -0
  151. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert.rb +74 -0
  152. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
  153. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
  154. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
  155. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
  156. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_properties.rb +69 -0
  157. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
  158. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
  159. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
  160. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +74 -0
  161. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_group.rb +88 -0
  162. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_group_by_fields.rb +20 -0
  163. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_group_item.rb +88 -0
  164. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/condition.rb +66 -0
  165. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/conditions.rb +121 -0
  166. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/diagnostics.rb +122 -0
  167. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/error_response.rb +47 -0
  168. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/error_response_body.rb +91 -0
  169. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/essentials.rb +258 -0
  170. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/managed_resource.rb +92 -0
  171. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
  172. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_service.rb +28 -0
  173. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
  174. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
  175. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
  176. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operator.rb +18 -0
  177. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/patch_object.rb +58 -0
  178. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/resource.rb +80 -0
  179. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/scope.rb +69 -0
  180. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/scope_type.rb +16 -0
  181. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
  182. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
  183. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
  184. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
  185. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
  186. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
  187. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
  188. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
  189. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +98 -0
  190. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
  191. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
  192. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression.rb +135 -0
  193. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression_config.rb +60 -0
  194. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression_schedule.rb +98 -0
  195. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression_type.rb +19 -0
  196. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
  197. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
  198. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/operations.rb +225 -0
  199. data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/smart_groups.rb +648 -0
  200. data/lib/azure_mgmt_alerts_management.rb +9 -0
  201. data/lib/module_definition.rb +7 -0
  202. data/lib/profiles/latest/alertsmanagement_latest_profile_client.rb +40 -0
  203. data/lib/profiles/latest/alertsmanagement_module_definition.rb +8 -0
  204. data/lib/profiles/latest/modules/alertsmanagement_profile_module.rb +271 -0
  205. data/lib/version.rb +7 -0
  206. metadata +321 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 057f9fb9f962956d0cbcd4ff48b403b2052e0ec1cd653ebc02a6a42042f98f8a
4
+ data.tar.gz: 60ff2de9231b3fd838550da1b22eeb9ba0ba54dcddbd56d1e60193d84fb813e6
5
+ SHA512:
6
+ metadata.gz: cd641b9cae1284c96e77568d6bde25d11045aa5b05114702b2ebfa7fef2b22ec963ab5850c5c26055c31f7be786de0f4306702a4c34fa43a3f6a0e0bf38904d9
7
+ data.tar.gz: c742b644c952892bc4632928857dd0a1b31a2b17de63ea525092a19a35b0b93b6b68c3f3d1a75d69ce75c25036b40724ad52c604e42a24df844d594bbf85d59f
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,76 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-05-05-preview/generated/azure_mgmt_alerts_management/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::AlertsManagement::Mgmt::V2018_05_05_preview
23
+ autoload :Operations, '2018-05-05-preview/generated/azure_mgmt_alerts_management/operations.rb'
24
+ autoload :Alerts, '2018-05-05-preview/generated/azure_mgmt_alerts_management/alerts.rb'
25
+ autoload :SmartGroups, '2018-05-05-preview/generated/azure_mgmt_alerts_management/smart_groups.rb'
26
+ autoload :AlertsManagementClient, '2018-05-05-preview/generated/azure_mgmt_alerts_management/alerts_management_client.rb'
27
+
28
+ module Models
29
+ autoload :SmartGroupModificationProperties, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb'
30
+ autoload :AlertsSummaryPropertiesSummaryBySeverity, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity.rb'
31
+ autoload :Operation, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operation.rb'
32
+ autoload :SmartGroupModificationItem, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb'
33
+ autoload :OperationDisplay, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operation_display.rb'
34
+ autoload :Resource, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/resource.rb'
35
+ autoload :AlertsSummaryBySeverityAndMonitorCondition, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition.rb'
36
+ autoload :AlertsList, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_list.rb'
37
+ autoload :AlertsSummaryByState, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_state.rb'
38
+ autoload :AlertModificationProperties, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb'
39
+ autoload :AlertsSummaryByMonitorCondition, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_monitor_condition.rb'
40
+ autoload :AlertsSummaryByMonitorService, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_monitor_service.rb'
41
+ autoload :AlertModificationItem, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb'
42
+ autoload :SmartGroupAggregatedProperty, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb'
43
+ autoload :SmartGroupsList, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb'
44
+ autoload :OperationsList, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operations_list.rb'
45
+ autoload :Alert, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert.rb'
46
+ autoload :AlertModification, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification.rb'
47
+ autoload :SmartGroupModification, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb'
48
+ autoload :AlertsSummaryPropertiesSummaryByState, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_state.rb'
49
+ autoload :AlertsSummaryPropertiesSummaryBySeveritySev0, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev0.rb'
50
+ autoload :AlertsSummaryPropertiesSummaryBySeveritySev1, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev1.rb'
51
+ autoload :AlertsSummaryPropertiesSummaryBySeveritySev2, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev2.rb'
52
+ autoload :AlertsSummaryPropertiesSummaryBySeveritySev3, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev3.rb'
53
+ autoload :AlertsSummaryPropertiesSummaryBySeveritySev4, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev4.rb'
54
+ autoload :AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_and_monitor_condition.rb'
55
+ autoload :AlertsSummaryPropertiesSummaryByMonitorService, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_monitor_service.rb'
56
+ autoload :AlertsSummary, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary.rb'
57
+ autoload :AlertsSummaryBySeverityAndMonitorConditionSev0, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev0.rb'
58
+ autoload :AlertsSummaryBySeverityAndMonitorConditionSev1, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev1.rb'
59
+ autoload :AlertsSummaryBySeverityAndMonitorConditionSev2, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev2.rb'
60
+ autoload :AlertsSummaryBySeverityAndMonitorConditionSev3, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev3.rb'
61
+ autoload :AlertsSummaryBySeverityAndMonitorConditionSev4, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev4.rb'
62
+ autoload :SmartGroup, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group.rb'
63
+ autoload :Severity, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/severity.rb'
64
+ autoload :SignalType, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/signal_type.rb'
65
+ autoload :AlertState, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_state.rb'
66
+ autoload :MonitorCondition, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_condition.rb'
67
+ autoload :MonitorService, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_service.rb'
68
+ autoload :AlertModificationEvent, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb'
69
+ autoload :SmartGroupModificationEvent, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb'
70
+ autoload :State, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/state.rb'
71
+ autoload :ApiVersion, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/api_version.rb'
72
+ autoload :TimeRange, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/time_range.rb'
73
+ autoload :AlertsSortByFields, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb'
74
+ autoload :SmartGroupsSortByFields, '2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb'
75
+ end
76
+ end
@@ -0,0 +1,708 @@
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::AlertsManagement::Mgmt::V2018_05_05_preview
7
+ #
8
+ # AlertsManagement Client
9
+ #
10
+ class Alerts
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Alerts class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AlertsManagementClient] reference to the AlertsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all the existing alerts, where the results can be selective by passing
26
+ # multiple filter parameters including time range and sorted on specific
27
+ # fields.
28
+ #
29
+ # @param target_resource [String] filter by target resource
30
+ # @param target_resource_group [String] filter by target resource group name
31
+ # @param target_resource_type [String] filter by target resource type
32
+ # @param monitor_condition [MonitorCondition] filter by monitor condition which
33
+ # is the state of the alert at monitor service. Possible values include:
34
+ # 'Fired', 'Resolved'
35
+ # @param severity [Severity] filter by severity. Possible values include:
36
+ # 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
37
+ # @param alert_state [AlertState] filter by state. Possible values include:
38
+ # 'New', 'Acknowledged', 'Closed'
39
+ # @param smart_group_id [String] filter by smart Group Id
40
+ # @param include_payload [Boolean] include payload field content, default value
41
+ # is 'false'.
42
+ # @param page_count [Integer] number of items per page, default value is '25'.
43
+ # @param sort_by [AlertsSortByFields] sort the query results by input field,
44
+ # default value is 'lastModifiedDateTime'. Possible values include: 'name',
45
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
46
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
47
+ # 'startDateTime', 'lastModifiedDateTime'
48
+ # @param sort_order [Enum] sort the query results order in either ascending or
49
+ # descending, default value is 'desc' for time fields and 'asc' for others.
50
+ # Possible values include: 'asc', 'desc'
51
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
52
+ # Possible values include: '1h', '1d', '7d', '30d'
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [Array<Alert>] operation results.
57
+ #
58
+ def get_all(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_condition:nil, severity:nil, alert_state:nil, smart_group_id:nil, include_payload:nil, page_count:nil, sort_by:nil, sort_order:nil, time_range:nil, custom_headers:nil)
59
+ first_page = get_all_as_lazy(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, smart_group_id:smart_group_id, include_payload:include_payload, page_count:page_count, sort_by:sort_by, sort_order:sort_order, time_range:time_range, custom_headers:custom_headers)
60
+ first_page.get_all_items
61
+ end
62
+
63
+ #
64
+ # List all the existing alerts, where the results can be selective by passing
65
+ # multiple filter parameters including time range and sorted on specific
66
+ # fields.
67
+ #
68
+ # @param target_resource [String] filter by target resource
69
+ # @param target_resource_group [String] filter by target resource group name
70
+ # @param target_resource_type [String] filter by target resource type
71
+ # @param monitor_condition [MonitorCondition] filter by monitor condition which
72
+ # is the state of the alert at monitor service. Possible values include:
73
+ # 'Fired', 'Resolved'
74
+ # @param severity [Severity] filter by severity. Possible values include:
75
+ # 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
76
+ # @param alert_state [AlertState] filter by state. Possible values include:
77
+ # 'New', 'Acknowledged', 'Closed'
78
+ # @param smart_group_id [String] filter by smart Group Id
79
+ # @param include_payload [Boolean] include payload field content, default value
80
+ # is 'false'.
81
+ # @param page_count [Integer] number of items per page, default value is '25'.
82
+ # @param sort_by [AlertsSortByFields] sort the query results by input field,
83
+ # default value is 'lastModifiedDateTime'. Possible values include: 'name',
84
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
85
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
86
+ # 'startDateTime', 'lastModifiedDateTime'
87
+ # @param sort_order [Enum] sort the query results order in either ascending or
88
+ # descending, default value is 'desc' for time fields and 'asc' for others.
89
+ # Possible values include: 'asc', 'desc'
90
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
91
+ # Possible values include: '1h', '1d', '7d', '30d'
92
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
93
+ # will be added to the HTTP request.
94
+ #
95
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
96
+ #
97
+ def get_all_with_http_info(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_condition:nil, severity:nil, alert_state:nil, smart_group_id:nil, include_payload:nil, page_count:nil, sort_by:nil, sort_order:nil, time_range:nil, custom_headers:nil)
98
+ get_all_async(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, smart_group_id:smart_group_id, include_payload:include_payload, page_count:page_count, sort_by:sort_by, sort_order:sort_order, time_range:time_range, custom_headers:custom_headers).value!
99
+ end
100
+
101
+ #
102
+ # List all the existing alerts, where the results can be selective by passing
103
+ # multiple filter parameters including time range and sorted on specific
104
+ # fields.
105
+ #
106
+ # @param target_resource [String] filter by target resource
107
+ # @param target_resource_group [String] filter by target resource group name
108
+ # @param target_resource_type [String] filter by target resource type
109
+ # @param monitor_condition [MonitorCondition] filter by monitor condition which
110
+ # is the state of the alert at monitor service. Possible values include:
111
+ # 'Fired', 'Resolved'
112
+ # @param severity [Severity] filter by severity. Possible values include:
113
+ # 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
114
+ # @param alert_state [AlertState] filter by state. Possible values include:
115
+ # 'New', 'Acknowledged', 'Closed'
116
+ # @param smart_group_id [String] filter by smart Group Id
117
+ # @param include_payload [Boolean] include payload field content, default value
118
+ # is 'false'.
119
+ # @param page_count [Integer] number of items per page, default value is '25'.
120
+ # @param sort_by [AlertsSortByFields] sort the query results by input field,
121
+ # default value is 'lastModifiedDateTime'. Possible values include: 'name',
122
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
123
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
124
+ # 'startDateTime', 'lastModifiedDateTime'
125
+ # @param sort_order [Enum] sort the query results order in either ascending or
126
+ # descending, default value is 'desc' for time fields and 'asc' for others.
127
+ # Possible values include: 'asc', 'desc'
128
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
129
+ # Possible values include: '1h', '1d', '7d', '30d'
130
+ # @param [Hash{String => String}] A hash of custom headers that will be added
131
+ # to the HTTP request.
132
+ #
133
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
134
+ #
135
+ def get_all_async(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_condition:nil, severity:nil, alert_state:nil, smart_group_id:nil, include_payload:nil, page_count:nil, sort_by:nil, sort_order:nil, time_range:nil, custom_headers:nil)
136
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
137
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
138
+
139
+
140
+ request_headers = {}
141
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
142
+
143
+ # Set Headers
144
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
145
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
146
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'
147
+
148
+ request_url = @base_url || @client.base_url
149
+
150
+ options = {
151
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
152
+ path_params: {'subscriptionId' => @client.subscription_id},
153
+ query_params: {'targetResource' => target_resource,'targetResourceGroup' => target_resource_group,'targetResourceType' => target_resource_type,'monitorService' => @client.monitor_service,'monitorCondition' => monitor_condition,'severity' => severity,'alertState' => alert_state,'smartGroupId' => smart_group_id,'includePayload' => include_payload,'pageCount' => page_count,'sortBy' => sort_by,'sortOrder' => sort_order,'timeRange' => time_range,'api-version' => @client.api_version},
154
+ headers: request_headers.merge(custom_headers || {}),
155
+ base_url: request_url
156
+ }
157
+ promise = @client.make_request_async(:get, path_template, options)
158
+
159
+ promise = promise.then do |result|
160
+ http_response = result.response
161
+ status_code = http_response.status
162
+ response_content = http_response.body
163
+ unless status_code == 200
164
+ error_model = JSON.load(response_content)
165
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
166
+ end
167
+
168
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
169
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
170
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
171
+ # Deserialize Response
172
+ if status_code == 200
173
+ begin
174
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
175
+ result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::AlertsList.mapper()
176
+ result.body = @client.deserialize(result_mapper, parsed_response)
177
+ rescue Exception => e
178
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
179
+ end
180
+ end
181
+
182
+ result
183
+ end
184
+
185
+ promise.execute
186
+ end
187
+
188
+ #
189
+ # Get a specific alert.
190
+ #
191
+ # Get information related to a specific alert
192
+ #
193
+ # @param alert_id [String] Unique ID of an alert object.
194
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
195
+ # will be added to the HTTP request.
196
+ #
197
+ # @return [Alert] operation results.
198
+ #
199
+ def get_by_id(alert_id, custom_headers:nil)
200
+ response = get_by_id_async(alert_id, custom_headers:custom_headers).value!
201
+ response.body unless response.nil?
202
+ end
203
+
204
+ #
205
+ # Get a specific alert.
206
+ #
207
+ # Get information related to a specific alert
208
+ #
209
+ # @param alert_id [String] Unique ID of an alert object.
210
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
211
+ # will be added to the HTTP request.
212
+ #
213
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
214
+ #
215
+ def get_by_id_with_http_info(alert_id, custom_headers:nil)
216
+ get_by_id_async(alert_id, custom_headers:custom_headers).value!
217
+ end
218
+
219
+ #
220
+ # Get a specific alert.
221
+ #
222
+ # Get information related to a specific alert
223
+ #
224
+ # @param alert_id [String] Unique ID of an alert object.
225
+ # @param [Hash{String => String}] A hash of custom headers that will be added
226
+ # to the HTTP request.
227
+ #
228
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
229
+ #
230
+ def get_by_id_async(alert_id, custom_headers:nil)
231
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
232
+ fail ArgumentError, 'alert_id is nil' if alert_id.nil?
233
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
234
+
235
+
236
+ request_headers = {}
237
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
238
+
239
+ # Set Headers
240
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
241
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
242
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}'
243
+
244
+ request_url = @base_url || @client.base_url
245
+
246
+ options = {
247
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
248
+ path_params: {'subscriptionId' => @client.subscription_id,'alertId' => alert_id},
249
+ query_params: {'api-version' => @client.api_version},
250
+ headers: request_headers.merge(custom_headers || {}),
251
+ base_url: request_url
252
+ }
253
+ promise = @client.make_request_async(:get, path_template, options)
254
+
255
+ promise = promise.then do |result|
256
+ http_response = result.response
257
+ status_code = http_response.status
258
+ response_content = http_response.body
259
+ unless status_code == 200
260
+ error_model = JSON.load(response_content)
261
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
262
+ end
263
+
264
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
265
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
266
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
267
+ # Deserialize Response
268
+ if status_code == 200
269
+ begin
270
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
271
+ result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::Alert.mapper()
272
+ result.body = @client.deserialize(result_mapper, parsed_response)
273
+ rescue Exception => e
274
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
275
+ end
276
+ end
277
+
278
+ result
279
+ end
280
+
281
+ promise.execute
282
+ end
283
+
284
+ #
285
+ # Change the state of the alert.
286
+ #
287
+ # @param alert_id [String] Unique ID of an alert object.
288
+ # @param new_state [AlertState] filter by state. Possible values include:
289
+ # 'New', 'Acknowledged', 'Closed'
290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
291
+ # will be added to the HTTP request.
292
+ #
293
+ # @return [Alert] operation results.
294
+ #
295
+ def change_state(alert_id, new_state, custom_headers:nil)
296
+ response = change_state_async(alert_id, new_state, custom_headers:custom_headers).value!
297
+ response.body unless response.nil?
298
+ end
299
+
300
+ #
301
+ # Change the state of the alert.
302
+ #
303
+ # @param alert_id [String] Unique ID of an alert object.
304
+ # @param new_state [AlertState] filter by state. Possible values include:
305
+ # 'New', 'Acknowledged', 'Closed'
306
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
307
+ # will be added to the HTTP request.
308
+ #
309
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
310
+ #
311
+ def change_state_with_http_info(alert_id, new_state, custom_headers:nil)
312
+ change_state_async(alert_id, new_state, custom_headers:custom_headers).value!
313
+ end
314
+
315
+ #
316
+ # Change the state of the alert.
317
+ #
318
+ # @param alert_id [String] Unique ID of an alert object.
319
+ # @param new_state [AlertState] filter by state. Possible values include:
320
+ # 'New', 'Acknowledged', 'Closed'
321
+ # @param [Hash{String => String}] A hash of custom headers that will be added
322
+ # to the HTTP request.
323
+ #
324
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
325
+ #
326
+ def change_state_async(alert_id, new_state, custom_headers:nil)
327
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
328
+ fail ArgumentError, 'alert_id is nil' if alert_id.nil?
329
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
330
+ fail ArgumentError, 'new_state is nil' if new_state.nil?
331
+
332
+
333
+ request_headers = {}
334
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
335
+
336
+ # Set Headers
337
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
338
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
339
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate'
340
+
341
+ request_url = @base_url || @client.base_url
342
+
343
+ options = {
344
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
345
+ path_params: {'subscriptionId' => @client.subscription_id,'alertId' => alert_id},
346
+ query_params: {'api-version' => @client.api_version,'newState' => new_state},
347
+ headers: request_headers.merge(custom_headers || {}),
348
+ base_url: request_url
349
+ }
350
+ promise = @client.make_request_async(:post, path_template, options)
351
+
352
+ promise = promise.then do |result|
353
+ http_response = result.response
354
+ status_code = http_response.status
355
+ response_content = http_response.body
356
+ unless status_code == 200
357
+ error_model = JSON.load(response_content)
358
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
359
+ end
360
+
361
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
362
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
363
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
364
+ # Deserialize Response
365
+ if status_code == 200
366
+ begin
367
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
368
+ result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::Alert.mapper()
369
+ result.body = @client.deserialize(result_mapper, parsed_response)
370
+ rescue Exception => e
371
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
372
+ end
373
+ end
374
+
375
+ result
376
+ end
377
+
378
+ promise.execute
379
+ end
380
+
381
+ #
382
+ # Get the history of the changes of an alert.
383
+ #
384
+ # @param alert_id [String] Unique ID of an alert object.
385
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
386
+ # will be added to the HTTP request.
387
+ #
388
+ # @return [AlertModification] operation results.
389
+ #
390
+ def get_history(alert_id, custom_headers:nil)
391
+ response = get_history_async(alert_id, custom_headers:custom_headers).value!
392
+ response.body unless response.nil?
393
+ end
394
+
395
+ #
396
+ # Get the history of the changes of an alert.
397
+ #
398
+ # @param alert_id [String] Unique ID of an alert object.
399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
400
+ # will be added to the HTTP request.
401
+ #
402
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
403
+ #
404
+ def get_history_with_http_info(alert_id, custom_headers:nil)
405
+ get_history_async(alert_id, custom_headers:custom_headers).value!
406
+ end
407
+
408
+ #
409
+ # Get the history of the changes of an alert.
410
+ #
411
+ # @param alert_id [String] Unique ID of an alert object.
412
+ # @param [Hash{String => String}] A hash of custom headers that will be added
413
+ # to the HTTP request.
414
+ #
415
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
416
+ #
417
+ def get_history_async(alert_id, custom_headers:nil)
418
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
419
+ fail ArgumentError, 'alert_id is nil' if alert_id.nil?
420
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
421
+
422
+
423
+ request_headers = {}
424
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
425
+
426
+ # Set Headers
427
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
428
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
429
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'
430
+
431
+ request_url = @base_url || @client.base_url
432
+
433
+ options = {
434
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
435
+ path_params: {'subscriptionId' => @client.subscription_id,'alertId' => alert_id},
436
+ query_params: {'api-version' => @client.api_version},
437
+ headers: request_headers.merge(custom_headers || {}),
438
+ base_url: request_url
439
+ }
440
+ promise = @client.make_request_async(:get, path_template, options)
441
+
442
+ promise = promise.then do |result|
443
+ http_response = result.response
444
+ status_code = http_response.status
445
+ response_content = http_response.body
446
+ unless status_code == 200
447
+ error_model = JSON.load(response_content)
448
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
449
+ end
450
+
451
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
452
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
453
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
454
+ # Deserialize Response
455
+ if status_code == 200
456
+ begin
457
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
458
+ result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::AlertModification.mapper()
459
+ result.body = @client.deserialize(result_mapper, parsed_response)
460
+ rescue Exception => e
461
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
462
+ end
463
+ end
464
+
465
+ result
466
+ end
467
+
468
+ promise.execute
469
+ end
470
+
471
+ #
472
+ # Summary of alerts with the count each severity.
473
+ #
474
+ # @param target_resource_group [String] filter by target resource group name
475
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
476
+ # Possible values include: '1h', '1d', '7d', '30d'
477
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
478
+ # will be added to the HTTP request.
479
+ #
480
+ # @return [AlertsSummary] operation results.
481
+ #
482
+ def get_summary(target_resource_group:nil, time_range:nil, custom_headers:nil)
483
+ response = get_summary_async(target_resource_group:target_resource_group, time_range:time_range, custom_headers:custom_headers).value!
484
+ response.body unless response.nil?
485
+ end
486
+
487
+ #
488
+ # Summary of alerts with the count each severity.
489
+ #
490
+ # @param target_resource_group [String] filter by target resource group name
491
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
492
+ # Possible values include: '1h', '1d', '7d', '30d'
493
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
494
+ # will be added to the HTTP request.
495
+ #
496
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
497
+ #
498
+ def get_summary_with_http_info(target_resource_group:nil, time_range:nil, custom_headers:nil)
499
+ get_summary_async(target_resource_group:target_resource_group, time_range:time_range, custom_headers:custom_headers).value!
500
+ end
501
+
502
+ #
503
+ # Summary of alerts with the count each severity.
504
+ #
505
+ # @param target_resource_group [String] filter by target resource group name
506
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
507
+ # Possible values include: '1h', '1d', '7d', '30d'
508
+ # @param [Hash{String => String}] A hash of custom headers that will be added
509
+ # to the HTTP request.
510
+ #
511
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
512
+ #
513
+ def get_summary_async(target_resource_group:nil, time_range:nil, custom_headers:nil)
514
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
515
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
516
+
517
+
518
+ request_headers = {}
519
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
520
+
521
+ # Set Headers
522
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
523
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
524
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary'
525
+
526
+ request_url = @base_url || @client.base_url
527
+
528
+ options = {
529
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
530
+ path_params: {'subscriptionId' => @client.subscription_id},
531
+ query_params: {'targetResourceGroup' => target_resource_group,'timeRange' => time_range,'api-version' => @client.api_version},
532
+ headers: request_headers.merge(custom_headers || {}),
533
+ base_url: request_url
534
+ }
535
+ promise = @client.make_request_async(:get, path_template, options)
536
+
537
+ promise = promise.then do |result|
538
+ http_response = result.response
539
+ status_code = http_response.status
540
+ response_content = http_response.body
541
+ unless status_code == 200
542
+ error_model = JSON.load(response_content)
543
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
544
+ end
545
+
546
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
547
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
548
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
549
+ # Deserialize Response
550
+ if status_code == 200
551
+ begin
552
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
553
+ result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::AlertsSummary.mapper()
554
+ result.body = @client.deserialize(result_mapper, parsed_response)
555
+ rescue Exception => e
556
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
557
+ end
558
+ end
559
+
560
+ result
561
+ end
562
+
563
+ promise.execute
564
+ end
565
+
566
+ #
567
+ # List all the existing alerts, where the results can be selective by passing
568
+ # multiple filter parameters including time range and sorted on specific
569
+ # fields.
570
+ #
571
+ # @param next_page_link [String] The NextLink from the previous successful call
572
+ # to List operation.
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [AlertsList] operation results.
577
+ #
578
+ def get_all_next(next_page_link, custom_headers:nil)
579
+ response = get_all_next_async(next_page_link, custom_headers:custom_headers).value!
580
+ response.body unless response.nil?
581
+ end
582
+
583
+ #
584
+ # List all the existing alerts, where the results can be selective by passing
585
+ # multiple filter parameters including time range and sorted on specific
586
+ # fields.
587
+ #
588
+ # @param next_page_link [String] The NextLink from the previous successful call
589
+ # to List operation.
590
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
591
+ # will be added to the HTTP request.
592
+ #
593
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
594
+ #
595
+ def get_all_next_with_http_info(next_page_link, custom_headers:nil)
596
+ get_all_next_async(next_page_link, custom_headers:custom_headers).value!
597
+ end
598
+
599
+ #
600
+ # List all the existing alerts, where the results can be selective by passing
601
+ # multiple filter parameters including time range and sorted on specific
602
+ # fields.
603
+ #
604
+ # @param next_page_link [String] The NextLink from the previous successful call
605
+ # to List operation.
606
+ # @param [Hash{String => String}] A hash of custom headers that will be added
607
+ # to the HTTP request.
608
+ #
609
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
610
+ #
611
+ def get_all_next_async(next_page_link, custom_headers:nil)
612
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
613
+
614
+
615
+ request_headers = {}
616
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
617
+
618
+ # Set Headers
619
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
620
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
621
+ path_template = '{nextLink}'
622
+
623
+ request_url = @base_url || @client.base_url
624
+
625
+ options = {
626
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
627
+ skip_encoding_path_params: {'nextLink' => next_page_link},
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 MsRest::HttpOperationError.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::AlertsManagement::Mgmt::V2018_05_05_preview::Models::AlertsList.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
+ # List all the existing alerts, where the results can be selective by passing
664
+ # multiple filter parameters including time range and sorted on specific
665
+ # fields.
666
+ #
667
+ # @param target_resource [String] filter by target resource
668
+ # @param target_resource_group [String] filter by target resource group name
669
+ # @param target_resource_type [String] filter by target resource type
670
+ # @param monitor_condition [MonitorCondition] filter by monitor condition which
671
+ # is the state of the alert at monitor service. Possible values include:
672
+ # 'Fired', 'Resolved'
673
+ # @param severity [Severity] filter by severity. Possible values include:
674
+ # 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
675
+ # @param alert_state [AlertState] filter by state. Possible values include:
676
+ # 'New', 'Acknowledged', 'Closed'
677
+ # @param smart_group_id [String] filter by smart Group Id
678
+ # @param include_payload [Boolean] include payload field content, default value
679
+ # is 'false'.
680
+ # @param page_count [Integer] number of items per page, default value is '25'.
681
+ # @param sort_by [AlertsSortByFields] sort the query results by input field,
682
+ # default value is 'lastModifiedDateTime'. Possible values include: 'name',
683
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
684
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
685
+ # 'startDateTime', 'lastModifiedDateTime'
686
+ # @param sort_order [Enum] sort the query results order in either ascending or
687
+ # descending, default value is 'desc' for time fields and 'asc' for others.
688
+ # Possible values include: 'asc', 'desc'
689
+ # @param time_range [TimeRange] filter by time range, default value is 1 day.
690
+ # Possible values include: '1h', '1d', '7d', '30d'
691
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
692
+ # will be added to the HTTP request.
693
+ #
694
+ # @return [AlertsList] which provide lazy access to pages of the response.
695
+ #
696
+ def get_all_as_lazy(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_condition:nil, severity:nil, alert_state:nil, smart_group_id:nil, include_payload:nil, page_count:nil, sort_by:nil, sort_order:nil, time_range:nil, custom_headers:nil)
697
+ response = get_all_async(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, smart_group_id:smart_group_id, include_payload:include_payload, page_count:page_count, sort_by:sort_by, sort_order:sort_order, time_range:time_range, custom_headers:custom_headers).value!
698
+ unless response.nil?
699
+ page = response.body
700
+ page.next_method = Proc.new do |next_page_link|
701
+ get_all_next_async(next_page_link, custom_headers:custom_headers)
702
+ end
703
+ page
704
+ end
705
+ end
706
+
707
+ end
708
+ end