diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py index af7ad075b8c64..b31b2980155eb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -13,10 +13,10 @@ from msrest import Serializer, Deserializer from ._configuration import AlertsManagementClientConfiguration +from .operations import ActionRulesOperations from .operations import Operations from .operations import AlertsOperations from .operations import SmartGroupsOperations -from .operations import ActionRulesOperations from .operations import SmartDetectorAlertRulesOperations from . import models @@ -27,14 +27,14 @@ class AlertsManagementClient(SDKClient): :ivar config: Configuration for client. :vartype config: AlertsManagementClientConfiguration + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.alertsmanagement.operations.Operations :ivar alerts: Alerts operations :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 :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations @@ -56,13 +56,13 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.alerts = AlertsOperations( 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) self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index 84870cf01aa04..3850e14f0d98a 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -32,7 +32,6 @@ from ._models_py3 import Detector from ._models_py3 import Diagnostics from ._models_py3 import ErrorResponse, ErrorResponseException - from ._models_py3 import ErrorResponse1, ErrorResponse1Exception from ._models_py3 import ErrorResponseBody from ._models_py3 import Essentials from ._models_py3 import ManagedResource @@ -43,6 +42,7 @@ from ._models_py3 import PatchObject from ._models_py3 import Resource from ._models_py3 import Scope + from ._models_py3 import SmartDetectorErrorResponse, SmartDetectorErrorResponseException from ._models_py3 import SmartGroup from ._models_py3 import SmartGroupAggregatedProperty from ._models_py3 import SmartGroupModification @@ -75,7 +75,6 @@ from ._models import Detector from ._models import Diagnostics from ._models import ErrorResponse, ErrorResponseException - from ._models import ErrorResponse1, ErrorResponse1Exception from ._models import ErrorResponseBody from ._models import Essentials from ._models import ManagedResource @@ -86,6 +85,7 @@ from ._models import PatchObject from ._models import Resource from ._models import Scope + from ._models import SmartDetectorErrorResponse, SmartDetectorErrorResponseException from ._models import SmartGroup from ._models import SmartGroupAggregatedProperty from ._models import SmartGroupModification @@ -101,6 +101,10 @@ from ._paged_models import OperationPaged from ._paged_models import SmartGroupPaged from ._alerts_management_client_enums import ( + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, Severity, SignalType, AlertState, @@ -109,10 +113,6 @@ AlertModificationEvent, SmartGroupModificationEvent, State, - ScopeType, - Operator, - SuppressionType, - ActionRuleStatus, AlertRuleState, TimeRange, AlertsSortByFields, @@ -143,7 +143,6 @@ 'Detector', 'Diagnostics', 'ErrorResponse', 'ErrorResponseException', - 'ErrorResponse1', 'ErrorResponse1Exception', 'ErrorResponseBody', 'Essentials', 'ManagedResource', @@ -154,6 +153,7 @@ 'PatchObject', 'Resource', 'Scope', + 'SmartDetectorErrorResponse', 'SmartDetectorErrorResponseException', 'SmartGroup', 'SmartGroupAggregatedProperty', 'SmartGroupModification', @@ -163,11 +163,15 @@ 'SuppressionConfig', 'SuppressionSchedule', 'ThrottlingInformation', + 'ActionRulePaged', 'OperationPaged', 'AlertPaged', 'SmartGroupPaged', - 'ActionRulePaged', 'AlertRulePaged', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', 'Severity', 'SignalType', 'AlertState', @@ -176,10 +180,6 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', - 'ScopeType', - 'Operator', - 'SuppressionType', - 'ActionRuleStatus', 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py index 2d9334e583c7f..ec67e80ea6701 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -12,6 +12,36 @@ from enum import Enum +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + subscription = "Subscription" + + +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 Severity(str, Enum): sev0 = "Sev0" @@ -64,6 +94,12 @@ class AlertModificationEvent(str, Enum): alert_created = "AlertCreated" state_change = "StateChange" monitor_condition_change = "MonitorConditionChange" + severity_change = "SeverityChange" + action_rule_triggered = "ActionRuleTriggered" + action_rule_suppressed = "ActionRuleSuppressed" + actions_triggered = "ActionsTriggered" + actions_suppressed = "ActionsSuppressed" + actions_failed = "ActionsFailed" class SmartGroupModificationEvent(str, Enum): @@ -81,35 +117,6 @@ 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 AlertRuleState(str, Enum): enabled = "Enabled" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py index a602fe2c93470..5c783facaaf7d 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -372,7 +372,9 @@ class AlertModificationItem(Model): """Alert modification item. :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange', + 'SeverityChange', 'ActionRuleTriggered', 'ActionRuleSuppressed', + 'ActionsTriggered', 'ActionsSuppressed', 'ActionsFailed' :type modification_event: str or ~azure.mgmt.alertsmanagement.models.AlertModificationEvent :param old_value: Old value @@ -478,7 +480,7 @@ class AzureResource(Model): :param location: The resource location. Default value: "global" . :type location: str :param tags: The resource tags. - :type tags: object + :type tags: dict[str, str] """ _validation = { @@ -492,7 +494,7 @@ class AzureResource(Model): 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): @@ -521,7 +523,7 @@ class AlertRule(AzureResource): :param location: The resource location. Default value: "global" . :type location: str :param tags: The resource tags. - :type tags: object + :type tags: dict[str, str] :param description: The alert rule description. :type description: str :param state: Required. The alert rule state. Possible values include: @@ -562,7 +564,7 @@ class AlertRule(AzureResource): 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'str'}, @@ -598,7 +600,7 @@ class AlertRulePatchObject(Model): :ivar name: The resource name. :vartype name: str :param tags: The resource tags. - :type tags: object + :type tags: dict[str, str] :param description: The alert rule description. :type description: str :param state: The alert rule state. Possible values include: 'Enabled', @@ -628,7 +630,7 @@ class AlertRulePatchObject(Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'str'}, @@ -993,38 +995,6 @@ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) -class ErrorResponse1(Model): - """Describe the format of an Error response. - - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse1, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponse1Exception(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse1'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) - - class ErrorResponseBody(Model): """Details of error response. @@ -1306,7 +1276,7 @@ class Scope(Model): resources from the scope subscription as well. :param scope_type: type of target scope. Possible values include: - 'ResourceGroup', 'Resource' + 'ResourceGroup', 'Resource', 'Subscription' :type scope_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. @@ -1324,6 +1294,38 @@ def __init__(self, **kwargs): self.values = kwargs.get('values', None) +class SmartDetectorErrorResponse(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartDetectorErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class SmartDetectorErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'SmartDetectorErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(SmartDetectorErrorResponseException, self).__init__(deserialize, response, 'SmartDetectorErrorResponse', *args) + + class SmartGroup(Resource): """Set of related alerts grouped together smartly by AMS. diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py index 635be9d76f8e1..2b86649a192d4 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -372,7 +372,9 @@ class AlertModificationItem(Model): """Alert modification item. :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange', + 'SeverityChange', 'ActionRuleTriggered', 'ActionRuleSuppressed', + 'ActionsTriggered', 'ActionsSuppressed', 'ActionsFailed' :type modification_event: str or ~azure.mgmt.alertsmanagement.models.AlertModificationEvent :param old_value: Old value @@ -478,7 +480,7 @@ class AzureResource(Model): :param location: The resource location. Default value: "global" . :type location: str :param tags: The resource tags. - :type tags: object + :type tags: dict[str, str] """ _validation = { @@ -492,7 +494,7 @@ class AzureResource(Model): 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: @@ -521,7 +523,7 @@ class AlertRule(AzureResource): :param location: The resource location. Default value: "global" . :type location: str :param tags: The resource tags. - :type tags: object + :type tags: dict[str, str] :param description: The alert rule description. :type description: str :param state: Required. The alert rule state. Possible values include: @@ -562,7 +564,7 @@ class AlertRule(AzureResource): 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'str'}, @@ -598,7 +600,7 @@ class AlertRulePatchObject(Model): :ivar name: The resource name. :vartype name: str :param tags: The resource tags. - :type tags: object + :type tags: dict[str, str] :param description: The alert rule description. :type description: str :param state: The alert rule state. Possible values include: 'Enabled', @@ -628,7 +630,7 @@ class AlertRulePatchObject(Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'str'}, @@ -993,38 +995,6 @@ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) -class ErrorResponse1(Model): - """Describe the format of an Error response. - - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse1, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponse1Exception(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse1'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) - - class ErrorResponseBody(Model): """Details of error response. @@ -1306,7 +1276,7 @@ class Scope(Model): resources from the scope subscription as well. :param scope_type: type of target scope. Possible values include: - 'ResourceGroup', 'Resource' + 'ResourceGroup', 'Resource', 'Subscription' :type scope_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. @@ -1324,6 +1294,38 @@ def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: self.values = values +class SmartDetectorErrorResponse(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(SmartDetectorErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class SmartDetectorErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'SmartDetectorErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(SmartDetectorErrorResponseException, self).__init__(deserialize, response, 'SmartDetectorErrorResponse', *args) + + class SmartGroup(Resource): """Set of related alerts grouped together smartly by AMS. diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py index aece7093df758..dbb12d962ad98 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py @@ -12,6 +12,19 @@ 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) class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -51,19 +64,6 @@ class SmartGroupPaged(Paged): def __init__(self, *args, **kwargs): super(SmartGroupPaged, self).__init__(*args, **kwargs) -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) class AlertRulePaged(Paged): """ A paging container for iterating over a list of :class:`AlertRule ` object diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 946b389ce5fb0..39ae7cd93bac9 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,16 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- +from ._action_rules_operations import ActionRulesOperations from ._operations import Operations from ._alerts_operations import AlertsOperations from ._smart_groups_operations import SmartGroupsOperations -from ._action_rules_operations import ActionRulesOperations from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ + 'ActionRulesOperations', 'Operations', 'AlertsOperations', 'SmartGroupsOperations', - 'ActionRulesOperations', 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py index 8119e32986ffa..a0f0792e8be17 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -55,7 +55,7 @@ def list( :rtype: ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] :raises: - :class:`ErrorResponse1Exception` + :class:`SmartDetectorErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -96,7 +96,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponse1Exception(self._deserialize, response) + raise models.SmartDetectorErrorResponseException(self._deserialize, response) return response @@ -128,7 +128,7 @@ def list_by_resource_group( :rtype: ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] :raises: - :class:`ErrorResponse1Exception` + :class:`SmartDetectorErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -170,7 +170,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponse1Exception(self._deserialize, response) + raise models.SmartDetectorErrorResponseException(self._deserialize, response) return response @@ -203,7 +203,7 @@ def get( :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponse1Exception` + :class:`SmartDetectorErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -235,7 +235,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponse1Exception(self._deserialize, response) + raise models.SmartDetectorErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -267,7 +267,7 @@ def create_or_update( :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponse1Exception` + :class:`SmartDetectorErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -301,7 +301,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorResponse1Exception(self._deserialize, response) + raise models.SmartDetectorErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -336,7 +336,7 @@ def patch( :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponse1Exception` + :class:`SmartDetectorErrorResponseException` """ # Construct URL url = self.patch.metadata['url'] @@ -370,7 +370,7 @@ def patch( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponse1Exception(self._deserialize, response) + raise models.SmartDetectorErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -399,7 +399,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponse1Exception` + :class:`SmartDetectorErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -428,7 +428,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ErrorResponse1Exception(self._deserialize, response) + raise models.SmartDetectorErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response)