Share via


ScheduledQueryRuleData Class

Definition

A class representing the ScheduledQueryRule data model. The scheduled query rule resource.

public class ScheduledQueryRuleData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Monitor.ScheduledQueryRuleData>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Monitor.ScheduledQueryRuleData>
public class ScheduledQueryRuleData : Azure.ResourceManager.Models.TrackedResourceData
type ScheduledQueryRuleData = class
    inherit TrackedResourceData
    interface IJsonModel<ScheduledQueryRuleData>
    interface IPersistableModel<ScheduledQueryRuleData>
type ScheduledQueryRuleData = class
    inherit TrackedResourceData
Public Class ScheduledQueryRuleData
Inherits TrackedResourceData
Implements IJsonModel(Of ScheduledQueryRuleData), IPersistableModel(Of ScheduledQueryRuleData)
Public Class ScheduledQueryRuleData
Inherits TrackedResourceData
Inheritance
ScheduledQueryRuleData
Implements

Constructors

ScheduledQueryRuleData(AzureLocation)

Initializes a new instance of ScheduledQueryRuleData.

Properties

Actions

Actions to invoke when the alert fires.

AutoMitigate

The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert.

CheckWorkspaceAlertsStorageConfigured

The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert.

CreatedWithApiVersion

The api-version used when creating this alert rule.

CriteriaAllOf

A list of conditions to evaluate against the specified scopes.

Description

The description of the scheduled query rule.

DisplayName

The display name of the alert rule.

ETag

The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.

EvaluationFrequency

How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.

Id

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

(Inherited from ResourceData)
IsEnabled

The flag which indicates whether this scheduled query rule is enabled. Value should be true or false.

IsLegacyLogAnalyticsRule

True if alert rule is legacy Log Analytic rule.

IsWorkspaceAlertsStorageConfigured

The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.

Kind

Indicates the type of scheduled query rule. The default is LogAlert.

Location

The geo-location where the resource lives.

(Inherited from TrackedResourceData)
MuteActionsDuration

Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert.

Name

The name of the resource.

(Inherited from ResourceData)
OverrideQueryTimeRange

If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.

ResourceType

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

(Inherited from ResourceData)
Scopes

The list of resource id's that this scheduled query rule is scoped to.

Severity

Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.

SkipQueryValidation

The flag which indicates whether the provided query should be validated or not. The default is false. Relevant only for rules of the kind LogAlert.

SystemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

(Inherited from ResourceData)
Tags

Resource tags.

(Inherited from TrackedResourceData)
TargetResourceTypes

List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert.

WindowSize

The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert.

Explicit Interface Implementations

IJsonModel<ScheduledQueryRuleData>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ScheduledQueryRuleData>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ScheduledQueryRuleData>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ScheduledQueryRuleData>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ScheduledQueryRuleData>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to