Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
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
13 changes: 6 additions & 7 deletions lib/services/monitorManagement/lib/models/alertingAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ 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 Azure action group reference.
* @member {array} [aznsAction.actionGroup] Azure Action Group reference.
* @member {string} [aznsAction.emailSubject] Custom subject override for all
* email ids in Azure action group
* @member {string} [aznsAction.customWebhookPayload] Custom payload to be
* sent for all webook URI in Azure action group
* @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 or suppressed.
* should be throttled
* @member {object} trigger The trigger condition that results in the alert
* rule being.
* @member {string} [trigger.thresholdOperator] Evaluation operation for rule
Expand Down
11 changes: 5 additions & 6 deletions lib/services/monitorManagement/lib/models/azNsActionGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@
'use strict';

/**
* Azure action group
* azns notification group
*
*/
class AzNsActionGroup {
/**
* Create a AzNsActionGroup.
* @member {array} [actionGroup] Azure Action Group reference.
* @member {string} [emailSubject] Custom subject override for all email ids
* in Azure action group
* @member {string} [customWebhookPayload] Custom payload to be sent for all
* webook URI in Azure action group
* @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() {
}
Expand Down
36 changes: 20 additions & 16 deletions lib/services/monitorManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,8 @@ export interface MetricAlertCriteria {
* threshold.
* @member {object} criteria defines the specific alert criteria information.
* @member {string} [criteria.odatatype] Polymorphic Discriminator
* @member {boolean} [autoMitigate] the flag that indicates whether the alert
* should be auto resolved or not.
* @member {array} [actions] the array of actions that are performed when the
* alert rule becomes active, and when an alert condition is resolved.
* @member {date} [lastUpdatedTime] Last time the rule was updated in ISO8601
Expand All @@ -2058,6 +2060,7 @@ export interface MetricAlertResource extends Resource {
evaluationFrequency: moment.Duration;
windowSize: moment.Duration;
criteria: MetricAlertCriteria;
autoMitigate?: boolean;
actions?: Action[];
readonly lastUpdatedTime?: Date;
}
Expand All @@ -2083,6 +2086,8 @@ export interface MetricAlertResource extends Resource {
* threshold.
* @member {object} criteria defines the specific alert criteria information.
* @member {string} [criteria.odatatype] Polymorphic Discriminator
* @member {boolean} [autoMitigate] the flag that indicates whether the alert
* should be auto resolved or not.
* @member {array} [actions] the array of actions that are performed when the
* alert rule becomes active, and when an alert condition is resolved.
* @member {date} [lastUpdatedTime] Last time the rule was updated in ISO8601
Expand All @@ -2097,6 +2102,7 @@ export interface MetricAlertResourcePatch {
evaluationFrequency: moment.Duration;
windowSize: moment.Duration;
criteria: MetricAlertCriteria;
autoMitigate?: boolean;
actions?: Action[];
readonly lastUpdatedTime?: Date;
}
Expand Down Expand Up @@ -2210,7 +2216,7 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria extends MetricA
*
* @member {string} query Log search query.
* @member {array} [authorizedResources] List of Resource referred into query
* @member {string} dataSourceId The resource uri over which log search query
* @member {string} datasourceId The resource uri over which log search query
* is to be run.
* @member {string} [queryType] Set value to ResultCount if query should be
* returning search result count. Set it to Number if its a metric query.
Expand All @@ -2219,7 +2225,7 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria extends MetricA
export interface Source {
query: string;
authorizedResources?: string[];
dataSourceId: string;
datasourceId: string;
queryType?: string;
}

Expand Down Expand Up @@ -2258,7 +2264,7 @@ export interface Schedule {
* @member {string} [source.query] Log search query.
* @member {array} [source.authorizedResources] List of Resource referred into
* query
* @member {string} [source.dataSourceId] The resource uri over which log
* @member {string} [source.datasourceId] The resource uri over which log
* search query is to be run.
* @member {string} [source.queryType] Set value to ResultCount if query should
* be returning search result count. Set it to Number if its a metric query.
Expand Down Expand Up @@ -2339,13 +2345,12 @@ export interface TriggerCondition {
* @class
* Initializes a new instance of the AzNsActionGroup class.
* @constructor
* Azure action group
* azns notification group
*
* @member {array} [actionGroup] Azure Action Group reference.
* @member {string} [emailSubject] Custom subject override for all email ids in
* Azure action group
* @member {string} [customWebhookPayload] Custom payload to be sent for all
* webook URI in Azure action group
* @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
*/
export interface AzNsActionGroup {
actionGroup?: string[];
Expand All @@ -2361,14 +2366,13 @@ export interface AzNsActionGroup {
*
* @member {string} severity Severity of the alert. Possible values include:
* '0', '1', '2', '3', '4'
* @member {object} aznsAction Azure action group reference.
* @member {array} [aznsAction.actionGroup] Azure Action Group reference.
* @member {string} [aznsAction.emailSubject] Custom subject override for all
* email ids in Azure action group
* @member {string} [aznsAction.customWebhookPayload] Custom payload to be sent
* for all webook URI in Azure action group
* @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 or suppressed.
* be throttled
* @member {object} trigger The trigger condition that results in the alert
* rule being.
* @member {string} [trigger.thresholdOperator] Evaluation operation for rule -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class LogSearchRuleResource extends models['Resource'] {
* @member {string} [source.query] Log search query.
* @member {array} [source.authorizedResources] List of Resource referred
* into query
* @member {string} [source.dataSourceId] The resource uri over which log
* @member {string} [source.datasourceId] The resource uri over which log
* search query is to be run.
* @member {string} [source.queryType] Set value to ResultCount if query
* should be returning search result count. Set it to Number if its a metric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class MetricAlertResource extends models['Resource'] {
* threshold.
* @member {object} criteria defines the specific alert criteria information.
* @member {string} [criteria.odatatype] Polymorphic Discriminator
* @member {boolean} [autoMitigate] the flag that indicates whether the alert
* should be auto resolved or not.
* @member {array} [actions] the array of actions that are performed when the
* alert rule becomes active, and when an alert condition is resolved.
* @member {date} [lastUpdatedTime] Last time the rule was updated in ISO8601
Expand Down Expand Up @@ -176,6 +178,13 @@ class MetricAlertResource extends models['Resource'] {
className: 'MetricAlertCriteria'
}
},
autoMitigate: {
required: false,
serializedName: 'properties.autoMitigate',
type: {
name: 'Boolean'
}
},
actions: {
required: false,
serializedName: 'properties.actions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class MetricAlertResourcePatch {
* threshold.
* @member {object} criteria defines the specific alert criteria information.
* @member {string} [criteria.odatatype] Polymorphic Discriminator
* @member {boolean} [autoMitigate] the flag that indicates whether the alert
* should be auto resolved or not.
* @member {array} [actions] the array of actions that are performed when the
* alert rule becomes active, and when an alert condition is resolved.
* @member {date} [lastUpdatedTime] Last time the rule was updated in ISO8601
Expand Down Expand Up @@ -144,6 +146,13 @@ class MetricAlertResourcePatch {
className: 'MetricAlertCriteria'
}
},
autoMitigate: {
required: false,
serializedName: 'properties.autoMitigate',
type: {
name: 'Boolean'
}
},
actions: {
required: false,
serializedName: 'properties.actions',
Expand Down
6 changes: 3 additions & 3 deletions lib/services/monitorManagement/lib/models/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Source {
* @member {string} query Log search query.
* @member {array} [authorizedResources] List of Resource referred into
* query
* @member {string} dataSourceId The resource uri over which log search query
* @member {string} datasourceId The resource uri over which log search query
* is to be run.
* @member {string} [queryType] Set value to ResultCount if query should be
* returning search result count. Set it to Number if its a metric query.
Expand Down Expand Up @@ -64,9 +64,9 @@ class Source {
}
}
},
dataSourceId: {
datasourceId: {
required: true,
serializedName: 'dataSourceId',
serializedName: 'datasourceId',
type: {
name: 'String'
}
Expand Down
16 changes: 14 additions & 2 deletions lib/services/monitorManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3884,6 +3884,9 @@ export interface MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -3936,6 +3939,9 @@ export interface MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -4009,6 +4015,9 @@ export interface MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -4059,6 +4068,9 @@ export interface MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -4318,7 +4330,7 @@ export interface ScheduledQueryRules {
* @param {array} [parameters.source.authorizedResources] List of Resource
* referred into query
*
* @param {string} parameters.source.dataSourceId The resource uri over which
* @param {string} parameters.source.datasourceId The resource uri over which
* log search query is to be run.
*
* @param {string} [parameters.source.queryType] Set value to ResultCount if
Expand Down Expand Up @@ -4386,7 +4398,7 @@ export interface ScheduledQueryRules {
* @param {array} [parameters.source.authorizedResources] List of Resource
* referred into query
*
* @param {string} parameters.source.dataSourceId The resource uri over which
* @param {string} parameters.source.datasourceId The resource uri over which
* log search query is to be run.
*
* @param {string} [parameters.source.queryType] Set value to ResultCount if
Expand Down
18 changes: 18 additions & 0 deletions lib/services/monitorManagement/lib/operations/metricAlerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ function _get(resourceGroupName, ruleName, options, callback) {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -658,6 +661,9 @@ function _createOrUpdate(resourceGroupName, ruleName, parameters, options, callb
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -1236,6 +1242,9 @@ class MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -1300,6 +1309,9 @@ class MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -1388,6 +1400,9 @@ class MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down Expand Up @@ -1450,6 +1465,9 @@ class MetricAlerts {
*
* @param {string} parameters.criteria.odatatype Polymorphic Discriminator
*
* @param {boolean} [parameters.autoMitigate] the flag that indicates whether
* the alert should be auto resolved or not.
*
* @param {array} [parameters.actions] the array of actions that are performed
* when the alert rule becomes active, and when an alert condition is resolved.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const WebResource = msRest.WebResource;
* @param {array} [parameters.source.authorizedResources] List of Resource
* referred into query
*
* @param {string} parameters.source.dataSourceId The resource uri over which
* @param {string} parameters.source.datasourceId The resource uri over which
* log search query is to be run.
*
* @param {string} [parameters.source.queryType] Set value to ResultCount if
Expand Down Expand Up @@ -843,7 +843,7 @@ class ScheduledQueryRules {
* @param {array} [parameters.source.authorizedResources] List of Resource
* referred into query
*
* @param {string} parameters.source.dataSourceId The resource uri over which
* @param {string} parameters.source.datasourceId The resource uri over which
* log search query is to be run.
*
* @param {string} [parameters.source.queryType] Set value to ResultCount if
Expand Down Expand Up @@ -923,7 +923,7 @@ class ScheduledQueryRules {
* @param {array} [parameters.source.authorizedResources] List of Resource
* referred into query
*
* @param {string} parameters.source.dataSourceId The resource uri over which
* @param {string} parameters.source.datasourceId The resource uri over which
* log search query is to be run.
*
* @param {string} [parameters.source.queryType] Set value to ResultCount if
Expand Down
7 changes: 5 additions & 2 deletions lib/services/monitorManagement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
"description": "MonitorManagementClient Library with typescript type definitions for node",
"version": "2.0.0-preview",
"dependencies": {
"ms-rest": "^2.3.2",
"ms-rest": "^2.3.3",
"ms-rest-azure": "^2.5.5"
},
"keywords": [ "node", "azure" ],
"keywords": [
"node",
"azure"
],
"license": "MIT",
"main": "./lib/monitorManagementClient.js",
"types": "./lib/monitorManagementClient.d.ts",
Expand Down