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,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::V2018_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::V2018_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::V2018_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
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
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::V2018_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::V2018_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,460 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::AlertsManagement::Mgmt::V2018_05_05_preview
|
7
|
+
#
|
8
|
+
# AlertsManagement Client
|
9
|
+
#
|
10
|
+
class 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 smartGroups within the subscription
|
26
|
+
#
|
27
|
+
# List all the smartGroups within the specified subscription.
|
28
|
+
#
|
29
|
+
# @param target_resource [String] filter by target resource
|
30
|
+
# @param target_resource_group [String] filter by target resource group name
|
31
|
+
# @param target_resource_type [String] filter by target resource type
|
32
|
+
# @param monitor_condition [MonitorCondition] filter by monitor condition which
|
33
|
+
# is the state of the alert at monitor service. Possible values include:
|
34
|
+
# 'Fired', 'Resolved'
|
35
|
+
# @param severity [Severity] filter by severity. Possible values include:
|
36
|
+
# 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
|
37
|
+
# @param smart_group_state [AlertState] filter by state. Possible values
|
38
|
+
# include: 'New', 'Acknowledged', 'Closed'
|
39
|
+
# @param time_range [TimeRange] filter by time range, default value is 1 day.
|
40
|
+
# Possible values include: '1h', '1d', '7d', '30d'
|
41
|
+
# @param page_count [Integer] number of items per page, default value is '25'.
|
42
|
+
# @param sort_by [SmartGroupsSortByFields] sort the query results by input
|
43
|
+
# field, default value is 'lastModifiedDateTime'. Possible values include:
|
44
|
+
# 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime'
|
45
|
+
# @param sort_order [Enum] sort the query results order in either ascending or
|
46
|
+
# descending, default value is 'desc' for time fields and 'asc' for others.
|
47
|
+
# Possible values include: 'asc', 'desc'
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [SmartGroupsList] operation results.
|
52
|
+
#
|
53
|
+
def get_all(target_resource:nil, target_resource_group:nil, target_resource_type: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)
|
54
|
+
response = get_all_async(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_condition:monitor_condition, severity:severity, 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!
|
55
|
+
response.body unless response.nil?
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Get all smartGroups within the subscription
|
60
|
+
#
|
61
|
+
# List all the smartGroups within the specified subscription.
|
62
|
+
#
|
63
|
+
# @param target_resource [String] filter by target resource
|
64
|
+
# @param target_resource_group [String] filter by target resource group name
|
65
|
+
# @param target_resource_type [String] filter by target resource type
|
66
|
+
# @param monitor_condition [MonitorCondition] filter by monitor condition which
|
67
|
+
# is the state of the alert at monitor service. Possible values include:
|
68
|
+
# 'Fired', 'Resolved'
|
69
|
+
# @param severity [Severity] filter by severity. Possible values include:
|
70
|
+
# 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
|
71
|
+
# @param smart_group_state [AlertState] filter by state. Possible values
|
72
|
+
# include: 'New', 'Acknowledged', 'Closed'
|
73
|
+
# @param time_range [TimeRange] filter by time range, default value is 1 day.
|
74
|
+
# Possible values include: '1h', '1d', '7d', '30d'
|
75
|
+
# @param page_count [Integer] number of items per page, default value is '25'.
|
76
|
+
# @param sort_by [SmartGroupsSortByFields] sort the query results by input
|
77
|
+
# field, default value is 'lastModifiedDateTime'. Possible values include:
|
78
|
+
# 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime'
|
79
|
+
# @param sort_order [Enum] sort the query results order in either ascending or
|
80
|
+
# descending, default value is 'desc' for time fields and 'asc' for others.
|
81
|
+
# Possible values include: 'asc', 'desc'
|
82
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
83
|
+
# will be added to the HTTP request.
|
84
|
+
#
|
85
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
86
|
+
#
|
87
|
+
def get_all_with_http_info(target_resource:nil, target_resource_group:nil, target_resource_type: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)
|
88
|
+
get_all_async(target_resource:target_resource, target_resource_group:target_resource_group, target_resource_type:target_resource_type, monitor_condition:monitor_condition, severity:severity, 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!
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# Get all smartGroups within the subscription
|
93
|
+
#
|
94
|
+
# List all the smartGroups within the specified subscription.
|
95
|
+
#
|
96
|
+
# @param target_resource [String] filter by target resource
|
97
|
+
# @param target_resource_group [String] filter by target resource group name
|
98
|
+
# @param target_resource_type [String] filter by target resource type
|
99
|
+
# @param monitor_condition [MonitorCondition] filter by monitor condition which
|
100
|
+
# is the state of the alert at monitor service. Possible values include:
|
101
|
+
# 'Fired', 'Resolved'
|
102
|
+
# @param severity [Severity] filter by severity. Possible values include:
|
103
|
+
# 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
|
104
|
+
# @param smart_group_state [AlertState] filter by state. Possible values
|
105
|
+
# include: 'New', 'Acknowledged', 'Closed'
|
106
|
+
# @param time_range [TimeRange] filter by time range, default value is 1 day.
|
107
|
+
# Possible values include: '1h', '1d', '7d', '30d'
|
108
|
+
# @param page_count [Integer] number of items per page, default value is '25'.
|
109
|
+
# @param sort_by [SmartGroupsSortByFields] sort the query results by input
|
110
|
+
# field, default value is 'lastModifiedDateTime'. Possible values include:
|
111
|
+
# 'alertsCount', 'state', 'severity', 'startDateTime', 'lastModifiedDateTime'
|
112
|
+
# @param sort_order [Enum] sort the query results order in either ascending or
|
113
|
+
# descending, default value is 'desc' for time fields and 'asc' for others.
|
114
|
+
# Possible values include: 'asc', 'desc'
|
115
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
116
|
+
# to the HTTP request.
|
117
|
+
#
|
118
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
119
|
+
#
|
120
|
+
def get_all_async(target_resource:nil, target_resource_group:nil, target_resource_type: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)
|
121
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
122
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
123
|
+
|
124
|
+
|
125
|
+
request_headers = {}
|
126
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
127
|
+
|
128
|
+
# Set Headers
|
129
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
130
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
131
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'
|
132
|
+
|
133
|
+
request_url = @base_url || @client.base_url
|
134
|
+
|
135
|
+
options = {
|
136
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
137
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
138
|
+
query_params: {'targetResource' => target_resource,'targetResourceGroup' => target_resource_group,'targetResourceType' => target_resource_type,'monitorService' => @client.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},
|
139
|
+
headers: request_headers.merge(custom_headers || {}),
|
140
|
+
base_url: request_url
|
141
|
+
}
|
142
|
+
promise = @client.make_request_async(:get, path_template, options)
|
143
|
+
|
144
|
+
promise = promise.then do |result|
|
145
|
+
http_response = result.response
|
146
|
+
status_code = http_response.status
|
147
|
+
response_content = http_response.body
|
148
|
+
unless status_code == 200
|
149
|
+
error_model = JSON.load(response_content)
|
150
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
151
|
+
end
|
152
|
+
|
153
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
154
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
155
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
156
|
+
# Deserialize Response
|
157
|
+
if status_code == 200
|
158
|
+
begin
|
159
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
160
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::SmartGroupsList.mapper()
|
161
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
162
|
+
rescue Exception => e
|
163
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
result
|
168
|
+
end
|
169
|
+
|
170
|
+
promise.execute
|
171
|
+
end
|
172
|
+
|
173
|
+
#
|
174
|
+
# Get information of smart alerts group.
|
175
|
+
#
|
176
|
+
# Get details of smart group.
|
177
|
+
#
|
178
|
+
# @param smart_group_id [String] Smart Group Id
|
179
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
180
|
+
# will be added to the HTTP request.
|
181
|
+
#
|
182
|
+
# @return [SmartGroup] operation results.
|
183
|
+
#
|
184
|
+
def get_by_id(smart_group_id, custom_headers:nil)
|
185
|
+
response = get_by_id_async(smart_group_id, custom_headers:custom_headers).value!
|
186
|
+
response.body unless response.nil?
|
187
|
+
end
|
188
|
+
|
189
|
+
#
|
190
|
+
# Get information of smart alerts group.
|
191
|
+
#
|
192
|
+
# Get details of smart group.
|
193
|
+
#
|
194
|
+
# @param smart_group_id [String] Smart Group Id
|
195
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
196
|
+
# will be added to the HTTP request.
|
197
|
+
#
|
198
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
199
|
+
#
|
200
|
+
def get_by_id_with_http_info(smart_group_id, custom_headers:nil)
|
201
|
+
get_by_id_async(smart_group_id, custom_headers:custom_headers).value!
|
202
|
+
end
|
203
|
+
|
204
|
+
#
|
205
|
+
# Get information of smart alerts group.
|
206
|
+
#
|
207
|
+
# Get details of smart group.
|
208
|
+
#
|
209
|
+
# @param smart_group_id [String] Smart Group Id
|
210
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
211
|
+
# to the HTTP request.
|
212
|
+
#
|
213
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
214
|
+
#
|
215
|
+
def get_by_id_async(smart_group_id, custom_headers:nil)
|
216
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
217
|
+
fail ArgumentError, 'smart_group_id is nil' if smart_group_id.nil?
|
218
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
219
|
+
|
220
|
+
|
221
|
+
request_headers = {}
|
222
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
223
|
+
|
224
|
+
# Set Headers
|
225
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
226
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
227
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}'
|
228
|
+
|
229
|
+
request_url = @base_url || @client.base_url
|
230
|
+
|
231
|
+
options = {
|
232
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
233
|
+
path_params: {'subscriptionId' => @client.subscription_id,'smartGroupId' => smart_group_id},
|
234
|
+
query_params: {'api-version' => @client.api_version},
|
235
|
+
headers: request_headers.merge(custom_headers || {}),
|
236
|
+
base_url: request_url
|
237
|
+
}
|
238
|
+
promise = @client.make_request_async(:get, path_template, options)
|
239
|
+
|
240
|
+
promise = promise.then do |result|
|
241
|
+
http_response = result.response
|
242
|
+
status_code = http_response.status
|
243
|
+
response_content = http_response.body
|
244
|
+
unless status_code == 200
|
245
|
+
error_model = JSON.load(response_content)
|
246
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
247
|
+
end
|
248
|
+
|
249
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
250
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
251
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
252
|
+
# Deserialize Response
|
253
|
+
if status_code == 200
|
254
|
+
begin
|
255
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
256
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::SmartGroup.mapper()
|
257
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
258
|
+
rescue Exception => e
|
259
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
result
|
264
|
+
end
|
265
|
+
|
266
|
+
promise.execute
|
267
|
+
end
|
268
|
+
|
269
|
+
#
|
270
|
+
# Change the state from unresolved to resolved and all the alerts within the
|
271
|
+
# smart group will also be resolved.
|
272
|
+
#
|
273
|
+
# @param smart_group_id [String] Smart Group Id
|
274
|
+
# @param new_state [AlertState] filter by state. Possible values include:
|
275
|
+
# 'New', 'Acknowledged', 'Closed'
|
276
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
277
|
+
# will be added to the HTTP request.
|
278
|
+
#
|
279
|
+
# @return [SmartGroup] operation results.
|
280
|
+
#
|
281
|
+
def change_state(smart_group_id, new_state, custom_headers:nil)
|
282
|
+
response = change_state_async(smart_group_id, new_state, custom_headers:custom_headers).value!
|
283
|
+
response.body unless response.nil?
|
284
|
+
end
|
285
|
+
|
286
|
+
#
|
287
|
+
# Change the state from unresolved to resolved and all the alerts within the
|
288
|
+
# smart group will also be resolved.
|
289
|
+
#
|
290
|
+
# @param smart_group_id [String] Smart Group Id
|
291
|
+
# @param new_state [AlertState] filter by state. Possible values include:
|
292
|
+
# 'New', 'Acknowledged', 'Closed'
|
293
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
294
|
+
# will be added to the HTTP request.
|
295
|
+
#
|
296
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
297
|
+
#
|
298
|
+
def change_state_with_http_info(smart_group_id, new_state, custom_headers:nil)
|
299
|
+
change_state_async(smart_group_id, new_state, custom_headers:custom_headers).value!
|
300
|
+
end
|
301
|
+
|
302
|
+
#
|
303
|
+
# Change the state from unresolved to resolved and all the alerts within the
|
304
|
+
# smart group will also be resolved.
|
305
|
+
#
|
306
|
+
# @param smart_group_id [String] Smart Group Id
|
307
|
+
# @param new_state [AlertState] filter by state. Possible values include:
|
308
|
+
# 'New', 'Acknowledged', 'Closed'
|
309
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
310
|
+
# to the HTTP request.
|
311
|
+
#
|
312
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
313
|
+
#
|
314
|
+
def change_state_async(smart_group_id, new_state, custom_headers:nil)
|
315
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
316
|
+
fail ArgumentError, 'smart_group_id is nil' if smart_group_id.nil?
|
317
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
318
|
+
fail ArgumentError, 'new_state is nil' if new_state.nil?
|
319
|
+
|
320
|
+
|
321
|
+
request_headers = {}
|
322
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
323
|
+
|
324
|
+
# Set Headers
|
325
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
326
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
327
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState'
|
328
|
+
|
329
|
+
request_url = @base_url || @client.base_url
|
330
|
+
|
331
|
+
options = {
|
332
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
333
|
+
path_params: {'subscriptionId' => @client.subscription_id,'smartGroupId' => smart_group_id},
|
334
|
+
query_params: {'api-version' => @client.api_version,'newState' => new_state},
|
335
|
+
headers: request_headers.merge(custom_headers || {}),
|
336
|
+
base_url: request_url
|
337
|
+
}
|
338
|
+
promise = @client.make_request_async(:post, path_template, options)
|
339
|
+
|
340
|
+
promise = promise.then do |result|
|
341
|
+
http_response = result.response
|
342
|
+
status_code = http_response.status
|
343
|
+
response_content = http_response.body
|
344
|
+
unless status_code == 200
|
345
|
+
error_model = JSON.load(response_content)
|
346
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
347
|
+
end
|
348
|
+
|
349
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
350
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
351
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
352
|
+
# Deserialize Response
|
353
|
+
if status_code == 200
|
354
|
+
begin
|
355
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
356
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::SmartGroup.mapper()
|
357
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
358
|
+
rescue Exception => e
|
359
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
result
|
364
|
+
end
|
365
|
+
|
366
|
+
promise.execute
|
367
|
+
end
|
368
|
+
|
369
|
+
#
|
370
|
+
# Get the history of the changes of smart group.
|
371
|
+
#
|
372
|
+
# @param smart_group_id [String] Smart Group Id
|
373
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
374
|
+
# will be added to the HTTP request.
|
375
|
+
#
|
376
|
+
# @return [SmartGroupModification] operation results.
|
377
|
+
#
|
378
|
+
def get_history(smart_group_id, custom_headers:nil)
|
379
|
+
response = get_history_async(smart_group_id, custom_headers:custom_headers).value!
|
380
|
+
response.body unless response.nil?
|
381
|
+
end
|
382
|
+
|
383
|
+
#
|
384
|
+
# Get the history of the changes of smart group.
|
385
|
+
#
|
386
|
+
# @param smart_group_id [String] Smart Group Id
|
387
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
388
|
+
# will be added to the HTTP request.
|
389
|
+
#
|
390
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
391
|
+
#
|
392
|
+
def get_history_with_http_info(smart_group_id, custom_headers:nil)
|
393
|
+
get_history_async(smart_group_id, custom_headers:custom_headers).value!
|
394
|
+
end
|
395
|
+
|
396
|
+
#
|
397
|
+
# Get the history of the changes of smart group.
|
398
|
+
#
|
399
|
+
# @param smart_group_id [String] Smart Group Id
|
400
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
401
|
+
# to the HTTP request.
|
402
|
+
#
|
403
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
404
|
+
#
|
405
|
+
def get_history_async(smart_group_id, custom_headers:nil)
|
406
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
407
|
+
fail ArgumentError, 'smart_group_id is nil' if smart_group_id.nil?
|
408
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
409
|
+
|
410
|
+
|
411
|
+
request_headers = {}
|
412
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
413
|
+
|
414
|
+
# Set Headers
|
415
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
416
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
417
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history'
|
418
|
+
|
419
|
+
request_url = @base_url || @client.base_url
|
420
|
+
|
421
|
+
options = {
|
422
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
423
|
+
path_params: {'subscriptionId' => @client.subscription_id,'smartGroupId' => smart_group_id},
|
424
|
+
query_params: {'api-version' => @client.api_version},
|
425
|
+
headers: request_headers.merge(custom_headers || {}),
|
426
|
+
base_url: request_url
|
427
|
+
}
|
428
|
+
promise = @client.make_request_async(:get, path_template, options)
|
429
|
+
|
430
|
+
promise = promise.then do |result|
|
431
|
+
http_response = result.response
|
432
|
+
status_code = http_response.status
|
433
|
+
response_content = http_response.body
|
434
|
+
unless status_code == 200
|
435
|
+
error_model = JSON.load(response_content)
|
436
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
437
|
+
end
|
438
|
+
|
439
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
440
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
441
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
442
|
+
# Deserialize Response
|
443
|
+
if status_code == 200
|
444
|
+
begin
|
445
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
446
|
+
result_mapper = Azure::AlertsManagement::Mgmt::V2018_05_05_preview::Models::SmartGroupModification.mapper()
|
447
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
448
|
+
rescue Exception => e
|
449
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
453
|
+
result
|
454
|
+
end
|
455
|
+
|
456
|
+
promise.execute
|
457
|
+
end
|
458
|
+
|
459
|
+
end
|
460
|
+
end
|