GetScheduledQueryRulesAlert
Use this data source to access the properties of an AlertingAction scheduled query rule.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Monitoring.GetScheduledQueryRulesAlert.InvokeAsync(new Azure.Monitoring.GetScheduledQueryRulesAlertArgs
{
Name = "tfex-queryrule",
ResourceGroupName = "example-rg",
}));
this.QueryRuleId = example.Apply(example => example.Id);
}
[Output("queryRuleId")]
public Output<string> QueryRuleId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/monitoring"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := monitoring.LookupScheduledQueryRulesAlert(ctx, &monitoring.LookupScheduledQueryRulesAlertArgs{
Name: "tfex-queryrule",
ResourceGroupName: "example-rg",
}, nil)
if err != nil {
return err
}
ctx.Export("queryRuleId", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.monitoring.get_scheduled_query_rules_alert(name="tfex-queryrule",
resource_group_name="example-rg")
pulumi.export("queryRuleId", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = pulumi.output(azure.monitoring.getScheduledQueryRulesAlert({
name: "tfex-queryrule",
resourceGroupName: "example-rg",
}, { async: true }));
export const queryRuleId = example.id;Using GetScheduledQueryRulesAlert
function getScheduledQueryRulesAlert(args: GetScheduledQueryRulesAlertArgs, opts?: InvokeOptions): Promise<GetScheduledQueryRulesAlertResult>function get_scheduled_query_rules_alert(name=None, resource_group_name=None, opts=None)func LookupScheduledQueryRulesAlert(ctx *Context, args *LookupScheduledQueryRulesAlertArgs, opts ...InvokeOption) (*LookupScheduledQueryRulesAlertResult, error)Note: This function is named
LookupScheduledQueryRulesAlertin the Go SDK.
public static class GetScheduledQueryRulesAlert {
public static Task<GetScheduledQueryRulesAlertResult> InvokeAsync(GetScheduledQueryRulesAlertArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the scheduled query rule.
- Resource
Group stringName Specifies the name of the resource group where the scheduled query rule is located.
- Name string
Specifies the name of the scheduled query rule.
- Resource
Group stringName Specifies the name of the resource group where the scheduled query rule is located.
- name string
Specifies the name of the scheduled query rule.
- resource
Group stringName Specifies the name of the resource group where the scheduled query rule is located.
- name str
Specifies the name of the scheduled query rule.
- resource_
group_ strname Specifies the name of the resource group where the scheduled query rule is located.
GetScheduledQueryRulesAlert Result
The following output properties are available:
- Actions
List<Get
Scheduled Query Rules Alert Action> An
actionblock as defined below.- List<string>
List of Resource IDs referred into query.
- Data
Source stringId The resource URI over which log search query is to be run.
- Description string
The description of the scheduled query rule.
- Enabled bool
Whether this scheduled query rule is enabled.
- Frequency int
Frequency at which rule condition should be evaluated.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Query string
Log search query.
- Query
Type string - Resource
Group stringName - Severity int
Severity of the alert.
- Dictionary<string, string>
- Throttling int
Time for which alerts should be throttled or suppressed.
- Time
Window int Time window for which data needs to be fetched for query.
- Triggers
List<Get
Scheduled Query Rules Alert Trigger> A
triggerblock as defined below.
- Actions
[]Get
Scheduled Query Rules Alert Action An
actionblock as defined below.- []string
List of Resource IDs referred into query.
- Data
Source stringId The resource URI over which log search query is to be run.
- Description string
The description of the scheduled query rule.
- Enabled bool
Whether this scheduled query rule is enabled.
- Frequency int
Frequency at which rule condition should be evaluated.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Query string
Log search query.
- Query
Type string - Resource
Group stringName - Severity int
Severity of the alert.
- map[string]string
- Throttling int
Time for which alerts should be throttled or suppressed.
- Time
Window int Time window for which data needs to be fetched for query.
- Triggers
[]Get
Scheduled Query Rules Alert Trigger A
triggerblock as defined below.
- actions
Get
Scheduled Query Rules Alert Action[] An
actionblock as defined below.- string[]
List of Resource IDs referred into query.
- data
Source stringId The resource URI over which log search query is to be run.
- description string
The description of the scheduled query rule.
- enabled boolean
Whether this scheduled query rule is enabled.
- frequency number
Frequency at which rule condition should be evaluated.
- id string
The provider-assigned unique ID for this managed resource.
- location string
- name string
- query string
Log search query.
- query
Type string - resource
Group stringName - severity number
Severity of the alert.
- {[key: string]: string}
- throttling number
Time for which alerts should be throttled or suppressed.
- time
Window number Time window for which data needs to be fetched for query.
- triggers
Get
Scheduled Query Rules Alert Trigger[] A
triggerblock as defined below.
- actions
List[Get
Scheduled Query Rules Alert Action] An
actionblock as defined below.- List[str]
List of Resource IDs referred into query.
- data_
source_ strid The resource URI over which log search query is to be run.
- description str
The description of the scheduled query rule.
- enabled bool
Whether this scheduled query rule is enabled.
- frequency float
Frequency at which rule condition should be evaluated.
- id str
The provider-assigned unique ID for this managed resource.
- location str
- name str
- query str
Log search query.
- query_
type str - resource_
group_ strname - severity float
Severity of the alert.
- Dict[str, str]
- throttling float
Time for which alerts should be throttled or suppressed.
- time_
window float Time window for which data needs to be fetched for query.
- triggers
List[Get
Scheduled Query Rules Alert Trigger] A
triggerblock as defined below.
Supporting Types
GetScheduledQueryRulesAlertAction
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Action
Groups List<string> List of action group reference resource IDs.
- Custom
Webhook stringPayload Custom payload to be sent for all webhook URI in Azure action group.
- Email
Subject string Custom subject override for all email IDs in Azure action group.
- Action
Groups []string List of action group reference resource IDs.
- Custom
Webhook stringPayload Custom payload to be sent for all webhook URI in Azure action group.
- Email
Subject string Custom subject override for all email IDs in Azure action group.
- action
Groups string[] List of action group reference resource IDs.
- custom
Webhook stringPayload Custom payload to be sent for all webhook URI in Azure action group.
- email
Subject string Custom subject override for all email IDs in Azure action group.
- action
Groups List[str] List of action group reference resource IDs.
- custom
Webhook strPayload Custom payload to be sent for all webhook URI in Azure action group.
- email
Subject str Custom subject override for all email IDs in Azure action group.
GetScheduledQueryRulesAlertTrigger
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Metric
Triggers List<GetScheduled Query Rules Alert Trigger Metric Trigger Args> - Operator string
Evaluation operation for rule.
- Threshold double
Result or count threshold based on which rule should be triggered.
- Metric
Triggers []GetScheduled Query Rules Alert Trigger Metric Trigger - Operator string
Evaluation operation for rule.
- Threshold float64
Result or count threshold based on which rule should be triggered.
- metric
Triggers GetScheduled Query Rules Alert Trigger Metric Trigger[] - operator string
Evaluation operation for rule.
- threshold number
Result or count threshold based on which rule should be triggered.
- metric
Triggers List[GetScheduled Query Rules Alert Trigger Metric Trigger] - operator str
Evaluation operation for rule.
- threshold float
Result or count threshold based on which rule should be triggered.
GetScheduledQueryRulesAlertTriggerMetricTrigger
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Metric
Column string - Metric
Trigger stringType - Operator string
Evaluation operation for rule.
- Threshold double
Result or count threshold based on which rule should be triggered.
- Metric
Column string - Metric
Trigger stringType - Operator string
Evaluation operation for rule.
- Threshold float64
Result or count threshold based on which rule should be triggered.
- metric
Column string - metric
Trigger stringType - operator string
Evaluation operation for rule.
- threshold number
Result or count threshold based on which rule should be triggered.
- metric
Column str - metric
Trigger strType - operator str
Evaluation operation for rule.
- threshold float
Result or count threshold based on which rule should be triggered.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.