/// <summary> /// Initializes a new instance of the MetricAlertResourcePatch class. /// </summary> /// <param name="description">the description of the metric alert that /// will be included in the alert email.</param> /// <param name="severity">Alert severity {0, 1, 2, 3, 4}</param> /// <param name="enabled">the flag that indicates whether the metric /// alert is enabled.</param> /// <param name="evaluationFrequency">how often the metric alert is /// evaluated represented in ISO 8601 duration format.</param> /// <param name="windowSize">the period of time (in ISO 8601 duration /// format) that is used to monitor alert activity based on the /// threshold.</param> /// <param name="criteria">defines the specific alert criteria /// information.</param> /// <param name="tags">Resource tags</param> /// <param name="scopes">the list of resource id's that this metric /// alert is scoped to.</param> /// <param name="autoMitigate">the flag that indicates whether the /// alert should be auto resolved or not.</param> /// <param name="actions">the array of actions that are performed when /// the alert rule becomes active, and when an alert condition is /// resolved.</param> /// <param name="lastUpdatedTime">Last time the rule was updated in /// ISO8601 format.</param> public MetricAlertResourcePatch(string description, int severity, bool enabled, System.TimeSpan evaluationFrequency, System.TimeSpan windowSize, MetricAlertCriteria criteria, IDictionary <string, string> tags = default(IDictionary <string, string>), IList <string> scopes = default(IList <string>), bool?autoMitigate = default(bool?), IList <MetricAlertAction> actions = default(IList <MetricAlertAction>), System.DateTime?lastUpdatedTime = default(System.DateTime?)) { Tags = tags; Description = description; Severity = severity; Enabled = enabled; Scopes = scopes; EvaluationFrequency = evaluationFrequency; WindowSize = windowSize; Criteria = criteria; AutoMitigate = autoMitigate; Actions = actions; LastUpdatedTime = lastUpdatedTime; CustomInit(); }
/// <summary> /// Initializes a new instance of the MetricAlertResource class. /// </summary> /// <param name="location">Resource location</param> /// <param name="description">the description of the metric alert that /// will be included in the alert email.</param> /// <param name="severity">Alert severity {0, 1, 2, 3, 4}</param> /// <param name="enabled">the flag that indicates whether the metric /// alert is enabled.</param> /// <param name="evaluationFrequency">how often the metric alert is /// evaluated represented in ISO 8601 duration format.</param> /// <param name="windowSize">the period of time (in ISO 8601 duration /// format) that is used to monitor alert activity based on the /// threshold.</param> /// <param name="criteria">defines the specific alert criteria /// information.</param> /// <param name="id">Azure resource Id</param> /// <param name="name">Azure resource name</param> /// <param name="type">Azure resource type</param> /// <param name="tags">Resource tags</param> /// <param name="scopes">the list of resource id's that this metric /// alert is scoped to.</param> /// <param name="targetResourceType">the resource type of the target /// resource(s) on which the alert is created/updated. Mandatory for /// MultipleResourceMultipleMetricCriteria.</param> /// <param name="targetResourceRegion">the region of the target /// resource(s) on which the alert is created/updated. Mandatory for /// MultipleResourceMultipleMetricCriteria.</param> /// <param name="autoMitigate">the flag that indicates whether the /// alert should be auto resolved or not. The default is true.</param> /// <param name="actions">the array of actions that are performed when /// the alert rule becomes active, and when an alert condition is /// resolved.</param> /// <param name="lastUpdatedTime">Last time the rule was updated in /// ISO8601 format.</param> public MetricAlertResource(string location, string description, int severity, bool enabled, System.TimeSpan evaluationFrequency, System.TimeSpan windowSize, MetricAlertCriteria criteria, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), IList <string> scopes = default(IList <string>), string targetResourceType = default(string), string targetResourceRegion = default(string), bool?autoMitigate = default(bool?), IList <MetricAlertAction> actions = default(IList <MetricAlertAction>), System.DateTime?lastUpdatedTime = default(System.DateTime?)) : base(location, id, name, type, tags) { Description = description; Severity = severity; Enabled = enabled; Scopes = scopes; EvaluationFrequency = evaluationFrequency; WindowSize = windowSize; TargetResourceType = targetResourceType; TargetResourceRegion = targetResourceRegion; Criteria = criteria; AutoMitigate = autoMitigate; Actions = actions; LastUpdatedTime = lastUpdatedTime; CustomInit(); }
/// <summary> /// Initializes a new instance of the MetricAlertResourcePatch class. /// </summary> /// <param name="tags">Resource tags</param> /// <param name="description">the description of the metric alert that /// will be included in the alert email.</param> /// <param name="severity">Alert severity {0, 1, 2, 3, 4}</param> /// <param name="enabled">the flag that indicates whether the metric /// alert is enabled.</param> /// <param name="scopes">the list of resource id's that this metric /// alert is scoped to.</param> /// <param name="evaluationFrequency">how often the metric alert is /// evaluated represented in ISO 8601 duration format.</param> /// <param name="windowSize">the period of time (in ISO 8601 duration /// format) that is used to monitor alert activity based on the /// threshold.</param> /// <param name="targetResourceType">the resource type of the target /// resource(s) on which the alert is created/updated. Mandatory for /// MultipleResourceMultipleMetricCriteria.</param> /// <param name="targetResourceRegion">the region of the target /// resource(s) on which the alert is created/updated. Mandatory for /// MultipleResourceMultipleMetricCriteria.</param> /// <param name="criteria">defines the specific alert criteria /// information.</param> /// <param name="autoMitigate">the flag that indicates whether the /// alert should be auto resolved or not. The default is true.</param> /// <param name="actions">the array of actions that are performed when /// the alert rule becomes active, and when an alert condition is /// resolved.</param> /// <param name="lastUpdatedTime">Last time the rule was updated in /// ISO8601 format.</param> /// <param name="isMigrated">the value indicating whether this alert /// rule is migrated.</param> public MetricAlertResourcePatch(IDictionary <string, string> tags = default(IDictionary <string, string>), string description = default(string), int?severity = default(int?), bool?enabled = default(bool?), IList <string> scopes = default(IList <string>), System.TimeSpan?evaluationFrequency = default(System.TimeSpan?), System.TimeSpan?windowSize = default(System.TimeSpan?), string targetResourceType = default(string), string targetResourceRegion = default(string), MetricAlertCriteria criteria = default(MetricAlertCriteria), bool?autoMitigate = default(bool?), IList <MetricAlertAction> actions = default(IList <MetricAlertAction>), System.DateTime?lastUpdatedTime = default(System.DateTime?), bool?isMigrated = default(bool?)) { Tags = tags; Description = description; Severity = severity; Enabled = enabled; Scopes = scopes; EvaluationFrequency = evaluationFrequency; WindowSize = windowSize; TargetResourceType = targetResourceType; TargetResourceRegion = targetResourceRegion; Criteria = criteria; AutoMitigate = autoMitigate; Actions = actions; LastUpdatedTime = lastUpdatedTime; IsMigrated = isMigrated; CustomInit(); }