diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py index 0c342ca81375..c790df71b5b5 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py @@ -16,6 +16,7 @@ from .operations.operations import Operations from .operations.alerts_operations import AlertsOperations from .operations.smart_groups_operations import SmartGroupsOperations +from .operations.action_rules_operations import ActionRulesOperations from . import models @@ -27,15 +28,18 @@ class AlertsManagementClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Subscription credentials which uniquely identify + :param subscription_id: subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param api_version1: client API version. Possible values include: + '2019-05-05-preview', '2018-05-05' + :type api_version1: str or ~azure.mgmt.alertsmanagement.models.ApiVersion :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, api_version1=None, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") @@ -51,6 +55,7 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id + self.api_version1 = api_version1 class AlertsManagementClient(SDKClient): @@ -65,25 +70,30 @@ class AlertsManagementClient(SDKClient): :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations :ivar smart_groups: SmartGroups operations :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Subscription credentials which uniquely identify + :param subscription_id: subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param api_version1: client API version. Possible values include: + '2019-05-05-preview', '2018-05-05' + :type api_version1: str or ~azure.mgmt.alertsmanagement.models.ApiVersion :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, api_version1=None, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, api_version1, base_url) super(AlertsManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-05-05' + self.api_version = '2019-05-05-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -93,3 +103,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.smart_groups = SmartGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..839f411bc239 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -13,8 +13,7 @@ from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties + from .managed_resource_py3 import ManagedResource from .alert_py3 import Alert from .alert_modification_item_py3 import AlertModificationItem from .alert_modification_properties_py3 import AlertModificationProperties @@ -22,18 +21,44 @@ from .smart_group_modification_item_py3 import SmartGroupModificationItem from .smart_group_modification_properties_py3 import SmartGroupModificationProperties from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup + from .alerts_summary_properties_summary_by_state_py3 import AlertsSummaryPropertiesSummaryByState + from .alerts_summary_properties_summary_by_severity_sev0_py3 import AlertsSummaryPropertiesSummaryBySeveritySev0 + from .alerts_summary_properties_summary_by_severity_sev1_py3 import AlertsSummaryPropertiesSummaryBySeveritySev1 + from .alerts_summary_properties_summary_by_severity_sev2_py3 import AlertsSummaryPropertiesSummaryBySeveritySev2 + from .alerts_summary_properties_summary_by_severity_sev3_py3 import AlertsSummaryPropertiesSummaryBySeveritySev3 + from .alerts_summary_properties_summary_by_severity_sev4_py3 import AlertsSummaryPropertiesSummaryBySeveritySev4 + from .alerts_summary_properties_summary_by_severity_py3 import AlertsSummaryPropertiesSummaryBySeverity + from .alerts_summary_properties_summary_by_severity_and_monitor_condition_py3 import AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition + from .alerts_summary_properties_summary_by_monitor_service_py3 import AlertsSummaryPropertiesSummaryByMonitorService from .alerts_summary_py3 import AlertsSummary + from .alerts_summary_by_state_py3 import AlertsSummaryByState + from .alerts_summary_by_severity_and_monitor_condition_sev0_py3 import AlertsSummaryBySeverityAndMonitorConditionSev0 + from .alerts_summary_by_severity_and_monitor_condition_sev1_py3 import AlertsSummaryBySeverityAndMonitorConditionSev1 + from .alerts_summary_by_severity_and_monitor_condition_sev2_py3 import AlertsSummaryBySeverityAndMonitorConditionSev2 + from .alerts_summary_by_severity_and_monitor_condition_sev3_py3 import AlertsSummaryBySeverityAndMonitorConditionSev3 + from .alerts_summary_by_severity_and_monitor_condition_sev4_py3 import AlertsSummaryBySeverityAndMonitorConditionSev4 + from .alerts_summary_by_severity_and_monitor_condition_py3 import AlertsSummaryBySeverityAndMonitorCondition + from .alerts_summary_by_monitor_condition_py3 import AlertsSummaryByMonitorCondition + from .alerts_summary_by_monitor_service_py3 import AlertsSummaryByMonitorService from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty from .smart_group_py3 import SmartGroup from .smart_groups_list_py3 import SmartGroupsList + from .scope_py3 import Scope + from .condition_py3 import Condition + from .conditions_py3 import Conditions + from .suppression_schedule_py3 import SuppressionSchedule + from .suppression_config_py3 import SuppressionConfig + from .action_rule_properties_py3 import ActionRuleProperties + from .action_rule_py3 import ActionRule + from .suppression_py3 import Suppression + from .action_group_py3 import ActionGroup + from .diagnostics_py3 import Diagnostics + from .patch_object_py3 import PatchObject except (SyntaxError, ImportError): from .operation_display import OperationDisplay from .operation import Operation from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties + from .managed_resource import ManagedResource from .alert import Alert from .alert_modification_item import AlertModificationItem from .alert_modification_properties import AlertModificationProperties @@ -41,14 +66,42 @@ from .smart_group_modification_item import SmartGroupModificationItem from .smart_group_modification_properties import SmartGroupModificationProperties from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup + from .alerts_summary_properties_summary_by_state import AlertsSummaryPropertiesSummaryByState + from .alerts_summary_properties_summary_by_severity_sev0 import AlertsSummaryPropertiesSummaryBySeveritySev0 + from .alerts_summary_properties_summary_by_severity_sev1 import AlertsSummaryPropertiesSummaryBySeveritySev1 + from .alerts_summary_properties_summary_by_severity_sev2 import AlertsSummaryPropertiesSummaryBySeveritySev2 + from .alerts_summary_properties_summary_by_severity_sev3 import AlertsSummaryPropertiesSummaryBySeveritySev3 + from .alerts_summary_properties_summary_by_severity_sev4 import AlertsSummaryPropertiesSummaryBySeveritySev4 + from .alerts_summary_properties_summary_by_severity import AlertsSummaryPropertiesSummaryBySeverity + from .alerts_summary_properties_summary_by_severity_and_monitor_condition import AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition + from .alerts_summary_properties_summary_by_monitor_service import AlertsSummaryPropertiesSummaryByMonitorService from .alerts_summary import AlertsSummary + from .alerts_summary_by_state import AlertsSummaryByState + from .alerts_summary_by_severity_and_monitor_condition_sev0 import AlertsSummaryBySeverityAndMonitorConditionSev0 + from .alerts_summary_by_severity_and_monitor_condition_sev1 import AlertsSummaryBySeverityAndMonitorConditionSev1 + from .alerts_summary_by_severity_and_monitor_condition_sev2 import AlertsSummaryBySeverityAndMonitorConditionSev2 + from .alerts_summary_by_severity_and_monitor_condition_sev3 import AlertsSummaryBySeverityAndMonitorConditionSev3 + from .alerts_summary_by_severity_and_monitor_condition_sev4 import AlertsSummaryBySeverityAndMonitorConditionSev4 + from .alerts_summary_by_severity_and_monitor_condition import AlertsSummaryBySeverityAndMonitorCondition + from .alerts_summary_by_monitor_condition import AlertsSummaryByMonitorCondition + from .alerts_summary_by_monitor_service import AlertsSummaryByMonitorService from .smart_group_aggregated_property import SmartGroupAggregatedProperty from .smart_group import SmartGroup from .smart_groups_list import SmartGroupsList + from .scope import Scope + from .condition import Condition + from .conditions import Conditions + from .suppression_schedule import SuppressionSchedule + from .suppression_config import SuppressionConfig + from .action_rule_properties import ActionRuleProperties + from .action_rule import ActionRule + from .suppression import Suppression + from .action_group import ActionGroup + from .diagnostics import Diagnostics + from .patch_object import PatchObject from .operation_paged import OperationPaged from .alert_paged import AlertPaged +from .action_rule_paged import ActionRulePaged from .alerts_management_client_enums import ( Severity, SignalType, @@ -58,9 +111,13 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + ApiVersion, TimeRange, AlertsSortByFields, - AlertsSummaryGroupByFields, SmartGroupsSortByFields, ) @@ -68,8 +125,7 @@ 'OperationDisplay', 'Operation', 'Resource', - 'Essentials', - 'AlertProperties', + 'ManagedResource', 'Alert', 'AlertModificationItem', 'AlertModificationProperties', @@ -77,14 +133,42 @@ 'SmartGroupModificationItem', 'SmartGroupModificationProperties', 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertsSummaryPropertiesSummaryByState', + 'AlertsSummaryPropertiesSummaryBySeveritySev0', + 'AlertsSummaryPropertiesSummaryBySeveritySev1', + 'AlertsSummaryPropertiesSummaryBySeveritySev2', + 'AlertsSummaryPropertiesSummaryBySeveritySev3', + 'AlertsSummaryPropertiesSummaryBySeveritySev4', + 'AlertsSummaryPropertiesSummaryBySeverity', + 'AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition', + 'AlertsSummaryPropertiesSummaryByMonitorService', 'AlertsSummary', + 'AlertsSummaryByState', + 'AlertsSummaryBySeverityAndMonitorConditionSev0', + 'AlertsSummaryBySeverityAndMonitorConditionSev1', + 'AlertsSummaryBySeverityAndMonitorConditionSev2', + 'AlertsSummaryBySeverityAndMonitorConditionSev3', + 'AlertsSummaryBySeverityAndMonitorConditionSev4', + 'AlertsSummaryBySeverityAndMonitorCondition', + 'AlertsSummaryByMonitorCondition', + 'AlertsSummaryByMonitorService', 'SmartGroupAggregatedProperty', 'SmartGroup', 'SmartGroupsList', + 'Scope', + 'Condition', + 'Conditions', + 'SuppressionSchedule', + 'SuppressionConfig', + 'ActionRuleProperties', + 'ActionRule', + 'Suppression', + 'ActionGroup', + 'Diagnostics', + 'PatchObject', 'OperationPaged', 'AlertPaged', + 'ActionRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,8 +177,12 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'ApiVersion', 'TimeRange', 'AlertsSortByFields', - 'AlertsSummaryGroupByFields', 'SmartGroupsSortByFields', ] diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_group.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_group.py new file mode 100644 index 000000000000..b95d105677b2 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_group.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_rule_properties import ActionRuleProperties + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_group_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_group_py3.py new file mode 100644 index 000000000000..091741393ae4 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_group_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_rule_properties_py3 import ActionRuleProperties + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule.py new file mode 100644 index 000000000000..146901c3f2e0 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .managed_resource import ManagedResource + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'scope': {'key': 'properties.scope', 'type': 'Scope'}, + 'conditions': {'key': 'properties.conditions', 'type': 'Conditions'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'properties.lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_paged.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_paged.py new file mode 100644 index 000000000000..1e271525bd1a --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_properties.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_properties.py new file mode 100644 index 000000000000..46db00885efd --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_properties.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_properties_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_properties_py3.py new file mode 100644 index 000000000000..4ed1cc7d4854 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_properties_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_py3.py new file mode 100644 index 000000000000..a3556fece91d --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/action_rule_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .managed_resource_py3 import ManagedResource + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'scope': {'key': 'properties.scope', 'type': 'Scope'}, + 'conditions': {'key': 'properties.conditions', 'type': 'Conditions'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'properties.lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py index 634c2c747b17..cb2655d177be 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py @@ -24,23 +24,109 @@ class Alert(Resource): :vartype type: str :ivar name: Azure resource name :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + :ivar severity: Severity of alert Sev1 being highest and Sev3 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: Log based alert or metric based alert. Possible values + include: 'Metric', 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state. Possible values include: 'New', + 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. + Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Target ARM resource name, on which alert got + created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource + :type target_resource_type: str + :ivar monitor_service: Monitor service which is the source of the alert + object. Possible values include: 'Platform', 'Application Insights', 'Log + Analytics', 'Infrastructure Insights', 'ActivityLog Administrative', + 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog + Policy', 'ActivityLog Autoscale', 'ServiceHealth', 'SmartDetector', + 'Zabbix', 'SCOM', 'Nagios' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar source_created_id: Unique Id created by monitor service + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Reason for addition to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format). + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format). + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert. + :vartype last_modified_user_name: str + :ivar payload: More details which are contextual to the monitor service. + :vartype payload: object """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + 'payload': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'signal_type': {'key': 'properties.signalType', 'type': 'str'}, + 'alert_state': {'key': 'properties.alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'properties.monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'properties.targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'properties.targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'properties.targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'properties.targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'properties.monitorService', 'type': 'str'}, + 'source_created_id': {'key': 'properties.sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'properties.smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'properties.smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'payload': {'key': 'properties.payload', 'type': 'object'}, } def __init__(self, **kwargs): super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.payload = None diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py index 4068ed33b63a..88b32aae4bd1 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py @@ -24,23 +24,109 @@ class Alert(Resource): :vartype type: str :ivar name: Azure resource name :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + :ivar severity: Severity of alert Sev1 being highest and Sev3 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: Log based alert or metric based alert. Possible values + include: 'Metric', 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state. Possible values include: 'New', + 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. + Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Target ARM resource name, on which alert got + created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource + :type target_resource_type: str + :ivar monitor_service: Monitor service which is the source of the alert + object. Possible values include: 'Platform', 'Application Insights', 'Log + Analytics', 'Infrastructure Insights', 'ActivityLog Administrative', + 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog + Policy', 'ActivityLog Autoscale', 'ServiceHealth', 'SmartDetector', + 'Zabbix', 'SCOM', 'Nagios' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar source_created_id: Unique Id created by monitor service + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Reason for addition to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format). + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format). + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert. + :vartype last_modified_user_name: str + :ivar payload: More details which are contextual to the monitor service. + :vartype payload: object """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + 'payload': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'signal_type': {'key': 'properties.signalType', 'type': 'str'}, + 'alert_state': {'key': 'properties.alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'properties.monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'properties.targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'properties.targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'properties.targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'properties.targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'properties.monitorService', 'type': 'str'}, + 'source_created_id': {'key': 'properties.sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'properties.smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'properties.smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'payload': {'key': 'properties.payload', 'type': 'object'}, } - def __init__(self, *, properties=None, **kwargs) -> None: + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: super(Alert, self).__init__(**kwargs) - self.properties = properties + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.payload = None diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py index f3295fc6ef88..16e16ef7ce23 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py @@ -43,20 +43,20 @@ class MonitorCondition(str, Enum): class MonitorService(str, Enum): + platform = "Platform" application_insights = "Application Insights" + log_analytics = "Log Analytics" + infrastructure_insights = "Infrastructure Insights" activity_log_administrative = "ActivityLog Administrative" activity_log_security = "ActivityLog Security" activity_log_recommendation = "ActivityLog Recommendation" activity_log_policy = "ActivityLog Policy" activity_log_autoscale = "ActivityLog Autoscale" - log_analytics = "Log Analytics" - nagios = "Nagios" - platform = "Platform" - scom = "SCOM" service_health = "ServiceHealth" smart_detector = "SmartDetector" - vm_insights = "VM Insights" zabbix = "Zabbix" + scom = "SCOM" + nagios = "Nagios" class AlertModificationEvent(str, Enum): @@ -81,6 +81,41 @@ class State(str, Enum): closed = "Closed" +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ApiVersion(str, Enum): + + two_zero_one_nine_zero_five_zero_five_preview = "2019-05-05-preview" + two_zero_one_eight_zero_five_zero_five = "2018-05-05" + + class TimeRange(str, Enum): oneh = "1h" @@ -103,16 +138,6 @@ class AlertsSortByFields(str, Enum): last_modified_date_time = "lastModifiedDateTime" -class AlertsSummaryGroupByFields(str, Enum): - - severity = "severity" - alert_state = "alertState" - monitor_condition = "monitorCondition" - monitor_service = "monitorService" - signal_type = "signalType" - alert_rule = "alertRule" - - class SmartGroupsSortByFields(str, Enum): alerts_count = "alertsCount" diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py index 9521d5cb5d32..b311484966d1 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py @@ -13,7 +13,7 @@ class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. + """Summary of the alerts. Variables are only populated by the server, and will be ignored when sending a request. @@ -24,8 +24,25 @@ class AlertsSummary(Resource): :vartype type: str :ivar name: Azure resource name :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + :param total: Total number of alerts. + :type total: int + :param smart_groups_count: Total number of smart groups. + :type smart_groups_count: int + :param summary_by_state: Summary of alerts by state + :type summary_by_state: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryByState + :param summary_by_severity: Summary of alerts by severity + :type summary_by_severity: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeverity + :param summary_by_severity_and_monitor_condition: Summary of alerts by + severity and monitor condition + :type summary_by_severity_and_monitor_condition: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition + :param summary_by_monitor_service: Summary of alerts by severity + :type summary_by_monitor_service: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryByMonitorService + :param next_link: URL to fetch the next set of results. + :type next_link: str """ _validation = { @@ -38,9 +55,21 @@ class AlertsSummary(Resource): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + 'total': {'key': 'properties.total', 'type': 'int'}, + 'smart_groups_count': {'key': 'properties.smartGroupsCount', 'type': 'int'}, + 'summary_by_state': {'key': 'properties.summaryByState', 'type': 'AlertsSummaryPropertiesSummaryByState'}, + 'summary_by_severity': {'key': 'properties.summaryBySeverity', 'type': 'AlertsSummaryPropertiesSummaryBySeverity'}, + 'summary_by_severity_and_monitor_condition': {'key': 'properties.summaryBySeverityAndMonitorCondition', 'type': 'AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition'}, + 'summary_by_monitor_service': {'key': 'properties.summaryByMonitorService', 'type': 'AlertsSummaryPropertiesSummaryByMonitorService'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, } def __init__(self, **kwargs): super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.summary_by_state = kwargs.get('summary_by_state', None) + self.summary_by_severity = kwargs.get('summary_by_severity', None) + self.summary_by_severity_and_monitor_condition = kwargs.get('summary_by_severity_and_monitor_condition', None) + self.summary_by_monitor_service = kwargs.get('summary_by_monitor_service', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_condition.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_condition.py new file mode 100644 index 000000000000..4d7056329716 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_condition.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryByMonitorCondition(Model): + """Summary of the alerts by monitor condition. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryByMonitorCondition, self).__init__(**kwargs) + self.fired = kwargs.get('fired', None) + self.resolved = kwargs.get('resolved', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_condition_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_condition_py3.py new file mode 100644 index 000000000000..f24e1b0fd43d --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_condition_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryByMonitorCondition(Model): + """Summary of the alerts by monitor condition. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, *, fired: int=None, resolved: int=None, **kwargs) -> None: + super(AlertsSummaryByMonitorCondition, self).__init__(**kwargs) + self.fired = fired + self.resolved = resolved diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_service.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_service.py new file mode 100644 index 000000000000..5e7099b3a6fc --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_service.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryByMonitorService(Model): + """Summary of the alerts by monitor service. + + :param platform: Count of alerts of "Platform" + :type platform: int + :param application_insights: Count of alerts of "Application Insights" + :type application_insights: int + :param log_analytics: Count of alerts of "Log Analytics" + :type log_analytics: int + :param zabbix: Count of alerts of "Zabbix" + :type zabbix: int + :param scom: Count of alerts of "SCOM" + :type scom: int + :param nagios: Count of alerts of "Nagios" + :type nagios: int + :param infrastructure_insights: Count of alerts of "Infrastructure + Insights" + :type infrastructure_insights: int + :param activity_log_administrative: Count of alerts of "ActivityLog + Administrative" + :type activity_log_administrative: int + :param activity_log_security: Count of alerts of "ActivityLog Security" + :type activity_log_security: int + :param activity_log_recommendation: Count of alerts of "ActivityLog + Recommendation" + :type activity_log_recommendation: int + :param activity_log_policy: Count of alerts of "ActivityLog Policy" + :type activity_log_policy: int + :param activity_log_autoscale: Count of alerts of "ActivityLog Autoscale" + :type activity_log_autoscale: int + :param service_health: Count of alerts of "ServiceHealth" + :type service_health: int + :param smart_detector: Count of alerts of "Smart Detector" + :type smart_detector: int + """ + + _attribute_map = { + 'platform': {'key': 'platform', 'type': 'int'}, + 'application_insights': {'key': 'application Insights', 'type': 'int'}, + 'log_analytics': {'key': 'log Analytics', 'type': 'int'}, + 'zabbix': {'key': 'zabbix', 'type': 'int'}, + 'scom': {'key': 'scom', 'type': 'int'}, + 'nagios': {'key': 'nagios', 'type': 'int'}, + 'infrastructure_insights': {'key': 'infrastructure Insights', 'type': 'int'}, + 'activity_log_administrative': {'key': 'activityLog Administrative', 'type': 'int'}, + 'activity_log_security': {'key': 'activityLog Security', 'type': 'int'}, + 'activity_log_recommendation': {'key': 'activityLog Recommendation', 'type': 'int'}, + 'activity_log_policy': {'key': 'activityLog Policy', 'type': 'int'}, + 'activity_log_autoscale': {'key': 'activityLog Autoscale', 'type': 'int'}, + 'service_health': {'key': 'serviceHealth', 'type': 'int'}, + 'smart_detector': {'key': 'smartDetector', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryByMonitorService, self).__init__(**kwargs) + self.platform = kwargs.get('platform', None) + self.application_insights = kwargs.get('application_insights', None) + self.log_analytics = kwargs.get('log_analytics', None) + self.zabbix = kwargs.get('zabbix', None) + self.scom = kwargs.get('scom', None) + self.nagios = kwargs.get('nagios', None) + self.infrastructure_insights = kwargs.get('infrastructure_insights', None) + self.activity_log_administrative = kwargs.get('activity_log_administrative', None) + self.activity_log_security = kwargs.get('activity_log_security', None) + self.activity_log_recommendation = kwargs.get('activity_log_recommendation', None) + self.activity_log_policy = kwargs.get('activity_log_policy', None) + self.activity_log_autoscale = kwargs.get('activity_log_autoscale', None) + self.service_health = kwargs.get('service_health', None) + self.smart_detector = kwargs.get('smart_detector', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_service_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_service_py3.py new file mode 100644 index 000000000000..9cba54784457 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_monitor_service_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryByMonitorService(Model): + """Summary of the alerts by monitor service. + + :param platform: Count of alerts of "Platform" + :type platform: int + :param application_insights: Count of alerts of "Application Insights" + :type application_insights: int + :param log_analytics: Count of alerts of "Log Analytics" + :type log_analytics: int + :param zabbix: Count of alerts of "Zabbix" + :type zabbix: int + :param scom: Count of alerts of "SCOM" + :type scom: int + :param nagios: Count of alerts of "Nagios" + :type nagios: int + :param infrastructure_insights: Count of alerts of "Infrastructure + Insights" + :type infrastructure_insights: int + :param activity_log_administrative: Count of alerts of "ActivityLog + Administrative" + :type activity_log_administrative: int + :param activity_log_security: Count of alerts of "ActivityLog Security" + :type activity_log_security: int + :param activity_log_recommendation: Count of alerts of "ActivityLog + Recommendation" + :type activity_log_recommendation: int + :param activity_log_policy: Count of alerts of "ActivityLog Policy" + :type activity_log_policy: int + :param activity_log_autoscale: Count of alerts of "ActivityLog Autoscale" + :type activity_log_autoscale: int + :param service_health: Count of alerts of "ServiceHealth" + :type service_health: int + :param smart_detector: Count of alerts of "Smart Detector" + :type smart_detector: int + """ + + _attribute_map = { + 'platform': {'key': 'platform', 'type': 'int'}, + 'application_insights': {'key': 'application Insights', 'type': 'int'}, + 'log_analytics': {'key': 'log Analytics', 'type': 'int'}, + 'zabbix': {'key': 'zabbix', 'type': 'int'}, + 'scom': {'key': 'scom', 'type': 'int'}, + 'nagios': {'key': 'nagios', 'type': 'int'}, + 'infrastructure_insights': {'key': 'infrastructure Insights', 'type': 'int'}, + 'activity_log_administrative': {'key': 'activityLog Administrative', 'type': 'int'}, + 'activity_log_security': {'key': 'activityLog Security', 'type': 'int'}, + 'activity_log_recommendation': {'key': 'activityLog Recommendation', 'type': 'int'}, + 'activity_log_policy': {'key': 'activityLog Policy', 'type': 'int'}, + 'activity_log_autoscale': {'key': 'activityLog Autoscale', 'type': 'int'}, + 'service_health': {'key': 'serviceHealth', 'type': 'int'}, + 'smart_detector': {'key': 'smartDetector', 'type': 'int'}, + } + + def __init__(self, *, platform: int=None, application_insights: int=None, log_analytics: int=None, zabbix: int=None, scom: int=None, nagios: int=None, infrastructure_insights: int=None, activity_log_administrative: int=None, activity_log_security: int=None, activity_log_recommendation: int=None, activity_log_policy: int=None, activity_log_autoscale: int=None, service_health: int=None, smart_detector: int=None, **kwargs) -> None: + super(AlertsSummaryByMonitorService, self).__init__(**kwargs) + self.platform = platform + self.application_insights = application_insights + self.log_analytics = log_analytics + self.zabbix = zabbix + self.scom = scom + self.nagios = nagios + self.infrastructure_insights = infrastructure_insights + self.activity_log_administrative = activity_log_administrative + self.activity_log_security = activity_log_security + self.activity_log_recommendation = activity_log_recommendation + self.activity_log_policy = activity_log_policy + self.activity_log_autoscale = activity_log_autoscale + self.service_health = service_health + self.smart_detector = smart_detector diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition.py new file mode 100644 index 000000000000..2c413b29f703 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryBySeverityAndMonitorCondition(Model): + """Summary of the alerts by severity and monitor condition. + + :param sev0: Summary of alerts by monitor condition with severity 'Sev0' + :type sev0: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev0 + :param sev1: Summary of alerts by monitor condition with severity 'Sev1' + :type sev1: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev1 + :param sev2: Summary of alerts by monitor condition with severity 'Sev2' + :type sev2: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev2 + :param sev3: Summary of alerts by monitor condition with severity 'Sev3' + :type sev3: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev3 + :param sev4: Summary of alerts by monitor condition with severity 'Sev4' + :type sev4: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev4 + """ + + _attribute_map = { + 'sev0': {'key': 'sev0', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev0'}, + 'sev1': {'key': 'sev1', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev1'}, + 'sev2': {'key': 'sev2', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev2'}, + 'sev3': {'key': 'sev3', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev3'}, + 'sev4': {'key': 'sev4', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev4'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryBySeverityAndMonitorCondition, self).__init__(**kwargs) + self.sev0 = kwargs.get('sev0', None) + self.sev1 = kwargs.get('sev1', None) + self.sev2 = kwargs.get('sev2', None) + self.sev3 = kwargs.get('sev3', None) + self.sev4 = kwargs.get('sev4', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_py3.py new file mode 100644 index 000000000000..97defc093a0c --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryBySeverityAndMonitorCondition(Model): + """Summary of the alerts by severity and monitor condition. + + :param sev0: Summary of alerts by monitor condition with severity 'Sev0' + :type sev0: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev0 + :param sev1: Summary of alerts by monitor condition with severity 'Sev1' + :type sev1: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev1 + :param sev2: Summary of alerts by monitor condition with severity 'Sev2' + :type sev2: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev2 + :param sev3: Summary of alerts by monitor condition with severity 'Sev3' + :type sev3: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev3 + :param sev4: Summary of alerts by monitor condition with severity 'Sev4' + :type sev4: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev4 + """ + + _attribute_map = { + 'sev0': {'key': 'sev0', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev0'}, + 'sev1': {'key': 'sev1', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev1'}, + 'sev2': {'key': 'sev2', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev2'}, + 'sev3': {'key': 'sev3', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev3'}, + 'sev4': {'key': 'sev4', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev4'}, + } + + def __init__(self, *, sev0=None, sev1=None, sev2=None, sev3=None, sev4=None, **kwargs) -> None: + super(AlertsSummaryBySeverityAndMonitorCondition, self).__init__(**kwargs) + self.sev0 = sev0 + self.sev1 = sev1 + self.sev2 = sev2 + self.sev3 = sev3 + self.sev4 = sev4 diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev0.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev0.py new file mode 100644 index 000000000000..659a360c92f5 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev0.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev0(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev0'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryBySeverityAndMonitorConditionSev0, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev0_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev0_py3.py new file mode 100644 index 000000000000..c3d794531a1c --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev0_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition_py3 import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev0(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev0'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, *, fired: int=None, resolved: int=None, **kwargs) -> None: + super(AlertsSummaryBySeverityAndMonitorConditionSev0, self).__init__(fired=fired, resolved=resolved, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev1.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev1.py new file mode 100644 index 000000000000..2b8d93f59df6 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev1.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev1(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev1'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryBySeverityAndMonitorConditionSev1, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev1_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev1_py3.py new file mode 100644 index 000000000000..e61494e2556c --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev1_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition_py3 import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev1(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev1'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, *, fired: int=None, resolved: int=None, **kwargs) -> None: + super(AlertsSummaryBySeverityAndMonitorConditionSev1, self).__init__(fired=fired, resolved=resolved, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev2.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev2.py new file mode 100644 index 000000000000..9934942c489b --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev2.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev2(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev2'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryBySeverityAndMonitorConditionSev2, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev2_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev2_py3.py new file mode 100644 index 000000000000..ea1c3d9b70fc --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev2_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition_py3 import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev2(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev2'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, *, fired: int=None, resolved: int=None, **kwargs) -> None: + super(AlertsSummaryBySeverityAndMonitorConditionSev2, self).__init__(fired=fired, resolved=resolved, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev3.py new file mode 100644 index 000000000000..975b9ab04f9b --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev3(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev3'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryBySeverityAndMonitorConditionSev3, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev3_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev3_py3.py new file mode 100644 index 000000000000..b7f2d7b6f8de --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev3_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition_py3 import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev3(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev3'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, *, fired: int=None, resolved: int=None, **kwargs) -> None: + super(AlertsSummaryBySeverityAndMonitorConditionSev3, self).__init__(fired=fired, resolved=resolved, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev4.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev4.py new file mode 100644 index 000000000000..1850e84132ca --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev4.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev4(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev4'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryBySeverityAndMonitorConditionSev4, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev4_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev4_py3.py new file mode 100644 index 000000000000..6ada692cd129 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_severity_and_monitor_condition_sev4_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_condition_py3 import AlertsSummaryByMonitorCondition + + +class AlertsSummaryBySeverityAndMonitorConditionSev4(AlertsSummaryByMonitorCondition): + """Summary of alerts by monitor condition with severity 'Sev4'. + + :param fired: Count of alerts with monitorCondition 'Fired' + :type fired: int + :param resolved: Count of alerts with monitorCondition 'Resolved' + :type resolved: int + """ + + _attribute_map = { + 'fired': {'key': 'fired', 'type': 'int'}, + 'resolved': {'key': 'resolved', 'type': 'int'}, + } + + def __init__(self, *, fired: int=None, resolved: int=None, **kwargs) -> None: + super(AlertsSummaryBySeverityAndMonitorConditionSev4, self).__init__(fired=fired, resolved=resolved, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_state.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_state.py new file mode 100644 index 000000000000..3df3c3a6941f --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_state.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryByState(Model): + """Summary of alerts by state. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryByState, self).__init__(**kwargs) + self.new = kwargs.get('new', None) + self.acknowledged = kwargs.get('acknowledged', None) + self.closed = kwargs.get('closed', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_state_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_state_py3.py new file mode 100644 index 000000000000..7410b54d7304 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_by_state_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryByState(Model): + """Summary of alerts by state. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryByState, self).__init__(**kwargs) + self.new = new + self.acknowledged = acknowledged + self.closed = closed diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_monitor_service.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_monitor_service.py new file mode 100644 index 000000000000..4d5a5eb03b8f --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_monitor_service.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_service import AlertsSummaryByMonitorService + + +class AlertsSummaryPropertiesSummaryByMonitorService(AlertsSummaryByMonitorService): + """Summary of alerts by severity. + + :param platform: Count of alerts of "Platform" + :type platform: int + :param application_insights: Count of alerts of "Application Insights" + :type application_insights: int + :param log_analytics: Count of alerts of "Log Analytics" + :type log_analytics: int + :param zabbix: Count of alerts of "Zabbix" + :type zabbix: int + :param scom: Count of alerts of "SCOM" + :type scom: int + :param nagios: Count of alerts of "Nagios" + :type nagios: int + :param infrastructure_insights: Count of alerts of "Infrastructure + Insights" + :type infrastructure_insights: int + :param activity_log_administrative: Count of alerts of "ActivityLog + Administrative" + :type activity_log_administrative: int + :param activity_log_security: Count of alerts of "ActivityLog Security" + :type activity_log_security: int + :param activity_log_recommendation: Count of alerts of "ActivityLog + Recommendation" + :type activity_log_recommendation: int + :param activity_log_policy: Count of alerts of "ActivityLog Policy" + :type activity_log_policy: int + :param activity_log_autoscale: Count of alerts of "ActivityLog Autoscale" + :type activity_log_autoscale: int + :param service_health: Count of alerts of "ServiceHealth" + :type service_health: int + :param smart_detector: Count of alerts of "Smart Detector" + :type smart_detector: int + """ + + _attribute_map = { + 'platform': {'key': 'platform', 'type': 'int'}, + 'application_insights': {'key': 'application Insights', 'type': 'int'}, + 'log_analytics': {'key': 'log Analytics', 'type': 'int'}, + 'zabbix': {'key': 'zabbix', 'type': 'int'}, + 'scom': {'key': 'scom', 'type': 'int'}, + 'nagios': {'key': 'nagios', 'type': 'int'}, + 'infrastructure_insights': {'key': 'infrastructure Insights', 'type': 'int'}, + 'activity_log_administrative': {'key': 'activityLog Administrative', 'type': 'int'}, + 'activity_log_security': {'key': 'activityLog Security', 'type': 'int'}, + 'activity_log_recommendation': {'key': 'activityLog Recommendation', 'type': 'int'}, + 'activity_log_policy': {'key': 'activityLog Policy', 'type': 'int'}, + 'activity_log_autoscale': {'key': 'activityLog Autoscale', 'type': 'int'}, + 'service_health': {'key': 'serviceHealth', 'type': 'int'}, + 'smart_detector': {'key': 'smartDetector', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryByMonitorService, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_monitor_service_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_monitor_service_py3.py new file mode 100644 index 000000000000..990a2c367d86 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_monitor_service_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_monitor_service_py3 import AlertsSummaryByMonitorService + + +class AlertsSummaryPropertiesSummaryByMonitorService(AlertsSummaryByMonitorService): + """Summary of alerts by severity. + + :param platform: Count of alerts of "Platform" + :type platform: int + :param application_insights: Count of alerts of "Application Insights" + :type application_insights: int + :param log_analytics: Count of alerts of "Log Analytics" + :type log_analytics: int + :param zabbix: Count of alerts of "Zabbix" + :type zabbix: int + :param scom: Count of alerts of "SCOM" + :type scom: int + :param nagios: Count of alerts of "Nagios" + :type nagios: int + :param infrastructure_insights: Count of alerts of "Infrastructure + Insights" + :type infrastructure_insights: int + :param activity_log_administrative: Count of alerts of "ActivityLog + Administrative" + :type activity_log_administrative: int + :param activity_log_security: Count of alerts of "ActivityLog Security" + :type activity_log_security: int + :param activity_log_recommendation: Count of alerts of "ActivityLog + Recommendation" + :type activity_log_recommendation: int + :param activity_log_policy: Count of alerts of "ActivityLog Policy" + :type activity_log_policy: int + :param activity_log_autoscale: Count of alerts of "ActivityLog Autoscale" + :type activity_log_autoscale: int + :param service_health: Count of alerts of "ServiceHealth" + :type service_health: int + :param smart_detector: Count of alerts of "Smart Detector" + :type smart_detector: int + """ + + _attribute_map = { + 'platform': {'key': 'platform', 'type': 'int'}, + 'application_insights': {'key': 'application Insights', 'type': 'int'}, + 'log_analytics': {'key': 'log Analytics', 'type': 'int'}, + 'zabbix': {'key': 'zabbix', 'type': 'int'}, + 'scom': {'key': 'scom', 'type': 'int'}, + 'nagios': {'key': 'nagios', 'type': 'int'}, + 'infrastructure_insights': {'key': 'infrastructure Insights', 'type': 'int'}, + 'activity_log_administrative': {'key': 'activityLog Administrative', 'type': 'int'}, + 'activity_log_security': {'key': 'activityLog Security', 'type': 'int'}, + 'activity_log_recommendation': {'key': 'activityLog Recommendation', 'type': 'int'}, + 'activity_log_policy': {'key': 'activityLog Policy', 'type': 'int'}, + 'activity_log_autoscale': {'key': 'activityLog Autoscale', 'type': 'int'}, + 'service_health': {'key': 'serviceHealth', 'type': 'int'}, + 'smart_detector': {'key': 'smartDetector', 'type': 'int'}, + } + + def __init__(self, *, platform: int=None, application_insights: int=None, log_analytics: int=None, zabbix: int=None, scom: int=None, nagios: int=None, infrastructure_insights: int=None, activity_log_administrative: int=None, activity_log_security: int=None, activity_log_recommendation: int=None, activity_log_policy: int=None, activity_log_autoscale: int=None, service_health: int=None, smart_detector: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryByMonitorService, self).__init__(platform=platform, application_insights=application_insights, log_analytics=log_analytics, zabbix=zabbix, scom=scom, nagios=nagios, infrastructure_insights=infrastructure_insights, activity_log_administrative=activity_log_administrative, activity_log_security=activity_log_security, activity_log_recommendation=activity_log_recommendation, activity_log_policy=activity_log_policy, activity_log_autoscale=activity_log_autoscale, service_health=service_health, smart_detector=smart_detector, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity.py new file mode 100644 index 000000000000..2921b3d2a636 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryPropertiesSummaryBySeverity(Model): + """Summary of alerts by severity. + + :param sev0: Summary of alerts by severity 'Sev0' + :type sev0: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev0 + :param sev1: Summary of alerts by severity 'Sev1' + :type sev1: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev1 + :param sev2: Summary of alerts by severity 'Sev2' + :type sev2: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev2 + :param sev3: Summary of alerts by severity 'Sev3' + :type sev3: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev3 + :param sev4: Summary of alerts by severity 'Sev4' + :type sev4: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev4 + """ + + _attribute_map = { + 'sev0': {'key': 'sev0', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev0'}, + 'sev1': {'key': 'sev1', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev1'}, + 'sev2': {'key': 'sev2', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev2'}, + 'sev3': {'key': 'sev3', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev3'}, + 'sev4': {'key': 'sev4', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev4'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeverity, self).__init__(**kwargs) + self.sev0 = kwargs.get('sev0', None) + self.sev1 = kwargs.get('sev1', None) + self.sev2 = kwargs.get('sev2', None) + self.sev3 = kwargs.get('sev3', None) + self.sev4 = kwargs.get('sev4', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_and_monitor_condition.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_and_monitor_condition.py new file mode 100644 index 000000000000..f866413e2855 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_and_monitor_condition.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_severity_and_monitor_condition import AlertsSummaryBySeverityAndMonitorCondition + + +class AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition(AlertsSummaryBySeverityAndMonitorCondition): + """Summary of alerts by severity and monitor condition. + + :param sev0: Summary of alerts by monitor condition with severity 'Sev0' + :type sev0: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev0 + :param sev1: Summary of alerts by monitor condition with severity 'Sev1' + :type sev1: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev1 + :param sev2: Summary of alerts by monitor condition with severity 'Sev2' + :type sev2: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev2 + :param sev3: Summary of alerts by monitor condition with severity 'Sev3' + :type sev3: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev3 + :param sev4: Summary of alerts by monitor condition with severity 'Sev4' + :type sev4: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev4 + """ + + _attribute_map = { + 'sev0': {'key': 'sev0', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev0'}, + 'sev1': {'key': 'sev1', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev1'}, + 'sev2': {'key': 'sev2', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev2'}, + 'sev3': {'key': 'sev3', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev3'}, + 'sev4': {'key': 'sev4', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev4'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_and_monitor_condition_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_and_monitor_condition_py3.py new file mode 100644 index 000000000000..930255221c2b --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_and_monitor_condition_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_severity_and_monitor_condition_py3 import AlertsSummaryBySeverityAndMonitorCondition + + +class AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition(AlertsSummaryBySeverityAndMonitorCondition): + """Summary of alerts by severity and monitor condition. + + :param sev0: Summary of alerts by monitor condition with severity 'Sev0' + :type sev0: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev0 + :param sev1: Summary of alerts by monitor condition with severity 'Sev1' + :type sev1: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev1 + :param sev2: Summary of alerts by monitor condition with severity 'Sev2' + :type sev2: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev2 + :param sev3: Summary of alerts by monitor condition with severity 'Sev3' + :type sev3: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev3 + :param sev4: Summary of alerts by monitor condition with severity 'Sev4' + :type sev4: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryBySeverityAndMonitorConditionSev4 + """ + + _attribute_map = { + 'sev0': {'key': 'sev0', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev0'}, + 'sev1': {'key': 'sev1', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev1'}, + 'sev2': {'key': 'sev2', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev2'}, + 'sev3': {'key': 'sev3', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev3'}, + 'sev4': {'key': 'sev4', 'type': 'AlertsSummaryBySeverityAndMonitorConditionSev4'}, + } + + def __init__(self, *, sev0=None, sev1=None, sev2=None, sev3=None, sev4=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition, self).__init__(sev0=sev0, sev1=sev1, sev2=sev2, sev3=sev3, sev4=sev4, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_py3.py new file mode 100644 index 000000000000..618cb7f4bb75 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertsSummaryPropertiesSummaryBySeverity(Model): + """Summary of alerts by severity. + + :param sev0: Summary of alerts by severity 'Sev0' + :type sev0: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev0 + :param sev1: Summary of alerts by severity 'Sev1' + :type sev1: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev1 + :param sev2: Summary of alerts by severity 'Sev2' + :type sev2: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev2 + :param sev3: Summary of alerts by severity 'Sev3' + :type sev3: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev3 + :param sev4: Summary of alerts by severity 'Sev4' + :type sev4: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeveritySev4 + """ + + _attribute_map = { + 'sev0': {'key': 'sev0', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev0'}, + 'sev1': {'key': 'sev1', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev1'}, + 'sev2': {'key': 'sev2', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev2'}, + 'sev3': {'key': 'sev3', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev3'}, + 'sev4': {'key': 'sev4', 'type': 'AlertsSummaryPropertiesSummaryBySeveritySev4'}, + } + + def __init__(self, *, sev0=None, sev1=None, sev2=None, sev3=None, sev4=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeverity, self).__init__(**kwargs) + self.sev0 = sev0 + self.sev1 = sev1 + self.sev2 = sev2 + self.sev3 = sev3 + self.sev4 = sev4 diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev0.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev0.py new file mode 100644 index 000000000000..24af3beeced5 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev0.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev0(AlertsSummaryByState): + """Summary of alerts by severity 'Sev0'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeveritySev0, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev0_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev0_py3.py new file mode 100644 index 000000000000..a02069e003ba --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev0_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state_py3 import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev0(AlertsSummaryByState): + """Summary of alerts by severity 'Sev0'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeveritySev0, self).__init__(new=new, acknowledged=acknowledged, closed=closed, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev1.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev1.py new file mode 100644 index 000000000000..75208ee4179c --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev1.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev1(AlertsSummaryByState): + """Summary of alerts by severity 'Sev1'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeveritySev1, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev1_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev1_py3.py new file mode 100644 index 000000000000..3c303a3ff5db --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev1_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state_py3 import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev1(AlertsSummaryByState): + """Summary of alerts by severity 'Sev1'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeveritySev1, self).__init__(new=new, acknowledged=acknowledged, closed=closed, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev2.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev2.py new file mode 100644 index 000000000000..b6fd7272a138 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev2.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev2(AlertsSummaryByState): + """Summary of alerts by severity 'Sev2'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeveritySev2, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev2_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev2_py3.py new file mode 100644 index 000000000000..07961f62db24 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev2_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state_py3 import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev2(AlertsSummaryByState): + """Summary of alerts by severity 'Sev2'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeveritySev2, self).__init__(new=new, acknowledged=acknowledged, closed=closed, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev3.py new file mode 100644 index 000000000000..8341316703c2 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev3(AlertsSummaryByState): + """Summary of alerts by severity 'Sev3'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeveritySev3, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev3_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev3_py3.py new file mode 100644 index 000000000000..b455cc73b2a4 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev3_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state_py3 import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev3(AlertsSummaryByState): + """Summary of alerts by severity 'Sev3'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeveritySev3, self).__init__(new=new, acknowledged=acknowledged, closed=closed, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev4.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev4.py new file mode 100644 index 000000000000..31265dc17bf7 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev4.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev4(AlertsSummaryByState): + """Summary of alerts by severity 'Sev4'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryBySeveritySev4, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev4_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev4_py3.py new file mode 100644 index 000000000000..27b6c68f80a3 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_severity_sev4_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state_py3 import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryBySeveritySev4(AlertsSummaryByState): + """Summary of alerts by severity 'Sev4'. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryBySeveritySev4, self).__init__(new=new, acknowledged=acknowledged, closed=closed, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_state.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_state.py new file mode 100644 index 000000000000..47624a82bded --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_state.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryByState(AlertsSummaryByState): + """Summary of alerts by state. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryPropertiesSummaryByState, self).__init__(**kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_state_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_state_py3.py new file mode 100644 index 000000000000..c4baba200612 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_properties_summary_by_state_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .alerts_summary_by_state_py3 import AlertsSummaryByState + + +class AlertsSummaryPropertiesSummaryByState(AlertsSummaryByState): + """Summary of alerts by state. + + :param new: Count of alerts with state 'New' + :type new: int + :param acknowledged: Count of alerts with state 'Acknowledged' + :type acknowledged: int + :param closed: Count of alerts with state 'Closed' + :type closed: int + """ + + _attribute_map = { + 'new': {'key': 'new', 'type': 'int'}, + 'acknowledged': {'key': 'acknowledged', 'type': 'int'}, + 'closed': {'key': 'closed', 'type': 'int'}, + } + + def __init__(self, *, new: int=None, acknowledged: int=None, closed: int=None, **kwargs) -> None: + super(AlertsSummaryPropertiesSummaryByState, self).__init__(new=new, acknowledged=acknowledged, closed=closed, **kwargs) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py index ed41ea6d10de..c73ef9d43d0b 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py @@ -13,7 +13,7 @@ class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. + """Summary of the alerts. Variables are only populated by the server, and will be ignored when sending a request. @@ -24,8 +24,25 @@ class AlertsSummary(Resource): :vartype type: str :ivar name: Azure resource name :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + :param total: Total number of alerts. + :type total: int + :param smart_groups_count: Total number of smart groups. + :type smart_groups_count: int + :param summary_by_state: Summary of alerts by state + :type summary_by_state: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryByState + :param summary_by_severity: Summary of alerts by severity + :type summary_by_severity: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeverity + :param summary_by_severity_and_monitor_condition: Summary of alerts by + severity and monitor condition + :type summary_by_severity_and_monitor_condition: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition + :param summary_by_monitor_service: Summary of alerts by severity + :type summary_by_monitor_service: + ~azure.mgmt.alertsmanagement.models.AlertsSummaryPropertiesSummaryByMonitorService + :param next_link: URL to fetch the next set of results. + :type next_link: str """ _validation = { @@ -38,9 +55,21 @@ class AlertsSummary(Resource): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + 'total': {'key': 'properties.total', 'type': 'int'}, + 'smart_groups_count': {'key': 'properties.smartGroupsCount', 'type': 'int'}, + 'summary_by_state': {'key': 'properties.summaryByState', 'type': 'AlertsSummaryPropertiesSummaryByState'}, + 'summary_by_severity': {'key': 'properties.summaryBySeverity', 'type': 'AlertsSummaryPropertiesSummaryBySeverity'}, + 'summary_by_severity_and_monitor_condition': {'key': 'properties.summaryBySeverityAndMonitorCondition', 'type': 'AlertsSummaryPropertiesSummaryBySeverityAndMonitorCondition'}, + 'summary_by_monitor_service': {'key': 'properties.summaryByMonitorService', 'type': 'AlertsSummaryPropertiesSummaryByMonitorService'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: + def __init__(self, *, total: int=None, smart_groups_count: int=None, summary_by_state=None, summary_by_severity=None, summary_by_severity_and_monitor_condition=None, summary_by_monitor_service=None, next_link: str=None, **kwargs) -> None: super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties + self.total = total + self.smart_groups_count = smart_groups_count + self.summary_by_state = summary_by_state + self.summary_by_severity = summary_by_severity + self.summary_by_severity_and_monitor_condition = summary_by_severity_and_monitor_condition + self.summary_by_monitor_service = summary_by_monitor_service + self.next_link = next_link diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/condition.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/condition.py new file mode 100644 index 000000000000..7ff7a865fb21 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/condition.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/condition_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/condition_py3.py new file mode 100644 index 000000000000..6d93a445ae4a --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/condition_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/conditions.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/conditions.py new file mode 100644 index 000000000000..6f0f88702d58 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/conditions.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by slert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/conditions_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/conditions_py3.py new file mode 100644 index 000000000000..7d550902f912 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/conditions_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by slert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/diagnostics.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/diagnostics.py new file mode 100644 index 000000000000..73cd2f07af65 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/diagnostics.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_rule_properties import ActionRuleProperties + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/diagnostics_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/diagnostics_py3.py new file mode 100644 index 000000000000..c68492350a91 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/diagnostics_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_rule_properties_py3 import ActionRuleProperties + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index fb40e5365a59..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains consistent fields across different monitor services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev4 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: The type of signal the alert is based on, which could - be metrics, logs or activity logs. Possible values include: 'Metric', - 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which can be modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Can be 'Fired' or 'Resolved', which represents - whether the underlying conditions have crossed the defined alert rule - thresholds. Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because the rule condition is no longer met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 31d14ddf7c7a..000000000000 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains consistent fields across different monitor services. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev4 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: The type of signal the alert is based on, which could - be metrics, logs or activity logs. Possible values include: 'Metric', - 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which can be modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Can be 'Fired' or 'Resolved', which represents - whether the underlying conditions have crossed the defined alert rule - thresholds. Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because the rule condition is no longer met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/managed_resource.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/managed_resource.py new file mode 100644 index 000000000000..7d9d0351378a --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/managed_resource.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/managed_resource_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/managed_resource_py3.py new file mode 100644 index 000000000000..9539a17c7204 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/managed_resource_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/patch_object.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/patch_object.py new file mode 100644 index 000000000000..8c1117f36196 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/patch_object.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/patch_object_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/patch_object_py3.py new file mode 100644 index 000000000000..e5299bec0709 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/patch_object_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/scope.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/scope.py new file mode 100644 index 000000000000..71595a19a7ee --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/scope.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.values = kwargs.get('values', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/scope_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/scope_py3.py new file mode 100644 index 000000000000..52546694967b --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/scope_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.type = type + self.values = values diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression.py new file mode 100644 index 000000000000..6999c85b1442 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_rule_properties import ActionRuleProperties + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_config.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_config.py new file mode 100644 index 000000000000..7fc021ffcfa7 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_config.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_config_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_config_py3.py new file mode 100644 index 000000000000..4381f0ec9a6e --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_config_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_py3.py new file mode 100644 index 000000000000..d4b32433fc4a --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .action_rule_properties_py3 import ActionRuleProperties + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_schedule.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_schedule.py new file mode 100644 index 000000000000..570e0a04448a --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_schedule.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_schedule_py3.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_schedule_py3.py new file mode 100644 index 000000000000..cabb571e031b --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/suppression_schedule_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..57f18c3c0263 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -12,9 +12,11 @@ from .operations import Operations from .alerts_operations import AlertsOperations from .smart_groups_operations import SmartGroupsOperations +from .action_rules_operations import ActionRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', ] diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/action_rules_operations.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/action_rules_operations.py new file mode 100644 index 000000000000..cbb205797244 --- /dev/null +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/action_rules_operations.py @@ -0,0 +1,559 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: filter by target resource group name + :type target_resource_group: str + :param target_resource_type: filter by target resource type + :type target_resource_type: str + :param target_resource: filter by target resource + :type target_resource: str + :param severity: filter by severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: filter by monitor service which is the source + of the alert object. Possible values include: 'Platform', 'Application + Insights', 'Log Analytics', 'Infrastructure Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'ServiceHealth', + 'SmartDetector', 'Zabbix', 'SCOM', 'Nagios' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: filter by target resource group name + :type target_resource_group: str + :param target_resource_type: filter by target resource type + :type target_resource_type: str + :param target_resource: filter by target resource + :type target_resource: str + :param severity: filter by severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: filter by monitor service which is the source + of the alert object. Possible values include: 'Platform', 'Application + Insights', 'Log Analytics', 'Infrastructure Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'ServiceHealth', + 'SmartDetector', 'Zabbix', 'SCOM', 'Nagios' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_rule, 'ActionRule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_rule_patch, 'PatchObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py index 96339533b864..b091d178f6ef 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py @@ -22,7 +22,7 @@ class AlertsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Possible values include: '2019-05-05-preview', '2018-05-05'. Constant value: "2019-05-05-preview". """ models = models @@ -32,91 +32,63 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( - self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all existing alerts, where the results can be filtered on the - basis of multiple parameters (e.g. time range). The results can then be - sorted on the basis specific fields, with the default being - lastModifiedDateTime. . - - :param target_resource: Filter by target resource( which is full ARM - ID) Default value is select all. + self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, smart_group_id=None, include_payload=None, page_count=None, sort_by=None, sort_order=None, time_range=None, custom_headers=None, raw=False, **operation_config): + """List all the existing alerts, where the results can be selective by + passing multiple filter parameters including time range and sorted on + specific fields. . + + :param target_resource: filter by target resource :type target_resource: str - :param target_resource_type: Filter by target resource type. Default - value is select all. - :type target_resource_type: str - :param target_resource_group: Filter by target resource group name. - Default value is select all. + :param target_resource_group: filter by target resource group name :type target_resource_group: str - :param monitor_service: Filter by monitor service which generates the - alert instance. Default value is select all. Possible values include: - 'Application Insights', 'ActivityLog Administrative', 'ActivityLog - Security', 'ActivityLog Recommendation', 'ActivityLog Policy', - 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', - 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :param target_resource_type: filter by target resource type + :type target_resource_type: str + :param monitor_service: filter by monitor service which is the source + of the alert object. Possible values include: 'Platform', 'Application + Insights', 'Log Analytics', 'Infrastructure Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'ServiceHealth', + 'SmartDetector', 'Zabbix', 'SCOM', 'Nagios' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is either - 'Fired' or 'Resolved'. Default value is to select all. Possible values - include: 'Fired', 'Resolved' + :param monitor_condition: filter by monitor condition which is the + state of the alert at monitor service. Possible values include: + 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Default value is select all. - Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :param severity: filter by severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :param alert_state: Filter by state of the alert instance. Default - value is to select all. Possible values include: 'New', + :param alert_state: filter by state. Possible values include: 'New', 'Acknowledged', 'Closed' :type alert_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by specific alert rule. Default value is to - select all. - :type alert_rule: str - :param smart_group_id: Filter the alerts list by the Smart Group Id. - Default value is none. + :param smart_group_id: filter by smart Group Id :type smart_group_id: str - :param include_context: Include context which has contextual data - specific to the monitor service. Default value is false' - :type include_context: bool - :param include_egress_config: Include egress config which would be - used for displaying the content in portal. Default value is 'false'. - :type include_egress_config: bool - :param page_count: Determines number of alerts returned per page in - response. Permissible value is between 1 to 250. When the - "includeContent" filter is selected, maximum value allowed is 25. - Default value is 25. + :param include_payload: include payload field content, default value + is 'false'. + :type include_payload: bool + :param page_count: number of items per page, default value is '25'. :type page_count: int - :param sort_by: Sort the query results by input field, Default value + :param sort_by: sort the query results by input field, default value is 'lastModifiedDateTime'. Possible values include: 'name', 'severity', 'alertState', 'monitorCondition', 'targetResource', 'targetResourceName', 'targetResourceGroup', 'targetResourceType', 'startDateTime', 'lastModifiedDateTime' :type sort_by: str or ~azure.mgmt.alertsmanagement.models.AlertsSortByFields - :param sort_order: Sort the query results order in either ascending or - descending. Default value is 'desc' for time fields and 'asc' for + :param sort_order: sort the query results order in either ascending or + descending, default value is 'desc' for time fields and 'asc' for others. Possible values include: 'asc', 'desc' :type sort_order: str - :param select: This filter allows to selection of the fields(comma - separated) which would be part of the essential section. This would - allow to project only the required fields rather than getting entire - content. Default is to fetch all the fields in the essentials - section. - :type select: str - :param time_range: Filter by time range by below listed values. - Default value is 1 day. Possible values include: '1h', '1d', '7d', - '30d' + :param time_range: filter by time range, default value is 1 day. + Possible values include: '1h', '1d', '7d', '30d' :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange - :param custom_time_range: Filter by custom time range in the format - / where time is in (ISO-8601 format)'. - Permissible values is within 30 days from query time. Either - timeRange or customTimeRange could be used but not both. Default is - none. - :type custom_time_range: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -142,10 +114,10 @@ def internal_paging(next_link=None, raw=False): query_parameters = {} if target_resource is not None: query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') if target_resource_group is not None: query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') if monitor_service is not None: query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') if monitor_condition is not None: @@ -154,26 +126,18 @@ def internal_paging(next_link=None, raw=False): query_parameters['severity'] = self._serialize.query("severity", severity, 'str') if alert_state is not None: query_parameters['alertState'] = self._serialize.query("alert_state", alert_state, 'str') - if alert_rule is not None: - query_parameters['alertRule'] = self._serialize.query("alert_rule", alert_rule, 'str') if smart_group_id is not None: query_parameters['smartGroupId'] = self._serialize.query("smart_group_id", smart_group_id, 'str') - if include_context is not None: - query_parameters['includeContext'] = self._serialize.query("include_context", include_context, 'bool') - if include_egress_config is not None: - query_parameters['includeEgressConfig'] = self._serialize.query("include_egress_config", include_egress_config, 'bool') + if include_payload is not None: + query_parameters['includePayload'] = self._serialize.query("include_payload", include_payload, 'bool') if page_count is not None: query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') if sort_by is not None: query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') if sort_order is not None: query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - if select is not None: - query_parameters['select'] = self._serialize.query("select", select, 'str') if time_range is not None: query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if custom_time_range is not None: - query_parameters['customTimeRange'] = self._serialize.query("custom_time_range", custom_time_range, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -216,7 +180,7 @@ def get_by_id( Get information related to a specific alert. - :param alert_id: Unique ID of an alert instance. + :param alert_id: Unique ID of an alert object. :type alert_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -272,12 +236,12 @@ def get_by_id( def change_state( self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of an alert. + """Change the state of the alert. - :param alert_id: Unique ID of an alert instance. + :param alert_id: Unique ID of an alert object. :type alert_id: str - :param new_state: New state of the alert. Possible values include: - 'New', 'Acknowledged', 'Closed' + :param new_state: filter by state. Possible values include: 'New', + 'Acknowledged', 'Closed' :type new_state: str or ~azure.mgmt.alertsmanagement.models.AlertState :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -334,11 +298,9 @@ def change_state( def get_history( self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of an alert, which captures any monitor condition - changes (Fired/Resolved) and alert state changes - (New/Acknowledged/Closed). + """Get the history of the changes of an alert. - :param alert_id: Unique ID of an alert instance. + :param alert_id: Unique ID of an alert object. :type alert_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -393,63 +355,14 @@ def get_history( get_history.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'} def get_summary( - self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Get a summarized count of your alerts grouped by various parameters - (e.g. grouping by 'Severity' returns the count of alerts for each - severity). - - :param groupby: This parameter allows the result set to be grouped by - input fields. For example, groupby=severity,alertstate. Possible - values include: 'severity', 'alertState', 'monitorCondition', - 'monitorService', 'signalType', 'alertRule' - :type groupby: str or - ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupByFields - :param include_smart_groups_count: Include count of the SmartGroups as - part of the summary. Default value is 'false'. - :type include_smart_groups_count: bool - :param target_resource: Filter by target resource( which is full ARM - ID) Default value is select all. - :type target_resource: str - :param target_resource_type: Filter by target resource type. Default - value is select all. - :type target_resource_type: str - :param target_resource_group: Filter by target resource group name. - Default value is select all. + self, target_resource_group=None, time_range=None, custom_headers=None, raw=False, **operation_config): + """Summary of alerts with the count each severity. + + :param target_resource_group: filter by target resource group name :type target_resource_group: str - :param monitor_service: Filter by monitor service which generates the - alert instance. Default value is select all. Possible values include: - 'Application Insights', 'ActivityLog Administrative', 'ActivityLog - Security', 'ActivityLog Recommendation', 'ActivityLog Policy', - 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', - 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' - :type monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is either - 'Fired' or 'Resolved'. Default value is to select all. Possible values - include: 'Fired', 'Resolved' - :type monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Default value is select all. - Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :param alert_state: Filter by state of the alert instance. Default - value is to select all. Possible values include: 'New', - 'Acknowledged', 'Closed' - :type alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by specific alert rule. Default value is to - select all. - :type alert_rule: str - :param time_range: Filter by time range by below listed values. - Default value is 1 day. Possible values include: '1h', '1d', '7d', - '30d' + :param time_range: filter by time range, default value is 1 day. + Possible values include: '1h', '1d', '7d', '30d' :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange - :param custom_time_range: Filter by custom time range in the format - / where time is in (ISO-8601 format)'. - Permissible values is within 30 days from query time. Either - timeRange or customTimeRange could be used but not both. Default is - none. - :type custom_time_range: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -470,29 +383,10 @@ def get_summary( # Construct parameters query_parameters = {} - query_parameters['groupby'] = self._serialize.query("groupby", groupby, 'str') - if include_smart_groups_count is not None: - query_parameters['includeSmartGroupsCount'] = self._serialize.query("include_smart_groups_count", include_smart_groups_count, 'bool') - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') if target_resource_group is not None: query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if alert_state is not None: - query_parameters['alertState'] = self._serialize.query("alert_state", alert_state, 'str') - if alert_rule is not None: - query_parameters['alertRule'] = self._serialize.query("alert_rule", alert_rule, 'str') if time_range is not None: query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if custom_time_range is not None: - query_parameters['customTimeRange'] = self._serialize.query("custom_time_range", custom_time_range, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py index 9718bb4566f6..2c5136702303 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Possible values include: '2019-05-05-preview', '2018-05-05'. Constant value: "2019-05-05-preview". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py index f1d5087fed0c..31750e302d62 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py @@ -22,7 +22,7 @@ class SmartGroupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". + :ivar api_version: client API version. Possible values include: '2019-05-05-preview', '2018-05-05'. Constant value: "2019-05-05-preview". """ models = models @@ -32,63 +32,54 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-05" + self.api_version = "2019-05-05-preview" self.config = config def get_all( self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all Smart Groups within a specified subscription. + """Get all smartGroups within the subscription. - List all the Smart Groups within a specified subscription. . + List all the smartGroups within the specified subscription. . - :param target_resource: Filter by target resource( which is full ARM - ID) Default value is select all. + :param target_resource: filter by target resource :type target_resource: str - :param target_resource_group: Filter by target resource group name. - Default value is select all. + :param target_resource_group: filter by target resource group name :type target_resource_group: str - :param target_resource_type: Filter by target resource type. Default - value is select all. + :param target_resource_type: filter by target resource type :type target_resource_type: str - :param monitor_service: Filter by monitor service which generates the - alert instance. Default value is select all. Possible values include: - 'Application Insights', 'ActivityLog Administrative', 'ActivityLog - Security', 'ActivityLog Recommendation', 'ActivityLog Policy', - 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', - 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :param monitor_service: filter by monitor service which is the source + of the alert object. Possible values include: 'Platform', 'Application + Insights', 'Log Analytics', 'Infrastructure Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'ServiceHealth', + 'SmartDetector', 'Zabbix', 'SCOM', 'Nagios' :type monitor_service: str or ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is either - 'Fired' or 'Resolved'. Default value is to select all. Possible values - include: 'Fired', 'Resolved' + :param monitor_condition: filter by monitor condition which is the + state of the alert at monitor service. Possible values include: + 'Fired', 'Resolved' :type monitor_condition: str or ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Default value is select all. - Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :param severity: filter by severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :param smart_group_state: Filter by state of the smart group. Default - value is to select all. Possible values include: 'New', - 'Acknowledged', 'Closed' + :param smart_group_state: filter by state. Possible values include: + 'New', 'Acknowledged', 'Closed' :type smart_group_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param time_range: Filter by time range by below listed values. - Default value is 1 day. Possible values include: '1h', '1d', '7d', - '30d' + :param time_range: filter by time range, default value is 1 day. + Possible values include: '1h', '1d', '7d', '30d' :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange - :param page_count: Determines number of alerts returned per page in - response. Permissible value is between 1 to 250. When the - "includeContent" filter is selected, maximum value allowed is 25. - Default value is 25. + :param page_count: number of items per page, default value is '25'. :type page_count: int - :param sort_by: Sort the query results by input field. Default value - is sort by 'lastModifiedDateTime'. Possible values include: - 'alertsCount', 'state', 'severity', 'startDateTime', - 'lastModifiedDateTime' + :param sort_by: sort the query results by input field, default value + is 'lastModifiedDateTime'. Possible values include: 'alertsCount', + 'state', 'severity', 'startDateTime', 'lastModifiedDateTime' :type sort_by: str or ~azure.mgmt.alertsmanagement.models.SmartGroupsSortByFields - :param sort_order: Sort the query results order in either ascending or - descending. Default value is 'desc' for time fields and 'asc' for + :param sort_order: sort the query results order in either ascending or + descending, default value is 'desc' for time fields and 'asc' for others. Possible values include: 'asc', 'desc' :type sort_order: str :param dict custom_headers: headers that will be added to the request @@ -166,11 +157,11 @@ def get_all( def get_by_id( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information related to a specific Smart Group. + """Get information of smart alerts group. - Get information related to a specific Smart Group. + Get details of smart group. - :param smart_group_id: Smart group unique id. + :param smart_group_id: Smart Group Id :type smart_group_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -231,12 +222,13 @@ def get_by_id( def change_state( self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of a Smart Group. + """Change the state from unresolved to resolved and all the alerts within + the smart group will also be resolved. - :param smart_group_id: Smart group unique id. + :param smart_group_id: Smart Group Id :type smart_group_id: str - :param new_state: New state of the alert. Possible values include: - 'New', 'Acknowledged', 'Closed' + :param new_state: filter by state. Possible values include: 'New', + 'Acknowledged', 'Closed' :type new_state: str or ~azure.mgmt.alertsmanagement.models.AlertState :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -298,10 +290,9 @@ def change_state( def get_history( self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history a smart group, which captures any Smart Group state - changes (New/Acknowledged/Closed) . + """Get the history of the changes of smart group. - :param smart_group_id: Smart group unique id. + :param smart_group_id: Smart Group Id :type smart_group_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py index 66bff6dc5556..dbb7d37864d4 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py +++ b/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2018-05-05" +VERSION = "2019-05-05-preview"