Skip to content
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
2 changes: 2 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from .azure_app_push_receiver import AzureAppPushReceiver
from .automation_runbook_receiver import AutomationRunbookReceiver
from .voice_receiver import VoiceReceiver
from .logic_app_receiver import LogicAppReceiver
from .action_group_resource import ActionGroupResource
from .enable_request import EnableRequest
from .action_group_patch_body import ActionGroupPatchBody
Expand Down Expand Up @@ -162,6 +163,7 @@
'AzureAppPushReceiver',
'AutomationRunbookReceiver',
'VoiceReceiver',
'LogicAppReceiver',
'ActionGroupResource',
'EnableRequest',
'ActionGroupPatchBody',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ class ActionGroupResource(Resource):
:param voice_receivers: The list of voice receivers that are part of this
action group.
:type voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver]
:param logic_app_receivers: The list of logic app receivers that are part
of this action group.
:type logic_app_receivers:
list[~azure.mgmt.monitor.models.LogicAppReceiver]
"""

_validation = {
Expand All @@ -84,9 +88,10 @@ class ActionGroupResource(Resource):
'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'},
'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'},
'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'},
'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'},
}

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):
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, logic_app_receivers=None):
super(ActionGroupResource, self).__init__(location=location, tags=tags)
self.group_short_name = group_short_name
self.enabled = enabled
Expand All @@ -97,3 +102,4 @@ def __init__(self, location, group_short_name, tags=None, enabled=True, email_re
self.azure_app_push_receivers = azure_app_push_receivers
self.automation_runbook_receivers = automation_runbook_receivers
self.voice_receivers = voice_receivers
self.logic_app_receivers = logic_app_receivers
43 changes: 43 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/logic_app_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 LogicAppReceiver(Model):
"""A logic app receiver.

:param name: The name of the logic app receiver. Names must be unique
across all receivers within an action group.
:type name: str
:param resource_id: The azure resource id of the logic app receiver.
:type resource_id: str
:param callback_url: The callback url where http request sent to.
:type callback_url: str
"""

_validation = {
'name': {'required': True},
'resource_id': {'required': True},
'callback_url': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
'callback_url': {'key': 'callbackUrl', 'type': 'str'},
}

def __init__(self, name, resource_id, callback_url):
super(LogicAppReceiver, self).__init__()
self.name = name
self.resource_id = resource_id
self.callback_url = callback_url
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class VoiceReceiver(Model):
"""An voice receiver.
"""A voice receiver.

:param name: The name of the voice receiver. Names must be unique across
all receivers within an action group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ActionGroupsOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2018-03-01".
"""

Expand Down Expand Up @@ -58,7 +58,7 @@ def create_or_update(
:class:`ErrorResponseException<azure.mgmt.monitor.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
url = self.create_or_update.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'),
Expand Down Expand Up @@ -103,6 +103,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'}

def get(
self, resource_group_name, action_group_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -124,7 +125,7 @@ def get(
:class:`ErrorResponseException<azure.mgmt.monitor.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
url = self.get.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'),
Expand Down Expand Up @@ -163,6 +164,7 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'}

def delete(
self, resource_group_name, action_group_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -183,7 +185,7 @@ def delete(
:class:`ErrorResponseException<azure.mgmt.monitor.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
url = self.delete.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'),
Expand Down Expand Up @@ -215,6 +217,7 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'}

def update(
self, resource_group_name, action_group_name, tags=None, enabled=True, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -245,7 +248,7 @@ def update(
action_group_patch = models.ActionGroupPatchBody(tags=tags, enabled=enabled)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
url = self.update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -288,6 +291,7 @@ def update(
return client_raw_response

return deserialized
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'}

def list_by_subscription_id(
self, custom_headers=None, raw=False, **operation_config):
Expand All @@ -308,7 +312,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups'
url = self.list_by_subscription_id.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -351,6 +355,7 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups'}

def list_by_resource_group(
self, resource_group_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -373,7 +378,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups'
url = self.list_by_resource_group.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
Expand Down Expand Up @@ -417,6 +422,7 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups'}

def enable_receiver(
self, resource_group_name, action_group_name, receiver_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -442,7 +448,7 @@ def enable_receiver(
enable_request = models.EnableRequest(receiver_name=receiver_name)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe'
url = self.enable_receiver.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'),
Expand Down Expand Up @@ -478,3 +484,4 @@ def enable_receiver(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
enable_receiver.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe'}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ActivityLogAlertsOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2017-04-01".
"""

Expand Down Expand Up @@ -60,7 +60,7 @@ def create_or_update(
:class:`ErrorResponseException<azure.mgmt.monitor.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'
url = self.create_or_update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -105,6 +105,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'}

def get(
self, resource_group_name, activity_log_alert_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -126,7 +127,7 @@ def get(
:class:`ErrorResponseException<azure.mgmt.monitor.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'
url = self.get.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -165,6 +166,7 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'}

def delete(
self, resource_group_name, activity_log_alert_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -185,7 +187,7 @@ def delete(
:class:`ErrorResponseException<azure.mgmt.monitor.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'
url = self.delete.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -217,6 +219,7 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'}

def update(
self, resource_group_name, activity_log_alert_name, tags=None, enabled=True, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -247,7 +250,7 @@ def update(
activity_log_alert_patch = models.ActivityLogAlertPatchBody(tags=tags, enabled=enabled)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'
url = self.update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -290,6 +293,7 @@ def update(
return client_raw_response

return deserialized
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'}

def list_by_subscription_id(
self, custom_headers=None, raw=False, **operation_config):
Expand All @@ -310,7 +314,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts'
url = self.list_by_subscription_id.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -353,6 +357,7 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts'}

def list_by_resource_group(
self, resource_group_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -375,7 +380,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts'
url = self.list_by_resource_group.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
Expand Down Expand Up @@ -419,3 +424,4 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts'}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ActivityLogsOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client Api Version. Constant value: "2015-04-01".
"""

Expand Down Expand Up @@ -83,7 +83,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values'
url = self.list.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -130,3 +130,4 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values'}
Loading