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,911 @@
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::V2019_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 existing alerts, where the results can be filtered on the basis of
26
+ # multiple parameters (e.g. time range). The results can then be sorted on the
27
+ # basis specific fields, with the default being lastModifiedDateTime.
28
+ #
29
+ # @param target_resource [String] Filter by target resource( which is full ARM
30
+ # ID) Default value is select all.
31
+ # @param target_resource_type [String] Filter by target resource type. Default
32
+ # value is select all.
33
+ # @param target_resource_group [String] Filter by target resource group name.
34
+ # Default value is select all.
35
+ # @param monitor_service [MonitorService] Filter by monitor service which
36
+ # generates the alert instance. Default value is select all. Possible values
37
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
38
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
39
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
40
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
41
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
42
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
43
+ # values include: 'Fired', 'Resolved'
44
+ # @param severity [Severity] Filter by severity. Default value is select all.
45
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
46
+ # @param alert_state [AlertState] Filter by state of the alert instance.
47
+ # Default value is to select all. Possible values include: 'New',
48
+ # 'Acknowledged', 'Closed'
49
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
50
+ # to select all.
51
+ # @param smart_group_id [String] Filter the alerts list by the Smart Group Id.
52
+ # Default value is none.
53
+ # @param include_context [Boolean] Include context which has contextual data
54
+ # specific to the monitor service. Default value is false'
55
+ # @param include_egress_config [Boolean] Include egress config which would be
56
+ # used for displaying the content in portal. Default value is 'false'.
57
+ # @param page_count [Integer] Determines number of alerts returned per page in
58
+ # response. Permissible value is between 1 to 250. When the "includeContent"
59
+ # filter is selected, maximum value allowed is 25. Default value is 25.
60
+ # @param sort_by [AlertsSortByFields] Sort the query results by input field,
61
+ # Default value is 'lastModifiedDateTime'. Possible values include: 'name',
62
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
63
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
64
+ # 'startDateTime', 'lastModifiedDateTime'
65
+ # @param sort_order [Enum] Sort the query results order in either ascending or
66
+ # descending. Default value is 'desc' for time fields and 'asc' for others.
67
+ # Possible values include: 'asc', 'desc'
68
+ # @param select [String] This filter allows to selection of the fields(comma
69
+ # separated) which would be part of the essential section. This would allow to
70
+ # project only the required fields rather than getting entire content.
71
+ # Default is to fetch all the fields in the essentials section.
72
+ # @param time_range [TimeRange] Filter by time range by below listed values.
73
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
74
+ # @param custom_time_range [String] Filter by custom time range in the format
75
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
76
+ # values is within 30 days from query time. Either timeRange or
77
+ # customTimeRange could be used but not both. Default is none.
78
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
79
+ # will be added to the HTTP request.
80
+ #
81
+ # @return [Array<Alert>] operation results.
82
+ #
83
+ def get_all(target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, smart_group_id:nil, include_context:nil, include_egress_config:nil, page_count:nil, sort_by:nil, sort_order:nil, select:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
84
+ first_page = get_all_as_lazy(target_resource:target_resource, target_resource_type:target_resource_type, target_resource_group:target_resource_group, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, alert_rule:alert_rule, smart_group_id:smart_group_id, include_context:include_context, include_egress_config:include_egress_config, page_count:page_count, sort_by:sort_by, sort_order:sort_order, select:select, time_range:time_range, custom_time_range:custom_time_range, custom_headers:custom_headers)
85
+ first_page.get_all_items
86
+ end
87
+
88
+ #
89
+ # List all existing alerts, where the results can be filtered on the basis of
90
+ # multiple parameters (e.g. time range). The results can then be sorted on the
91
+ # basis specific fields, with the default being lastModifiedDateTime.
92
+ #
93
+ # @param target_resource [String] Filter by target resource( which is full ARM
94
+ # ID) Default value is select all.
95
+ # @param target_resource_type [String] Filter by target resource type. Default
96
+ # value is select all.
97
+ # @param target_resource_group [String] Filter by target resource group name.
98
+ # Default value is select all.
99
+ # @param monitor_service [MonitorService] Filter by monitor service which
100
+ # generates the alert instance. Default value is select all. Possible values
101
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
102
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
103
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
104
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
105
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
106
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
107
+ # values include: 'Fired', 'Resolved'
108
+ # @param severity [Severity] Filter by severity. Default value is select all.
109
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
110
+ # @param alert_state [AlertState] Filter by state of the alert instance.
111
+ # Default value is to select all. Possible values include: 'New',
112
+ # 'Acknowledged', 'Closed'
113
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
114
+ # to select all.
115
+ # @param smart_group_id [String] Filter the alerts list by the Smart Group Id.
116
+ # Default value is none.
117
+ # @param include_context [Boolean] Include context which has contextual data
118
+ # specific to the monitor service. Default value is false'
119
+ # @param include_egress_config [Boolean] Include egress config which would be
120
+ # used for displaying the content in portal. Default value is 'false'.
121
+ # @param page_count [Integer] Determines number of alerts returned per page in
122
+ # response. Permissible value is between 1 to 250. When the "includeContent"
123
+ # filter is selected, maximum value allowed is 25. Default value is 25.
124
+ # @param sort_by [AlertsSortByFields] Sort the query results by input field,
125
+ # Default value is 'lastModifiedDateTime'. Possible values include: 'name',
126
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
127
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
128
+ # 'startDateTime', 'lastModifiedDateTime'
129
+ # @param sort_order [Enum] Sort the query results order in either ascending or
130
+ # descending. Default value is 'desc' for time fields and 'asc' for others.
131
+ # Possible values include: 'asc', 'desc'
132
+ # @param select [String] This filter allows to selection of the fields(comma
133
+ # separated) which would be part of the essential section. This would allow to
134
+ # project only the required fields rather than getting entire content.
135
+ # Default is to fetch all the fields in the essentials section.
136
+ # @param time_range [TimeRange] Filter by time range by below listed values.
137
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
138
+ # @param custom_time_range [String] Filter by custom time range in the format
139
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
140
+ # values is within 30 days from query time. Either timeRange or
141
+ # customTimeRange could be used but not both. Default is none.
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
146
+ #
147
+ def get_all_with_http_info(target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, smart_group_id:nil, include_context:nil, include_egress_config:nil, page_count:nil, sort_by:nil, sort_order:nil, select:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
148
+ get_all_async(target_resource:target_resource, target_resource_type:target_resource_type, target_resource_group:target_resource_group, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, alert_rule:alert_rule, smart_group_id:smart_group_id, include_context:include_context, include_egress_config:include_egress_config, page_count:page_count, sort_by:sort_by, sort_order:sort_order, select:select, time_range:time_range, custom_time_range:custom_time_range, custom_headers:custom_headers).value!
149
+ end
150
+
151
+ #
152
+ # List all existing alerts, where the results can be filtered on the basis of
153
+ # multiple parameters (e.g. time range). The results can then be sorted on the
154
+ # basis specific fields, with the default being lastModifiedDateTime.
155
+ #
156
+ # @param target_resource [String] Filter by target resource( which is full ARM
157
+ # ID) Default value is select all.
158
+ # @param target_resource_type [String] Filter by target resource type. Default
159
+ # value is select all.
160
+ # @param target_resource_group [String] Filter by target resource group name.
161
+ # Default value is select all.
162
+ # @param monitor_service [MonitorService] Filter by monitor service which
163
+ # generates the alert instance. Default value is select all. Possible values
164
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
165
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
166
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
167
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
168
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
169
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
170
+ # values include: 'Fired', 'Resolved'
171
+ # @param severity [Severity] Filter by severity. Default value is select all.
172
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
173
+ # @param alert_state [AlertState] Filter by state of the alert instance.
174
+ # Default value is to select all. Possible values include: 'New',
175
+ # 'Acknowledged', 'Closed'
176
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
177
+ # to select all.
178
+ # @param smart_group_id [String] Filter the alerts list by the Smart Group Id.
179
+ # Default value is none.
180
+ # @param include_context [Boolean] Include context which has contextual data
181
+ # specific to the monitor service. Default value is false'
182
+ # @param include_egress_config [Boolean] Include egress config which would be
183
+ # used for displaying the content in portal. Default value is 'false'.
184
+ # @param page_count [Integer] Determines number of alerts returned per page in
185
+ # response. Permissible value is between 1 to 250. When the "includeContent"
186
+ # filter is selected, maximum value allowed is 25. Default value is 25.
187
+ # @param sort_by [AlertsSortByFields] Sort the query results by input field,
188
+ # Default value is 'lastModifiedDateTime'. Possible values include: 'name',
189
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
190
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
191
+ # 'startDateTime', 'lastModifiedDateTime'
192
+ # @param sort_order [Enum] Sort the query results order in either ascending or
193
+ # descending. Default value is 'desc' for time fields and 'asc' for others.
194
+ # Possible values include: 'asc', 'desc'
195
+ # @param select [String] This filter allows to selection of the fields(comma
196
+ # separated) which would be part of the essential section. This would allow to
197
+ # project only the required fields rather than getting entire content.
198
+ # Default is to fetch all the fields in the essentials section.
199
+ # @param time_range [TimeRange] Filter by time range by below listed values.
200
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
201
+ # @param custom_time_range [String] Filter by custom time range in the format
202
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
203
+ # values is within 30 days from query time. Either timeRange or
204
+ # customTimeRange could be used but not both. Default is none.
205
+ # @param [Hash{String => String}] A hash of custom headers that will be added
206
+ # to the HTTP request.
207
+ #
208
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
209
+ #
210
+ def get_all_async(target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, smart_group_id:nil, include_context:nil, include_egress_config:nil, page_count:nil, sort_by:nil, sort_order:nil, select:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
211
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
212
+ @client.api_version = '2019-05-05-preview'
213
+
214
+
215
+ request_headers = {}
216
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
217
+
218
+ # Set Headers
219
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
220
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
221
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'
222
+
223
+ request_url = @base_url || @client.base_url
224
+
225
+ options = {
226
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
227
+ path_params: {'subscriptionId' => @client.subscription_id},
228
+ query_params: {'targetResource' => target_resource,'targetResourceType' => target_resource_type,'targetResourceGroup' => target_resource_group,'monitorService' => monitor_service,'monitorCondition' => monitor_condition,'severity' => severity,'alertState' => alert_state,'alertRule' => alert_rule,'smartGroupId' => smart_group_id,'includeContext' => include_context,'includeEgressConfig' => include_egress_config,'pageCount' => page_count,'sortBy' => sort_by,'sortOrder' => sort_order,'select' => select,'timeRange' => time_range,'customTimeRange' => custom_time_range,'api-version' => @client.api_version},
229
+ headers: request_headers.merge(custom_headers || {}),
230
+ base_url: request_url
231
+ }
232
+ promise = @client.make_request_async(:get, path_template, options)
233
+
234
+ promise = promise.then do |result|
235
+ http_response = result.response
236
+ status_code = http_response.status
237
+ response_content = http_response.body
238
+ unless status_code == 200
239
+ error_model = JSON.load(response_content)
240
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
241
+ end
242
+
243
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
244
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
245
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
246
+ # Deserialize Response
247
+ if status_code == 200
248
+ begin
249
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
250
+ result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::AlertsList.mapper()
251
+ result.body = @client.deserialize(result_mapper, parsed_response)
252
+ rescue Exception => e
253
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
254
+ end
255
+ end
256
+
257
+ result
258
+ end
259
+
260
+ promise.execute
261
+ end
262
+
263
+ #
264
+ # Get a specific alert.
265
+ #
266
+ # Get information related to a specific alert
267
+ #
268
+ # @param alert_id [String] Unique ID of an alert instance.
269
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
+ # will be added to the HTTP request.
271
+ #
272
+ # @return [Alert] operation results.
273
+ #
274
+ def get_by_id(alert_id, custom_headers:nil)
275
+ response = get_by_id_async(alert_id, custom_headers:custom_headers).value!
276
+ response.body unless response.nil?
277
+ end
278
+
279
+ #
280
+ # Get a specific alert.
281
+ #
282
+ # Get information related to a specific alert
283
+ #
284
+ # @param alert_id [String] Unique ID of an alert instance.
285
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
286
+ # will be added to the HTTP request.
287
+ #
288
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
289
+ #
290
+ def get_by_id_with_http_info(alert_id, custom_headers:nil)
291
+ get_by_id_async(alert_id, custom_headers:custom_headers).value!
292
+ end
293
+
294
+ #
295
+ # Get a specific alert.
296
+ #
297
+ # Get information related to a specific alert
298
+ #
299
+ # @param alert_id [String] Unique ID of an alert instance.
300
+ # @param [Hash{String => String}] A hash of custom headers that will be added
301
+ # to the HTTP request.
302
+ #
303
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
304
+ #
305
+ def get_by_id_async(alert_id, custom_headers:nil)
306
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
307
+ fail ArgumentError, 'alert_id is nil' if alert_id.nil?
308
+ @client.api_version = '2019-05-05-preview'
309
+
310
+
311
+ request_headers = {}
312
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
313
+
314
+ # Set Headers
315
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
316
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
317
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}'
318
+
319
+ request_url = @base_url || @client.base_url
320
+
321
+ options = {
322
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
323
+ path_params: {'subscriptionId' => @client.subscription_id,'alertId' => alert_id},
324
+ query_params: {'api-version' => @client.api_version},
325
+ headers: request_headers.merge(custom_headers || {}),
326
+ base_url: request_url
327
+ }
328
+ promise = @client.make_request_async(:get, path_template, options)
329
+
330
+ promise = promise.then do |result|
331
+ http_response = result.response
332
+ status_code = http_response.status
333
+ response_content = http_response.body
334
+ unless status_code == 200
335
+ error_model = JSON.load(response_content)
336
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
337
+ end
338
+
339
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
340
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
341
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
342
+ # Deserialize Response
343
+ if status_code == 200
344
+ begin
345
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
346
+ result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::Alert.mapper()
347
+ result.body = @client.deserialize(result_mapper, parsed_response)
348
+ rescue Exception => e
349
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
350
+ end
351
+ end
352
+
353
+ result
354
+ end
355
+
356
+ promise.execute
357
+ end
358
+
359
+ #
360
+ # Change the state of an alert.
361
+ #
362
+ # @param alert_id [String] Unique ID of an alert instance.
363
+ # @param new_state [AlertState] New state of the alert. Possible values
364
+ # include: 'New', 'Acknowledged', 'Closed'
365
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
366
+ # will be added to the HTTP request.
367
+ #
368
+ # @return [Alert] operation results.
369
+ #
370
+ def change_state(alert_id, new_state, custom_headers:nil)
371
+ response = change_state_async(alert_id, new_state, custom_headers:custom_headers).value!
372
+ response.body unless response.nil?
373
+ end
374
+
375
+ #
376
+ # Change the state of an alert.
377
+ #
378
+ # @param alert_id [String] Unique ID of an alert instance.
379
+ # @param new_state [AlertState] New state of the alert. Possible values
380
+ # include: 'New', 'Acknowledged', 'Closed'
381
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
382
+ # will be added to the HTTP request.
383
+ #
384
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
385
+ #
386
+ def change_state_with_http_info(alert_id, new_state, custom_headers:nil)
387
+ change_state_async(alert_id, new_state, custom_headers:custom_headers).value!
388
+ end
389
+
390
+ #
391
+ # Change the state of an alert.
392
+ #
393
+ # @param alert_id [String] Unique ID of an alert instance.
394
+ # @param new_state [AlertState] New state of the alert. Possible values
395
+ # include: 'New', 'Acknowledged', 'Closed'
396
+ # @param [Hash{String => String}] A hash of custom headers that will be added
397
+ # to the HTTP request.
398
+ #
399
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
400
+ #
401
+ def change_state_async(alert_id, new_state, custom_headers:nil)
402
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
403
+ fail ArgumentError, 'alert_id is nil' if alert_id.nil?
404
+ @client.api_version = '2019-05-05-preview'
405
+ fail ArgumentError, 'new_state is nil' if new_state.nil?
406
+
407
+
408
+ request_headers = {}
409
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
410
+
411
+ # Set Headers
412
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
413
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
414
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate'
415
+
416
+ request_url = @base_url || @client.base_url
417
+
418
+ options = {
419
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
420
+ path_params: {'subscriptionId' => @client.subscription_id,'alertId' => alert_id},
421
+ query_params: {'api-version' => @client.api_version,'newState' => new_state},
422
+ headers: request_headers.merge(custom_headers || {}),
423
+ base_url: request_url
424
+ }
425
+ promise = @client.make_request_async(:post, path_template, options)
426
+
427
+ promise = promise.then do |result|
428
+ http_response = result.response
429
+ status_code = http_response.status
430
+ response_content = http_response.body
431
+ unless status_code == 200
432
+ error_model = JSON.load(response_content)
433
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
434
+ end
435
+
436
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
437
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
438
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
439
+ # Deserialize Response
440
+ if status_code == 200
441
+ begin
442
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
443
+ result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::Alert.mapper()
444
+ result.body = @client.deserialize(result_mapper, parsed_response)
445
+ rescue Exception => e
446
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
447
+ end
448
+ end
449
+
450
+ result
451
+ end
452
+
453
+ promise.execute
454
+ end
455
+
456
+ #
457
+ # Get the history of an alert, which captures any monitor condition changes
458
+ # (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).
459
+ #
460
+ # @param alert_id [String] Unique ID of an alert instance.
461
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
462
+ # will be added to the HTTP request.
463
+ #
464
+ # @return [AlertModification] operation results.
465
+ #
466
+ def get_history(alert_id, custom_headers:nil)
467
+ response = get_history_async(alert_id, custom_headers:custom_headers).value!
468
+ response.body unless response.nil?
469
+ end
470
+
471
+ #
472
+ # Get the history of an alert, which captures any monitor condition changes
473
+ # (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).
474
+ #
475
+ # @param alert_id [String] Unique ID of an alert instance.
476
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
477
+ # will be added to the HTTP request.
478
+ #
479
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
480
+ #
481
+ def get_history_with_http_info(alert_id, custom_headers:nil)
482
+ get_history_async(alert_id, custom_headers:custom_headers).value!
483
+ end
484
+
485
+ #
486
+ # Get the history of an alert, which captures any monitor condition changes
487
+ # (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).
488
+ #
489
+ # @param alert_id [String] Unique ID of an alert instance.
490
+ # @param [Hash{String => String}] A hash of custom headers that will be added
491
+ # to the HTTP request.
492
+ #
493
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
494
+ #
495
+ def get_history_async(alert_id, custom_headers:nil)
496
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
497
+ fail ArgumentError, 'alert_id is nil' if alert_id.nil?
498
+ @client.api_version = '2019-05-05-preview'
499
+
500
+
501
+ request_headers = {}
502
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
503
+
504
+ # Set Headers
505
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
506
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
507
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'
508
+
509
+ request_url = @base_url || @client.base_url
510
+
511
+ options = {
512
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
513
+ path_params: {'subscriptionId' => @client.subscription_id,'alertId' => alert_id},
514
+ query_params: {'api-version' => @client.api_version},
515
+ headers: request_headers.merge(custom_headers || {}),
516
+ base_url: request_url
517
+ }
518
+ promise = @client.make_request_async(:get, path_template, options)
519
+
520
+ promise = promise.then do |result|
521
+ http_response = result.response
522
+ status_code = http_response.status
523
+ response_content = http_response.body
524
+ unless status_code == 200
525
+ error_model = JSON.load(response_content)
526
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
527
+ end
528
+
529
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
530
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
531
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
532
+ # Deserialize Response
533
+ if status_code == 200
534
+ begin
535
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
536
+ result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::AlertModification.mapper()
537
+ result.body = @client.deserialize(result_mapper, parsed_response)
538
+ rescue Exception => e
539
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
540
+ end
541
+ end
542
+
543
+ result
544
+ end
545
+
546
+ promise.execute
547
+ end
548
+
549
+ #
550
+ # Get a summarized count of your alerts grouped by various parameters (e.g.
551
+ # grouping by 'Severity' returns the count of alerts for each severity).
552
+ #
553
+ # @param groupby [AlertsSummaryGroupByFields] This parameter allows the result
554
+ # set to be grouped by input fields (Maximum 2 comma separated fields
555
+ # supported). For example, groupby=severity or groupby=severity,alertstate.
556
+ # Possible values include: 'severity', 'alertState', 'monitorCondition',
557
+ # 'monitorService', 'signalType', 'alertRule'
558
+ # @param include_smart_groups_count [Boolean] Include count of the SmartGroups
559
+ # as part of the summary. Default value is 'false'.
560
+ # @param target_resource [String] Filter by target resource( which is full ARM
561
+ # ID) Default value is select all.
562
+ # @param target_resource_type [String] Filter by target resource type. Default
563
+ # value is select all.
564
+ # @param target_resource_group [String] Filter by target resource group name.
565
+ # Default value is select all.
566
+ # @param monitor_service [MonitorService] Filter by monitor service which
567
+ # generates the alert instance. Default value is select all. Possible values
568
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
569
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
570
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
571
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
572
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
573
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
574
+ # values include: 'Fired', 'Resolved'
575
+ # @param severity [Severity] Filter by severity. Default value is select all.
576
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
577
+ # @param alert_state [AlertState] Filter by state of the alert instance.
578
+ # Default value is to select all. Possible values include: 'New',
579
+ # 'Acknowledged', 'Closed'
580
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
581
+ # to select all.
582
+ # @param time_range [TimeRange] Filter by time range by below listed values.
583
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
584
+ # @param custom_time_range [String] Filter by custom time range in the format
585
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
586
+ # values is within 30 days from query time. Either timeRange or
587
+ # customTimeRange could be used but not both. Default is none.
588
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
589
+ # will be added to the HTTP request.
590
+ #
591
+ # @return [AlertsSummary] operation results.
592
+ #
593
+ def get_summary(groupby, include_smart_groups_count:nil, target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
594
+ response = get_summary_async(groupby, include_smart_groups_count:include_smart_groups_count, target_resource:target_resource, target_resource_type:target_resource_type, target_resource_group:target_resource_group, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, alert_rule:alert_rule, time_range:time_range, custom_time_range:custom_time_range, custom_headers:custom_headers).value!
595
+ response.body unless response.nil?
596
+ end
597
+
598
+ #
599
+ # Get a summarized count of your alerts grouped by various parameters (e.g.
600
+ # grouping by 'Severity' returns the count of alerts for each severity).
601
+ #
602
+ # @param groupby [AlertsSummaryGroupByFields] This parameter allows the result
603
+ # set to be grouped by input fields (Maximum 2 comma separated fields
604
+ # supported). For example, groupby=severity or groupby=severity,alertstate.
605
+ # Possible values include: 'severity', 'alertState', 'monitorCondition',
606
+ # 'monitorService', 'signalType', 'alertRule'
607
+ # @param include_smart_groups_count [Boolean] Include count of the SmartGroups
608
+ # as part of the summary. Default value is 'false'.
609
+ # @param target_resource [String] Filter by target resource( which is full ARM
610
+ # ID) Default value is select all.
611
+ # @param target_resource_type [String] Filter by target resource type. Default
612
+ # value is select all.
613
+ # @param target_resource_group [String] Filter by target resource group name.
614
+ # Default value is select all.
615
+ # @param monitor_service [MonitorService] Filter by monitor service which
616
+ # generates the alert instance. Default value is select all. Possible values
617
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
618
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
619
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
620
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
621
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
622
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
623
+ # values include: 'Fired', 'Resolved'
624
+ # @param severity [Severity] Filter by severity. Default value is select all.
625
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
626
+ # @param alert_state [AlertState] Filter by state of the alert instance.
627
+ # Default value is to select all. Possible values include: 'New',
628
+ # 'Acknowledged', 'Closed'
629
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
630
+ # to select all.
631
+ # @param time_range [TimeRange] Filter by time range by below listed values.
632
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
633
+ # @param custom_time_range [String] Filter by custom time range in the format
634
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
635
+ # values is within 30 days from query time. Either timeRange or
636
+ # customTimeRange could be used but not both. Default is none.
637
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
638
+ # will be added to the HTTP request.
639
+ #
640
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
641
+ #
642
+ def get_summary_with_http_info(groupby, include_smart_groups_count:nil, target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
643
+ get_summary_async(groupby, include_smart_groups_count:include_smart_groups_count, target_resource:target_resource, target_resource_type:target_resource_type, target_resource_group:target_resource_group, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, alert_rule:alert_rule, time_range:time_range, custom_time_range:custom_time_range, custom_headers:custom_headers).value!
644
+ end
645
+
646
+ #
647
+ # Get a summarized count of your alerts grouped by various parameters (e.g.
648
+ # grouping by 'Severity' returns the count of alerts for each severity).
649
+ #
650
+ # @param groupby [AlertsSummaryGroupByFields] This parameter allows the result
651
+ # set to be grouped by input fields (Maximum 2 comma separated fields
652
+ # supported). For example, groupby=severity or groupby=severity,alertstate.
653
+ # Possible values include: 'severity', 'alertState', 'monitorCondition',
654
+ # 'monitorService', 'signalType', 'alertRule'
655
+ # @param include_smart_groups_count [Boolean] Include count of the SmartGroups
656
+ # as part of the summary. Default value is 'false'.
657
+ # @param target_resource [String] Filter by target resource( which is full ARM
658
+ # ID) Default value is select all.
659
+ # @param target_resource_type [String] Filter by target resource type. Default
660
+ # value is select all.
661
+ # @param target_resource_group [String] Filter by target resource group name.
662
+ # Default value is select all.
663
+ # @param monitor_service [MonitorService] Filter by monitor service which
664
+ # generates the alert instance. Default value is select all. Possible values
665
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
666
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
667
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
668
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
669
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
670
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
671
+ # values include: 'Fired', 'Resolved'
672
+ # @param severity [Severity] Filter by severity. Default value is select all.
673
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
674
+ # @param alert_state [AlertState] Filter by state of the alert instance.
675
+ # Default value is to select all. Possible values include: 'New',
676
+ # 'Acknowledged', 'Closed'
677
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
678
+ # to select all.
679
+ # @param time_range [TimeRange] Filter by time range by below listed values.
680
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
681
+ # @param custom_time_range [String] Filter by custom time range in the format
682
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
683
+ # values is within 30 days from query time. Either timeRange or
684
+ # customTimeRange could be used but not both. Default is none.
685
+ # @param [Hash{String => String}] A hash of custom headers that will be added
686
+ # to the HTTP request.
687
+ #
688
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
689
+ #
690
+ def get_summary_async(groupby, include_smart_groups_count:nil, target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
691
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
692
+ fail ArgumentError, 'groupby is nil' if groupby.nil?
693
+ @client.api_version = '2019-05-05-preview'
694
+
695
+
696
+ request_headers = {}
697
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
698
+
699
+ # Set Headers
700
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
701
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
702
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary'
703
+
704
+ request_url = @base_url || @client.base_url
705
+
706
+ options = {
707
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
708
+ path_params: {'subscriptionId' => @client.subscription_id},
709
+ query_params: {'groupby' => groupby,'includeSmartGroupsCount' => include_smart_groups_count,'targetResource' => target_resource,'targetResourceType' => target_resource_type,'targetResourceGroup' => target_resource_group,'monitorService' => monitor_service,'monitorCondition' => monitor_condition,'severity' => severity,'alertState' => alert_state,'alertRule' => alert_rule,'timeRange' => time_range,'customTimeRange' => custom_time_range,'api-version' => @client.api_version},
710
+ headers: request_headers.merge(custom_headers || {}),
711
+ base_url: request_url
712
+ }
713
+ promise = @client.make_request_async(:get, path_template, options)
714
+
715
+ promise = promise.then do |result|
716
+ http_response = result.response
717
+ status_code = http_response.status
718
+ response_content = http_response.body
719
+ unless status_code == 200
720
+ error_model = JSON.load(response_content)
721
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
722
+ end
723
+
724
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
725
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
726
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
727
+ # Deserialize Response
728
+ if status_code == 200
729
+ begin
730
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
731
+ result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::AlertsSummary.mapper()
732
+ result.body = @client.deserialize(result_mapper, parsed_response)
733
+ rescue Exception => e
734
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
735
+ end
736
+ end
737
+
738
+ result
739
+ end
740
+
741
+ promise.execute
742
+ end
743
+
744
+ #
745
+ # List all existing alerts, where the results can be filtered on the basis of
746
+ # multiple parameters (e.g. time range). The results can then be sorted on the
747
+ # basis specific fields, with the default being lastModifiedDateTime.
748
+ #
749
+ # @param next_page_link [String] The NextLink from the previous successful call
750
+ # to List operation.
751
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
752
+ # will be added to the HTTP request.
753
+ #
754
+ # @return [AlertsList] operation results.
755
+ #
756
+ def get_all_next(next_page_link, custom_headers:nil)
757
+ response = get_all_next_async(next_page_link, custom_headers:custom_headers).value!
758
+ response.body unless response.nil?
759
+ end
760
+
761
+ #
762
+ # List all existing alerts, where the results can be filtered on the basis of
763
+ # multiple parameters (e.g. time range). The results can then be sorted on the
764
+ # basis specific fields, with the default being lastModifiedDateTime.
765
+ #
766
+ # @param next_page_link [String] The NextLink from the previous successful call
767
+ # to List operation.
768
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
769
+ # will be added to the HTTP request.
770
+ #
771
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
772
+ #
773
+ def get_all_next_with_http_info(next_page_link, custom_headers:nil)
774
+ get_all_next_async(next_page_link, custom_headers:custom_headers).value!
775
+ end
776
+
777
+ #
778
+ # List all existing alerts, where the results can be filtered on the basis of
779
+ # multiple parameters (e.g. time range). The results can then be sorted on the
780
+ # basis specific fields, with the default being lastModifiedDateTime.
781
+ #
782
+ # @param next_page_link [String] The NextLink from the previous successful call
783
+ # to List operation.
784
+ # @param [Hash{String => String}] A hash of custom headers that will be added
785
+ # to the HTTP request.
786
+ #
787
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
788
+ #
789
+ def get_all_next_async(next_page_link, custom_headers:nil)
790
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
791
+
792
+
793
+ request_headers = {}
794
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
795
+
796
+ # Set Headers
797
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
798
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
799
+ path_template = '{nextLink}'
800
+
801
+ request_url = @base_url || @client.base_url
802
+
803
+ options = {
804
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
805
+ skip_encoding_path_params: {'nextLink' => next_page_link},
806
+ headers: request_headers.merge(custom_headers || {}),
807
+ base_url: request_url
808
+ }
809
+ promise = @client.make_request_async(:get, path_template, options)
810
+
811
+ promise = promise.then do |result|
812
+ http_response = result.response
813
+ status_code = http_response.status
814
+ response_content = http_response.body
815
+ unless status_code == 200
816
+ error_model = JSON.load(response_content)
817
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
818
+ end
819
+
820
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
821
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
822
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
823
+ # Deserialize Response
824
+ if status_code == 200
825
+ begin
826
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
827
+ result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::AlertsList.mapper()
828
+ result.body = @client.deserialize(result_mapper, parsed_response)
829
+ rescue Exception => e
830
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
831
+ end
832
+ end
833
+
834
+ result
835
+ end
836
+
837
+ promise.execute
838
+ end
839
+
840
+ #
841
+ # List all existing alerts, where the results can be filtered on the basis of
842
+ # multiple parameters (e.g. time range). The results can then be sorted on the
843
+ # basis specific fields, with the default being lastModifiedDateTime.
844
+ #
845
+ # @param target_resource [String] Filter by target resource( which is full ARM
846
+ # ID) Default value is select all.
847
+ # @param target_resource_type [String] Filter by target resource type. Default
848
+ # value is select all.
849
+ # @param target_resource_group [String] Filter by target resource group name.
850
+ # Default value is select all.
851
+ # @param monitor_service [MonitorService] Filter by monitor service which
852
+ # generates the alert instance. Default value is select all. Possible values
853
+ # include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
854
+ # Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
855
+ # Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
856
+ # 'SmartDetector', 'VM Insights', 'Zabbix'
857
+ # @param monitor_condition [MonitorCondition] Filter by monitor condition which
858
+ # is either 'Fired' or 'Resolved'. Default value is to select all. Possible
859
+ # values include: 'Fired', 'Resolved'
860
+ # @param severity [Severity] Filter by severity. Default value is select all.
861
+ # Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
862
+ # @param alert_state [AlertState] Filter by state of the alert instance.
863
+ # Default value is to select all. Possible values include: 'New',
864
+ # 'Acknowledged', 'Closed'
865
+ # @param alert_rule [String] Filter by specific alert rule. Default value is
866
+ # to select all.
867
+ # @param smart_group_id [String] Filter the alerts list by the Smart Group Id.
868
+ # Default value is none.
869
+ # @param include_context [Boolean] Include context which has contextual data
870
+ # specific to the monitor service. Default value is false'
871
+ # @param include_egress_config [Boolean] Include egress config which would be
872
+ # used for displaying the content in portal. Default value is 'false'.
873
+ # @param page_count [Integer] Determines number of alerts returned per page in
874
+ # response. Permissible value is between 1 to 250. When the "includeContent"
875
+ # filter is selected, maximum value allowed is 25. Default value is 25.
876
+ # @param sort_by [AlertsSortByFields] Sort the query results by input field,
877
+ # Default value is 'lastModifiedDateTime'. Possible values include: 'name',
878
+ # 'severity', 'alertState', 'monitorCondition', 'targetResource',
879
+ # 'targetResourceName', 'targetResourceGroup', 'targetResourceType',
880
+ # 'startDateTime', 'lastModifiedDateTime'
881
+ # @param sort_order [Enum] Sort the query results order in either ascending or
882
+ # descending. Default value is 'desc' for time fields and 'asc' for others.
883
+ # Possible values include: 'asc', 'desc'
884
+ # @param select [String] This filter allows to selection of the fields(comma
885
+ # separated) which would be part of the essential section. This would allow to
886
+ # project only the required fields rather than getting entire content.
887
+ # Default is to fetch all the fields in the essentials section.
888
+ # @param time_range [TimeRange] Filter by time range by below listed values.
889
+ # Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
890
+ # @param custom_time_range [String] Filter by custom time range in the format
891
+ # <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible
892
+ # values is within 30 days from query time. Either timeRange or
893
+ # customTimeRange could be used but not both. Default is none.
894
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
895
+ # will be added to the HTTP request.
896
+ #
897
+ # @return [AlertsList] which provide lazy access to pages of the response.
898
+ #
899
+ def get_all_as_lazy(target_resource:nil, target_resource_type:nil, target_resource_group:nil, monitor_service:nil, monitor_condition:nil, severity:nil, alert_state:nil, alert_rule:nil, smart_group_id:nil, include_context:nil, include_egress_config:nil, page_count:nil, sort_by:nil, sort_order:nil, select:nil, time_range:nil, custom_time_range:nil, custom_headers:nil)
900
+ response = get_all_async(target_resource:target_resource, target_resource_type:target_resource_type, target_resource_group:target_resource_group, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, alert_state:alert_state, alert_rule:alert_rule, smart_group_id:smart_group_id, include_context:include_context, include_egress_config:include_egress_config, page_count:page_count, sort_by:sort_by, sort_order:sort_order, select:select, time_range:time_range, custom_time_range:custom_time_range, custom_headers:custom_headers).value!
901
+ unless response.nil?
902
+ page = response.body
903
+ page.next_method = Proc.new do |next_page_link|
904
+ get_all_next_async(next_page_link, custom_headers:custom_headers)
905
+ end
906
+ page
907
+ end
908
+ end
909
+
910
+ end
911
+ end