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

com.pulumi.azure.monitoring.kotlin.MonitoringFunctions.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.monitoring.kotlin

import com.pulumi.azure.monitoring.MonitoringFunctions.getActionGroupPlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getDataCollectionEndpointPlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getDataCollectionRulePlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getDiagnosticCategoriesPlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getLogProfilePlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getScheduledQueryRulesAlertPlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getScheduledQueryRulesLogPlain
import com.pulumi.azure.monitoring.MonitoringFunctions.getWorkspacePlain
import com.pulumi.azure.monitoring.kotlin.inputs.GetActionGroupPlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetActionGroupPlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionEndpointPlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionEndpointPlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionRulePlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionRulePlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetDiagnosticCategoriesPlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetDiagnosticCategoriesPlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetLogProfilePlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetLogProfilePlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesAlertPlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesAlertPlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesLogPlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesLogPlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.GetWorkspacePlainArgs
import com.pulumi.azure.monitoring.kotlin.inputs.GetWorkspacePlainArgsBuilder
import com.pulumi.azure.monitoring.kotlin.outputs.GetActionGroupResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetDataCollectionEndpointResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetDataCollectionRuleResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetDiagnosticCategoriesResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetLogProfileResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetScheduledQueryRulesAlertResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetScheduledQueryRulesLogResult
import com.pulumi.azure.monitoring.kotlin.outputs.GetWorkspaceResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.monitoring.kotlin.outputs.GetActionGroupResult.Companion.toKotlin as getActionGroupResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetDataCollectionEndpointResult.Companion.toKotlin as getDataCollectionEndpointResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetDataCollectionRuleResult.Companion.toKotlin as getDataCollectionRuleResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetDiagnosticCategoriesResult.Companion.toKotlin as getDiagnosticCategoriesResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetLogProfileResult.Companion.toKotlin as getLogProfileResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetScheduledQueryRulesAlertResult.Companion.toKotlin as getScheduledQueryRulesAlertResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetScheduledQueryRulesLogResult.Companion.toKotlin as getScheduledQueryRulesLogResultToKotlin
import com.pulumi.azure.monitoring.kotlin.outputs.GetWorkspaceResult.Companion.toKotlin as getWorkspaceResultToKotlin

public object MonitoringFunctions {
    /**
     * Use this data source to access the properties of an Action Group.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.monitoring.getActionGroup({
     *     resourceGroupName: "example-rg",
     *     name: "tfex-actiongroup",
     * });
     * export const actionGroupId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.monitoring.get_action_group(resource_group_name="example-rg",
     *     name="tfex-actiongroup")
     * pulumi.export("actionGroupId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Monitoring.GetActionGroup.Invoke(new()
     *     {
     *         ResourceGroupName = "example-rg",
     *         Name = "tfex-actiongroup",
     *     });
     *     return new Dictionary
     *     {
     *         ["actionGroupId"] = example.Apply(getActionGroupResult => getActionGroupResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := monitoring.LookupActionGroup(ctx, &monitoring.LookupActionGroupArgs{
     * 			ResourceGroupName: "example-rg",
     * 			Name:              "tfex-actiongroup",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("actionGroupId", 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.monitoring.MonitoringFunctions;
     * import com.pulumi.azure.monitoring.inputs.GetActionGroupArgs;
     * 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.getActionGroup(GetActionGroupArgs.builder()
     *             .resourceGroupName("example-rg")
     *             .name("tfex-actiongroup")
     *             .build());
     *         ctx.export("actionGroupId", example.applyValue(getActionGroupResult -> getActionGroupResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getActionGroup
     *       Arguments:
     *         resourceGroupName: example-rg
     *         name: tfex-actiongroup
     * outputs:
     *   actionGroupId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getActionGroup.
     * @return A collection of values returned by getActionGroup.
     */
    public suspend fun getActionGroup(argument: GetActionGroupPlainArgs): GetActionGroupResult =
        getActionGroupResultToKotlin(getActionGroupPlain(argument.toJava()).await())

    /**
     * @see [getActionGroup].
     * @param name Specifies the name of the Action Group.
     * @param resourceGroupName Specifies the name of the resource group the Action Group is located in.
     * @return A collection of values returned by getActionGroup.
     */
    public suspend fun getActionGroup(name: String, resourceGroupName: String): GetActionGroupResult {
        val argument = GetActionGroupPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getActionGroupResultToKotlin(getActionGroupPlain(argument.toJava()).await())
    }

    /**
     * @see [getActionGroup].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetActionGroupPlainArgs].
     * @return A collection of values returned by getActionGroup.
     */
    public suspend fun getActionGroup(argument: suspend GetActionGroupPlainArgsBuilder.() -> Unit): GetActionGroupResult {
        val builder = GetActionGroupPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getActionGroupResultToKotlin(getActionGroupPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing Data Collection Endpoint.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.monitoring.getDataCollectionEndpoint({
     *     name: "example-mdce",
     *     resourceGroupName: exampleAzurermResourceGroup.name,
     * });
     * export const endpointId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.monitoring.get_data_collection_endpoint(name="example-mdce",
     *     resource_group_name=example_azurerm_resource_group["name"])
     * pulumi.export("endpointId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Monitoring.GetDataCollectionEndpoint.Invoke(new()
     *     {
     *         Name = "example-mdce",
     *         ResourceGroupName = exampleAzurermResourceGroup.Name,
     *     });
     *     return new Dictionary
     *     {
     *         ["endpointId"] = example.Apply(getDataCollectionEndpointResult => getDataCollectionEndpointResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := monitoring.LookupDataCollectionEndpoint(ctx, &monitoring.LookupDataCollectionEndpointArgs{
     * 			Name:              "example-mdce",
     * 			ResourceGroupName: exampleAzurermResourceGroup.Name,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("endpointId", 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.monitoring.MonitoringFunctions;
     * import com.pulumi.azure.monitoring.inputs.GetDataCollectionEndpointArgs;
     * 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.getDataCollectionEndpoint(GetDataCollectionEndpointArgs.builder()
     *             .name("example-mdce")
     *             .resourceGroupName(exampleAzurermResourceGroup.name())
     *             .build());
     *         ctx.export("endpointId", example.applyValue(getDataCollectionEndpointResult -> getDataCollectionEndpointResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getDataCollectionEndpoint
     *       Arguments:
     *         name: example-mdce
     *         resourceGroupName: ${exampleAzurermResourceGroup.name}
     * outputs:
     *   endpointId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getDataCollectionEndpoint.
     * @return A collection of values returned by getDataCollectionEndpoint.
     */
    public suspend fun getDataCollectionEndpoint(argument: GetDataCollectionEndpointPlainArgs): GetDataCollectionEndpointResult =
        getDataCollectionEndpointResultToKotlin(getDataCollectionEndpointPlain(argument.toJava()).await())

    /**
     * @see [getDataCollectionEndpoint].
     * @param name Specifies the name of the Data Collection Endpoint.
     * @param resourceGroupName Specifies the name of the resource group the Data Collection Endpoint is located in.
     * @return A collection of values returned by getDataCollectionEndpoint.
     */
    public suspend fun getDataCollectionEndpoint(name: String, resourceGroupName: String): GetDataCollectionEndpointResult {
        val argument = GetDataCollectionEndpointPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getDataCollectionEndpointResultToKotlin(getDataCollectionEndpointPlain(argument.toJava()).await())
    }

    /**
     * @see [getDataCollectionEndpoint].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionEndpointPlainArgs].
     * @return A collection of values returned by getDataCollectionEndpoint.
     */
    public suspend fun getDataCollectionEndpoint(argument: suspend GetDataCollectionEndpointPlainArgsBuilder.() -> Unit): GetDataCollectionEndpointResult {
        val builder = GetDataCollectionEndpointPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDataCollectionEndpointResultToKotlin(getDataCollectionEndpointPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing Data Collection Rule.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.monitoring.getDataCollectionRule({
     *     name: "example-rule",
     *     resourceGroupName: exampleAzurermResourceGroup.name,
     * });
     * export const ruleId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.monitoring.get_data_collection_rule(name="example-rule",
     *     resource_group_name=example_azurerm_resource_group["name"])
     * pulumi.export("ruleId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Monitoring.GetDataCollectionRule.Invoke(new()
     *     {
     *         Name = "example-rule",
     *         ResourceGroupName = exampleAzurermResourceGroup.Name,
     *     });
     *     return new Dictionary
     *     {
     *         ["ruleId"] = example.Apply(getDataCollectionRuleResult => getDataCollectionRuleResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := monitoring.LookupDataCollectionRule(ctx, &monitoring.LookupDataCollectionRuleArgs{
     * 			Name:              "example-rule",
     * 			ResourceGroupName: exampleAzurermResourceGroup.Name,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("ruleId", 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.monitoring.MonitoringFunctions;
     * import com.pulumi.azure.monitoring.inputs.GetDataCollectionRuleArgs;
     * 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.getDataCollectionRule(GetDataCollectionRuleArgs.builder()
     *             .name("example-rule")
     *             .resourceGroupName(exampleAzurermResourceGroup.name())
     *             .build());
     *         ctx.export("ruleId", example.applyValue(getDataCollectionRuleResult -> getDataCollectionRuleResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getDataCollectionRule
     *       Arguments:
     *         name: example-rule
     *         resourceGroupName: ${exampleAzurermResourceGroup.name}
     * outputs:
     *   ruleId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getDataCollectionRule.
     * @return A collection of values returned by getDataCollectionRule.
     */
    public suspend fun getDataCollectionRule(argument: GetDataCollectionRulePlainArgs): GetDataCollectionRuleResult =
        getDataCollectionRuleResultToKotlin(getDataCollectionRulePlain(argument.toJava()).await())

    /**
     * @see [getDataCollectionRule].
     * @param name Specifies the name of the Data Collection Rule.
     * @param resourceGroupName Specifies the name of the resource group the Data Collection Rule is located in.
     * @return A collection of values returned by getDataCollectionRule.
     */
    public suspend fun getDataCollectionRule(name: String, resourceGroupName: String): GetDataCollectionRuleResult {
        val argument = GetDataCollectionRulePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getDataCollectionRuleResultToKotlin(getDataCollectionRulePlain(argument.toJava()).await())
    }

    /**
     * @see [getDataCollectionRule].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetDataCollectionRulePlainArgs].
     * @return A collection of values returned by getDataCollectionRule.
     */
    public suspend fun getDataCollectionRule(argument: suspend GetDataCollectionRulePlainArgsBuilder.() -> Unit): GetDataCollectionRuleResult {
        val builder = GetDataCollectionRulePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDataCollectionRuleResultToKotlin(getDataCollectionRulePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about the Monitor Diagnostics Categories supported by an existing Resource.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.keyvault.getKeyVault({
     *     name: exampleAzurermKeyVault.name,
     *     resourceGroupName: exampleAzurermKeyVault.resourceGroupName,
     * });
     * const exampleGetDiagnosticCategories = example.then(example => azure.monitoring.getDiagnosticCategories({
     *     resourceId: example.id,
     * }));
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.keyvault.get_key_vault(name=example_azurerm_key_vault["name"],
     *     resource_group_name=example_azurerm_key_vault["resourceGroupName"])
     * example_get_diagnostic_categories = azure.monitoring.get_diagnostic_categories(resource_id=example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.KeyVault.GetKeyVault.Invoke(new()
     *     {
     *         Name = exampleAzurermKeyVault.Name,
     *         ResourceGroupName = exampleAzurermKeyVault.ResourceGroupName,
     *     });
     *     var exampleGetDiagnosticCategories = Azure.Monitoring.GetDiagnosticCategories.Invoke(new()
     *     {
     *         ResourceId = example.Apply(getKeyVaultResult => getKeyVaultResult.Id),
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{
     * 			Name:              exampleAzurermKeyVault.Name,
     * 			ResourceGroupName: exampleAzurermKeyVault.ResourceGroupName,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		_, err = monitoring.GetDiagnosticCategories(ctx, &monitoring.GetDiagnosticCategoriesArgs{
     * 			ResourceId: example.Id,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.keyvault.KeyvaultFunctions;
     * import com.pulumi.azure.keyvault.inputs.GetKeyVaultArgs;
     * import com.pulumi.azure.monitoring.MonitoringFunctions;
     * import com.pulumi.azure.monitoring.inputs.GetDiagnosticCategoriesArgs;
     * 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 = KeyvaultFunctions.getKeyVault(GetKeyVaultArgs.builder()
     *             .name(exampleAzurermKeyVault.name())
     *             .resourceGroupName(exampleAzurermKeyVault.resourceGroupName())
     *             .build());
     *         final var exampleGetDiagnosticCategories = MonitoringFunctions.getDiagnosticCategories(GetDiagnosticCategoriesArgs.builder()
     *             .resourceId(example.applyValue(getKeyVaultResult -> getKeyVaultResult.id()))
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:keyvault:getKeyVault
     *       Arguments:
     *         name: ${exampleAzurermKeyVault.name}
     *         resourceGroupName: ${exampleAzurermKeyVault.resourceGroupName}
     *   exampleGetDiagnosticCategories:
     *     fn::invoke:
     *       Function: azure:monitoring:getDiagnosticCategories
     *       Arguments:
     *         resourceId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getDiagnosticCategories.
     * @return A collection of values returned by getDiagnosticCategories.
     */
    public suspend fun getDiagnosticCategories(argument: GetDiagnosticCategoriesPlainArgs): GetDiagnosticCategoriesResult =
        getDiagnosticCategoriesResultToKotlin(getDiagnosticCategoriesPlain(argument.toJava()).await())

    /**
     * @see [getDiagnosticCategories].
     * @param resourceId The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for.
     * @return A collection of values returned by getDiagnosticCategories.
     */
    public suspend fun getDiagnosticCategories(resourceId: String): GetDiagnosticCategoriesResult {
        val argument = GetDiagnosticCategoriesPlainArgs(
            resourceId = resourceId,
        )
        return getDiagnosticCategoriesResultToKotlin(getDiagnosticCategoriesPlain(argument.toJava()).await())
    }

    /**
     * @see [getDiagnosticCategories].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetDiagnosticCategoriesPlainArgs].
     * @return A collection of values returned by getDiagnosticCategories.
     */
    public suspend fun getDiagnosticCategories(argument: suspend GetDiagnosticCategoriesPlainArgsBuilder.() -> Unit): GetDiagnosticCategoriesResult {
        val builder = GetDiagnosticCategoriesPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDiagnosticCategoriesResultToKotlin(getDiagnosticCategoriesPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access the properties of a Log Profile.
     * !> **NOTE:** Azure Log Profiles will be retired on 30th September 2026 and will be removed in v4.0 of the AzureRM Provider. More information on the deprecation can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods).
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.monitoring.getLogProfile({
     *     name: "test-logprofile",
     * });
     * export const logProfileStorageAccountId = example.then(example => example.storageAccountId);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.monitoring.get_log_profile(name="test-logprofile")
     * pulumi.export("logProfileStorageAccountId", example.storage_account_id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Monitoring.GetLogProfile.Invoke(new()
     *     {
     *         Name = "test-logprofile",
     *     });
     *     return new Dictionary
     *     {
     *         ["logProfileStorageAccountId"] = example.Apply(getLogProfileResult => getLogProfileResult.StorageAccountId),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := monitoring.LookupLogProfile(ctx, &monitoring.LookupLogProfileArgs{
     * 			Name: "test-logprofile",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("logProfileStorageAccountId", example.StorageAccountId)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * 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.GetLogProfileArgs;
     * 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.getLogProfile(GetLogProfileArgs.builder()
     *             .name("test-logprofile")
     *             .build());
     *         ctx.export("logProfileStorageAccountId", example.applyValue(getLogProfileResult -> getLogProfileResult.storageAccountId()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getLogProfile
     *       Arguments:
     *         name: test-logprofile
     * outputs:
     *   logProfileStorageAccountId: ${example.storageAccountId}
     * ```
     * 
     * @param argument A collection of arguments for invoking getLogProfile.
     * @return A collection of values returned by getLogProfile.
     */
    public suspend fun getLogProfile(argument: GetLogProfilePlainArgs): GetLogProfileResult =
        getLogProfileResultToKotlin(getLogProfilePlain(argument.toJava()).await())

    /**
     * @see [getLogProfile].
     * @param name Specifies the Name of the Log Profile.
     * @return A collection of values returned by getLogProfile.
     */
    public suspend fun getLogProfile(name: String): GetLogProfileResult {
        val argument = GetLogProfilePlainArgs(
            name = name,
        )
        return getLogProfileResultToKotlin(getLogProfilePlain(argument.toJava()).await())
    }

    /**
     * @see [getLogProfile].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetLogProfilePlainArgs].
     * @return A collection of values returned by getLogProfile.
     */
    public suspend fun getLogProfile(argument: suspend GetLogProfilePlainArgsBuilder.() -> Unit): GetLogProfileResult {
        val builder = GetLogProfilePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getLogProfileResultToKotlin(getLogProfilePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access the properties of an AlertingAction scheduled query rule.
     * ## Example Usage
     * 
     * ```typescript
     * 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);
     * ```
     * ```python
     * 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)
     * ```
     * ```csharp
     * 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
     *     {
     *         ["queryRuleId"] = example.Apply(getScheduledQueryRulesAlertResult => getScheduledQueryRulesAlertResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/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
     * 	})
     * }
     * ```
     * ```java
     * 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.applyValue(getScheduledQueryRulesAlertResult -> getScheduledQueryRulesAlertResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getScheduledQueryRulesAlert
     *       Arguments:
     *         resourceGroupName: example-rg
     *         name: tfex-queryrule
     * outputs:
     *   queryRuleId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getScheduledQueryRulesAlert.
     * @return A collection of values returned by getScheduledQueryRulesAlert.
     */
    public suspend fun getScheduledQueryRulesAlert(argument: GetScheduledQueryRulesAlertPlainArgs): GetScheduledQueryRulesAlertResult =
        getScheduledQueryRulesAlertResultToKotlin(getScheduledQueryRulesAlertPlain(argument.toJava()).await())

    /**
     * @see [getScheduledQueryRulesAlert].
     * @param name Specifies the name of the scheduled query rule.
     * @param resourceGroupName Specifies the name of the resource group where the scheduled query rule is located.
     * @return A collection of values returned by getScheduledQueryRulesAlert.
     */
    public suspend fun getScheduledQueryRulesAlert(name: String, resourceGroupName: String): GetScheduledQueryRulesAlertResult {
        val argument = GetScheduledQueryRulesAlertPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getScheduledQueryRulesAlertResultToKotlin(getScheduledQueryRulesAlertPlain(argument.toJava()).await())
    }

    /**
     * @see [getScheduledQueryRulesAlert].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesAlertPlainArgs].
     * @return A collection of values returned by getScheduledQueryRulesAlert.
     */
    public suspend fun getScheduledQueryRulesAlert(argument: suspend GetScheduledQueryRulesAlertPlainArgsBuilder.() -> Unit): GetScheduledQueryRulesAlertResult {
        val builder = GetScheduledQueryRulesAlertPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getScheduledQueryRulesAlertResultToKotlin(getScheduledQueryRulesAlertPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access the properties of a LogToMetricAction scheduled query rule.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.monitoring.getScheduledQueryRulesLog({
     *     resourceGroupName: "example-rg",
     *     name: "tfex-queryrule",
     * });
     * export const queryRuleId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.monitoring.get_scheduled_query_rules_log(resource_group_name="example-rg",
     *     name="tfex-queryrule")
     * pulumi.export("queryRuleId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Monitoring.GetScheduledQueryRulesLog.Invoke(new()
     *     {
     *         ResourceGroupName = "example-rg",
     *         Name = "tfex-queryrule",
     *     });
     *     return new Dictionary
     *     {
     *         ["queryRuleId"] = example.Apply(getScheduledQueryRulesLogResult => getScheduledQueryRulesLogResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := monitoring.LookupScheduledQueryRulesLog(ctx, &monitoring.LookupScheduledQueryRulesLogArgs{
     * 			ResourceGroupName: "example-rg",
     * 			Name:              "tfex-queryrule",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("queryRuleId", 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.monitoring.MonitoringFunctions;
     * import com.pulumi.azure.monitoring.inputs.GetScheduledQueryRulesLogArgs;
     * 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.getScheduledQueryRulesLog(GetScheduledQueryRulesLogArgs.builder()
     *             .resourceGroupName("example-rg")
     *             .name("tfex-queryrule")
     *             .build());
     *         ctx.export("queryRuleId", example.applyValue(getScheduledQueryRulesLogResult -> getScheduledQueryRulesLogResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getScheduledQueryRulesLog
     *       Arguments:
     *         resourceGroupName: example-rg
     *         name: tfex-queryrule
     * outputs:
     *   queryRuleId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getScheduledQueryRulesLog.
     * @return A collection of values returned by getScheduledQueryRulesLog.
     */
    public suspend fun getScheduledQueryRulesLog(argument: GetScheduledQueryRulesLogPlainArgs): GetScheduledQueryRulesLogResult =
        getScheduledQueryRulesLogResultToKotlin(getScheduledQueryRulesLogPlain(argument.toJava()).await())

    /**
     * @see [getScheduledQueryRulesLog].
     * @param name Specifies the name of the scheduled query rule.
     * @param resourceGroupName Specifies the name of the resource group where the scheduled query rule is located.
     * @return A collection of values returned by getScheduledQueryRulesLog.
     */
    public suspend fun getScheduledQueryRulesLog(name: String, resourceGroupName: String): GetScheduledQueryRulesLogResult {
        val argument = GetScheduledQueryRulesLogPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getScheduledQueryRulesLogResultToKotlin(getScheduledQueryRulesLogPlain(argument.toJava()).await())
    }

    /**
     * @see [getScheduledQueryRulesLog].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetScheduledQueryRulesLogPlainArgs].
     * @return A collection of values returned by getScheduledQueryRulesLog.
     */
    public suspend fun getScheduledQueryRulesLog(argument: suspend GetScheduledQueryRulesLogPlainArgsBuilder.() -> Unit): GetScheduledQueryRulesLogResult {
        val builder = GetScheduledQueryRulesLogPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getScheduledQueryRulesLogResultToKotlin(getScheduledQueryRulesLogPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing Workspace.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.monitoring.getWorkspace({
     *     name: "example-workspace",
     *     resourceGroupName: exampleAzurermResourceGroup.name,
     * });
     * export const queryEndpoint = example.then(example => example.queryEndpoint);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.monitoring.get_workspace(name="example-workspace",
     *     resource_group_name=example_azurerm_resource_group["name"])
     * pulumi.export("queryEndpoint", example.query_endpoint)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Monitoring.GetWorkspace.Invoke(new()
     *     {
     *         Name = "example-workspace",
     *         ResourceGroupName = exampleAzurermResourceGroup.Name,
     *     });
     *     return new Dictionary
     *     {
     *         ["queryEndpoint"] = example.Apply(getWorkspaceResult => getWorkspaceResult.QueryEndpoint),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := monitoring.LookupWorkspace(ctx, &monitoring.LookupWorkspaceArgs{
     * 			Name:              "example-workspace",
     * 			ResourceGroupName: exampleAzurermResourceGroup.Name,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("queryEndpoint", example.QueryEndpoint)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * 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.GetWorkspaceArgs;
     * 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.getWorkspace(GetWorkspaceArgs.builder()
     *             .name("example-workspace")
     *             .resourceGroupName(exampleAzurermResourceGroup.name())
     *             .build());
     *         ctx.export("queryEndpoint", example.applyValue(getWorkspaceResult -> getWorkspaceResult.queryEndpoint()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:monitoring:getWorkspace
     *       Arguments:
     *         name: example-workspace
     *         resourceGroupName: ${exampleAzurermResourceGroup.name}
     * outputs:
     *   queryEndpoint: ${example.queryEndpoint}
     * ```
     * 
     * @param argument A collection of arguments for invoking getWorkspace.
     * @return A collection of values returned by getWorkspace.
     */
    public suspend fun getWorkspace(argument: GetWorkspacePlainArgs): GetWorkspaceResult =
        getWorkspaceResultToKotlin(getWorkspacePlain(argument.toJava()).await())

    /**
     * @see [getWorkspace].
     * @param name Specifies the name of the Workspace.
     * @param resourceGroupName Specifies the name of the resource group the Workspace is located in.
     * @return A collection of values returned by getWorkspace.
     */
    public suspend fun getWorkspace(name: String, resourceGroupName: String): GetWorkspaceResult {
        val argument = GetWorkspacePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getWorkspaceResultToKotlin(getWorkspacePlain(argument.toJava()).await())
    }

    /**
     * @see [getWorkspace].
     * @param argument Builder for [com.pulumi.azure.monitoring.kotlin.inputs.GetWorkspacePlainArgs].
     * @return A collection of values returned by getWorkspace.
     */
    public suspend fun getWorkspace(argument: suspend GetWorkspacePlainArgsBuilder.() -> Unit): GetWorkspaceResult {
        val builder = GetWorkspacePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getWorkspaceResultToKotlin(getWorkspacePlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy