ArmMonitorModelFactory.AlertRuleData Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Initializes a new instance of AlertRuleData.

C#
public static Azure.ResourceManager.Monitor.AlertRuleData AlertRuleData(Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, string alertRuleName = default, string description = default, string provisioningState = default, bool isEnabled = false, Azure.ResourceManager.Monitor.Models.AlertRuleCondition condition = default, Azure.ResourceManager.Monitor.Models.AlertRuleAction action = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Monitor.Models.AlertRuleAction> actions = default, DateTimeOffset? lastUpdatedOn = default);

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

tags
IDictionary<String,String>

The tags.

location
AzureLocation

The location.

alertRuleName
String

the name of the alert rule.

description
String

the description of the alert rule that will be included in the alert email.

provisioningState
String

the provisioning state.

isEnabled
Boolean

the flag that indicates whether the alert rule is enabled.

condition
AlertRuleCondition

the condition that results in the alert rule being activated. Please note AlertRuleCondition is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include LocationThresholdRuleCondition, ManagementEventRuleCondition and ThresholdRuleCondition.

action
AlertRuleAction

action that is performed when the alert rule becomes active, and when an alert condition is resolved. Please note AlertRuleAction is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include RuleEmailAction and RuleWebhookAction.

actions
IEnumerable<AlertRuleAction>

the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. Please note AlertRuleAction is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include RuleEmailAction and RuleWebhookAction.

lastUpdatedOn
Nullable<DateTimeOffset>

Last time the rule was updated in ISO8601 format.

Returns

A new AlertRuleData instance for mocking.

Applies to

Toode Versioonid
Azure SDK for .NET Latest, Preview