Skip to content
82 changes: 82 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,9 @@
from .itsm_receiver_py3 import ItsmReceiver
from .azure_app_push_receiver_py3 import AzureAppPushReceiver
from .automation_runbook_receiver_py3 import AutomationRunbookReceiver
from .voice_receiver_py3 import VoiceReceiver
from .logic_app_receiver_py3 import LogicAppReceiver
from .azure_function_receiver_py3 import AzureFunctionReceiver
from .action_group_resource_py3 import ActionGroupResource
from .enable_request_py3 import EnableRequest
from .action_group_patch_body_py3 import ActionGroupPatchBody
Expand All @@ -84,6 +87,25 @@
from .baseline_response_py3 import BaselineResponse
from .time_series_information_py3 import TimeSeriesInformation
from .calculate_baseline_response_py3 import CalculateBaselineResponse
from .metric_alert_action_py3 import MetricAlertAction
from .metric_alert_criteria_py3 import MetricAlertCriteria
from .metric_alert_resource_py3 import MetricAlertResource
from .metric_alert_resource_patch_py3 import MetricAlertResourcePatch
from .metric_alert_status_properties_py3 import MetricAlertStatusProperties
from .metric_alert_status_py3 import MetricAlertStatus
from .metric_alert_status_collection_py3 import MetricAlertStatusCollection
from .metric_dimension_py3 import MetricDimension
from .metric_criteria_py3 import MetricCriteria
from .metric_alert_single_resource_multiple_metric_criteria_py3 import MetricAlertSingleResourceMultipleMetricCriteria
from .source_py3 import Source
from .schedule_py3 import Schedule
from .action_py3 import Action
from .log_search_rule_resource_py3 import LogSearchRuleResource
from .log_search_rule_resource_patch_py3 import LogSearchRuleResourcePatch
from .log_metric_trigger_py3 import LogMetricTrigger
from .trigger_condition_py3 import TriggerCondition
from .az_ns_action_group_py3 import AzNsActionGroup
from .alerting_action_py3 import AlertingAction
except (SyntaxError, ImportError):
from .resource import Resource
from .scale_capacity import ScaleCapacity
Expand Down Expand Up @@ -134,6 +156,9 @@
from .itsm_receiver import ItsmReceiver
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 .azure_function_receiver import AzureFunctionReceiver
from .action_group_resource import ActionGroupResource
from .enable_request import EnableRequest
from .action_group_patch_body import ActionGroupPatchBody
Expand All @@ -159,6 +184,25 @@
from .baseline_response import BaselineResponse
from .time_series_information import TimeSeriesInformation
from .calculate_baseline_response import CalculateBaselineResponse
from .metric_alert_action import MetricAlertAction
from .metric_alert_criteria import MetricAlertCriteria
from .metric_alert_resource import MetricAlertResource
from .metric_alert_resource_patch import MetricAlertResourcePatch
from .metric_alert_status_properties import MetricAlertStatusProperties
from .metric_alert_status import MetricAlertStatus
from .metric_alert_status_collection import MetricAlertStatusCollection
from .metric_dimension import MetricDimension
from .metric_criteria import MetricCriteria
from .metric_alert_single_resource_multiple_metric_criteria import MetricAlertSingleResourceMultipleMetricCriteria
from .source import Source
from .schedule import Schedule
from .action import Action
from .log_search_rule_resource import LogSearchRuleResource
from .log_search_rule_resource_patch import LogSearchRuleResourcePatch
from .log_metric_trigger import LogMetricTrigger
from .trigger_condition import TriggerCondition
from .az_ns_action_group import AzNsActionGroup
from .alerting_action import AlertingAction
from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged
from .incident_paged import IncidentPaged
from .alert_rule_resource_paged import AlertRuleResourcePaged
Expand All @@ -168,6 +212,8 @@
from .event_data_paged import EventDataPaged
from .localizable_string_paged import LocalizableStringPaged
from .metric_definition_paged import MetricDefinitionPaged
from .metric_alert_resource_paged import MetricAlertResourcePaged
from .log_search_rule_resource_paged import LogSearchRuleResourcePaged
from .monitor_management_client_enums import (
MetricStatisticType,
TimeAggregationType,
Expand All @@ -183,6 +229,12 @@
Unit,
AggregationType,
Sensitivity,
Enabled,
ProvisioningState,
QueryType,
ConditionalOperator,
MetricTriggerType,
AlertSeverity,
ResultType,
)

Expand Down Expand Up @@ -236,6 +288,9 @@
'ItsmReceiver',
'AzureAppPushReceiver',
'AutomationRunbookReceiver',
'VoiceReceiver',
'LogicAppReceiver',
'AzureFunctionReceiver',
'ActionGroupResource',
'EnableRequest',
'ActionGroupPatchBody',
Expand All @@ -261,6 +316,25 @@
'BaselineResponse',
'TimeSeriesInformation',
'CalculateBaselineResponse',
'MetricAlertAction',
'MetricAlertCriteria',
'MetricAlertResource',
'MetricAlertResourcePatch',
'MetricAlertStatusProperties',
'MetricAlertStatus',
'MetricAlertStatusCollection',
'MetricDimension',
'MetricCriteria',
'MetricAlertSingleResourceMultipleMetricCriteria',
'Source',
'Schedule',
'Action',
'LogSearchRuleResource',
'LogSearchRuleResourcePatch',
'LogMetricTrigger',
'TriggerCondition',
'AzNsActionGroup',
'AlertingAction',
'AutoscaleSettingResourcePaged',
'IncidentPaged',
'AlertRuleResourcePaged',
Expand All @@ -270,6 +344,8 @@
'EventDataPaged',
'LocalizableStringPaged',
'MetricDefinitionPaged',
'MetricAlertResourcePaged',
'LogSearchRuleResourcePaged',
'MetricStatisticType',
'TimeAggregationType',
'ComparisonOperationType',
Expand All @@ -284,5 +360,11 @@
'Unit',
'AggregationType',
'Sensitivity',
'Enabled',
'ProvisioningState',
'QueryType',
'ConditionalOperator',
'MetricTriggerType',
'AlertSeverity',
'ResultType',
]
41 changes: 41 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 Action(Model):
"""Action.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AlertingAction

All required parameters must be populated in order to send to Azure.

:param odatatype: Required. Constant filled by server.
:type odatatype: str
"""

_validation = {
'odatatype': {'required': True},
}

_attribute_map = {
'odatatype': {'key': 'odata\\.type', 'type': 'str'},
}

_subtype_map = {
'odatatype': {'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction': 'AlertingAction'}
}

def __init__(self, **kwargs):
super(Action, self).__init__(**kwargs)
self.odatatype = None
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,25 @@ class ActionGroupResource(Resource):
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]
: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]
:param azure_function_receivers: The list of azure function receivers that
are part of this action group.
:type azure_function_receivers:
list[~azure.mgmt.monitor.models.AzureFunctionReceiver]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'group_short_name': {'required': True, 'max_length': 15},
'group_short_name': {'required': True, 'max_length': 12},
'enabled': {'required': True},
}

Expand All @@ -82,6 +93,9 @@ class ActionGroupResource(Resource):
'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]'},
'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'},
'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'},
}

def __init__(self, **kwargs):
Expand All @@ -94,3 +108,6 @@ def __init__(self, **kwargs):
self.itsm_receivers = kwargs.get('itsm_receivers', None)
self.azure_app_push_receivers = kwargs.get('azure_app_push_receivers', None)
self.automation_runbook_receivers = kwargs.get('automation_runbook_receivers', None)
self.voice_receivers = kwargs.get('voice_receivers', None)
self.logic_app_receivers = kwargs.get('logic_app_receivers', None)
self.azure_function_receivers = kwargs.get('azure_function_receivers', None)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .resource_py3 import Resource


class ActionGroupResource(Resource):
Expand Down Expand Up @@ -57,14 +57,25 @@ class ActionGroupResource(Resource):
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]
: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]
:param azure_function_receivers: The list of azure function receivers that
are part of this action group.
:type azure_function_receivers:
list[~azure.mgmt.monitor.models.AzureFunctionReceiver]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'group_short_name': {'required': True, 'max_length': 15},
'group_short_name': {'required': True, 'max_length': 12},
'enabled': {'required': True},
}

Expand All @@ -82,9 +93,12 @@ class ActionGroupResource(Resource):
'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]'},
'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'},
'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'},
}

def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: bool=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, **kwargs) -> None:
def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: bool=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, azure_function_receivers=None, **kwargs) -> None:
super(ActionGroupResource, self).__init__(location=location, tags=tags, **kwargs)
self.group_short_name = group_short_name
self.enabled = enabled
Expand All @@ -94,3 +108,6 @@ def __init__(self, *, location: str, group_short_name: str, tags=None, enabled:
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
self.logic_app_receivers = logic_app_receivers
self.azure_function_receivers = azure_function_receivers
41 changes: 41 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/action_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 Action(Model):
"""Action.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AlertingAction

All required parameters must be populated in order to send to Azure.

:param odatatype: Required. Constant filled by server.
:type odatatype: str
"""

_validation = {
'odatatype': {'required': True},
}

_attribute_map = {
'odatatype': {'key': 'odata\\.type', 'type': 'str'},
}

_subtype_map = {
'odatatype': {'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction': 'AlertingAction'}
}

def __init__(self, **kwargs) -> None:
super(Action, self).__init__(**kwargs)
self.odatatype = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .resource_py3 import Resource


class ActivityLogAlertResource(Resource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .resource_py3 import Resource


class AlertRuleResource(Resource):
Expand Down
Loading