getScheduledQueryRulesAlert

Use this data source to access the properties of an AlertingAction scheduled query rule.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.monitoring.getScheduledQueryRulesAlert({
resourceGroupName: "example-rg",
name: "tfex-queryrule",
});
export const queryRuleId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.monitoring.get_scheduled_query_rules_alert(resource_group_name="example-rg",
name="tfex-queryrule")
pulumi.export("queryRuleId", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Monitoring.GetScheduledQueryRulesAlert.Invoke(new()
{
ResourceGroupName = "example-rg",
Name = "tfex-queryrule",
});
return new Dictionary<string, object?>
{
["queryRuleId"] = example.Apply(getScheduledQueryRulesAlertResult => getScheduledQueryRulesAlertResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := monitoring.LookupScheduledQueryRulesAlert(ctx, &monitoring.LookupScheduledQueryRulesAlertArgs{
ResourceGroupName: "example-rg",
Name: "tfex-queryrule",
}, nil)
if err != nil {
return err
}
ctx.Export("queryRuleId", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.monitoring.MonitoringFunctions;
import com.pulumi.azure.monitoring.inputs.GetScheduledQueryRulesAlertArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = MonitoringFunctions.getScheduledQueryRulesAlert(GetScheduledQueryRulesAlertArgs.builder()
.resourceGroupName("example-rg")
.name("tfex-queryrule")
.build());
ctx.export("queryRuleId", example.id());
}
}
variables:
example:
fn::invoke:
function: azure:monitoring:getScheduledQueryRulesAlert
arguments:
resourceGroupName: example-rg
name: tfex-queryrule
outputs:
queryRuleId: ${example.id}

Return

A collection of values returned by getScheduledQueryRulesAlert.

Parameters

argument

A collection of arguments for invoking getScheduledQueryRulesAlert.


Return

A collection of values returned by getScheduledQueryRulesAlert.

Parameters

name

Specifies the name of the scheduled query rule.

resourceGroupName

Specifies the name of the resource group where the scheduled query rule is located.

See also


Return

A collection of values returned by getScheduledQueryRulesAlert.

Parameters

argument

Builder for com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesAlertPlainArgs.

See also