-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR monitor/resource-manager] Added GA API version for Scheduled …
…Query Rule (#2416) * Generated from d183bad923d3a0a4092d21203f850db6cde9f4e9 Resolving Comments Resolving Comments * Generated from df40ac3bbf17ea0180dd4adff2af3094065feca0 Made SKU as top level proprty and including generic error response format Couple of changes - 1. Made SKU as top level proprty as mentioned here - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md#put-resource 2. including generic error response format * Generated from 7578160670750a68d05f77ec8163b25bb72f391e Minor Changes to align implementation 1. Removed SKU - Billing Model is still under discussion, hence need not to be exposed to customers. 2. Enabled field ichanged to align with camel case. 3. 'throttleTillDate' in properties.action changed to 'throttlingInMin' to denote correct meaning and it’s data type changed to number instead of date. 4. 'status' to be removed in properties.action from examples. 5. 'severity' made a required field in properties.action. 6. Removed Examples from original spec json * Generated from fb180fb311d73934d0f5150f72638cc3de155ea0 Added Default Response payload in all APIs Changes - 1. Added Default Response payload in all APIs 2. Made azNs description more clear * Generated from fb180fb311d73934d0f5150f72638cc3de155ea0 Added Default Response payload in all APIs Changes - 1. Added Default Response payload in all APIs 2. Made azNs description more clear
- Loading branch information
1 parent
0c48dd2
commit d19dcb8
Showing
53 changed files
with
3,222 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# 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): | ||
"""An alert 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 action_group_id: the id of the action group to use. | ||
:type action_group_id: str | ||
:param webhook_properties: | ||
:type webhook_properties: dict[str, str] | ||
:param odatatype: Required. Constant filled by server. | ||
:type odatatype: str | ||
""" | ||
|
||
_validation = { | ||
'odatatype': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, | ||
'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, | ||
'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.action_group_id = kwargs.get('action_group_id', None) | ||
self.webhook_properties = kwargs.get('webhook_properties', None) | ||
self.odatatype = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
azure-mgmt-monitor/azure/mgmt/monitor/models/action_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# 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): | ||
"""An alert 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 action_group_id: the id of the action group to use. | ||
:type action_group_id: str | ||
:param webhook_properties: | ||
:type webhook_properties: dict[str, str] | ||
:param odatatype: Required. Constant filled by server. | ||
:type odatatype: str | ||
""" | ||
|
||
_validation = { | ||
'odatatype': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, | ||
'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, | ||
'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, *, action_group_id: str=None, webhook_properties=None, **kwargs) -> None: | ||
super(Action, self).__init__(**kwargs) | ||
self.action_group_id = action_group_id | ||
self.webhook_properties = webhook_properties | ||
self.odatatype = None |
62 changes: 62 additions & 0 deletions
62
azure-mgmt-monitor/azure/mgmt/monitor/models/alerting_action.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# 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 .action import Action | ||
|
||
|
||
class AlertingAction(Action): | ||
"""Specifiy action need to be taken when rule type is Alert. | ||
All required parameters must be populated in order to send to Azure. | ||
:param action_group_id: the id of the action group to use. | ||
:type action_group_id: str | ||
:param webhook_properties: | ||
:type webhook_properties: dict[str, str] | ||
:param odatatype: Required. Constant filled by server. | ||
:type odatatype: str | ||
: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. azns notification group reference. | ||
:type azns_action: ~azure.mgmt.monitor.models.AzNsActionGroup | ||
:param throttling_in_min: time (in minutes) for which Alerts should be | ||
throttled | ||
:type throttling_in_min: int | ||
:param trigger: Required. The trigger condition that results in the alert | ||
rule being. | ||
:type trigger: ~azure.mgmt.monitor.models.TriggerCondition | ||
""" | ||
|
||
_validation = { | ||
'odatatype': {'required': True}, | ||
'severity': {'required': True}, | ||
'azns_action': {'required': True}, | ||
'trigger': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, | ||
'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, | ||
'odatatype': {'key': 'odata\\.type', 'type': 'str'}, | ||
'severity': {'key': 'severity', 'type': 'str'}, | ||
'azns_action': {'key': 'aznsAction', 'type': 'AzNsActionGroup'}, | ||
'throttling_in_min': {'key': 'throttlingInMin', 'type': 'int'}, | ||
'trigger': {'key': 'trigger', 'type': 'TriggerCondition'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(AlertingAction, self).__init__(**kwargs) | ||
self.severity = kwargs.get('severity', None) | ||
self.azns_action = kwargs.get('azns_action', None) | ||
self.throttling_in_min = kwargs.get('throttling_in_min', None) | ||
self.trigger = kwargs.get('trigger', None) | ||
self.odatatype = 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction' |
Oops, something went wrong.