get Scheduled Query Rules Alert
suspend fun getScheduledQueryRulesAlert(argument: GetScheduledQueryRulesAlertPlainArgs): GetScheduledQueryRulesAlertResult
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);
Content copied to clipboard
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)
Content copied to clipboard
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),
};
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:monitoring:getScheduledQueryRulesAlert
arguments:
resourceGroupName: example-rg
name: tfex-queryrule
outputs:
queryRuleId: ${example.id}
Content copied to clipboard
Return
A collection of values returned by getScheduledQueryRulesAlert.
Parameters
argument
A collection of arguments for invoking getScheduledQueryRulesAlert.
suspend fun getScheduledQueryRulesAlert(name: String, resourceGroupName: String): GetScheduledQueryRulesAlertResult
Return
A collection of values returned by getScheduledQueryRulesAlert.
Parameters
name
Specifies the name of the scheduled query rule.
resource Group Name
Specifies the name of the resource group where the scheduled query rule is located.
See also
suspend fun getScheduledQueryRulesAlert(argument: suspend GetScheduledQueryRulesAlertPlainArgsBuilder.() -> Unit): GetScheduledQueryRulesAlertResult
Return
A collection of values returned by getScheduledQueryRulesAlert.
Parameters
argument
Builder for com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesAlertPlainArgs.