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 af7ad075b8c6..b1c6ae0ef04d 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 @@ -43,13 +43,15 @@ class AlertsManagementClient(SDKClient): object` :param subscription_id: The ID of the target subscription. :type subscription_id: str + :param subscription_id1: The ID of the target subscription. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, 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)} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py index c42d0ce4b9cf..8e987865b32e 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -23,16 +23,20 @@ class AlertsManagementClientConfiguration(AzureConfiguration): object` :param subscription_id: The ID of the target subscription. :type subscription_id: str + :param subscription_id1: The ID of the target subscription. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -46,3 +50,4 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 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 2d9334e583c7..ccb9b689b722 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 @@ -64,6 +64,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): @@ -85,6 +91,7 @@ class ScopeType(str, Enum): resource_group = "ResourceGroup" resource = "Resource" + subscription = "Subscription" class Operator(str, Enum): 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 a602fe2c9347..f399c307f12d 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 @@ -1306,7 +1308,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. 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 635be9d76f8e..98f98e9bdb83 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 @@ -1306,7 +1308,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. diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 014f250f6e3f..85847c38e80f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)