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

[AutoPR] monitor/resource-manager #4563

Closed
wants to merge 4 commits 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
31 changes: 28 additions & 3 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,25 @@
from .baseline_response_py3 import BaselineResponse
from .time_series_information_py3 import TimeSeriesInformation
from .calculate_baseline_response_py3 import CalculateBaselineResponse
from .metric_single_dimension_py3 import MetricSingleDimension
from .single_baseline_py3 import SingleBaseline
from .baseline_metadata_py3 import BaselineMetadata
from .time_series_baseline_py3 import TimeSeriesBaseline
from .single_metric_baseline_py3 import SingleMetricBaseline
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 .metric_dimension_py3 import MetricDimension
from .multi_metric_criteria_py3 import MultiMetricCriteria
from .metric_alert_multiple_resource_multiple_metric_criteria_py3 import MetricAlertMultipleResourceMultipleMetricCriteria
from .dynamic_threshold_failing_periods_py3 import DynamicThresholdFailingPeriods
from .dynamic_metric_criteria_py3 import DynamicMetricCriteria
from .source_py3 import Source
from .schedule_py3 import Schedule
from .action_py3 import Action
Expand Down Expand Up @@ -199,18 +206,25 @@
from .baseline_response import BaselineResponse
from .time_series_information import TimeSeriesInformation
from .calculate_baseline_response import CalculateBaselineResponse
from .metric_single_dimension import MetricSingleDimension
from .single_baseline import SingleBaseline
from .baseline_metadata import BaselineMetadata
from .time_series_baseline import TimeSeriesBaseline
from .single_metric_baseline import SingleMetricBaseline
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 .metric_dimension import MetricDimension
from .multi_metric_criteria import MultiMetricCriteria
from .metric_alert_multiple_resource_multiple_metric_criteria import MetricAlertMultipleResourceMultipleMetricCriteria
from .dynamic_threshold_failing_periods import DynamicThresholdFailingPeriods
from .dynamic_metric_criteria import DynamicMetricCriteria
from .source import Source
from .schedule import Schedule
from .action import Action
Expand Down Expand Up @@ -240,6 +254,7 @@
from .event_data_paged import EventDataPaged
from .localizable_string_paged import LocalizableStringPaged
from .metric_definition_paged import MetricDefinitionPaged
from .single_metric_baseline_paged import SingleMetricBaselinePaged
from .metric_alert_resource_paged import MetricAlertResourcePaged
from .log_search_rule_resource_paged import LogSearchRuleResourcePaged
from .metric_namespace_paged import MetricNamespacePaged
Expand All @@ -258,6 +273,7 @@
Unit,
AggregationType,
Sensitivity,
BaselineSensitivity,
Enabled,
ProvisioningState,
QueryType,
Expand Down Expand Up @@ -348,18 +364,25 @@
'BaselineResponse',
'TimeSeriesInformation',
'CalculateBaselineResponse',
'MetricSingleDimension',
'SingleBaseline',
'BaselineMetadata',
'TimeSeriesBaseline',
'SingleMetricBaseline',
'MetricAlertAction',
'MetricAlertCriteria',
'MetricAlertResource',
'MetricAlertResourcePatch',
'MetricAlertStatusProperties',
'MetricAlertStatus',
'MetricAlertStatusCollection',
'MetricDimension',
'MetricCriteria',
'MetricAlertSingleResourceMultipleMetricCriteria',
'MetricDimension',
'MultiMetricCriteria',
'MetricAlertMultipleResourceMultipleMetricCriteria',
'DynamicThresholdFailingPeriods',
'DynamicMetricCriteria',
'Source',
'Schedule',
'Action',
Expand Down Expand Up @@ -389,6 +412,7 @@
'EventDataPaged',
'LocalizableStringPaged',
'MetricDefinitionPaged',
'SingleMetricBaselinePaged',
'MetricAlertResourcePaged',
'LogSearchRuleResourcePaged',
'MetricNamespacePaged',
Expand All @@ -406,6 +430,7 @@
'Unit',
'AggregationType',
'Sensitivity',
'BaselineSensitivity',
'Enabled',
'ProvisioningState',
'QueryType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,25 @@ class ArmRoleReceiver(Model):
:type name: str
:param role_id: Required. The arm role id.
:type role_id: str
:param use_common_alert_schema: Required. Indicates whether to use common
alert schema.
:type use_common_alert_schema: bool
"""

_validation = {
'name': {'required': True},
'role_id': {'required': True},
'use_common_alert_schema': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'role_id': {'key': 'roleId', 'type': 'str'},
'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(ArmRoleReceiver, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.role_id = kwargs.get('role_id', None)
self.use_common_alert_schema = kwargs.get('use_common_alert_schema', None)
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,25 @@ class ArmRoleReceiver(Model):
:type name: str
:param role_id: Required. The arm role id.
:type role_id: str
:param use_common_alert_schema: Required. Indicates whether to use common
alert schema.
:type use_common_alert_schema: bool
"""

_validation = {
'name': {'required': True},
'role_id': {'required': True},
'use_common_alert_schema': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'role_id': {'key': 'roleId', 'type': 'str'},
'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'},
}

def __init__(self, *, name: str, role_id: str, **kwargs) -> None:
def __init__(self, *, name: str, role_id: str, use_common_alert_schema: bool, **kwargs) -> None:
super(ArmRoleReceiver, self).__init__(**kwargs)
self.name = name
self.role_id = role_id
self.use_common_alert_schema = use_common_alert_schema
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ class AutomationRunbookReceiver(Model):
:type name: str
:param service_uri: The URI where webhooks should be sent.
:type service_uri: str
:param use_common_alert_schema: Required. Indicates whether to use common
alert schema.
:type use_common_alert_schema: bool
"""

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

_attribute_map = {
Expand All @@ -48,6 +52,7 @@ class AutomationRunbookReceiver(Model):
'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'service_uri': {'key': 'serviceUri', 'type': 'str'},
'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand All @@ -58,3 +63,4 @@ def __init__(self, **kwargs):
self.is_global_runbook = kwargs.get('is_global_runbook', None)
self.name = kwargs.get('name', None)
self.service_uri = kwargs.get('service_uri', None)
self.use_common_alert_schema = kwargs.get('use_common_alert_schema', None)
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ class AutomationRunbookReceiver(Model):
:type name: str
:param service_uri: The URI where webhooks should be sent.
:type service_uri: str
:param use_common_alert_schema: Required. Indicates whether to use common
alert schema.
:type use_common_alert_schema: bool
"""

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

_attribute_map = {
Expand All @@ -48,13 +52,15 @@ class AutomationRunbookReceiver(Model):
'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'service_uri': {'key': 'serviceUri', 'type': 'str'},
'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'},
}

def __init__(self, *, automation_account_id: str, runbook_name: str, webhook_resource_id: str, is_global_runbook: bool, name: str=None, service_uri: str=None, **kwargs) -> None:
def __init__(self, *, automation_account_id: str, runbook_name: str, webhook_resource_id: str, is_global_runbook: bool, use_common_alert_schema: bool, name: str=None, service_uri: str=None, **kwargs) -> None:
super(AutomationRunbookReceiver, self).__init__(**kwargs)
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
self.use_common_alert_schema = use_common_alert_schema
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,25 @@ class AzureFunctionReceiver(Model):
:param http_trigger_url: Required. The http trigger url where http request
sent to.
:type http_trigger_url: str
:param use_common_alert_schema: Required. Indicates whether to use common
alert schema.
:type use_common_alert_schema: bool
"""

_validation = {
'name': {'required': True},
'function_app_resource_id': {'required': True},
'function_name': {'required': True},
'http_trigger_url': {'required': True},
'use_common_alert_schema': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'function_app_resource_id': {'key': 'functionAppResourceId', 'type': 'str'},
'function_name': {'key': 'functionName', 'type': 'str'},
'http_trigger_url': {'key': 'httpTriggerUrl', 'type': 'str'},
'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand All @@ -50,3 +55,4 @@ def __init__(self, **kwargs):
self.function_app_resource_id = kwargs.get('function_app_resource_id', None)
self.function_name = kwargs.get('function_name', None)
self.http_trigger_url = kwargs.get('http_trigger_url', None)
self.use_common_alert_schema = kwargs.get('use_common_alert_schema', None)
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,31 @@ class AzureFunctionReceiver(Model):
:param http_trigger_url: Required. The http trigger url where http request
sent to.
:type http_trigger_url: str
:param use_common_alert_schema: Required. Indicates whether to use common
alert schema.
:type use_common_alert_schema: bool
"""

_validation = {
'name': {'required': True},
'function_app_resource_id': {'required': True},
'function_name': {'required': True},
'http_trigger_url': {'required': True},
'use_common_alert_schema': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'function_app_resource_id': {'key': 'functionAppResourceId', 'type': 'str'},
'function_name': {'key': 'functionName', 'type': 'str'},
'http_trigger_url': {'key': 'httpTriggerUrl', 'type': 'str'},
'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'},
}

def __init__(self, *, name: str, function_app_resource_id: str, function_name: str, http_trigger_url: str, **kwargs) -> None:
def __init__(self, *, name: str, function_app_resource_id: str, function_name: str, http_trigger_url: str, use_common_alert_schema: bool, **kwargs) -> None:
super(AzureFunctionReceiver, self).__init__(**kwargs)
self.name = name
self.function_app_resource_id = function_app_resource_id
self.function_name = function_name
self.http_trigger_url = http_trigger_url
self.use_common_alert_schema = use_common_alert_schema
39 changes: 39 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata.py
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 BaselineMetadata(Model):
"""Represents a baseline metadata value.

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

:param name: Required. Name of the baseline metadata.
:type name: str
:param value: Required. Value of the baseline metadata.
:type value: str
"""

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

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

def __init__(self, **kwargs):
super(BaselineMetadata, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.value = kwargs.get('value', None)
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 BaselineMetadata(Model):
"""Represents a baseline metadata value.

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

:param name: Required. Name of the baseline metadata.
:type name: str
:param value: Required. Value of the baseline metadata.
:type value: str
"""

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

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

def __init__(self, *, name: str, value: str, **kwargs) -> None:
super(BaselineMetadata, self).__init__(**kwargs)
self.name = name
self.value = value
Loading