Skip to content

Commit

Permalink
Generated from 1a427dcf2521c6b838a0bbb547f47bac3f1f6f94
Browse files Browse the repository at this point in the history
unhidden status
  • Loading branch information
SDK Automation committed Jun 15, 2020
1 parent 49774f1 commit f20d9c0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ class AlertsManagementClient(SDKClient):
object<msrestazure.azure_active_directory>`
: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)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,20 @@ class AlertsManagementClientConfiguration(AzureConfiguration):
object<msrestazure.azure_active_directory>`
: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'

Expand All @@ -46,3 +50,4 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.subscription_id1 = subscription_id1
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -85,6 +91,7 @@ class ScopeType(str, Enum):

resource_group = "ResourceGroup"
resource = "Resource"
subscription = "Subscription"


class Operator(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f20d9c0

Please sign in to comment.