UNPKG

@pulumi/azure-native

Version:

[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https://badge.fury.io/js/%40pulumi%2Fazure-native.svg)](https://npmjs.com/package/@pulumi/azure-native) [![Python version](https://badge.fury.io/py/pu

245 lines (244 loc) • 11.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as enums from "../types/enums"; /** * The scheduled query rule resource. * * Uses Azure REST API version 2025-01-01-preview. * * Other available API versions: 2023-12-01, 2024-01-01-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native monitor [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details. */ export declare class ScheduledQueryRule extends pulumi.CustomResource { /** * Get an existing ScheduledQueryRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ScheduledQueryRule; /** * Returns true if the given object is an instance of ScheduledQueryRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ScheduledQueryRule; /** * Actions to invoke when the alert fires. */ readonly actions: pulumi.Output<outputs.monitor.ActionsResponse | undefined>; /** * The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert. */ readonly autoMitigate: pulumi.Output<boolean | undefined>; /** * The Azure API version of the resource. */ readonly azureApiVersion: pulumi.Output<string>; /** * 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. */ readonly checkWorkspaceAlertsStorageConfigured: pulumi.Output<boolean | undefined>; /** * The api-version used when creating this alert rule */ readonly createdWithApiVersion: pulumi.Output<string>; /** * The rule criteria that defines the conditions of the scheduled query rule. */ readonly criteria: pulumi.Output<outputs.monitor.ScheduledQueryRuleCriteriaResponse>; /** * The description of the scheduled query rule. */ readonly description: pulumi.Output<string | undefined>; /** * The display name of the alert rule */ readonly displayName: pulumi.Output<string | undefined>; /** * The flag which indicates whether this scheduled query rule is enabled. Value should be true or false */ readonly enabled: pulumi.Output<boolean>; /** * 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. */ readonly etag: pulumi.Output<string>; /** * How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert. */ readonly evaluationFrequency: pulumi.Output<string | undefined>; /** * The identity of the resource. */ readonly identity: pulumi.Output<outputs.monitor.IdentityResponse | undefined>; /** * True if alert rule is legacy Log Analytic rule */ readonly isLegacyLogAnalyticsRule: pulumi.Output<boolean>; /** * The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false. */ readonly isWorkspaceAlertsStorageConfigured: pulumi.Output<boolean>; /** * Indicates the type of scheduled query rule. The default is LogAlert. */ readonly kind: pulumi.Output<string | undefined>; /** * The geo-location where the resource lives */ readonly location: pulumi.Output<string>; /** * 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. */ readonly muteActionsDuration: pulumi.Output<string | undefined>; /** * The name of the resource */ readonly name: pulumi.Output<string>; /** * If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. */ readonly overrideQueryTimeRange: pulumi.Output<string | undefined>; /** * Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert. */ readonly resolveConfiguration: pulumi.Output<outputs.monitor.RuleResolveConfigurationResponse | undefined>; /** * The list of resource id's that this scheduled query rule is scoped to. */ readonly scopes: pulumi.Output<string[]>; /** * 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. */ readonly severity: pulumi.Output<number | undefined>; /** * 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. */ readonly skipQueryValidation: pulumi.Output<boolean | undefined>; /** * SystemData of ScheduledQueryRule. */ readonly systemData: pulumi.Output<outputs.monitor.SystemDataResponse>; /** * Resource tags. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * 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 */ readonly targetResourceTypes: pulumi.Output<string[] | undefined>; /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ readonly type: pulumi.Output<string>; /** * 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. */ readonly windowSize: pulumi.Output<string | undefined>; /** * Create a ScheduledQueryRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ScheduledQueryRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a ScheduledQueryRule resource. */ export interface ScheduledQueryRuleArgs { /** * Actions to invoke when the alert fires. */ actions?: pulumi.Input<inputs.monitor.ActionsArgs>; /** * The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert. */ autoMitigate?: pulumi.Input<boolean>; /** * 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. */ checkWorkspaceAlertsStorageConfigured?: pulumi.Input<boolean>; /** * The rule criteria that defines the conditions of the scheduled query rule. */ criteria: pulumi.Input<inputs.monitor.ScheduledQueryRuleCriteriaArgs>; /** * The description of the scheduled query rule. */ description?: pulumi.Input<string>; /** * The display name of the alert rule */ displayName?: pulumi.Input<string>; /** * The flag which indicates whether this scheduled query rule is enabled. Value should be true or false */ enabled: pulumi.Input<boolean>; /** * How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert. */ evaluationFrequency?: pulumi.Input<string>; /** * The identity of the resource. */ identity?: pulumi.Input<inputs.monitor.IdentityArgs>; /** * Indicates the type of scheduled query rule. The default is LogAlert. */ kind?: pulumi.Input<string | enums.monitor.Kind>; /** * The geo-location where the resource lives */ location?: pulumi.Input<string>; /** * 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. */ muteActionsDuration?: pulumi.Input<string>; /** * If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. */ overrideQueryTimeRange?: pulumi.Input<string>; /** * Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert. */ resolveConfiguration?: pulumi.Input<inputs.monitor.RuleResolveConfigurationArgs>; /** * The name of the resource group. The name is case insensitive. */ resourceGroupName: pulumi.Input<string>; /** * The name of the rule. */ ruleName?: pulumi.Input<string>; /** * The list of resource id's that this scheduled query rule is scoped to. */ scopes: pulumi.Input<pulumi.Input<string>[]>; /** * 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. */ severity?: pulumi.Input<number>; /** * 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. */ skipQueryValidation?: pulumi.Input<boolean>; /** * Resource tags. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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 */ targetResourceTypes?: pulumi.Input<pulumi.Input<string>[]>; /** * 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. */ windowSize?: pulumi.Input<string>; }