UNPKG

azure-arm-insights

Version:

Microsoft Azure Insights Management Client Library for node

98 lines (92 loc) 2.94 kB
/* * 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 * Initializes a new instance of the ManagementEventRuleCondition class. * @constructor * A management event rule condition. * * @member {object} [dataSource] the resource from which the rule collects its * data. For this type dataSource will always be of type * RuleManagementEventDataSource. * * @member {string} [dataSource.odatatype] Polymorphic Discriminator * * @member {object} [aggregation] How the data that is collected should be * combined over time and when the alert is activated. Note that for management * event alerts aggregation is optional – if it is not provided then any event * will cause the alert to activate. * * @member {string} [aggregation.operator] the condition operator. Possible * values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', * 'LessThanOrEqual' * * @member {number} [aggregation.threshold] The threshold value that activates * the alert. * * @member {moment.duration} [aggregation.windowSize] the period of time (in * ISO 8601 duration format) that is used to monitor alert activity based on * the threshold. If specified then it must be between 5 minutes and 1 day. * */ class ManagementEventRuleCondition extends models['RuleCondition'] { constructor() { super(); } /** * Defines the metadata of ManagementEventRuleCondition * * @returns {object} metadata of ManagementEventRuleCondition * */ mapper() { return { required: false, serializedName: 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition', type: { name: 'Composite', className: 'ManagementEventRuleCondition', modelProperties: { odatatype: { required: true, serializedName: 'odata\\.type', type: { name: 'String' } }, dataSource: { required: false, serializedName: 'dataSource', type: { name: 'Composite', polymorphicDiscriminator: { serializedName: 'odata.type', clientName: 'odatatype' }, uberParent: 'RuleDataSource', className: 'RuleDataSource' } }, aggregation: { required: false, serializedName: 'aggregation', type: { name: 'Composite', className: 'ManagementEventAggregationCondition' } } } } }; } } module.exports = ManagementEventRuleCondition;