Skip to content
Merged
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
10 changes: 10 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,13 @@
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 .voice_receiver import VoiceReceiver
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 Down Expand Up @@ -153,8 +158,13 @@
'EmailReceiver',
'SmsReceiver',
'WebhookReceiver',
'ItsmReceiver',
'AzureAppPushReceiver',
'AutomationRunbookReceiver',
'VoiceReceiver',
'ActionGroupResource',
'EnableRequest',
'ActionGroupPatchBody',
'ActivityLogAlertLeafCondition',
'ActivityLogAlertAllOfCondition',
'ActivityLogAlertActionGroup',
Expand Down
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,20 @@ 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]
:param voice_receivers: The list of voice receivers that are part of this
action group.
:type voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver]
"""

_validation = {
Expand All @@ -66,12 +80,20 @@ 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]'},
'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'},
}

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, voice_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
self.voice_receivers = voice_receivers
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
@@ -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
56 changes: 56 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 ItsmReceiver(Model):
"""An Itsm receiver.

:param name: The name of the Itsm receiver. Names must be unique across
all receivers within an action group.
:type name: str
:param workspace_id: OMS LA instance identifier.
:type workspace_id: str
:param connection_id: Unique identification of ITSM connection among
multiple defined in above workspace.
:type connection_id: str
:param ticket_configuration: JSON blob for the configurations of the ITSM
action. CreateMultipleWorkItems option will be part of this blob as well.
:type ticket_configuration: str
:param region: Region in which workspace resides. Supported
values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'
:type region: str
"""

_validation = {
'name': {'required': True},
'workspace_id': {'required': True},
'connection_id': {'required': True},
'ticket_configuration': {'required': True},
'region': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'workspace_id': {'key': 'workspaceId', 'type': 'str'},
'connection_id': {'key': 'connectionId', 'type': 'str'},
'ticket_configuration': {'key': 'ticketConfiguration', 'type': 'str'},
'region': {'key': 'region', 'type': 'str'},
}

def __init__(self, name, workspace_id, connection_id, ticket_configuration, region):
super(ItsmReceiver, self).__init__()
self.name = name
self.workspace_id = workspace_id
self.connection_id = connection_id
self.ticket_configuration = ticket_configuration
self.region = region
43 changes: 43 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.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 VoiceReceiver(Model):
"""An voice receiver.

:param name: The name of the voice receiver. Names must be unique across
all receivers within an action group.
:type name: str
:param country_code: The country code of the voice receiver.
:type country_code: str
:param phone_number: The phone number of the voice receiver.
:type phone_number: str
"""

_validation = {
'name': {'required': True},
'country_code': {'required': True},
'phone_number': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'country_code': {'key': 'countryCode', 'type': 'str'},
'phone_number': {'key': 'phoneNumber', 'type': 'str'},
}

def __init__(self, name, country_code, phone_number):
super(VoiceReceiver, self).__init__()
self.name = name
self.country_code = country_code
self.phone_number = phone_number
Loading