All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.sentinel.kotlin.SentinelFunctions.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.sentinel.kotlin

import com.pulumi.azure.sentinel.SentinelFunctions.getAlertRuleAnomalyPlain
import com.pulumi.azure.sentinel.SentinelFunctions.getAlertRulePlain
import com.pulumi.azure.sentinel.SentinelFunctions.getAlertRuleTemplatePlain
import com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleAnomalyPlainArgs
import com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleAnomalyPlainArgsBuilder
import com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRulePlainArgs
import com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRulePlainArgsBuilder
import com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleTemplatePlainArgs
import com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleTemplatePlainArgsBuilder
import com.pulumi.azure.sentinel.kotlin.outputs.GetAlertRuleAnomalyResult
import com.pulumi.azure.sentinel.kotlin.outputs.GetAlertRuleResult
import com.pulumi.azure.sentinel.kotlin.outputs.GetAlertRuleTemplateResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.sentinel.kotlin.outputs.GetAlertRuleAnomalyResult.Companion.toKotlin as getAlertRuleAnomalyResultToKotlin
import com.pulumi.azure.sentinel.kotlin.outputs.GetAlertRuleResult.Companion.toKotlin as getAlertRuleResultToKotlin
import com.pulumi.azure.sentinel.kotlin.outputs.GetAlertRuleTemplateResult.Companion.toKotlin as getAlertRuleTemplateResultToKotlin

public object SentinelFunctions {
    /**
     * Use this data source to access information about an existing Sentinel Alert Rule.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.operationalinsights.getAnalyticsWorkspace({
     *     name: "example",
     *     resourceGroupName: "example-resources",
     * });
     * const exampleGetAlertRule = example.then(example => azure.sentinel.getAlertRule({
     *     name: "existing",
     *     logAnalyticsWorkspaceId: example.id,
     * }));
     * export const id = exampleGetAlertRule.then(exampleGetAlertRule => exampleGetAlertRule.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.operationalinsights.get_analytics_workspace(name="example",
     *     resource_group_name="example-resources")
     * example_get_alert_rule = azure.sentinel.get_alert_rule(name="existing",
     *     log_analytics_workspace_id=example.id)
     * pulumi.export("id", example_get_alert_rule.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.OperationalInsights.GetAnalyticsWorkspace.Invoke(new()
     *     {
     *         Name = "example",
     *         ResourceGroupName = "example-resources",
     *     });
     *     var exampleGetAlertRule = Azure.Sentinel.GetAlertRule.Invoke(new()
     *     {
     *         Name = "existing",
     *         LogAnalyticsWorkspaceId = example.Apply(getAnalyticsWorkspaceResult => getAnalyticsWorkspaceResult.Id),
     *     });
     *     return new Dictionary
     *     {
     *         ["id"] = exampleGetAlertRule.Apply(getAlertRuleResult => getAlertRuleResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/sentinel"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := operationalinsights.LookupAnalyticsWorkspace(ctx, &operationalinsights.LookupAnalyticsWorkspaceArgs{
     * 			Name:              "example",
     * 			ResourceGroupName: "example-resources",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		exampleGetAlertRule, err := sentinel.GetAlertRule(ctx, &sentinel.GetAlertRuleArgs{
     * 			Name:                    "existing",
     * 			LogAnalyticsWorkspaceId: example.Id,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("id", exampleGetAlertRule.Id)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.operationalinsights.OperationalinsightsFunctions;
     * import com.pulumi.azure.operationalinsights.inputs.GetAnalyticsWorkspaceArgs;
     * import com.pulumi.azure.sentinel.SentinelFunctions;
     * import com.pulumi.azure.sentinel.inputs.GetAlertRuleArgs;
     * 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 = OperationalinsightsFunctions.getAnalyticsWorkspace(GetAnalyticsWorkspaceArgs.builder()
     *             .name("example")
     *             .resourceGroupName("example-resources")
     *             .build());
     *         final var exampleGetAlertRule = SentinelFunctions.getAlertRule(GetAlertRuleArgs.builder()
     *             .name("existing")
     *             .logAnalyticsWorkspaceId(example.applyValue(getAnalyticsWorkspaceResult -> getAnalyticsWorkspaceResult.id()))
     *             .build());
     *         ctx.export("id", exampleGetAlertRule.applyValue(getAlertRuleResult -> getAlertRuleResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:operationalinsights:getAnalyticsWorkspace
     *       Arguments:
     *         name: example
     *         resourceGroupName: example-resources
     *   exampleGetAlertRule:
     *     fn::invoke:
     *       Function: azure:sentinel:getAlertRule
     *       Arguments:
     *         name: existing
     *         logAnalyticsWorkspaceId: ${example.id}
     * outputs:
     *   id: ${exampleGetAlertRule.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getAlertRule.
     * @return A collection of values returned by getAlertRule.
     */
    public suspend fun getAlertRule(argument: GetAlertRulePlainArgs): GetAlertRuleResult =
        getAlertRuleResultToKotlin(getAlertRulePlain(argument.toJava()).await())

    /**
     * @see [getAlertRule].
     * @param logAnalyticsWorkspaceId The ID of the Log Analytics Workspace this Sentinel Alert Rule belongs to.
     * @param name The name which should be used for this Sentinel Alert Rule.
     * @return A collection of values returned by getAlertRule.
     */
    public suspend fun getAlertRule(logAnalyticsWorkspaceId: String, name: String):
        GetAlertRuleResult {
        val argument = GetAlertRulePlainArgs(
            logAnalyticsWorkspaceId = logAnalyticsWorkspaceId,
            name = name,
        )
        return getAlertRuleResultToKotlin(getAlertRulePlain(argument.toJava()).await())
    }

    /**
     * @see [getAlertRule].
     * @param argument Builder for [com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRulePlainArgs].
     * @return A collection of values returned by getAlertRule.
     */
    public suspend fun getAlertRule(argument: suspend GetAlertRulePlainArgsBuilder.() -> Unit):
        GetAlertRuleResult {
        val builder = GetAlertRulePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAlertRuleResultToKotlin(getAlertRulePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing Anomaly Alert Rule.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
     *     name: "example-resources",
     *     location: "West Europe",
     * });
     * const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
     *     name: "example-law",
     *     location: exampleResourceGroup.location,
     *     resourceGroupName: exampleResourceGroup.name,
     *     sku: "PerGB2018",
     * });
     * const exampleLogAnalyticsWorkspaceOnboarding = new azure.sentinel.LogAnalyticsWorkspaceOnboarding("example", {
     *     workspaceId: exampleAnalyticsWorkspace.id,
     *     customerManagedKeyEnabled: false,
     * });
     * const example = azure.sentinel.getAlertRuleAnomalyOutput({
     *     logAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.workspaceId,
     *     displayName: "Potential data staging",
     * });
     * export const id = example.apply(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example_resource_group = azure.core.ResourceGroup("example",
     *     name="example-resources",
     *     location="West Europe")
     * example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
     *     name="example-law",
     *     location=example_resource_group.location,
     *     resource_group_name=example_resource_group.name,
     *     sku="PerGB2018")
     * example_log_analytics_workspace_onboarding = azure.sentinel.LogAnalyticsWorkspaceOnboarding("example",
     *     workspace_id=example_analytics_workspace.id,
     *     customer_managed_key_enabled=False)
     * example = azure.sentinel.get_alert_rule_anomaly_output(log_analytics_workspace_id=example_log_analytics_workspace_onboarding.workspace_id,
     *     display_name="Potential data staging")
     * pulumi.export("id", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
     *     {
     *         Name = "example-resources",
     *         Location = "West Europe",
     *     });
     *     var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
     *     {
     *         Name = "example-law",
     *         Location = exampleResourceGroup.Location,
     *         ResourceGroupName = exampleResourceGroup.Name,
     *         Sku = "PerGB2018",
     *     });
     *     var exampleLogAnalyticsWorkspaceOnboarding = new Azure.Sentinel.LogAnalyticsWorkspaceOnboarding("example", new()
     *     {
     *         WorkspaceId = exampleAnalyticsWorkspace.Id,
     *         CustomerManagedKeyEnabled = false,
     *     });
     *     var example = Azure.Sentinel.GetAlertRuleAnomaly.Invoke(new()
     *     {
     *         LogAnalyticsWorkspaceId = exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId,
     *         DisplayName = "Potential data staging",
     *     });
     *     return new Dictionary
     *     {
     *         ["id"] = example.Apply(getAlertRuleAnomalyResult => getAlertRuleAnomalyResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/sentinel"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
     * 			Name:     pulumi.String("example-resources"),
     * 			Location: pulumi.String("West Europe"),
     * 		})
     * 		if err != nil {
     * 			return err
     * 		}
     * 		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
     * 			Name:              pulumi.String("example-law"),
     * 			Location:          exampleResourceGroup.Location,
     * 			ResourceGroupName: exampleResourceGroup.Name,
     * 			Sku:               pulumi.String("PerGB2018"),
     * 		})
     * 		if err != nil {
     * 			return err
     * 		}
     * 		exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{
     * 			WorkspaceId:               exampleAnalyticsWorkspace.ID(),
     * 			CustomerManagedKeyEnabled: pulumi.Bool(false),
     * 		})
     * 		if err != nil {
     * 			return err
     * 		}
     * 		example := sentinel.GetAlertRuleAnomalyOutput(ctx, sentinel.GetAlertRuleAnomalyOutputArgs{
     * 			LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId,
     * 			DisplayName:             pulumi.String("Potential data staging"),
     * 		}, nil)
     * 		ctx.Export("id", example.ApplyT(func(example sentinel.GetAlertRuleAnomalyResult) (*string, error) {
     * 			return &example.Id, nil
     * 		}).(pulumi.StringPtrOutput))
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.core.ResourceGroup;
     * import com.pulumi.azure.core.ResourceGroupArgs;
     * import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
     * import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
     * import com.pulumi.azure.sentinel.LogAnalyticsWorkspaceOnboarding;
     * import com.pulumi.azure.sentinel.LogAnalyticsWorkspaceOnboardingArgs;
     * import com.pulumi.azure.sentinel.SentinelFunctions;
     * import com.pulumi.azure.sentinel.inputs.GetAlertRuleAnomalyArgs;
     * 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) {
     *         var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
     *             .name("example-resources")
     *             .location("West Europe")
     *             .build());
     *         var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
     *             .name("example-law")
     *             .location(exampleResourceGroup.location())
     *             .resourceGroupName(exampleResourceGroup.name())
     *             .sku("PerGB2018")
     *             .build());
     *         var exampleLogAnalyticsWorkspaceOnboarding = new LogAnalyticsWorkspaceOnboarding("exampleLogAnalyticsWorkspaceOnboarding", LogAnalyticsWorkspaceOnboardingArgs.builder()
     *             .workspaceId(exampleAnalyticsWorkspace.id())
     *             .customerManagedKeyEnabled(false)
     *             .build());
     *         final var example = SentinelFunctions.getAlertRuleAnomaly(GetAlertRuleAnomalyArgs.builder()
     *             .logAnalyticsWorkspaceId(exampleLogAnalyticsWorkspaceOnboarding.workspaceId())
     *             .displayName("Potential data staging")
     *             .build());
     *         ctx.export("id", example.applyValue(getAlertRuleAnomalyResult -> getAlertRuleAnomalyResult).applyValue(example -> example.applyValue(getAlertRuleAnomalyResult -> getAlertRuleAnomalyResult.id())));
     *     }
     * }
     * ```
     * ```yaml
     * resources:
     *   exampleResourceGroup:
     *     type: azure:core:ResourceGroup
     *     name: example
     *     properties:
     *       name: example-resources
     *       location: West Europe
     *   exampleAnalyticsWorkspace:
     *     type: azure:operationalinsights:AnalyticsWorkspace
     *     name: example
     *     properties:
     *       name: example-law
     *       location: ${exampleResourceGroup.location}
     *       resourceGroupName: ${exampleResourceGroup.name}
     *       sku: PerGB2018
     *   exampleLogAnalyticsWorkspaceOnboarding:
     *     type: azure:sentinel:LogAnalyticsWorkspaceOnboarding
     *     name: example
     *     properties:
     *       workspaceId: ${exampleAnalyticsWorkspace.id}
     *       customerManagedKeyEnabled: false
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:sentinel:getAlertRuleAnomaly
     *       Arguments:
     *         logAnalyticsWorkspaceId: ${exampleLogAnalyticsWorkspaceOnboarding.workspaceId}
     *         displayName: Potential data staging
     * outputs:
     *   id: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getAlertRuleAnomaly.
     * @return A collection of values returned by getAlertRuleAnomaly.
     */
    public suspend fun getAlertRuleAnomaly(argument: GetAlertRuleAnomalyPlainArgs):
        GetAlertRuleAnomalyResult =
        getAlertRuleAnomalyResultToKotlin(getAlertRuleAnomalyPlain(argument.toJava()).await())

    /**
     * @see [getAlertRuleAnomaly].
     * @param displayName The display name of this Sentinel Alert Rule Template. Either `display_name` or `name` have to be specified.
     * > **NOTE** One of `name` or `display_name` must be specified.
     * @param logAnalyticsWorkspaceId The ID of the Log Analytics Workspace.
     * @param name The guid of this Sentinel Alert Rule Template. Either `display_name` or `name` have to be specified.
     * @return A collection of values returned by getAlertRuleAnomaly.
     */
    public suspend fun getAlertRuleAnomaly(
        displayName: String? = null,
        logAnalyticsWorkspaceId: String,
        name: String? = null,
    ): GetAlertRuleAnomalyResult {
        val argument = GetAlertRuleAnomalyPlainArgs(
            displayName = displayName,
            logAnalyticsWorkspaceId = logAnalyticsWorkspaceId,
            name = name,
        )
        return getAlertRuleAnomalyResultToKotlin(getAlertRuleAnomalyPlain(argument.toJava()).await())
    }

    /**
     * @see [getAlertRuleAnomaly].
     * @param argument Builder for [com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleAnomalyPlainArgs].
     * @return A collection of values returned by getAlertRuleAnomaly.
     */
    public suspend
    fun getAlertRuleAnomaly(argument: suspend GetAlertRuleAnomalyPlainArgsBuilder.() -> Unit):
        GetAlertRuleAnomalyResult {
        val builder = GetAlertRuleAnomalyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAlertRuleAnomalyResultToKotlin(getAlertRuleAnomalyPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing Sentinel Alert Rule Template.
     * ## Example Usage
     * 
     * ```typescript
     * 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);
     * ```
     * ```python
     * 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)
     * ```
     * ```csharp
     * 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
     *     {
     *         ["id"] = example.Apply(getAlertRuleTemplateResult => getAlertRuleTemplateResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/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
     * 	})
     * }
     * ```
     * ```java
     * 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()));
     *     }
     * }
     * ```
     * ```yaml
     * 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}
     * ```
     * 
     * @param argument A collection of arguments for invoking getAlertRuleTemplate.
     * @return A collection of values returned by getAlertRuleTemplate.
     */
    public suspend fun getAlertRuleTemplate(argument: GetAlertRuleTemplatePlainArgs):
        GetAlertRuleTemplateResult =
        getAlertRuleTemplateResultToKotlin(getAlertRuleTemplatePlain(argument.toJava()).await())

    /**
     * @see [getAlertRuleTemplate].
     * @param displayName 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 same `display_name`.
     * @param logAnalyticsWorkspaceId The ID of the Log Analytics Workspace.
     * @param name The name of this Sentinel Alert Rule Template. Either `display_name` or `name` have to be specified.
     * @return A collection of values returned by getAlertRuleTemplate.
     */
    public suspend fun getAlertRuleTemplate(
        displayName: String? = null,
        logAnalyticsWorkspaceId: String,
        name: String? = null,
    ): GetAlertRuleTemplateResult {
        val argument = GetAlertRuleTemplatePlainArgs(
            displayName = displayName,
            logAnalyticsWorkspaceId = logAnalyticsWorkspaceId,
            name = name,
        )
        return getAlertRuleTemplateResultToKotlin(getAlertRuleTemplatePlain(argument.toJava()).await())
    }

    /**
     * @see [getAlertRuleTemplate].
     * @param argument Builder for [com.pulumi.azure.sentinel.kotlin.inputs.GetAlertRuleTemplatePlainArgs].
     * @return A collection of values returned by getAlertRuleTemplate.
     */
    public suspend
    fun getAlertRuleTemplate(argument: suspend GetAlertRuleTemplatePlainArgsBuilder.() -> Unit):
        GetAlertRuleTemplateResult {
        val builder = GetAlertRuleTemplatePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAlertRuleTemplateResultToKotlin(getAlertRuleTemplatePlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy