Skip to content

Commit

Permalink
[AutoPR] monitor/resource-manager (#2761)
Browse files Browse the repository at this point in the history
* Generated from c9fbbd46eca53db6f1ebcf1b23fd224bcdee2b5e (#2760)

Changing Case

Due to difference in case, multiple section created in ARM documentation - https://docs.microsoft.com/en-us/rest/api/monitor/scheduledqueryrules

* [AutoPR monitor/resource-manager] Add two missing "by subscription" operations for completeness and compliance (#2795)

* Generated from 4afd2b6cd7da03f1f623144e33df0c923c56ba05

Add two missing "by subscription" operations.

* Generated from 840fcf1cde3e9644d365599339033b58288ad7e3

Remove "examples" nodes as requested since they are not used anymore. Adding documentation to reduce number of warnings in validation.

* Generated from 8e22a0641dc1ac873b046bdbdc934ad5525cb814

Add the serviceBusRuleId back into the DiagnosticSetting resource spec.

* Generated from 6110295138cbd6959df204de3830b4ada943a4fc (#2970)

updated description of recurrent frequency

* Generated from 1ca7f22a22e15cb8980176f25be20fd3e6f73162 (#3084)

[Monitor] Fix issue #3585: revert previous commit since it is a breaking change

* [AutoPR monitor/resource-manager] Adding MetricNamespacesAPI for version 2017-12-01-preview/Fix metrics_API.json format issue (#3266)

* Generated from 7aba14c8c35e90fe78d0b76659f0b9bc7d2da066

Fix metrics_API.json for autorest validation

* Generated from f95241c45d660fa24cf9a714b327abf56979009c

Fix tag name

* Generated from fd6b93f0f316a0f0bd8dcbce59320a99c5701e56

Fixing comments

* Packaging update of azure-mgmt-monitor

* [AutoPR monitor/resource-manager] Add missing enum for aggregation type (#3363)

* Generated from 94966a030267d7db87fc3d2440dffbe83908781a

Add missing enum for aggregation type

* Generated from 86adb05ccf2d2e4b98d1f7f08fba9aa8ec794405

Update enum order

* Generated from a2ed141f095adf20aeb11d3bd796d5906fce4f6b (#3414)

Update sqr documentation to include LogToMetricAction

* Packaging update of azure-mgmt-monitor

* [AutoPR monitor/resource-manager] Add Multi Resource Alert changes for Metric Alert API (#3445)

* Generated from 09c5415be341f2a6816dafb7a504818a3c536b7e

Multi Resource Alert changes

* Packaging update of azure-mgmt-monitor

* Generated from a88d7f44fc48e9ea0c1203b6bf10bac1b65111e4

Merge remote-tracking branch 'upstream/master'

* [AutoPR monitor/resource-manager] add armRoleReceiver to ActionGroup API and update API version to 2018-09-01 (#3640)

* Generated from 39d45decf33f87ddfe651bcd6ca1d9d9c5169df2

add armRoleReceiver to ActionGroup API
and update API version to 2018-09-01

* Packaging update of azure-mgmt-monitor

* Generated from 5ec4b7786b7b32ee01a752d38bda6d75021f3521

add description

* Generated from 5738fd21af734dc48d88f275b73a2c7fe3e504e4 (#3954)

typo: monitor/resource-manager/microsoft.insights

- datatimes ->datetimes
- calcualte -> calculate
- timezones -> time zones
- blongs -> belongs
- defintions -> definitions
- definitons -> definitions
- defitinitons -> definitions
- Speficies -> Specifies
- webook -> webhook
- Acount -> Account
- scheduledquery -> scheduled query
- Frequnecy -> Frequency
- Specifiy -> Specify

* Generated from 9771d96d4a2f4caa435cd59ae81736e910b8ee89 (#4139)

Update Python version

* Packaging update of azure-mgmt-monitor

* [AutoPR monitor/resource-manager] Updates to Scheduled Query Rule swagger (#4336)

* Generated from 42f7747495368468a3dcb9cdf36443b2d34a745f

Updates to Scheduled Query Rule swagger
  - making aznsaction paramter optional
  - removing hidden-link value from tags

* Packaging update of azure-mgmt-monitor

* Prepare 0.6.0

* Packaging update of azure-mgmt-monitor
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 6, 2019
1 parent a53e2fa commit f1eb5ad
Show file tree
Hide file tree
Showing 104 changed files with 2,007 additions and 696 deletions.
23 changes: 22 additions & 1 deletion azure-mgmt-monitor/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
Release History
===============

0.6.0 (2018-03-06)
++++++++++++++++++

**Features**

- Model MetricCriteria has a new parameter additional_properties
- Model MetricAlertResource has a new parameter target_resource_region
- Model MetricAlertResource has a new parameter target_resource_type
- Model MetricAlertResourcePatch has a new parameter target_resource_region
- Model MetricAlertResourcePatch has a new parameter target_resource_type
- Model ActionGroupResource has a new parameter arm_role_receivers
- Model DiagnosticSettingsResource has a new parameter service_bus_rule_id
- Added operation AutoscaleSettingsOperations.list_by_subscription
- Added operation AlertRulesOperations.list_by_subscription
- Added operation group MetricNamespacesOperations
- Added operation group VMInsightsOperations

**Breaking changes**

- Model MetricCriteria has a new required parameter criterion_type

0.5.2 (2018-06-06)
++++++++++++++++++

Expand Down Expand Up @@ -44,7 +65,7 @@ This version uses a next-generation code generator that *might* introduce breaki

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
Expand Down
48 changes: 48 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
from .voice_receiver_py3 import VoiceReceiver
from .logic_app_receiver_py3 import LogicAppReceiver
from .azure_function_receiver_py3 import AzureFunctionReceiver
from .arm_role_receiver_py3 import ArmRoleReceiver
from .action_group_resource_py3 import ActionGroupResource
from .enable_request_py3 import EnableRequest
from .action_group_patch_body_py3 import ActionGroupPatchBody
Expand Down Expand Up @@ -97,6 +98,8 @@
from .metric_dimension_py3 import MetricDimension
from .metric_criteria_py3 import MetricCriteria
from .metric_alert_single_resource_multiple_metric_criteria_py3 import MetricAlertSingleResourceMultipleMetricCriteria
from .multi_metric_criteria_py3 import MultiMetricCriteria
from .metric_alert_multiple_resource_multiple_metric_criteria_py3 import MetricAlertMultipleResourceMultipleMetricCriteria
from .source_py3 import Source
from .schedule_py3 import Schedule
from .action_py3 import Action
Expand All @@ -106,6 +109,17 @@
from .trigger_condition_py3 import TriggerCondition
from .az_ns_action_group_py3 import AzNsActionGroup
from .alerting_action_py3 import AlertingAction
from .dimension_py3 import Dimension
from .criteria_py3 import Criteria
from .log_to_metric_action_py3 import LogToMetricAction
from .metric_namespace_name_py3 import MetricNamespaceName
from .metric_namespace_py3 import MetricNamespace
from .proxy_resource_py3 import ProxyResource
from .error_py3 import Error
from .response_with_error_py3 import ResponseWithError, ResponseWithErrorException
from .workspace_info_py3 import WorkspaceInfo
from .data_container_py3 import DataContainer
from .vm_insights_onboarding_status_py3 import VMInsightsOnboardingStatus
except (SyntaxError, ImportError):
from .resource import Resource
from .scale_capacity import ScaleCapacity
Expand Down Expand Up @@ -159,6 +173,7 @@
from .voice_receiver import VoiceReceiver
from .logic_app_receiver import LogicAppReceiver
from .azure_function_receiver import AzureFunctionReceiver
from .arm_role_receiver import ArmRoleReceiver
from .action_group_resource import ActionGroupResource
from .enable_request import EnableRequest
from .action_group_patch_body import ActionGroupPatchBody
Expand Down Expand Up @@ -194,6 +209,8 @@
from .metric_dimension import MetricDimension
from .metric_criteria import MetricCriteria
from .metric_alert_single_resource_multiple_metric_criteria import MetricAlertSingleResourceMultipleMetricCriteria
from .multi_metric_criteria import MultiMetricCriteria
from .metric_alert_multiple_resource_multiple_metric_criteria import MetricAlertMultipleResourceMultipleMetricCriteria
from .source import Source
from .schedule import Schedule
from .action import Action
Expand All @@ -203,6 +220,17 @@
from .trigger_condition import TriggerCondition
from .az_ns_action_group import AzNsActionGroup
from .alerting_action import AlertingAction
from .dimension import Dimension
from .criteria import Criteria
from .log_to_metric_action import LogToMetricAction
from .metric_namespace_name import MetricNamespaceName
from .metric_namespace import MetricNamespace
from .proxy_resource import ProxyResource
from .error import Error
from .response_with_error import ResponseWithError, ResponseWithErrorException
from .workspace_info import WorkspaceInfo
from .data_container import DataContainer
from .vm_insights_onboarding_status import VMInsightsOnboardingStatus
from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged
from .incident_paged import IncidentPaged
from .alert_rule_resource_paged import AlertRuleResourcePaged
Expand All @@ -214,6 +242,7 @@
from .metric_definition_paged import MetricDefinitionPaged
from .metric_alert_resource_paged import MetricAlertResourcePaged
from .log_search_rule_resource_paged import LogSearchRuleResourcePaged
from .metric_namespace_paged import MetricNamespacePaged
from .monitor_management_client_enums import (
MetricStatisticType,
TimeAggregationType,
Expand All @@ -235,6 +264,8 @@
ConditionalOperator,
MetricTriggerType,
AlertSeverity,
OnboardingStatus,
DataStatus,
ResultType,
)

Expand Down Expand Up @@ -291,6 +322,7 @@
'VoiceReceiver',
'LogicAppReceiver',
'AzureFunctionReceiver',
'ArmRoleReceiver',
'ActionGroupResource',
'EnableRequest',
'ActionGroupPatchBody',
Expand Down Expand Up @@ -326,6 +358,8 @@
'MetricDimension',
'MetricCriteria',
'MetricAlertSingleResourceMultipleMetricCriteria',
'MultiMetricCriteria',
'MetricAlertMultipleResourceMultipleMetricCriteria',
'Source',
'Schedule',
'Action',
Expand All @@ -335,6 +369,17 @@
'TriggerCondition',
'AzNsActionGroup',
'AlertingAction',
'Dimension',
'Criteria',
'LogToMetricAction',
'MetricNamespaceName',
'MetricNamespace',
'ProxyResource',
'Error',
'ResponseWithError', 'ResponseWithErrorException',
'WorkspaceInfo',
'DataContainer',
'VMInsightsOnboardingStatus',
'AutoscaleSettingResourcePaged',
'IncidentPaged',
'AlertRuleResourcePaged',
Expand All @@ -346,6 +391,7 @@
'MetricDefinitionPaged',
'MetricAlertResourcePaged',
'LogSearchRuleResourcePaged',
'MetricNamespacePaged',
'MetricStatisticType',
'TimeAggregationType',
'ComparisonOperationType',
Expand All @@ -366,5 +412,7 @@
'ConditionalOperator',
'MetricTriggerType',
'AlertSeverity',
'OnboardingStatus',
'DataStatus',
'ResultType',
]
6 changes: 3 additions & 3 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


class Action(Model):
"""Action.
"""Action descriptor.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AlertingAction
sub-classes are: AlertingAction, LogToMetricAction
All required parameters must be populated in order to send to Azure.
Expand All @@ -33,7 +33,7 @@ class Action(Model):
}

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

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class ActionGroupResource(Resource):
are part of this action group.
:type azure_function_receivers:
list[~azure.mgmt.monitor.models.AzureFunctionReceiver]
:param arm_role_receivers: The list of ARM role receivers that are part of
this action group. Roles are Azure RBAC roles and only built-in roles are
supported.
:type arm_role_receivers: list[~azure.mgmt.monitor.models.ArmRoleReceiver]
"""

_validation = {
Expand Down Expand Up @@ -96,6 +100,7 @@ class ActionGroupResource(Resource):
'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'},
'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'},
'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'},
'arm_role_receivers': {'key': 'properties.armRoleReceivers', 'type': '[ArmRoleReceiver]'},
}

def __init__(self, **kwargs):
Expand All @@ -111,3 +116,4 @@ def __init__(self, **kwargs):
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)
self.arm_role_receivers = kwargs.get('arm_role_receivers', None)
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class ActionGroupResource(Resource):
are part of this action group.
:type azure_function_receivers:
list[~azure.mgmt.monitor.models.AzureFunctionReceiver]
:param arm_role_receivers: The list of ARM role receivers that are part of
this action group. Roles are Azure RBAC roles and only built-in roles are
supported.
:type arm_role_receivers: list[~azure.mgmt.monitor.models.ArmRoleReceiver]
"""

_validation = {
Expand Down Expand Up @@ -96,9 +100,10 @@ class ActionGroupResource(Resource):
'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'},
'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'},
'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'},
'arm_role_receivers': {'key': 'properties.armRoleReceivers', 'type': '[ArmRoleReceiver]'},
}

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:
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, arm_role_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 @@ -111,3 +116,4 @@ def __init__(self, *, location: str, group_short_name: str, tags=None, enabled:
self.voice_receivers = voice_receivers
self.logic_app_receivers = logic_app_receivers
self.azure_function_receivers = azure_function_receivers
self.arm_role_receivers = arm_role_receivers
6 changes: 3 additions & 3 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/action_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


class Action(Model):
"""Action.
"""Action descriptor.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AlertingAction
sub-classes are: AlertingAction, LogToMetricAction
All required parameters must be populated in order to send to Azure.
Expand All @@ -33,7 +33,7 @@ class Action(Model):
}

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

def __init__(self, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class AlertingAction(Action):
"""Specifiy action need to be taken when rule type is Alert.
"""Specify action need to be taken when rule type is Alert.
All required parameters must be populated in order to send to Azure.
Expand All @@ -22,7 +22,7 @@ class AlertingAction(Action):
:param severity: Required. Severity of the alert. Possible values include:
'0', '1', '2', '3', '4'
:type severity: str or ~azure.mgmt.monitor.models.AlertSeverity
:param azns_action: Required. Azure action group reference.
:param azns_action: Azure action group reference.
:type azns_action: ~azure.mgmt.monitor.models.AzNsActionGroup
:param throttling_in_min: time (in minutes) for which Alerts should be
throttled or suppressed.
Expand All @@ -35,7 +35,6 @@ class AlertingAction(Action):
_validation = {
'odatatype': {'required': True},
'severity': {'required': True},
'azns_action': {'required': True},
'trigger': {'required': True},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class AlertingAction(Action):
"""Specifiy action need to be taken when rule type is Alert.
"""Specify action need to be taken when rule type is Alert.
All required parameters must be populated in order to send to Azure.
Expand All @@ -22,7 +22,7 @@ class AlertingAction(Action):
:param severity: Required. Severity of the alert. Possible values include:
'0', '1', '2', '3', '4'
:type severity: str or ~azure.mgmt.monitor.models.AlertSeverity
:param azns_action: Required. Azure action group reference.
:param azns_action: Azure action group reference.
:type azns_action: ~azure.mgmt.monitor.models.AzNsActionGroup
:param throttling_in_min: time (in minutes) for which Alerts should be
throttled or suppressed.
Expand All @@ -35,7 +35,6 @@ class AlertingAction(Action):
_validation = {
'odatatype': {'required': True},
'severity': {'required': True},
'azns_action': {'required': True},
'trigger': {'required': True},
}

Expand All @@ -47,7 +46,7 @@ class AlertingAction(Action):
'trigger': {'key': 'trigger', 'type': 'TriggerCondition'},
}

def __init__(self, *, severity, azns_action, trigger, throttling_in_min: int=None, **kwargs) -> None:
def __init__(self, *, severity, trigger, azns_action=None, throttling_in_min: int=None, **kwargs) -> None:
super(AlertingAction, self).__init__(**kwargs)
self.severity = severity
self.azns_action = azns_action
Expand Down
40 changes: 40 additions & 0 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/arm_role_receiver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 ArmRoleReceiver(Model):
"""An arm role receiver.
All required parameters must be populated in order to send to Azure.
:param name: Required. The name of the arm role receiver. Names must be
unique across all receivers within an action group.
:type name: str
:param role_id: Required. The arm role id.
:type role_id: str
"""

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

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

def __init__(self, **kwargs):
super(ArmRoleReceiver, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.role_id = kwargs.get('role_id', None)
Loading

0 comments on commit f1eb5ad

Please sign in to comment.