This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 567
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 (#2721) * Generated from 2e4c790d16eb6be9299db7a75798bca1697fd5e9 Added GA API version for Scheduled Query Rule Added GA API version for Scheduled Query Rule * 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
5e87a39
commit d864459
Showing
21 changed files
with
2,863 additions
and
2 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
163 changes: 163 additions & 0 deletions
163
lib/services/monitorManagement/lib/models/alertingAction.js
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,163 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const models = require('./index'); | ||
|
||
/** | ||
* Specifiy action need to be taken when rule type is Alert | ||
* | ||
* @extends models['Action'] | ||
*/ | ||
class AlertingAction extends models['Action'] { | ||
/** | ||
* Create a AlertingAction. | ||
* @member {string} severity Severity of the alert. Possible values include: | ||
* '0', '1', '2', '3', '4' | ||
* @member {object} aznsAction azns notification group reference. | ||
* @member {array} [aznsAction.actionGroup] Azure Group reference. | ||
* @member {string} [aznsAction.emailSubject] Custom subject for Azns email | ||
* @member {string} [aznsAction.customWebhookPayload] Custom webhook payload | ||
* to be send to azns action group | ||
* @member {number} [throttlingInMin] time (in minutes) for which Alerts | ||
* should be throttled | ||
* @member {object} trigger The trigger condition that results in the alert | ||
* rule being. | ||
* @member {string} [trigger.thresholdOperator] Evaluation operation for rule | ||
* - 'GreaterThan' or 'LessThan. Possible values include: 'GreaterThan', | ||
* 'LessThan', 'Equal' | ||
* @member {number} [trigger.threshold] Result or count threshold based on | ||
* which rule should be triggered. | ||
* @member {object} [trigger.metricTrigger] Trigger condition for metric | ||
* query rule | ||
* @member {string} [trigger.metricTrigger.metricName] the name of the metric | ||
* that defines what the rule monitors. | ||
* @member {string} [trigger.metricTrigger.metricResourceUri] the resource | ||
* identifier of the resource the rule monitors. | ||
* @member {moment.duration} [trigger.metricTrigger.timeGrain] the | ||
* granularity of metrics the rule monitors. Must be one of the predefined | ||
* values returned from metric definitions for the metric. Must be between 12 | ||
* hours and 1 minute. | ||
* @member {string} [trigger.metricTrigger.statistic] the metric statistic | ||
* type. How the metrics from multiple instances are combined. Possible | ||
* values include: 'Average', 'Min', 'Max', 'Sum' | ||
* @member {moment.duration} [trigger.metricTrigger.timeWindow] the range of | ||
* time in which instance data is collected. This value must be greater than | ||
* the delay in metric collection, which can vary from resource-to-resource. | ||
* Must be between 12 hours and 5 minutes. | ||
* @member {string} [trigger.metricTrigger.timeAggregation] time aggregation | ||
* type. How the data that is collected should be combined over time. The | ||
* default value is Average. Possible values include: 'Average', 'Minimum', | ||
* 'Maximum', 'Total', 'Count' | ||
* @member {string} [trigger.metricTrigger.operator] the operator that is | ||
* used to compare the metric data and the threshold. Possible values | ||
* include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', | ||
* 'LessThan', 'LessThanOrEqual' | ||
* @member {number} [trigger.metricTrigger.threshold] the threshold of the | ||
* metric that triggers the scale action. | ||
* @member {string} [trigger.metricTrigger.thresholdOperator] Evaluation | ||
* operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'. Possible | ||
* values include: 'GreaterThan', 'LessThan', 'Equal' | ||
* @member {string} [trigger.metricTrigger.metricTriggerType] Metric Trigger | ||
* Type - 'Consecutive' or 'Total'. Possible values include: 'Consecutive', | ||
* 'Total' | ||
* @member {string} [trigger.metricTrigger.metricColumn] Evaluation of metric | ||
* on a particular column | ||
*/ | ||
constructor() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Defines the metadata of AlertingAction | ||
* | ||
* @returns {object} metadata of AlertingAction | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction', | ||
type: { | ||
name: 'Composite', | ||
polymorphicDiscriminator: { | ||
serializedName: 'odata.type', | ||
clientName: 'odatatype' | ||
}, | ||
uberParent: 'Action', | ||
className: 'AlertingAction', | ||
modelProperties: { | ||
actionGroupId: { | ||
required: false, | ||
serializedName: 'actionGroupId', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
webhookProperties: { | ||
required: false, | ||
serializedName: 'webhookProperties', | ||
type: { | ||
name: 'Dictionary', | ||
value: { | ||
required: false, | ||
serializedName: 'StringElementType', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
}, | ||
odatatype: { | ||
required: true, | ||
serializedName: 'odata\\.type', | ||
isPolymorphicDiscriminator: true, | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
severity: { | ||
required: true, | ||
serializedName: 'severity', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
aznsAction: { | ||
required: true, | ||
serializedName: 'aznsAction', | ||
type: { | ||
name: 'Composite', | ||
className: 'AzNsActionGroup' | ||
} | ||
}, | ||
throttlingInMin: { | ||
required: false, | ||
serializedName: 'throttlingInMin', | ||
type: { | ||
name: 'Number' | ||
} | ||
}, | ||
trigger: { | ||
required: true, | ||
serializedName: 'trigger', | ||
type: { | ||
name: 'Composite', | ||
className: 'TriggerCondition' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = AlertingAction; |
76 changes: 76 additions & 0 deletions
76
lib/services/monitorManagement/lib/models/azNsActionGroup.js
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,76 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* azns notification group | ||
* | ||
*/ | ||
class AzNsActionGroup { | ||
/** | ||
* Create a AzNsActionGroup. | ||
* @member {array} [actionGroup] Azure Group reference. | ||
* @member {string} [emailSubject] Custom subject for Azns email | ||
* @member {string} [customWebhookPayload] Custom webhook payload to be send | ||
* to azns action group | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of AzNsActionGroup | ||
* | ||
* @returns {object} metadata of AzNsActionGroup | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'AzNsActionGroup', | ||
type: { | ||
name: 'Composite', | ||
className: 'AzNsActionGroup', | ||
modelProperties: { | ||
actionGroup: { | ||
required: false, | ||
serializedName: 'actionGroup', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'StringElementType', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
}, | ||
emailSubject: { | ||
required: false, | ||
serializedName: 'emailSubject', | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
customWebhookPayload: { | ||
required: false, | ||
serializedName: 'customWebhookPayload', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = AzNsActionGroup; |
Oops, something went wrong.