get Alert Rule Template
Use this data source to access information about an existing Sentinel Alert Rule Template.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.sentinel.getAlertRuleTemplate({
logAnalyticsWorkspaceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1",
displayName: "Create incidents based on Azure Security Center for IoT alerts",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.sentinel.get_alert_rule_template(log_analytics_workspace_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1",
display_name="Create incidents based on Azure Security Center for IoT alerts")
pulumi.export("id", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Sentinel.GetAlertRuleTemplate.Invoke(new()
{
LogAnalyticsWorkspaceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1",
DisplayName = "Create incidents based on Azure Security Center for IoT alerts",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getAlertRuleTemplateResult => getAlertRuleTemplateResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := sentinel.GetAlertRuleTemplate(ctx, &sentinel.GetAlertRuleTemplateArgs{
LogAnalyticsWorkspaceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1",
DisplayName: pulumi.StringRef("Create incidents based on Azure Security Center for IoT alerts"),
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.sentinel.SentinelFunctions;
import com.pulumi.azure.sentinel.inputs.GetAlertRuleTemplateArgs;
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 = SentinelFunctions.getAlertRuleTemplate(GetAlertRuleTemplateArgs.builder()
.logAnalyticsWorkspaceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1")
.displayName("Create incidents based on Azure Security Center for IoT alerts")
.build());
ctx.export("id", example.applyValue(getAlertRuleTemplateResult -> getAlertRuleTemplateResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:sentinel:getAlertRuleTemplate
arguments:
logAnalyticsWorkspaceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1
displayName: Create incidents based on Azure Security Center for IoT alerts
outputs:
id: ${example.id}
Return
A collection of values returned by getAlertRuleTemplate.
Parameters
A collection of arguments for invoking getAlertRuleTemplate.
Return
A collection of values returned by getAlertRuleTemplate.
Parameters
The display name of this Sentinel Alert Rule Template. Either display_name
or name
have to be specified.
NOTE As
display_name
is not unique, errors may occur when there are multiple Sentinel Alert Rule Template with samedisplay_name
.
The ID of the Log Analytics Workspace.
The name of this Sentinel Alert Rule Template. Either display_name
or name
have to be specified.
See also
Return
A collection of values returned by getAlertRuleTemplate.
Parameters
Builder for com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleTemplatePlainArgs.