azure_mgmt_alerts_management 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management.rb +76 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/alerts.rb +708 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/alerts_management_client.rb +150 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert.rb +259 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +147 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_monitor_condition.rb +57 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_monitor_service.rb +189 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition.rb +101 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev0.rb +52 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev1.rb +52 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev2.rb +52 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev3.rb +52 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_severity_and_monitor_condition_sev4.rb +52 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_by_state.rb +68 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_monitor_service.rb +148 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity.rb +100 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_and_monitor_condition.rb +81 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev0.rb +60 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev1.rb +60 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev2.rb +60 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev3.rb +60 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_severity_sev4.rb +60 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_properties_summary_by_state.rb +59 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/api_version.rb +16 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_service.rb +28 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/resource.rb +80 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +66 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/operations.rb +225 -0
- data/lib/2018-05-05-preview/generated/azure_mgmt_alerts_management/smart_groups.rb +460 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management.rb +64 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/alerts.rb +908 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/alerts_management_client.rb +141 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert.rb +74 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_properties.rb +69 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +74 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary_group.rb +88 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary_group_by_fields.rb +20 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/alerts_summary_group_item.rb +88 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/error_response.rb +47 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/error_response_body.rb +91 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/essentials.rb +257 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/monitor_service.rb +28 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/resource.rb +80 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +98 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/operations.rb +225 -0
- data/lib/2018-05-05/generated/azure_mgmt_alerts_management/smart_groups.rb +648 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management.rb +71 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/alerts.rb +977 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/alerts_management_client.rb +154 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/action_groups_information.rb +78 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert.rb +74 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_properties.rb +69 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_rule.rb +164 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_rule_state.rb +16 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_rules_list.rb +98 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +74 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary_group.rb +88 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary_group_by_fields.rb +20 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/alerts_summary_group_item.rb +88 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/azure_resource.rb +71 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/detector.rb +130 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/error_response1.rb +57 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/essentials.rb +257 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/monitor_service.rb +29 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/proxy_resource.rb +71 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +66 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/throttling_information.rb +48 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/operations.rb +225 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/smart_detector_alert_rules.rb +725 -0
- data/lib/2019-03-01/generated/azure_mgmt_alerts_management/smart_groups.rb +499 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management.rb +82 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/action_rules.rb +1082 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/alerts.rb +911 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/alerts_management_client.rb +145 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_group.rb +133 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rule.rb +101 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rule_properties.rb +146 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rule_status.rb +16 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/action_rules_list.rb +98 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert.rb +74 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification.rb +74 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_event.rb +17 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_item.rb +114 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_modification_properties.rb +68 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_properties.rb +69 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alert_state.rb +17 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_list.rb +98 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_sort_by_fields.rb +24 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary.rb +74 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_group.rb +88 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_group_by_fields.rb +20 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/alerts_summary_group_item.rb +88 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/condition.rb +66 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/conditions.rb +121 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/diagnostics.rb +122 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/error_response.rb +47 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/error_response_body.rb +91 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/essentials.rb +258 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/managed_resource.rb +92 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_condition.rb +16 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/monitor_service.rb +28 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operation.rb +58 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operation_display.rb +79 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operations_list.rb +98 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/operator.rb +18 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/patch_object.rb +58 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/resource.rb +80 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/scope.rb +69 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/scope_type.rb +16 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/severity.rb +19 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/signal_type.rb +17 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group.rb +297 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_aggregated_property.rb +57 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification.rb +74 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_event.rb +18 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_item.rb +115 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_group_modification_properties.rb +79 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_list.rb +98 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/smart_groups_sort_by_fields.rb +19 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/state.rb +17 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression.rb +135 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression_config.rb +60 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression_schedule.rb +98 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/suppression_type.rb +19 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/models/time_range.rb +18 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/module_definition.rb +9 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/operations.rb +225 -0
- data/lib/2019-05-05-preview/generated/azure_mgmt_alerts_management/smart_groups.rb +648 -0
- data/lib/azure_mgmt_alerts_management.rb +9 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/alertsmanagement_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/alertsmanagement_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/alertsmanagement_profile_module.rb +271 -0
- data/lib/version.rb +7 -0
- metadata +321 -0
@@ -0,0 +1,19 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for SuppressionType
|
10
|
+
#
|
11
|
+
module SuppressionType
|
12
|
+
Always = "Always"
|
13
|
+
Once = "Once"
|
14
|
+
Daily = "Daily"
|
15
|
+
Weekly = "Weekly"
|
16
|
+
Monthly = "Monthly"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for TimeRange
|
10
|
+
#
|
11
|
+
module TimeRange
|
12
|
+
Oneh = "1h"
|
13
|
+
Oned = "1d"
|
14
|
+
Sevend = "7d"
|
15
|
+
ThreeZerod = "30d"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::AlertsManagement end
|
8
|
+
module Azure::AlertsManagement::Mgmt end
|
9
|
+
module Azure::AlertsManagement::Mgmt::V2019_05_05_preview end
|
@@ -0,0 +1,225 @@
|
|
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 Operations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operations 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 operations available through Azure Alerts Management Resource
|
26
|
+
# Provider.
|
27
|
+
#
|
28
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
29
|
+
# will be added to the HTTP request.
|
30
|
+
#
|
31
|
+
# @return [Array<Operation>] operation results.
|
32
|
+
#
|
33
|
+
def list(custom_headers:nil)
|
34
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
35
|
+
first_page.get_all_items
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# List all operations available through Azure Alerts Management Resource
|
40
|
+
# Provider.
|
41
|
+
#
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
46
|
+
#
|
47
|
+
def list_with_http_info(custom_headers:nil)
|
48
|
+
list_async(custom_headers:custom_headers).value!
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# List all operations available through Azure Alerts Management Resource
|
53
|
+
# Provider.
|
54
|
+
#
|
55
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
56
|
+
# to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
59
|
+
#
|
60
|
+
def list_async(custom_headers:nil)
|
61
|
+
@client.api_version = '2019-05-05-preview'
|
62
|
+
|
63
|
+
|
64
|
+
request_headers = {}
|
65
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
66
|
+
|
67
|
+
# Set Headers
|
68
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
69
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
70
|
+
path_template = 'providers/Microsoft.AlertsManagement/operations'
|
71
|
+
|
72
|
+
request_url = @base_url || @client.base_url
|
73
|
+
|
74
|
+
options = {
|
75
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
76
|
+
query_params: {'api-version' => @client.api_version},
|
77
|
+
headers: request_headers.merge(custom_headers || {}),
|
78
|
+
base_url: request_url
|
79
|
+
}
|
80
|
+
promise = @client.make_request_async(:get, path_template, options)
|
81
|
+
|
82
|
+
promise = promise.then do |result|
|
83
|
+
http_response = result.response
|
84
|
+
status_code = http_response.status
|
85
|
+
response_content = http_response.body
|
86
|
+
unless status_code == 200
|
87
|
+
error_model = JSON.load(response_content)
|
88
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
89
|
+
end
|
90
|
+
|
91
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
92
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
93
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
94
|
+
# Deserialize Response
|
95
|
+
if status_code == 200
|
96
|
+
begin
|
97
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
98
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::OperationsList.mapper()
|
99
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
100
|
+
rescue Exception => e
|
101
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
result
|
106
|
+
end
|
107
|
+
|
108
|
+
promise.execute
|
109
|
+
end
|
110
|
+
|
111
|
+
#
|
112
|
+
# List all operations available through Azure Alerts Management Resource
|
113
|
+
# Provider.
|
114
|
+
#
|
115
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
116
|
+
# to List operation.
|
117
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
118
|
+
# will be added to the HTTP request.
|
119
|
+
#
|
120
|
+
# @return [OperationsList] operation results.
|
121
|
+
#
|
122
|
+
def list_next(next_page_link, custom_headers:nil)
|
123
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
124
|
+
response.body unless response.nil?
|
125
|
+
end
|
126
|
+
|
127
|
+
#
|
128
|
+
# List all operations available through Azure Alerts Management Resource
|
129
|
+
# Provider.
|
130
|
+
#
|
131
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
132
|
+
# to List operation.
|
133
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
134
|
+
# will be added to the HTTP request.
|
135
|
+
#
|
136
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
137
|
+
#
|
138
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
139
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
140
|
+
end
|
141
|
+
|
142
|
+
#
|
143
|
+
# List all operations available through Azure Alerts Management Resource
|
144
|
+
# Provider.
|
145
|
+
#
|
146
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
147
|
+
# to List operation.
|
148
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
149
|
+
# to the HTTP request.
|
150
|
+
#
|
151
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
152
|
+
#
|
153
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
154
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
155
|
+
|
156
|
+
|
157
|
+
request_headers = {}
|
158
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
159
|
+
|
160
|
+
# Set Headers
|
161
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
162
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
163
|
+
path_template = '{nextLink}'
|
164
|
+
|
165
|
+
request_url = @base_url || @client.base_url
|
166
|
+
|
167
|
+
options = {
|
168
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
169
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
170
|
+
headers: request_headers.merge(custom_headers || {}),
|
171
|
+
base_url: request_url
|
172
|
+
}
|
173
|
+
promise = @client.make_request_async(:get, path_template, options)
|
174
|
+
|
175
|
+
promise = promise.then do |result|
|
176
|
+
http_response = result.response
|
177
|
+
status_code = http_response.status
|
178
|
+
response_content = http_response.body
|
179
|
+
unless status_code == 200
|
180
|
+
error_model = JSON.load(response_content)
|
181
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
182
|
+
end
|
183
|
+
|
184
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
185
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
186
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
187
|
+
# Deserialize Response
|
188
|
+
if status_code == 200
|
189
|
+
begin
|
190
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
191
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::OperationsList.mapper()
|
192
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
193
|
+
rescue Exception => e
|
194
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
result
|
199
|
+
end
|
200
|
+
|
201
|
+
promise.execute
|
202
|
+
end
|
203
|
+
|
204
|
+
#
|
205
|
+
# List all operations available through Azure Alerts Management Resource
|
206
|
+
# Provider.
|
207
|
+
#
|
208
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
209
|
+
# will be added to the HTTP request.
|
210
|
+
#
|
211
|
+
# @return [OperationsList] which provide lazy access to pages of the response.
|
212
|
+
#
|
213
|
+
def list_as_lazy(custom_headers:nil)
|
214
|
+
response = list_async(custom_headers:custom_headers).value!
|
215
|
+
unless response.nil?
|
216
|
+
page = response.body
|
217
|
+
page.next_method = Proc.new do |next_page_link|
|
218
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
219
|
+
end
|
220
|
+
page
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
end
|
@@ -0,0 +1,648 @@
|
|
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 SmartGroups
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the SmartGroups 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
|
+
# Get all Smart Groups within a specified subscription
|
26
|
+
#
|
27
|
+
# List all the Smart Groups within a specified subscription.
|
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_group [String] Filter by target resource group name.
|
32
|
+
# Default value is select all.
|
33
|
+
# @param target_resource_type [String] Filter by target resource type. Default
|
34
|
+
# 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 smart_group_state [AlertState] Filter by state of the smart group.
|
47
|
+
# Default value is to select all. Possible values include: 'New',
|
48
|
+
# 'Acknowledged', 'Closed'
|
49
|
+
# @param time_range [TimeRange] Filter by time range by below listed values.
|
50
|
+
# Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
|
51
|
+
# @param page_count [Integer] Determines number of alerts returned per page in
|
52
|
+
# response. Permissible value is between 1 to 250. When the "includeContent"
|
53
|
+
# filter is selected, maximum value allowed is 25. Default value is 25.
|
54
|
+
# @param sort_by [SmartGroupsSortByFields] Sort the query results by input
|
55
|
+
# field. Default value is sort by 'lastModifiedDateTime'. Possible values
|
56
|
+
# include: 'alertsCount', 'state', 'severity', 'startDateTime',
|
57
|
+
# 'lastModifiedDateTime'
|
58
|
+
# @param sort_order [Enum] Sort the query results order in either ascending or
|
59
|
+
# descending. Default value is 'desc' for time fields and 'asc' for others.
|
60
|
+
# Possible values include: 'asc', 'desc'
|
61
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
62
|
+
# will be added to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Array<SmartGroup>] operation results.
|
65
|
+
#
|
66
|
+
def get_all(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_service:nil, monitor_condition:nil, severity:nil, smart_group_state:nil, time_range:nil, page_count:nil, sort_by:nil, sort_order:nil, custom_headers:nil)
|
67
|
+
first_page = get_all_as_lazy(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, smart_group_state:smart_group_state, time_range:time_range, page_count:page_count, sort_by:sort_by, sort_order:sort_order, custom_headers:custom_headers)
|
68
|
+
first_page.get_all_items
|
69
|
+
end
|
70
|
+
|
71
|
+
#
|
72
|
+
# Get all Smart Groups within a specified subscription
|
73
|
+
#
|
74
|
+
# List all the Smart Groups within a specified subscription.
|
75
|
+
#
|
76
|
+
# @param target_resource [String] Filter by target resource( which is full ARM
|
77
|
+
# ID) Default value is select all.
|
78
|
+
# @param target_resource_group [String] Filter by target resource group name.
|
79
|
+
# Default value is select all.
|
80
|
+
# @param target_resource_type [String] Filter by target resource type. Default
|
81
|
+
# value is select all.
|
82
|
+
# @param monitor_service [MonitorService] Filter by monitor service which
|
83
|
+
# generates the alert instance. Default value is select all. Possible values
|
84
|
+
# include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
|
85
|
+
# Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
|
86
|
+
# Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
|
87
|
+
# 'SmartDetector', 'VM Insights', 'Zabbix'
|
88
|
+
# @param monitor_condition [MonitorCondition] Filter by monitor condition which
|
89
|
+
# is either 'Fired' or 'Resolved'. Default value is to select all. Possible
|
90
|
+
# values include: 'Fired', 'Resolved'
|
91
|
+
# @param severity [Severity] Filter by severity. Default value is select all.
|
92
|
+
# Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
|
93
|
+
# @param smart_group_state [AlertState] Filter by state of the smart group.
|
94
|
+
# Default value is to select all. Possible values include: 'New',
|
95
|
+
# 'Acknowledged', 'Closed'
|
96
|
+
# @param time_range [TimeRange] Filter by time range by below listed values.
|
97
|
+
# Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
|
98
|
+
# @param page_count [Integer] Determines number of alerts returned per page in
|
99
|
+
# response. Permissible value is between 1 to 250. When the "includeContent"
|
100
|
+
# filter is selected, maximum value allowed is 25. Default value is 25.
|
101
|
+
# @param sort_by [SmartGroupsSortByFields] Sort the query results by input
|
102
|
+
# field. Default value is sort by 'lastModifiedDateTime'. Possible values
|
103
|
+
# include: 'alertsCount', 'state', 'severity', 'startDateTime',
|
104
|
+
# 'lastModifiedDateTime'
|
105
|
+
# @param sort_order [Enum] Sort the query results order in either ascending or
|
106
|
+
# descending. Default value is 'desc' for time fields and 'asc' for others.
|
107
|
+
# Possible values include: 'asc', 'desc'
|
108
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
109
|
+
# will be added to the HTTP request.
|
110
|
+
#
|
111
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
112
|
+
#
|
113
|
+
def get_all_with_http_info(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_service:nil, monitor_condition:nil, severity:nil, smart_group_state:nil, time_range:nil, page_count:nil, sort_by:nil, sort_order:nil, custom_headers:nil)
|
114
|
+
get_all_async(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, smart_group_state:smart_group_state, time_range:time_range, page_count:page_count, sort_by:sort_by, sort_order:sort_order, custom_headers:custom_headers).value!
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Get all Smart Groups within a specified subscription
|
119
|
+
#
|
120
|
+
# List all the Smart Groups within a specified subscription.
|
121
|
+
#
|
122
|
+
# @param target_resource [String] Filter by target resource( which is full ARM
|
123
|
+
# ID) Default value is select all.
|
124
|
+
# @param target_resource_group [String] Filter by target resource group name.
|
125
|
+
# Default value is select all.
|
126
|
+
# @param target_resource_type [String] Filter by target resource type. Default
|
127
|
+
# value is select all.
|
128
|
+
# @param monitor_service [MonitorService] Filter by monitor service which
|
129
|
+
# generates the alert instance. Default value is select all. Possible values
|
130
|
+
# include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
|
131
|
+
# Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
|
132
|
+
# Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
|
133
|
+
# 'SmartDetector', 'VM Insights', 'Zabbix'
|
134
|
+
# @param monitor_condition [MonitorCondition] Filter by monitor condition which
|
135
|
+
# is either 'Fired' or 'Resolved'. Default value is to select all. Possible
|
136
|
+
# values include: 'Fired', 'Resolved'
|
137
|
+
# @param severity [Severity] Filter by severity. Default value is select all.
|
138
|
+
# Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
|
139
|
+
# @param smart_group_state [AlertState] Filter by state of the smart group.
|
140
|
+
# Default value is to select all. Possible values include: 'New',
|
141
|
+
# 'Acknowledged', 'Closed'
|
142
|
+
# @param time_range [TimeRange] Filter by time range by below listed values.
|
143
|
+
# Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
|
144
|
+
# @param page_count [Integer] Determines number of alerts returned per page in
|
145
|
+
# response. Permissible value is between 1 to 250. When the "includeContent"
|
146
|
+
# filter is selected, maximum value allowed is 25. Default value is 25.
|
147
|
+
# @param sort_by [SmartGroupsSortByFields] Sort the query results by input
|
148
|
+
# field. Default value is sort by 'lastModifiedDateTime'. Possible values
|
149
|
+
# include: 'alertsCount', 'state', 'severity', 'startDateTime',
|
150
|
+
# 'lastModifiedDateTime'
|
151
|
+
# @param sort_order [Enum] Sort the query results order in either ascending or
|
152
|
+
# descending. Default value is 'desc' for time fields and 'asc' for others.
|
153
|
+
# Possible values include: 'asc', 'desc'
|
154
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
155
|
+
# to the HTTP request.
|
156
|
+
#
|
157
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
158
|
+
#
|
159
|
+
def get_all_async(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_service:nil, monitor_condition:nil, severity:nil, smart_group_state:nil, time_range:nil, page_count:nil, sort_by:nil, sort_order:nil, custom_headers:nil)
|
160
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
161
|
+
@client.api_version = '2019-05-05-preview'
|
162
|
+
|
163
|
+
|
164
|
+
request_headers = {}
|
165
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
166
|
+
|
167
|
+
# Set Headers
|
168
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
169
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
170
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'
|
171
|
+
|
172
|
+
request_url = @base_url || @client.base_url
|
173
|
+
|
174
|
+
options = {
|
175
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
176
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
177
|
+
query_params: {'targetResource' => target_resource,'targetResourceGroup' => target_resource_group,'targetResourceType' => target_resource_type,'monitorService' => monitor_service,'monitorCondition' => monitor_condition,'severity' => severity,'smartGroupState' => smart_group_state,'timeRange' => time_range,'pageCount' => page_count,'sortBy' => sort_by,'sortOrder' => sort_order,'api-version' => @client.api_version},
|
178
|
+
headers: request_headers.merge(custom_headers || {}),
|
179
|
+
base_url: request_url
|
180
|
+
}
|
181
|
+
promise = @client.make_request_async(:get, path_template, options)
|
182
|
+
|
183
|
+
promise = promise.then do |result|
|
184
|
+
http_response = result.response
|
185
|
+
status_code = http_response.status
|
186
|
+
response_content = http_response.body
|
187
|
+
unless status_code == 200
|
188
|
+
error_model = JSON.load(response_content)
|
189
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
190
|
+
end
|
191
|
+
|
192
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
193
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
194
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
195
|
+
# Deserialize Response
|
196
|
+
if status_code == 200
|
197
|
+
begin
|
198
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
199
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::SmartGroupsList.mapper()
|
200
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
201
|
+
rescue Exception => e
|
202
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
result
|
207
|
+
end
|
208
|
+
|
209
|
+
promise.execute
|
210
|
+
end
|
211
|
+
|
212
|
+
#
|
213
|
+
# Get information related to a specific Smart Group.
|
214
|
+
#
|
215
|
+
# Get information related to a specific Smart Group.
|
216
|
+
#
|
217
|
+
# @param smart_group_id [String] Smart group unique id.
|
218
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
219
|
+
# will be added to the HTTP request.
|
220
|
+
#
|
221
|
+
# @return [SmartGroup] operation results.
|
222
|
+
#
|
223
|
+
def get_by_id(smart_group_id, custom_headers:nil)
|
224
|
+
response = get_by_id_async(smart_group_id, custom_headers:custom_headers).value!
|
225
|
+
response.body unless response.nil?
|
226
|
+
end
|
227
|
+
|
228
|
+
#
|
229
|
+
# Get information related to a specific Smart Group.
|
230
|
+
#
|
231
|
+
# Get information related to a specific Smart Group.
|
232
|
+
#
|
233
|
+
# @param smart_group_id [String] Smart group unique id.
|
234
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
235
|
+
# will be added to the HTTP request.
|
236
|
+
#
|
237
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
238
|
+
#
|
239
|
+
def get_by_id_with_http_info(smart_group_id, custom_headers:nil)
|
240
|
+
get_by_id_async(smart_group_id, custom_headers:custom_headers).value!
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
# Get information related to a specific Smart Group.
|
245
|
+
#
|
246
|
+
# Get information related to a specific Smart Group.
|
247
|
+
#
|
248
|
+
# @param smart_group_id [String] Smart group unique id.
|
249
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
250
|
+
# to the HTTP request.
|
251
|
+
#
|
252
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
253
|
+
#
|
254
|
+
def get_by_id_async(smart_group_id, custom_headers:nil)
|
255
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
256
|
+
fail ArgumentError, 'smart_group_id is nil' if smart_group_id.nil?
|
257
|
+
@client.api_version = '2019-05-05-preview'
|
258
|
+
|
259
|
+
|
260
|
+
request_headers = {}
|
261
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
262
|
+
|
263
|
+
# Set Headers
|
264
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
265
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
266
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}'
|
267
|
+
|
268
|
+
request_url = @base_url || @client.base_url
|
269
|
+
|
270
|
+
options = {
|
271
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
272
|
+
path_params: {'subscriptionId' => @client.subscription_id,'smartGroupId' => smart_group_id},
|
273
|
+
query_params: {'api-version' => @client.api_version},
|
274
|
+
headers: request_headers.merge(custom_headers || {}),
|
275
|
+
base_url: request_url
|
276
|
+
}
|
277
|
+
promise = @client.make_request_async(:get, path_template, options)
|
278
|
+
|
279
|
+
promise = promise.then do |result|
|
280
|
+
http_response = result.response
|
281
|
+
status_code = http_response.status
|
282
|
+
response_content = http_response.body
|
283
|
+
unless status_code == 200
|
284
|
+
error_model = JSON.load(response_content)
|
285
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
286
|
+
end
|
287
|
+
|
288
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
289
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
290
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
291
|
+
# Deserialize Response
|
292
|
+
if status_code == 200
|
293
|
+
begin
|
294
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
295
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::SmartGroup.mapper()
|
296
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
297
|
+
rescue Exception => e
|
298
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
result
|
303
|
+
end
|
304
|
+
|
305
|
+
promise.execute
|
306
|
+
end
|
307
|
+
|
308
|
+
#
|
309
|
+
# Change the state of a Smart Group.
|
310
|
+
#
|
311
|
+
# @param smart_group_id [String] Smart group unique id.
|
312
|
+
# @param new_state [AlertState] New state of the alert. Possible values
|
313
|
+
# include: 'New', 'Acknowledged', 'Closed'
|
314
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
315
|
+
# will be added to the HTTP request.
|
316
|
+
#
|
317
|
+
# @return [SmartGroup] operation results.
|
318
|
+
#
|
319
|
+
def change_state(smart_group_id, new_state, custom_headers:nil)
|
320
|
+
response = change_state_async(smart_group_id, new_state, custom_headers:custom_headers).value!
|
321
|
+
response.body unless response.nil?
|
322
|
+
end
|
323
|
+
|
324
|
+
#
|
325
|
+
# Change the state of a Smart Group.
|
326
|
+
#
|
327
|
+
# @param smart_group_id [String] Smart group unique id.
|
328
|
+
# @param new_state [AlertState] New state of the alert. Possible values
|
329
|
+
# include: 'New', 'Acknowledged', 'Closed'
|
330
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
331
|
+
# will be added to the HTTP request.
|
332
|
+
#
|
333
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
334
|
+
#
|
335
|
+
def change_state_with_http_info(smart_group_id, new_state, custom_headers:nil)
|
336
|
+
change_state_async(smart_group_id, new_state, custom_headers:custom_headers).value!
|
337
|
+
end
|
338
|
+
|
339
|
+
#
|
340
|
+
# Change the state of a Smart Group.
|
341
|
+
#
|
342
|
+
# @param smart_group_id [String] Smart group unique id.
|
343
|
+
# @param new_state [AlertState] New state of the alert. Possible values
|
344
|
+
# include: 'New', 'Acknowledged', 'Closed'
|
345
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
346
|
+
# to the HTTP request.
|
347
|
+
#
|
348
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
349
|
+
#
|
350
|
+
def change_state_async(smart_group_id, new_state, custom_headers:nil)
|
351
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
352
|
+
fail ArgumentError, 'smart_group_id is nil' if smart_group_id.nil?
|
353
|
+
@client.api_version = '2019-05-05-preview'
|
354
|
+
fail ArgumentError, 'new_state is nil' if new_state.nil?
|
355
|
+
|
356
|
+
|
357
|
+
request_headers = {}
|
358
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
359
|
+
|
360
|
+
# Set Headers
|
361
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
362
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
363
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState'
|
364
|
+
|
365
|
+
request_url = @base_url || @client.base_url
|
366
|
+
|
367
|
+
options = {
|
368
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
369
|
+
path_params: {'subscriptionId' => @client.subscription_id,'smartGroupId' => smart_group_id},
|
370
|
+
query_params: {'api-version' => @client.api_version,'newState' => new_state},
|
371
|
+
headers: request_headers.merge(custom_headers || {}),
|
372
|
+
base_url: request_url
|
373
|
+
}
|
374
|
+
promise = @client.make_request_async(:post, path_template, options)
|
375
|
+
|
376
|
+
promise = promise.then do |result|
|
377
|
+
http_response = result.response
|
378
|
+
status_code = http_response.status
|
379
|
+
response_content = http_response.body
|
380
|
+
unless status_code == 200
|
381
|
+
error_model = JSON.load(response_content)
|
382
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
383
|
+
end
|
384
|
+
|
385
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
386
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
387
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
388
|
+
# Deserialize Response
|
389
|
+
if status_code == 200
|
390
|
+
begin
|
391
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
392
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::SmartGroup.mapper()
|
393
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
394
|
+
rescue Exception => e
|
395
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
396
|
+
end
|
397
|
+
end
|
398
|
+
|
399
|
+
result
|
400
|
+
end
|
401
|
+
|
402
|
+
promise.execute
|
403
|
+
end
|
404
|
+
|
405
|
+
#
|
406
|
+
# Get the history a smart group, which captures any Smart Group state changes
|
407
|
+
# (New/Acknowledged/Closed) .
|
408
|
+
#
|
409
|
+
# @param smart_group_id [String] Smart group unique id.
|
410
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
411
|
+
# will be added to the HTTP request.
|
412
|
+
#
|
413
|
+
# @return [SmartGroupModification] operation results.
|
414
|
+
#
|
415
|
+
def get_history(smart_group_id, custom_headers:nil)
|
416
|
+
response = get_history_async(smart_group_id, custom_headers:custom_headers).value!
|
417
|
+
response.body unless response.nil?
|
418
|
+
end
|
419
|
+
|
420
|
+
#
|
421
|
+
# Get the history a smart group, which captures any Smart Group state changes
|
422
|
+
# (New/Acknowledged/Closed) .
|
423
|
+
#
|
424
|
+
# @param smart_group_id [String] Smart group unique id.
|
425
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
426
|
+
# will be added to the HTTP request.
|
427
|
+
#
|
428
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
429
|
+
#
|
430
|
+
def get_history_with_http_info(smart_group_id, custom_headers:nil)
|
431
|
+
get_history_async(smart_group_id, custom_headers:custom_headers).value!
|
432
|
+
end
|
433
|
+
|
434
|
+
#
|
435
|
+
# Get the history a smart group, which captures any Smart Group state changes
|
436
|
+
# (New/Acknowledged/Closed) .
|
437
|
+
#
|
438
|
+
# @param smart_group_id [String] Smart group unique id.
|
439
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
440
|
+
# to the HTTP request.
|
441
|
+
#
|
442
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
443
|
+
#
|
444
|
+
def get_history_async(smart_group_id, custom_headers:nil)
|
445
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
446
|
+
fail ArgumentError, 'smart_group_id is nil' if smart_group_id.nil?
|
447
|
+
@client.api_version = '2019-05-05-preview'
|
448
|
+
|
449
|
+
|
450
|
+
request_headers = {}
|
451
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
452
|
+
|
453
|
+
# Set Headers
|
454
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
455
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
456
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history'
|
457
|
+
|
458
|
+
request_url = @base_url || @client.base_url
|
459
|
+
|
460
|
+
options = {
|
461
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
462
|
+
path_params: {'subscriptionId' => @client.subscription_id,'smartGroupId' => smart_group_id},
|
463
|
+
query_params: {'api-version' => @client.api_version},
|
464
|
+
headers: request_headers.merge(custom_headers || {}),
|
465
|
+
base_url: request_url
|
466
|
+
}
|
467
|
+
promise = @client.make_request_async(:get, path_template, options)
|
468
|
+
|
469
|
+
promise = promise.then do |result|
|
470
|
+
http_response = result.response
|
471
|
+
status_code = http_response.status
|
472
|
+
response_content = http_response.body
|
473
|
+
unless status_code == 200
|
474
|
+
error_model = JSON.load(response_content)
|
475
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
476
|
+
end
|
477
|
+
|
478
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
479
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
480
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
481
|
+
# Deserialize Response
|
482
|
+
if status_code == 200
|
483
|
+
begin
|
484
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
485
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::SmartGroupModification.mapper()
|
486
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
487
|
+
rescue Exception => e
|
488
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
result
|
493
|
+
end
|
494
|
+
|
495
|
+
promise.execute
|
496
|
+
end
|
497
|
+
|
498
|
+
#
|
499
|
+
# Get all Smart Groups within a specified subscription
|
500
|
+
#
|
501
|
+
# List all the Smart Groups within a specified subscription.
|
502
|
+
#
|
503
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
504
|
+
# to List operation.
|
505
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
506
|
+
# will be added to the HTTP request.
|
507
|
+
#
|
508
|
+
# @return [SmartGroupsList] operation results.
|
509
|
+
#
|
510
|
+
def get_all_next(next_page_link, custom_headers:nil)
|
511
|
+
response = get_all_next_async(next_page_link, custom_headers:custom_headers).value!
|
512
|
+
response.body unless response.nil?
|
513
|
+
end
|
514
|
+
|
515
|
+
#
|
516
|
+
# Get all Smart Groups within a specified subscription
|
517
|
+
#
|
518
|
+
# List all the Smart Groups within a specified subscription.
|
519
|
+
#
|
520
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
521
|
+
# to List operation.
|
522
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
523
|
+
# will be added to the HTTP request.
|
524
|
+
#
|
525
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
526
|
+
#
|
527
|
+
def get_all_next_with_http_info(next_page_link, custom_headers:nil)
|
528
|
+
get_all_next_async(next_page_link, custom_headers:custom_headers).value!
|
529
|
+
end
|
530
|
+
|
531
|
+
#
|
532
|
+
# Get all Smart Groups within a specified subscription
|
533
|
+
#
|
534
|
+
# List all the Smart Groups within a specified subscription.
|
535
|
+
#
|
536
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
537
|
+
# to List operation.
|
538
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
539
|
+
# to the HTTP request.
|
540
|
+
#
|
541
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
542
|
+
#
|
543
|
+
def get_all_next_async(next_page_link, custom_headers:nil)
|
544
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
545
|
+
|
546
|
+
|
547
|
+
request_headers = {}
|
548
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
549
|
+
|
550
|
+
# Set Headers
|
551
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
552
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
553
|
+
path_template = '{nextLink}'
|
554
|
+
|
555
|
+
request_url = @base_url || @client.base_url
|
556
|
+
|
557
|
+
options = {
|
558
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
559
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
560
|
+
headers: request_headers.merge(custom_headers || {}),
|
561
|
+
base_url: request_url
|
562
|
+
}
|
563
|
+
promise = @client.make_request_async(:get, path_template, options)
|
564
|
+
|
565
|
+
promise = promise.then do |result|
|
566
|
+
http_response = result.response
|
567
|
+
status_code = http_response.status
|
568
|
+
response_content = http_response.body
|
569
|
+
unless status_code == 200
|
570
|
+
error_model = JSON.load(response_content)
|
571
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
572
|
+
end
|
573
|
+
|
574
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
575
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
576
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
577
|
+
# Deserialize Response
|
578
|
+
if status_code == 200
|
579
|
+
begin
|
580
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
581
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2019_05_05_preview::Models::SmartGroupsList.mapper()
|
582
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
583
|
+
rescue Exception => e
|
584
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
585
|
+
end
|
586
|
+
end
|
587
|
+
|
588
|
+
result
|
589
|
+
end
|
590
|
+
|
591
|
+
promise.execute
|
592
|
+
end
|
593
|
+
|
594
|
+
#
|
595
|
+
# Get all Smart Groups within a specified subscription
|
596
|
+
#
|
597
|
+
# List all the Smart Groups within a specified subscription.
|
598
|
+
#
|
599
|
+
# @param target_resource [String] Filter by target resource( which is full ARM
|
600
|
+
# ID) Default value is select all.
|
601
|
+
# @param target_resource_group [String] Filter by target resource group name.
|
602
|
+
# Default value is select all.
|
603
|
+
# @param target_resource_type [String] Filter by target resource type. Default
|
604
|
+
# value is select all.
|
605
|
+
# @param monitor_service [MonitorService] Filter by monitor service which
|
606
|
+
# generates the alert instance. Default value is select all. Possible values
|
607
|
+
# include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog
|
608
|
+
# Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog
|
609
|
+
# Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth',
|
610
|
+
# 'SmartDetector', 'VM Insights', 'Zabbix'
|
611
|
+
# @param monitor_condition [MonitorCondition] Filter by monitor condition which
|
612
|
+
# is either 'Fired' or 'Resolved'. Default value is to select all. Possible
|
613
|
+
# values include: 'Fired', 'Resolved'
|
614
|
+
# @param severity [Severity] Filter by severity. Default value is select all.
|
615
|
+
# Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
|
616
|
+
# @param smart_group_state [AlertState] Filter by state of the smart group.
|
617
|
+
# Default value is to select all. Possible values include: 'New',
|
618
|
+
# 'Acknowledged', 'Closed'
|
619
|
+
# @param time_range [TimeRange] Filter by time range by below listed values.
|
620
|
+
# Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'
|
621
|
+
# @param page_count [Integer] Determines number of alerts returned per page in
|
622
|
+
# response. Permissible value is between 1 to 250. When the "includeContent"
|
623
|
+
# filter is selected, maximum value allowed is 25. Default value is 25.
|
624
|
+
# @param sort_by [SmartGroupsSortByFields] Sort the query results by input
|
625
|
+
# field. Default value is sort by 'lastModifiedDateTime'. Possible values
|
626
|
+
# include: 'alertsCount', 'state', 'severity', 'startDateTime',
|
627
|
+
# 'lastModifiedDateTime'
|
628
|
+
# @param sort_order [Enum] Sort the query results order in either ascending or
|
629
|
+
# descending. Default value is 'desc' for time fields and 'asc' for others.
|
630
|
+
# Possible values include: 'asc', 'desc'
|
631
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
632
|
+
# will be added to the HTTP request.
|
633
|
+
#
|
634
|
+
# @return [SmartGroupsList] which provide lazy access to pages of the response.
|
635
|
+
#
|
636
|
+
def get_all_as_lazy(target_resource:nil, target_resource_group:nil, target_resource_type:nil, monitor_service:nil, monitor_condition:nil, severity:nil, smart_group_state:nil, time_range:nil, page_count:nil, sort_by:nil, sort_order:nil, custom_headers:nil)
|
637
|
+
response = get_all_async(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_service:monitor_service, monitor_condition:monitor_condition, severity:severity, smart_group_state:smart_group_state, time_range:time_range, page_count:page_count, sort_by:sort_by, sort_order:sort_order, custom_headers:custom_headers).value!
|
638
|
+
unless response.nil?
|
639
|
+
page = response.body
|
640
|
+
page.next_method = Proc.new do |next_page_link|
|
641
|
+
get_all_next_async(next_page_link, custom_headers:custom_headers)
|
642
|
+
end
|
643
|
+
page
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
end
|
648
|
+
end
|