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 1 commit
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
Next Next commit
Generated from 2e4c790d16eb6be9299db7a75798bca1697fd5e9
Added GA API version for Scheduled Query Rule

Added GA API version for Scheduled Query Rule
  • Loading branch information
AutorestCI committed Apr 12, 2018
commit 7c588bb8967fd4429cf2a8198c85b6bf346b1aa5
14 changes: 14 additions & 0 deletions lib/services/monitorManagement/lib/models/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Action {
* Create a Action.
* @member {string} [actionGroupId] the id of the action group to use.
* @member {object} [webhookProperties]
* @member {string} odatatype Polymorphic Discriminator
*/
constructor() {
}
Expand All @@ -35,6 +36,11 @@ class Action {
serializedName: 'Action',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'odata.type',
clientName: 'odatatype'
},
uberParent: 'Action',
className: 'Action',
modelProperties: {
actionGroupId: {
Expand All @@ -57,6 +63,14 @@ class Action {
}
}
}
},
odatatype: {
required: true,
serializedName: 'odata\\.type',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
}
}
}
Expand Down
183 changes: 183 additions & 0 deletions lib/services/monitorManagement/lib/models/alertingAction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
/*
* 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');

/**
* Class representing a AlertingAction.
* @extends models['Action']
*/
class AlertingAction extends models['Action'] {
/**
* Create a AlertingAction.
* @member {string} [lastFiredTime] Last time the rule was fired in IS08601
* format.
* @member {string} [severity] Severity of the alert. Possible values
* include: '1', '2', '3', '4'
* @member {string} [status] Alert state. Possible values include: 'Active',
* 'Inactive'
* @member {object} aznsAction azns notification group reference.
* @member {array} [aznsAction.actionGroup] azns notification 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 {date} [throttleTillDate] Time untill alert should not be fired in
* ISO8601 format.
* @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'
}
},
lastFiredTime: {
required: false,
readOnly: true,
serializedName: 'lastFiredTime',
type: {
name: 'String'
}
},
severity: {
required: false,
serializedName: 'severity',
type: {
name: 'String'
}
},
status: {
required: false,
readOnly: true,
serializedName: 'status',
type: {
name: 'String'
}
},
aznsAction: {
required: true,
serializedName: 'aznsAction',
type: {
name: 'Composite',
className: 'AzNsActionGroup'
}
},
throttleTillDate: {
required: false,
serializedName: 'throttleTillDate',
type: {
name: 'DateTime'
}
},
trigger: {
required: true,
serializedName: 'trigger',
type: {
name: 'Composite',
className: 'TriggerCondition'
}
}
}
}
};
}
}

module.exports = AlertingAction;
76 changes: 76 additions & 0 deletions lib/services/monitorManagement/lib/models/azNsActionGroup.js
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] azns notification 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;
Loading