Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MgmtMonitor] Added new receivers to action group document. #1752

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@
from .email_receiver import EmailReceiver
from .sms_receiver import SmsReceiver
from .webhook_receiver import WebhookReceiver
from .itsm_receiver import ItsmReceiver
from .azure_app_push_receiver import AzureAppPushReceiver
from .automation_runbook_receiver import AutomationRunbookReceiver
from .action_group_resource import ActionGroupResource
from .enable_request import EnableRequest
from .action_group_patch_body import ActionGroupPatchBody
from .activity_log_alert_leaf_condition import ActivityLogAlertLeafCondition
from .activity_log_alert_all_of_condition import ActivityLogAlertAllOfCondition
from .activity_log_alert_action_group import ActivityLogAlertActionGroup
Expand All @@ -74,6 +78,11 @@
from .time_series_element import TimeSeriesElement
from .metric import Metric
from .response import Response
from .baseline_metadata_value import BaselineMetadataValue
from .baseline import Baseline
from .baseline_response import BaselineResponse
from .time_series_information import TimeSeriesInformation
from .calculate_baseline_response import CalculateBaselineResponse
from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged
from .incident_paged import IncidentPaged
from .alert_rule_resource_paged import AlertRuleResourcePaged
Expand All @@ -97,6 +106,7 @@
EventLevel,
Unit,
AggregationType,
Sensitivity,
ResultType,
)

Expand Down Expand Up @@ -147,8 +157,12 @@
'EmailReceiver',
'SmsReceiver',
'WebhookReceiver',
'ItsmReceiver',
'AzureAppPushReceiver',
'AutomationRunbookReceiver',
'ActionGroupResource',
'EnableRequest',
'ActionGroupPatchBody',
'ActivityLogAlertLeafCondition',
'ActivityLogAlertAllOfCondition',
'ActivityLogAlertActionGroup',
Expand All @@ -166,6 +180,11 @@
'TimeSeriesElement',
'Metric',
'Response',
'BaselineMetadataValue',
'Baseline',
'BaselineResponse',
'TimeSeriesInformation',
'CalculateBaselineResponse',
'AutoscaleSettingResourcePaged',
'IncidentPaged',
'AlertRuleResourcePaged',
Expand All @@ -188,5 +207,6 @@
'EventLevel',
'Unit',
'AggregationType',
'Sensitivity',
'ResultType',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ActionGroupPatchBody(Model):
"""An action group object for the body of patch operations.

:param tags: Resource tags
:type tags: dict[str, str]
:param enabled: Indicates whether this action group is enabled. If an
action group is not enabled, then none of its actions will be activated.
Default value: True .
:type enabled: bool
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
}

def __init__(self, tags=None, enabled=True):
super(ActionGroupPatchBody, self).__init__()
self.tags = tags
self.enabled = enabled
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ class ActionGroupResource(Resource):
:param webhook_receivers: The list of webhook receivers that are part of
this action group.
:type webhook_receivers: list[~azure.mgmt.monitor.models.WebhookReceiver]
:param itsm_receivers: The list of ITSM receivers that are part of this
action group.
:type itsm_receivers: list[~azure.mgmt.monitor.models.ItsmReceiver]
:param azure_app_push_receivers: The list of AzureAppPush receivers that
are part of this action group.
:type azure_app_push_receivers:
list[~azure.mgmt.monitor.models.AzureAppPushReceiver]
:param automation_runbook_receivers: The list of AutomationRunbook
receivers that are part of this action group.
:type automation_runbook_receivers:
list[~azure.mgmt.monitor.models.AutomationRunbookReceiver]
"""

_validation = {
Expand All @@ -66,12 +77,18 @@ class ActionGroupResource(Resource):
'email_receivers': {'key': 'properties.emailReceivers', 'type': '[EmailReceiver]'},
'sms_receivers': {'key': 'properties.smsReceivers', 'type': '[SmsReceiver]'},
'webhook_receivers': {'key': 'properties.webhookReceivers', 'type': '[WebhookReceiver]'},
'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'},
'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'},
'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'},
}

def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None):
def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None):
super(ActionGroupResource, self).__init__(location=location, tags=tags)
self.group_short_name = group_short_name
self.enabled = enabled
self.email_receivers = email_receivers
self.sms_receivers = sms_receivers
self.webhook_receivers = webhook_receivers
self.itsm_receivers = itsm_receivers
self.azure_app_push_receivers = azure_app_push_receivers
self.automation_runbook_receivers = automation_runbook_receivers
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ class ActivityLogAlertActionGroup(Model):
}

def __init__(self, action_group_id, webhook_properties=None):
super(ActivityLogAlertActionGroup, self).__init__()
self.action_group_id = action_group_id
self.webhook_properties = webhook_properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ class ActivityLogAlertActionList(Model):
}

def __init__(self, action_groups=None):
super(ActivityLogAlertActionList, self).__init__()
self.action_groups = action_groups
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ class ActivityLogAlertAllOfCondition(Model):
}

def __init__(self, all_of):
super(ActivityLogAlertAllOfCondition, self).__init__()
self.all_of = all_of
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ class ActivityLogAlertLeafCondition(Model):
}

def __init__(self, field, equals):
super(ActivityLogAlertLeafCondition, self).__init__()
self.field = field
self.equals = equals
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ class ActivityLogAlertPatchBody(Model):
}

def __init__(self, tags=None, enabled=True):
super(ActivityLogAlertPatchBody, self).__init__()
self.tags = tags
self.enabled = enabled
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class AlertRuleResourcePatch(Model):
}

def __init__(self, name, is_enabled, condition, tags=None, description=None, actions=None):
super(AlertRuleResourcePatch, self).__init__()
self.tags = tags
self.name = name
self.description = description
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 AutomationRunbookReceiver(Model):
"""The Azure Automation Runbook notification receiver.

:param automation_account_id: The Azure automation account Id which holds
this runbook and authenticate to Azure resource.
:type automation_account_id: str
:param runbook_name: The name for this runbook.
:type runbook_name: str
:param webhook_resource_id: The resource id for webhook linked to this
runbook.
:type webhook_resource_id: str
:param is_global_runbook: Indicates whether this instance is global
runbook.
:type is_global_runbook: bool
:param name: Indicates name of the webhook.
:type name: str
:param service_uri: The URI where webhooks should be sent.
:type service_uri: str
"""

_validation = {
'automation_account_id': {'required': True},
'runbook_name': {'required': True},
'webhook_resource_id': {'required': True},
'is_global_runbook': {'required': True},
}

_attribute_map = {
'automation_account_id': {'key': 'automationAccountId', 'type': 'str'},
'runbook_name': {'key': 'runbookName', 'type': 'str'},
'webhook_resource_id': {'key': 'webhookResourceId', 'type': 'str'},
'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'service_uri': {'key': 'serviceUri', 'type': 'str'},
}

def __init__(self, automation_account_id, runbook_name, webhook_resource_id, is_global_runbook, name=None, service_uri=None):
super(AutomationRunbookReceiver, self).__init__()
self.automation_account_id = automation_account_id
self.runbook_name = runbook_name
self.webhook_resource_id = webhook_resource_id
self.is_global_runbook = is_global_runbook
self.name = name
self.service_uri = service_uri
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ class AutoscaleNotification(Model):
operation = "Scale"

def __init__(self, email=None, webhooks=None):
super(AutoscaleNotification, self).__init__()
self.email = email
self.webhooks = webhooks
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class AutoscaleProfile(Model):
}

def __init__(self, name, capacity, rules, fixed_date=None, recurrence=None):
super(AutoscaleProfile, self).__init__()
self.name = name
self.capacity = capacity
self.rules = rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class AutoscaleSettingResourcePatch(Model):
}

def __init__(self, profiles, tags=None, notifications=None, enabled=True, name=None, target_resource_uri=None):
super(AutoscaleSettingResourcePatch, self).__init__()
self.tags = tags
self.profiles = profiles
self.notifications = notifications
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 AzureAppPushReceiver(Model):
"""The Azure mobile App push notification receiver.

:param name: The name of the Azure mobile app push receiver. Names must be
unique across all receivers within an action group.
:type name: str
:param email_address: The email address registered for the Azure mobile
app.
:type email_address: str
"""

_validation = {
'name': {'required': True},
'email_address': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'email_address': {'key': 'emailAddress', 'type': 'str'},
}

def __init__(self, name, email_address):
super(AzureAppPushReceiver, self).__init__()
self.name = name
self.email_address = email_address
43 changes: 43 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 Baseline(Model):
"""The baseline values for a single sensitivity value.

:param sensitivity: the sensitivity of the baseline. Possible values
include: 'Low', 'Medium', 'High'
:type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity
:param low_thresholds: The low thresholds of the baseline.
:type low_thresholds: list[float]
:param high_thresholds: The high thresholds of the baseline.
:type high_thresholds: list[float]
"""

_validation = {
'sensitivity': {'required': True},
'low_thresholds': {'required': True},
'high_thresholds': {'required': True},
}

_attribute_map = {
'sensitivity': {'key': 'sensitivity', 'type': 'Sensitivity'},
'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'},
'high_thresholds': {'key': 'highThresholds', 'type': '[float]'},
}

def __init__(self, sensitivity, low_thresholds, high_thresholds):
super(Baseline, self).__init__()
self.sensitivity = sensitivity
self.low_thresholds = low_thresholds
self.high_thresholds = high_thresholds
Original file line number Diff line number Diff line change
@@ -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 BaselineMetadataValue(Model):
"""Represents a baseline metadata value.

:param name: the name of the metadata.
:type name: ~azure.mgmt.monitor.models.LocalizableString
:param value: the value of the metadata.
:type value: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'LocalizableString'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, name=None, value=None):
super(BaselineMetadataValue, self).__init__()
self.name = name
self.value = value
Loading