azure.monitoring.ScheduledQueryRulesAlertV2
Manages an AlertingAction Scheduled Query Rules Version 2 resource within Azure Monitor
Create ScheduledQueryRulesAlertV2 Resource
new ScheduledQueryRulesAlertV2(name: string, args: ScheduledQueryRulesAlertV2Args, opts?: CustomResourceOptions);
@overload
def ScheduledQueryRulesAlertV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[ScheduledQueryRulesAlertV2ActionArgs] = None,
auto_mitigation_enabled: Optional[bool] = None,
criterias: Optional[Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
evaluation_frequency: Optional[str] = None,
location: Optional[str] = None,
mute_actions_after_alert_duration: Optional[str] = None,
name: Optional[str] = None,
query_time_range_override: Optional[str] = None,
resource_group_name: Optional[str] = None,
scopes: Optional[str] = None,
severity: Optional[int] = None,
skip_query_validation: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_types: Optional[Sequence[str]] = None,
window_duration: Optional[str] = None,
workspace_alerts_storage_enabled: Optional[bool] = None)
@overload
def ScheduledQueryRulesAlertV2(resource_name: str,
args: ScheduledQueryRulesAlertV2Args,
opts: Optional[ResourceOptions] = None)
func NewScheduledQueryRulesAlertV2(ctx *Context, name string, args ScheduledQueryRulesAlertV2Args, opts ...ResourceOption) (*ScheduledQueryRulesAlertV2, error)
public ScheduledQueryRulesAlertV2(string name, ScheduledQueryRulesAlertV2Args args, CustomResourceOptions? opts = null)
public ScheduledQueryRulesAlertV2(String name, ScheduledQueryRulesAlertV2Args args)
public ScheduledQueryRulesAlertV2(String name, ScheduledQueryRulesAlertV2Args args, CustomResourceOptions options)
type: azure:monitoring:ScheduledQueryRulesAlertV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ScheduledQueryRulesAlertV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ScheduledQueryRulesAlertV2 resource accepts the following input properties:
- Criterias
List<Scheduled
Query Rules Alert V2Criteria Args> A
criteria
block as defined below.- Resource
Group stringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Window
Duration string Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- Action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- Auto
Mitigation boolEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- Description string
Specifies the description of the scheduled query rule.
- Display
Name string Specifies the display name of the alert rule.
- Enabled bool
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- Location string
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Name string
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Skip
Query boolValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Dictionary<string, string>
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- Target
Resource List<string>Types 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.- Workspace
Alerts boolStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- Criterias
[]Scheduled
Query Rules Alert V2Criteria Args A
criteria
block as defined below.- Resource
Group stringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Window
Duration string Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- Action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- Auto
Mitigation boolEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- Description string
Specifies the description of the scheduled query rule.
- Display
Name string Specifies the display name of the alert rule.
- Enabled bool
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- Location string
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Name string
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Skip
Query boolValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- map[string]string
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- Target
Resource []stringTypes 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.- Workspace
Alerts boolStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias
List<Scheduled
Query Rules Alert V2Criteria Args> A
criteria
block as defined below.- resource
Group StringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Integer
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window
Duration String Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- auto
Mitigation BooleanEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- description String
Specifies the description of the scheduled query rule.
- display
Name String Specifies the display name of the alert rule.
- enabled Boolean
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- location String
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name String
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- skip
Query BooleanValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String,String>
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target
Resource List<String>Types 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.- workspace
Alerts BooleanStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias
Scheduled
Query Rules Alert V2Criteria Args[] A
criteria
block as defined below.- resource
Group stringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes string
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity number
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window
Duration string Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- auto
Mitigation booleanEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- description string
Specifies the description of the scheduled query rule.
- display
Name string Specifies the display name of the alert rule.
- enabled boolean
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- location string
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name string
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- skip
Query booleanValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- {[key: string]: string}
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target
Resource string[]Types 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.- workspace
Alerts booleanStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias
Sequence[Scheduled
Query Rules Alert V2Criteria Args] A
criteria
block as defined below.- resource_
group_ strname Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes str
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity int
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window_
duration str Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- auto_
mitigation_ boolenabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- description str
Specifies the description of the scheduled query rule.
- display_
name str Specifies the display name of the alert rule.
- enabled bool
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation_
frequency str How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- location str
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute_
actions_ strafter_ alert_ duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name str
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query_
time_ strrange_ override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- skip_
query_ boolvalidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Mapping[str, str]
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target_
resource_ Sequence[str]types 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.- workspace_
alerts_ boolstorage_ enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias List<Property Map>
A
criteria
block as defined below.- resource
Group StringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Number
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window
Duration String Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- action Property Map
An
action
block as defined below.- auto
Mitigation BooleanEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- description String
Specifies the description of the scheduled query rule.
- display
Name String Specifies the display name of the alert rule.
- enabled Boolean
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- location String
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name String
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- skip
Query BooleanValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String>
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target
Resource List<String>Types 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.- workspace
Alerts BooleanStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledQueryRulesAlertV2 resource produces the following output properties:
- Created
With stringApi Version The api-version used when creating this alert rule.
- Id string
The provider-assigned unique ID for this managed resource.
- Is
ALegacy boolLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- Created
With stringApi Version The api-version used when creating this alert rule.
- Id string
The provider-assigned unique ID for this managed resource.
- Is
ALegacy boolLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created
With StringApi Version The api-version used when creating this alert rule.
- id String
The provider-assigned unique ID for this managed resource.
- is
ALegacy BooleanLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created
With stringApi Version The api-version used when creating this alert rule.
- id string
The provider-assigned unique ID for this managed resource.
- is
ALegacy booleanLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace booleanAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created_
with_ strapi_ version The api-version used when creating this alert rule.
- id str
The provider-assigned unique ID for this managed resource.
- is_
a_ boollegacy_ log_ analytics_ rule True if this alert rule is a legacy Log Analytic Rule.
- is_
workspace_ boolalerts_ storage_ configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created
With StringApi Version The api-version used when creating this alert rule.
- id String
The provider-assigned unique ID for this managed resource.
- is
ALegacy BooleanLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
Look up Existing ScheduledQueryRulesAlertV2 Resource
Get an existing ScheduledQueryRulesAlertV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScheduledQueryRulesAlertV2State, opts?: CustomResourceOptions): ScheduledQueryRulesAlertV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[ScheduledQueryRulesAlertV2ActionArgs] = None,
auto_mitigation_enabled: Optional[bool] = None,
created_with_api_version: Optional[str] = None,
criterias: Optional[Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
evaluation_frequency: Optional[str] = None,
is_a_legacy_log_analytics_rule: Optional[bool] = None,
is_workspace_alerts_storage_configured: Optional[bool] = None,
location: Optional[str] = None,
mute_actions_after_alert_duration: Optional[str] = None,
name: Optional[str] = None,
query_time_range_override: Optional[str] = None,
resource_group_name: Optional[str] = None,
scopes: Optional[str] = None,
severity: Optional[int] = None,
skip_query_validation: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_types: Optional[Sequence[str]] = None,
window_duration: Optional[str] = None,
workspace_alerts_storage_enabled: Optional[bool] = None) -> ScheduledQueryRulesAlertV2
func GetScheduledQueryRulesAlertV2(ctx *Context, name string, id IDInput, state *ScheduledQueryRulesAlertV2State, opts ...ResourceOption) (*ScheduledQueryRulesAlertV2, error)
public static ScheduledQueryRulesAlertV2 Get(string name, Input<string> id, ScheduledQueryRulesAlertV2State? state, CustomResourceOptions? opts = null)
public static ScheduledQueryRulesAlertV2 get(String name, Output<String> id, ScheduledQueryRulesAlertV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- Auto
Mitigation boolEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- Created
With stringApi Version The api-version used when creating this alert rule.
- Criterias
List<Scheduled
Query Rules Alert V2Criteria Args> A
criteria
block as defined below.- Description string
Specifies the description of the scheduled query rule.
- Display
Name string Specifies the display name of the alert rule.
- Enabled bool
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- Is
ALegacy boolLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- Location string
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Name string
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Resource
Group stringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Skip
Query boolValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Dictionary<string, string>
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- Target
Resource List<string>Types 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.- Window
Duration string Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- Workspace
Alerts boolStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- Action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- Auto
Mitigation boolEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- Created
With stringApi Version The api-version used when creating this alert rule.
- Criterias
[]Scheduled
Query Rules Alert V2Criteria Args A
criteria
block as defined below.- Description string
Specifies the description of the scheduled query rule.
- Display
Name string Specifies the display name of the alert rule.
- Enabled bool
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- Is
ALegacy boolLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- Location string
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Name string
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- Resource
Group stringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Skip
Query boolValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- map[string]string
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- Target
Resource []stringTypes 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.- Window
Duration string Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- Workspace
Alerts boolStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- auto
Mitigation BooleanEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- created
With StringApi Version The api-version used when creating this alert rule.
- criterias
List<Scheduled
Query Rules Alert V2Criteria Args> A
criteria
block as defined below.- description String
Specifies the description of the scheduled query rule.
- display
Name String Specifies the display name of the alert rule.
- enabled Boolean
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- is
ALegacy BooleanLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location String
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name String
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- resource
Group StringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Integer
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip
Query BooleanValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String,String>
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target
Resource List<String>Types 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.- window
Duration String Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- workspace
Alerts BooleanStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- auto
Mitigation booleanEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- created
With stringApi Version The api-version used when creating this alert rule.
- criterias
Scheduled
Query Rules Alert V2Criteria Args[] A
criteria
block as defined below.- description string
Specifies the description of the scheduled query rule.
- display
Name string Specifies the display name of the alert rule.
- enabled boolean
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- is
ALegacy booleanLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace booleanAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location string
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name string
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- resource
Group stringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes string
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity number
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip
Query booleanValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- {[key: string]: string}
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target
Resource string[]Types 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.- window
Duration string Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- workspace
Alerts booleanStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action
Scheduled
Query Rules Alert V2Action Args An
action
block as defined below.- auto_
mitigation_ boolenabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- created_
with_ strapi_ version The api-version used when creating this alert rule.
- criterias
Sequence[Scheduled
Query Rules Alert V2Criteria Args] A
criteria
block as defined below.- description str
Specifies the description of the scheduled query rule.
- display_
name str Specifies the display name of the alert rule.
- enabled bool
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation_
frequency str How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- is_
a_ boollegacy_ log_ analytics_ rule True if this alert rule is a legacy Log Analytic Rule.
- is_
workspace_ boolalerts_ storage_ configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location str
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute_
actions_ strafter_ alert_ duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name str
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query_
time_ strrange_ override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- resource_
group_ strname Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes str
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity int
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip_
query_ boolvalidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Mapping[str, str]
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target_
resource_ Sequence[str]types 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.- window_
duration str Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- workspace_
alerts_ boolstorage_ enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action Property Map
An
action
block as defined below.- auto
Mitigation BooleanEnabled Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
.- created
With StringApi Version The api-version used when creating this alert rule.
- criterias List<Property Map>
A
criteria
block as defined below.- description String
Specifies the description of the scheduled query rule.
- display
Name String Specifies the display name of the alert rule.
- enabled Boolean
Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. The default istrue
.- evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.- is
ALegacy BooleanLog Analytics Rule True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location String
Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- name String
Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.- resource
Group StringName Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Number
Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip
Query BooleanValidation Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String>
A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- target
Resource List<String>Types 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.- window
Duration String Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
.- workspace
Alerts BooleanStorage Enabled Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
Supporting Types
ScheduledQueryRulesAlertV2Action
- Action
Groups List<string> List of Action Group resource IDs to invoke when the alert fires.
- Custom
Properties Dictionary<string, string> Specifies the properties of an alert payload.
- Action
Groups []string List of Action Group resource IDs to invoke when the alert fires.
- Custom
Properties map[string]string Specifies the properties of an alert payload.
- action
Groups List<String> List of Action Group resource IDs to invoke when the alert fires.
- custom
Properties Map<String,String> Specifies the properties of an alert payload.
- action
Groups string[] List of Action Group resource IDs to invoke when the alert fires.
- custom
Properties {[key: string]: string} Specifies the properties of an alert payload.
- action_
groups Sequence[str] List of Action Group resource IDs to invoke when the alert fires.
- custom_
properties Mapping[str, str] Specifies the properties of an alert payload.
- action
Groups List<String> List of Action Group resource IDs to invoke when the alert fires.
- custom
Properties Map<String> Specifies the properties of an alert payload.
ScheduledQueryRulesAlertV2Criteria
- Operator string
Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
.- Query string
The query to run on logs. The results returned by this query are used to populate the alert.
- Threshold double
Specifies the criteria threshold value that activates the alert.
- Time
Aggregation stringMethod The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
.- Dimensions
List<Scheduled
Query Rules Alert V2Criteria Dimension> A
dimension
block as defined below.- Failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods A
failing_periods
block as defined below.- Metric
Measure stringColumn Specifies the column containing the metric measure number.
- Resource
Id stringColumn Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- Operator string
Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
.- Query string
The query to run on logs. The results returned by this query are used to populate the alert.
- Threshold float64
Specifies the criteria threshold value that activates the alert.
- Time
Aggregation stringMethod The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
.- Dimensions
[]Scheduled
Query Rules Alert V2Criteria Dimension A
dimension
block as defined below.- Failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods A
failing_periods
block as defined below.- Metric
Measure stringColumn Specifies the column containing the metric measure number.
- Resource
Id stringColumn Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator String
Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
.- query String
The query to run on logs. The results returned by this query are used to populate the alert.
- threshold Double
Specifies the criteria threshold value that activates the alert.
- time
Aggregation StringMethod The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
.- dimensions
List<Scheduled
Query Rules Alert V2Criteria Dimension> A
dimension
block as defined below.- failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods A
failing_periods
block as defined below.- metric
Measure StringColumn Specifies the column containing the metric measure number.
- resource
Id StringColumn Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator string
Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
.- query string
The query to run on logs. The results returned by this query are used to populate the alert.
- threshold number
Specifies the criteria threshold value that activates the alert.
- time
Aggregation stringMethod The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
.- dimensions
Scheduled
Query Rules Alert V2Criteria Dimension[] A
dimension
block as defined below.- failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods A
failing_periods
block as defined below.- metric
Measure stringColumn Specifies the column containing the metric measure number.
- resource
Id stringColumn Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator str
Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
.- query str
The query to run on logs. The results returned by this query are used to populate the alert.
- threshold float
Specifies the criteria threshold value that activates the alert.
- time_
aggregation_ strmethod The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
.- dimensions
Sequence[Scheduled
Query Rules Alert V2Criteria Dimension] A
dimension
block as defined below.- failing_
periods ScheduledQuery Rules Alert V2Criteria Failing Periods A
failing_periods
block as defined below.- metric_
measure_ strcolumn Specifies the column containing the metric measure number.
- resource_
id_ strcolumn Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator String
Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
.- query String
The query to run on logs. The results returned by this query are used to populate the alert.
- threshold Number
Specifies the criteria threshold value that activates the alert.
- time
Aggregation StringMethod The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
.- dimensions List<Property Map>
A
dimension
block as defined below.- failing
Periods Property Map A
failing_periods
block as defined below.- metric
Measure StringColumn Specifies the column containing the metric measure number.
- resource
Id StringColumn Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
ScheduledQueryRulesAlertV2CriteriaDimension
ScheduledQueryRulesAlertV2CriteriaFailingPeriods
- Minimum
Failing intPeriods To Trigger Alert Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6.- Number
Of intEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.
- Minimum
Failing intPeriods To Trigger Alert Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6.- Number
Of intEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.
- minimum
Failing IntegerPeriods To Trigger Alert Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6.- number
Of IntegerEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.
- minimum
Failing numberPeriods To Trigger Alert Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6.- number
Of numberEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.
- minimum_
failing_ intperiods_ to_ trigger_ alert Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6.- number_
of_ intevaluation_ periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.
- minimum
Failing NumberPeriods To Trigger Alert Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6.- number
Of NumberEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.
Import
Monitor Scheduled Query Rule Alert can be imported using the resource id
, e.g.
$ pulumi import azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/scheduledQueryRules/rule1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.