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

com.pulumi.azure.eventhub.kotlin.EventhubFunctions.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.eventhub.kotlin

import com.pulumi.azure.eventhub.EventhubFunctions.getAuthorizationRulePlain
import com.pulumi.azure.eventhub.EventhubFunctions.getClusterPlain
import com.pulumi.azure.eventhub.EventhubFunctions.getConsumeGroupPlain
import com.pulumi.azure.eventhub.EventhubFunctions.getEventHubPlain
import com.pulumi.azure.eventhub.EventhubFunctions.getEventhubNamespacePlain
import com.pulumi.azure.eventhub.EventhubFunctions.getNamespaceAuthorizationRulePlain
import com.pulumi.azure.eventhub.EventhubFunctions.getNamespacePlain
import com.pulumi.azure.eventhub.EventhubFunctions.getSasPlain
import com.pulumi.azure.eventhub.EventhubFunctions.getServiceBusNamespacePlain
import com.pulumi.azure.eventhub.kotlin.inputs.GetAuthorizationRulePlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetAuthorizationRulePlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetClusterPlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetClusterPlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetConsumeGroupPlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetConsumeGroupPlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetEventHubPlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetEventHubPlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetEventhubNamespacePlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetEventhubNamespacePlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetNamespaceAuthorizationRulePlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetNamespaceAuthorizationRulePlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetNamespacePlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetNamespacePlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetSasPlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetSasPlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.inputs.GetServiceBusNamespacePlainArgs
import com.pulumi.azure.eventhub.kotlin.inputs.GetServiceBusNamespacePlainArgsBuilder
import com.pulumi.azure.eventhub.kotlin.outputs.GetAuthorizationRuleResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetClusterResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetConsumeGroupResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetEventHubResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetEventhubNamespaceResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetNamespaceAuthorizationRuleResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetNamespaceResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetSasResult
import com.pulumi.azure.eventhub.kotlin.outputs.GetServiceBusNamespaceResult
import kotlinx.coroutines.future.await
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.eventhub.kotlin.outputs.GetAuthorizationRuleResult.Companion.toKotlin as getAuthorizationRuleResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetClusterResult.Companion.toKotlin as getClusterResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetConsumeGroupResult.Companion.toKotlin as getConsumeGroupResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetEventHubResult.Companion.toKotlin as getEventHubResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetEventhubNamespaceResult.Companion.toKotlin as getEventhubNamespaceResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetNamespaceAuthorizationRuleResult.Companion.toKotlin as getNamespaceAuthorizationRuleResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetNamespaceResult.Companion.toKotlin as getNamespaceResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetSasResult.Companion.toKotlin as getSasResultToKotlin
import com.pulumi.azure.eventhub.kotlin.outputs.GetServiceBusNamespaceResult.Companion.toKotlin as getServiceBusNamespaceResultToKotlin

public object EventhubFunctions {
    /**
     * Use this data source to access information about an existing Event Hubs Authorization Rule within an Event Hub.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const test = azure.eventhub.getAuthorizationRule({
     *     name: "test",
     *     namespaceName: testAzurermEventhubNamespace.name,
     *     eventhubName: testAzurermEventhub.name,
     *     resourceGroupName: testAzurermResourceGroup.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * test = azure.eventhub.get_authorization_rule(name="test",
     *     namespace_name=test_azurerm_eventhub_namespace["name"],
     *     eventhub_name=test_azurerm_eventhub["name"],
     *     resource_group_name=test_azurerm_resource_group["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var test = Azure.EventHub.GetAuthorizationRule.Invoke(new()
     *     {
     *         Name = "test",
     *         NamespaceName = testAzurermEventhubNamespace.Name,
     *         EventhubName = testAzurermEventhub.Name,
     *         ResourceGroupName = testAzurermResourceGroup.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := eventhub.LookupAuthorizationRule(ctx, &eventhub.LookupAuthorizationRuleArgs{
     * 			Name:              "test",
     * 			NamespaceName:     testAzurermEventhubNamespace.Name,
     * 			EventhubName:      testAzurermEventhub.Name,
     * 			ResourceGroupName: testAzurermResourceGroup.Name,
     * 		}, 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetAuthorizationRuleArgs;
     * 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 test = EventhubFunctions.getAuthorizationRule(GetAuthorizationRuleArgs.builder()
     *             .name("test")
     *             .namespaceName(testAzurermEventhubNamespace.name())
     *             .eventhubName(testAzurermEventhub.name())
     *             .resourceGroupName(testAzurermResourceGroup.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   test:
     *     fn::invoke:
     *       Function: azure:eventhub:getAuthorizationRule
     *       Arguments:
     *         name: test
     *         namespaceName: ${testAzurermEventhubNamespace.name}
     *         eventhubName: ${testAzurermEventhub.name}
     *         resourceGroupName: ${testAzurermResourceGroup.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getAuthorizationRule.
     * @return A collection of values returned by getAuthorizationRule.
     */
    public suspend fun getAuthorizationRule(argument: GetAuthorizationRulePlainArgs): GetAuthorizationRuleResult =
        getAuthorizationRuleResultToKotlin(getAuthorizationRulePlain(argument.toJava()).await())

    /**
     * @see [getAuthorizationRule].
     * @param eventhubName Specifies the name of the EventHub.
     * @param listen
     * @param manage
     * @param name Specifies the name of the EventHub Authorization Rule resource. be created.
     * @param namespaceName Specifies the name of the grandparent EventHub Namespace.
     * @param resourceGroupName The name of the resource group in which the EventHub Authorization Rule's grandparent Namespace exists.
     * @param send
     * @return A collection of values returned by getAuthorizationRule.
     */
    public suspend fun getAuthorizationRule(
        eventhubName: String,
        listen: Boolean? = null,
        manage: Boolean? = null,
        name: String,
        namespaceName: String,
        resourceGroupName: String,
        send: Boolean? = null,
    ): GetAuthorizationRuleResult {
        val argument = GetAuthorizationRulePlainArgs(
            eventhubName = eventhubName,
            listen = listen,
            manage = manage,
            name = name,
            namespaceName = namespaceName,
            resourceGroupName = resourceGroupName,
            send = send,
        )
        return getAuthorizationRuleResultToKotlin(getAuthorizationRulePlain(argument.toJava()).await())
    }

    /**
     * @see [getAuthorizationRule].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetAuthorizationRulePlainArgs].
     * @return A collection of values returned by getAuthorizationRule.
     */
    public suspend fun getAuthorizationRule(argument: suspend GetAuthorizationRulePlainArgsBuilder.() -> Unit): GetAuthorizationRuleResult {
        val builder = GetAuthorizationRulePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAuthorizationRuleResultToKotlin(getAuthorizationRulePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing EventHub.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.eventhub.getCluster({
     *     name: "search-eventhub",
     *     resourceGroupName: "search-service",
     * });
     * export const eventhubId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.eventhub.get_cluster(name="search-eventhub",
     *     resource_group_name="search-service")
     * pulumi.export("eventhubId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.EventHub.GetCluster.Invoke(new()
     *     {
     *         Name = "search-eventhub",
     *         ResourceGroupName = "search-service",
     *     });
     *     return new Dictionary
     *     {
     *         ["eventhubId"] = example.Apply(getClusterResult => getClusterResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := eventhub.LookupCluster(ctx, &eventhub.LookupClusterArgs{
     * 			Name:              "search-eventhub",
     * 			ResourceGroupName: "search-service",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("eventhubId", 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetClusterArgs;
     * 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 = EventhubFunctions.getCluster(GetClusterArgs.builder()
     *             .name("search-eventhub")
     *             .resourceGroupName("search-service")
     *             .build());
     *         ctx.export("eventhubId", example.applyValue(getClusterResult -> getClusterResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:eventhub:getCluster
     *       Arguments:
     *         name: search-eventhub
     *         resourceGroupName: search-service
     * outputs:
     *   eventhubId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getCluster.
     * @return A collection of values returned by getCluster.
     */
    public suspend fun getCluster(argument: GetClusterPlainArgs): GetClusterResult =
        getClusterResultToKotlin(getClusterPlain(argument.toJava()).await())

    /**
     * @see [getCluster].
     * @param name The name of this EventHub Cluster.
     * @param resourceGroupName The name of the Resource Group where the EventHub Cluster exists.
     * @return A collection of values returned by getCluster.
     */
    public suspend fun getCluster(name: String, resourceGroupName: String): GetClusterResult {
        val argument = GetClusterPlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getClusterResultToKotlin(getClusterPlain(argument.toJava()).await())
    }

    /**
     * @see [getCluster].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetClusterPlainArgs].
     * @return A collection of values returned by getCluster.
     */
    public suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult {
        val builder = GetClusterPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getClusterResultToKotlin(getClusterPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing Event Hubs Consumer Group within an Event Hub.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const test = azure.eventhub.getConsumeGroup({
     *     name: testAzurermEventhubConsumerGroup.name,
     *     namespaceName: testAzurermEventhubNamespace.name,
     *     eventhubName: testAzurermEventhub.name,
     *     resourceGroupName: testAzurermResourceGroup.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * test = azure.eventhub.get_consume_group(name=test_azurerm_eventhub_consumer_group["name"],
     *     namespace_name=test_azurerm_eventhub_namespace["name"],
     *     eventhub_name=test_azurerm_eventhub["name"],
     *     resource_group_name=test_azurerm_resource_group["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var test = Azure.EventHub.GetConsumeGroup.Invoke(new()
     *     {
     *         Name = testAzurermEventhubConsumerGroup.Name,
     *         NamespaceName = testAzurermEventhubNamespace.Name,
     *         EventhubName = testAzurermEventhub.Name,
     *         ResourceGroupName = testAzurermResourceGroup.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := eventhub.GetConsumeGroup(ctx, &eventhub.GetConsumeGroupArgs{
     * 			Name:              testAzurermEventhubConsumerGroup.Name,
     * 			NamespaceName:     testAzurermEventhubNamespace.Name,
     * 			EventhubName:      testAzurermEventhub.Name,
     * 			ResourceGroupName: testAzurermResourceGroup.Name,
     * 		}, 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetConsumeGroupArgs;
     * 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 test = EventhubFunctions.getConsumeGroup(GetConsumeGroupArgs.builder()
     *             .name(testAzurermEventhubConsumerGroup.name())
     *             .namespaceName(testAzurermEventhubNamespace.name())
     *             .eventhubName(testAzurermEventhub.name())
     *             .resourceGroupName(testAzurermResourceGroup.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   test:
     *     fn::invoke:
     *       Function: azure:eventhub:getConsumeGroup
     *       Arguments:
     *         name: ${testAzurermEventhubConsumerGroup.name}
     *         namespaceName: ${testAzurermEventhubNamespace.name}
     *         eventhubName: ${testAzurermEventhub.name}
     *         resourceGroupName: ${testAzurermResourceGroup.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getConsumeGroup.
     * @return A collection of values returned by getConsumeGroup.
     */
    public suspend fun getConsumeGroup(argument: GetConsumeGroupPlainArgs): GetConsumeGroupResult =
        getConsumeGroupResultToKotlin(getConsumeGroupPlain(argument.toJava()).await())

    /**
     * @see [getConsumeGroup].
     * @param eventhubName Specifies the name of the EventHub.
     * @param name Specifies the name of the EventHub Consumer Group resource.
     * @param namespaceName Specifies the name of the grandparent EventHub Namespace.
     * @param resourceGroupName The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
     * @return A collection of values returned by getConsumeGroup.
     */
    public suspend fun getConsumeGroup(
        eventhubName: String,
        name: String,
        namespaceName: String,
        resourceGroupName: String,
    ): GetConsumeGroupResult {
        val argument = GetConsumeGroupPlainArgs(
            eventhubName = eventhubName,
            name = name,
            namespaceName = namespaceName,
            resourceGroupName = resourceGroupName,
        )
        return getConsumeGroupResultToKotlin(getConsumeGroupPlain(argument.toJava()).await())
    }

    /**
     * @see [getConsumeGroup].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetConsumeGroupPlainArgs].
     * @return A collection of values returned by getConsumeGroup.
     */
    public suspend fun getConsumeGroup(argument: suspend GetConsumeGroupPlainArgsBuilder.() -> Unit): GetConsumeGroupResult {
        val builder = GetConsumeGroupPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getConsumeGroupResultToKotlin(getConsumeGroupPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing EventHub.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.eventhub.getEventHub({
     *     name: "search-eventhub",
     *     resourceGroupName: "search-service",
     *     namespaceName: "search-eventhubns",
     * });
     * export const eventhubId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.eventhub.get_event_hub(name="search-eventhub",
     *     resource_group_name="search-service",
     *     namespace_name="search-eventhubns")
     * pulumi.export("eventhubId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.EventHub.GetEventHub.Invoke(new()
     *     {
     *         Name = "search-eventhub",
     *         ResourceGroupName = "search-service",
     *         NamespaceName = "search-eventhubns",
     *     });
     *     return new Dictionary
     *     {
     *         ["eventhubId"] = example.Apply(getEventHubResult => getEventHubResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := eventhub.LookupEventHub(ctx, &eventhub.LookupEventHubArgs{
     * 			Name:              "search-eventhub",
     * 			ResourceGroupName: "search-service",
     * 			NamespaceName:     "search-eventhubns",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("eventhubId", 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetEventHubArgs;
     * 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 = EventhubFunctions.getEventHub(GetEventHubArgs.builder()
     *             .name("search-eventhub")
     *             .resourceGroupName("search-service")
     *             .namespaceName("search-eventhubns")
     *             .build());
     *         ctx.export("eventhubId", example.applyValue(getEventHubResult -> getEventHubResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:eventhub:getEventHub
     *       Arguments:
     *         name: search-eventhub
     *         resourceGroupName: search-service
     *         namespaceName: search-eventhubns
     * outputs:
     *   eventhubId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getEventHub.
     * @return A collection of values returned by getEventHub.
     */
    public suspend fun getEventHub(argument: GetEventHubPlainArgs): GetEventHubResult =
        getEventHubResultToKotlin(getEventHubPlain(argument.toJava()).await())

    /**
     * @see [getEventHub].
     * @param name The name of this EventHub.
     * @param namespaceName The name of the EventHub Namespace where the EventHub exists.
     * @param resourceGroupName The name of the Resource Group where the EventHub exists.
     * @return A collection of values returned by getEventHub.
     */
    public suspend fun getEventHub(
        name: String,
        namespaceName: String,
        resourceGroupName: String,
    ): GetEventHubResult {
        val argument = GetEventHubPlainArgs(
            name = name,
            namespaceName = namespaceName,
            resourceGroupName = resourceGroupName,
        )
        return getEventHubResultToKotlin(getEventHubPlain(argument.toJava()).await())
    }

    /**
     * @see [getEventHub].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetEventHubPlainArgs].
     * @return A collection of values returned by getEventHub.
     */
    public suspend fun getEventHub(argument: suspend GetEventHubPlainArgsBuilder.() -> Unit): GetEventHubResult {
        val builder = GetEventHubPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getEventHubResultToKotlin(getEventHubPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing EventHub Namespace.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.eventhub.getNamespace({
     *     name: "search-eventhubns",
     *     resourceGroupName: "search-service",
     * });
     * export const eventhubNamespaceId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.eventhub.get_namespace(name="search-eventhubns",
     *     resource_group_name="search-service")
     * pulumi.export("eventhubNamespaceId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.EventHub.GetNamespace.Invoke(new()
     *     {
     *         Name = "search-eventhubns",
     *         ResourceGroupName = "search-service",
     *     });
     *     return new Dictionary
     *     {
     *         ["eventhubNamespaceId"] = example.Apply(getNamespaceResult => getNamespaceResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := eventhub.LookupNamespace(ctx, &eventhub.LookupNamespaceArgs{
     * 			Name:              "search-eventhubns",
     * 			ResourceGroupName: "search-service",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("eventhubNamespaceId", 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetNamespaceArgs;
     * 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 = EventhubFunctions.getNamespace(GetNamespaceArgs.builder()
     *             .name("search-eventhubns")
     *             .resourceGroupName("search-service")
     *             .build());
     *         ctx.export("eventhubNamespaceId", example.applyValue(getNamespaceResult -> getNamespaceResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:eventhub:getNamespace
     *       Arguments:
     *         name: search-eventhubns
     *         resourceGroupName: search-service
     * outputs:
     *   eventhubNamespaceId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getEventhubNamespace.
     * @return A collection of values returned by getEventhubNamespace.
     */
    @Deprecated(
        message = """
  azure.eventhub.getEventhubNamespace has been deprecated in favor of azure.eventhub.getNamespace
  """,
    )
    public suspend fun getEventhubNamespace(argument: GetEventhubNamespacePlainArgs): GetEventhubNamespaceResult =
        getEventhubNamespaceResultToKotlin(getEventhubNamespacePlain(argument.toJava()).await())

    /**
     * @see [getEventhubNamespace].
     * @param name The name of the EventHub Namespace.
     * @param resourceGroupName The Name of the Resource Group where the EventHub Namespace exists.
     * @return A collection of values returned by getEventhubNamespace.
     */
    @Deprecated(
        message = """
  azure.eventhub.getEventhubNamespace has been deprecated in favor of azure.eventhub.getNamespace
  """,
    )
    public suspend fun getEventhubNamespace(name: String, resourceGroupName: String): GetEventhubNamespaceResult {
        val argument = GetEventhubNamespacePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getEventhubNamespaceResultToKotlin(getEventhubNamespacePlain(argument.toJava()).await())
    }

    /**
     * @see [getEventhubNamespace].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetEventhubNamespacePlainArgs].
     * @return A collection of values returned by getEventhubNamespace.
     */
    @Deprecated(
        message = """
  azure.eventhub.getEventhubNamespace has been deprecated in favor of azure.eventhub.getNamespace
  """,
    )
    public suspend fun getEventhubNamespace(argument: suspend GetEventhubNamespacePlainArgsBuilder.() -> Unit): GetEventhubNamespaceResult {
        val builder = GetEventhubNamespacePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getEventhubNamespaceResultToKotlin(getEventhubNamespacePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing EventHub Namespace.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.eventhub.getNamespace({
     *     name: "search-eventhubns",
     *     resourceGroupName: "search-service",
     * });
     * export const eventhubNamespaceId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.eventhub.get_namespace(name="search-eventhubns",
     *     resource_group_name="search-service")
     * pulumi.export("eventhubNamespaceId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.EventHub.GetNamespace.Invoke(new()
     *     {
     *         Name = "search-eventhubns",
     *         ResourceGroupName = "search-service",
     *     });
     *     return new Dictionary
     *     {
     *         ["eventhubNamespaceId"] = example.Apply(getNamespaceResult => getNamespaceResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := eventhub.LookupNamespace(ctx, &eventhub.LookupNamespaceArgs{
     * 			Name:              "search-eventhubns",
     * 			ResourceGroupName: "search-service",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("eventhubNamespaceId", 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetNamespaceArgs;
     * 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 = EventhubFunctions.getNamespace(GetNamespaceArgs.builder()
     *             .name("search-eventhubns")
     *             .resourceGroupName("search-service")
     *             .build());
     *         ctx.export("eventhubNamespaceId", example.applyValue(getNamespaceResult -> getNamespaceResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:eventhub:getNamespace
     *       Arguments:
     *         name: search-eventhubns
     *         resourceGroupName: search-service
     * outputs:
     *   eventhubNamespaceId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getNamespace.
     * @return A collection of values returned by getNamespace.
     */
    public suspend fun getNamespace(argument: GetNamespacePlainArgs): GetNamespaceResult =
        getNamespaceResultToKotlin(getNamespacePlain(argument.toJava()).await())

    /**
     * @see [getNamespace].
     * @param name The name of the EventHub Namespace.
     * @param resourceGroupName The Name of the Resource Group where the EventHub Namespace exists.
     * @return A collection of values returned by getNamespace.
     */
    public suspend fun getNamespace(name: String, resourceGroupName: String): GetNamespaceResult {
        val argument = GetNamespacePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getNamespaceResultToKotlin(getNamespacePlain(argument.toJava()).await())
    }

    /**
     * @see [getNamespace].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetNamespacePlainArgs].
     * @return A collection of values returned by getNamespace.
     */
    public suspend fun getNamespace(argument: suspend GetNamespacePlainArgsBuilder.() -> Unit): GetNamespaceResult {
        val builder = GetNamespacePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getNamespaceResultToKotlin(getNamespacePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an Authorization Rule for an Event Hub Namespace.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.eventhub.getNamespaceAuthorizationRule({
     *     name: "navi",
     *     resourceGroupName: "example-resources",
     *     namespaceName: "example-ns",
     * });
     * export const eventhubAuthorizationRuleId = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.eventhub.get_namespace_authorization_rule(name="navi",
     *     resource_group_name="example-resources",
     *     namespace_name="example-ns")
     * pulumi.export("eventhubAuthorizationRuleId", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.EventHub.GetNamespaceAuthorizationRule.Invoke(new()
     *     {
     *         Name = "navi",
     *         ResourceGroupName = "example-resources",
     *         NamespaceName = "example-ns",
     *     });
     *     return new Dictionary
     *     {
     *         ["eventhubAuthorizationRuleId"] = example.Apply(getNamespaceAuthorizationRuleResult => getNamespaceAuthorizationRuleResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := eventhub.LookupNamespaceAuthorizationRule(ctx, &eventhub.LookupNamespaceAuthorizationRuleArgs{
     * 			Name:              "navi",
     * 			ResourceGroupName: "example-resources",
     * 			NamespaceName:     "example-ns",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("eventhubAuthorizationRuleId", 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.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetNamespaceAuthorizationRuleArgs;
     * 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 = EventhubFunctions.getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs.builder()
     *             .name("navi")
     *             .resourceGroupName("example-resources")
     *             .namespaceName("example-ns")
     *             .build());
     *         ctx.export("eventhubAuthorizationRuleId", example.applyValue(getNamespaceAuthorizationRuleResult -> getNamespaceAuthorizationRuleResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:eventhub:getNamespaceAuthorizationRule
     *       Arguments:
     *         name: navi
     *         resourceGroupName: example-resources
     *         namespaceName: example-ns
     * outputs:
     *   eventhubAuthorizationRuleId: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getNamespaceAuthorizationRule.
     * @return A collection of values returned by getNamespaceAuthorizationRule.
     */
    public suspend fun getNamespaceAuthorizationRule(argument: GetNamespaceAuthorizationRulePlainArgs): GetNamespaceAuthorizationRuleResult =
        getNamespaceAuthorizationRuleResultToKotlin(getNamespaceAuthorizationRulePlain(argument.toJava()).await())

    /**
     * @see [getNamespaceAuthorizationRule].
     * @param name The name of the EventHub Authorization Rule resource.
     * @param namespaceName Specifies the name of the EventHub Namespace.
     * @param resourceGroupName The name of the resource group in which the EventHub Namespace exists.
     * @return A collection of values returned by getNamespaceAuthorizationRule.
     */
    public suspend fun getNamespaceAuthorizationRule(
        name: String,
        namespaceName: String,
        resourceGroupName: String,
    ): GetNamespaceAuthorizationRuleResult {
        val argument = GetNamespaceAuthorizationRulePlainArgs(
            name = name,
            namespaceName = namespaceName,
            resourceGroupName = resourceGroupName,
        )
        return getNamespaceAuthorizationRuleResultToKotlin(getNamespaceAuthorizationRulePlain(argument.toJava()).await())
    }

    /**
     * @see [getNamespaceAuthorizationRule].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetNamespaceAuthorizationRulePlainArgs].
     * @return A collection of values returned by getNamespaceAuthorizationRule.
     */
    public suspend fun getNamespaceAuthorizationRule(argument: suspend GetNamespaceAuthorizationRulePlainArgsBuilder.() -> Unit): GetNamespaceAuthorizationRuleResult {
        val builder = GetNamespaceAuthorizationRulePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getNamespaceAuthorizationRuleResultToKotlin(getNamespaceAuthorizationRulePlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to obtain a Shared Access Signature (SAS Token) for an existing Event Hub.
     * ## 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 exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("example", {
     *     name: "example-ehn",
     *     location: exampleResourceGroup.location,
     *     resourceGroupName: exampleResourceGroup.name,
     *     sku: "Basic",
     * });
     * const exampleEventHub = new azure.eventhub.EventHub("example", {
     *     name: "example-eh",
     *     namespaceName: exampleEventHubNamespace.name,
     *     resourceGroupName: exampleResourceGroup.name,
     *     partitionCount: 1,
     *     messageRetention: 1,
     * });
     * const exampleAuthorizationRule = new azure.eventhub.AuthorizationRule("example", {
     *     name: "example-ehar",
     *     namespaceName: exampleEventHubNamespace.name,
     *     eventhubName: exampleEventHub.name,
     *     resourceGroupName: exampleResourceGroup.name,
     *     listen: true,
     *     send: true,
     *     manage: true,
     * });
     * const example = azure.eventhub.getAuthorizationRuleOutput({
     *     name: exampleAuthorizationRule.name,
     *     namespaceName: exampleEventHubNamespace.name,
     *     eventhubName: exampleEventHub.name,
     *     resourceGroupName: exampleResourceGroup.name,
     * });
     * const exampleGetSas = example.apply(example => azure.eventhub.getSasOutput({
     *     connectionString: example.primaryConnectionString,
     *     expiry: "2023-06-23T00:00:00Z",
     * }));
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example_resource_group = azure.core.ResourceGroup("example",
     *     name="example-resources",
     *     location="West Europe")
     * example_event_hub_namespace = azure.eventhub.EventHubNamespace("example",
     *     name="example-ehn",
     *     location=example_resource_group.location,
     *     resource_group_name=example_resource_group.name,
     *     sku="Basic")
     * example_event_hub = azure.eventhub.EventHub("example",
     *     name="example-eh",
     *     namespace_name=example_event_hub_namespace.name,
     *     resource_group_name=example_resource_group.name,
     *     partition_count=1,
     *     message_retention=1)
     * example_authorization_rule = azure.eventhub.AuthorizationRule("example",
     *     name="example-ehar",
     *     namespace_name=example_event_hub_namespace.name,
     *     eventhub_name=example_event_hub.name,
     *     resource_group_name=example_resource_group.name,
     *     listen=True,
     *     send=True,
     *     manage=True)
     * example = azure.eventhub.get_authorization_rule_output(name=example_authorization_rule.name,
     *     namespace_name=example_event_hub_namespace.name,
     *     eventhub_name=example_event_hub.name,
     *     resource_group_name=example_resource_group.name)
     * example_get_sas = example.apply(lambda example: azure.eventhub.get_sas_output(connection_string=example.primary_connection_string,
     *     expiry="2023-06-23T00:00:00Z"))
     * ```
     * ```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 exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("example", new()
     *     {
     *         Name = "example-ehn",
     *         Location = exampleResourceGroup.Location,
     *         ResourceGroupName = exampleResourceGroup.Name,
     *         Sku = "Basic",
     *     });
     *     var exampleEventHub = new Azure.EventHub.EventHub("example", new()
     *     {
     *         Name = "example-eh",
     *         NamespaceName = exampleEventHubNamespace.Name,
     *         ResourceGroupName = exampleResourceGroup.Name,
     *         PartitionCount = 1,
     *         MessageRetention = 1,
     *     });
     *     var exampleAuthorizationRule = new Azure.EventHub.AuthorizationRule("example", new()
     *     {
     *         Name = "example-ehar",
     *         NamespaceName = exampleEventHubNamespace.Name,
     *         EventhubName = exampleEventHub.Name,
     *         ResourceGroupName = exampleResourceGroup.Name,
     *         Listen = true,
     *         Send = true,
     *         Manage = true,
     *     });
     *     var example = Azure.EventHub.GetAuthorizationRule.Invoke(new()
     *     {
     *         Name = exampleAuthorizationRule.Name,
     *         NamespaceName = exampleEventHubNamespace.Name,
     *         EventhubName = exampleEventHub.Name,
     *         ResourceGroupName = exampleResourceGroup.Name,
     *     });
     *     var exampleGetSas = Azure.EventHub.GetSas.Invoke(new()
     *     {
     *         ConnectionString = example.Apply(getAuthorizationRuleResult => getAuthorizationRuleResult.PrimaryConnectionString),
     *         Expiry = "2023-06-23T00:00:00Z",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
     * 	"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
     * 		}
     * 		exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
     * 			Name:              pulumi.String("example-ehn"),
     * 			Location:          exampleResourceGroup.Location,
     * 			ResourceGroupName: exampleResourceGroup.Name,
     * 			Sku:               pulumi.String("Basic"),
     * 		})
     * 		if err != nil {
     * 			return err
     * 		}
     * 		exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
     * 			Name:              pulumi.String("example-eh"),
     * 			NamespaceName:     exampleEventHubNamespace.Name,
     * 			ResourceGroupName: exampleResourceGroup.Name,
     * 			PartitionCount:    pulumi.Int(1),
     * 			MessageRetention:  pulumi.Int(1),
     * 		})
     * 		if err != nil {
     * 			return err
     * 		}
     * 		exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
     * 			Name:              pulumi.String("example-ehar"),
     * 			NamespaceName:     exampleEventHubNamespace.Name,
     * 			EventhubName:      exampleEventHub.Name,
     * 			ResourceGroupName: exampleResourceGroup.Name,
     * 			Listen:            pulumi.Bool(true),
     * 			Send:              pulumi.Bool(true),
     * 			Manage:            pulumi.Bool(true),
     * 		})
     * 		if err != nil {
     * 			return err
     * 		}
     * 		example := eventhub.LookupAuthorizationRuleOutput(ctx, eventhub.GetAuthorizationRuleOutputArgs{
     * 			Name:              exampleAuthorizationRule.Name,
     * 			NamespaceName:     exampleEventHubNamespace.Name,
     * 			EventhubName:      exampleEventHub.Name,
     * 			ResourceGroupName: exampleResourceGroup.Name,
     * 		}, nil)
     * 		_ = example.ApplyT(func(example eventhub.GetAuthorizationRuleResult) (eventhub.GetSasResult, error) {
     * 			return eventhub.GetSasResult(interface{}(eventhub.GetSasOutput(ctx, eventhub.GetSasOutputArgs{
     * 				ConnectionString: example.PrimaryConnectionString,
     * 				Expiry:           "2023-06-23T00:00:00Z",
     * 			}, nil))), nil
     * 		}).(eventhub.GetSasResultOutput)
     * 		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.eventhub.EventHubNamespace;
     * import com.pulumi.azure.eventhub.EventHubNamespaceArgs;
     * import com.pulumi.azure.eventhub.EventHub;
     * import com.pulumi.azure.eventhub.EventHubArgs;
     * import com.pulumi.azure.eventhub.AuthorizationRule;
     * import com.pulumi.azure.eventhub.AuthorizationRuleArgs;
     * import com.pulumi.azure.eventhub.EventhubFunctions;
     * import com.pulumi.azure.eventhub.inputs.GetAuthorizationRuleArgs;
     * import com.pulumi.azure.eventhub.inputs.GetSasArgs;
     * 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 exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
     *             .name("example-ehn")
     *             .location(exampleResourceGroup.location())
     *             .resourceGroupName(exampleResourceGroup.name())
     *             .sku("Basic")
     *             .build());
     *         var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
     *             .name("example-eh")
     *             .namespaceName(exampleEventHubNamespace.name())
     *             .resourceGroupName(exampleResourceGroup.name())
     *             .partitionCount(1)
     *             .messageRetention(1)
     *             .build());
     *         var exampleAuthorizationRule = new AuthorizationRule("exampleAuthorizationRule", AuthorizationRuleArgs.builder()
     *             .name("example-ehar")
     *             .namespaceName(exampleEventHubNamespace.name())
     *             .eventhubName(exampleEventHub.name())
     *             .resourceGroupName(exampleResourceGroup.name())
     *             .listen(true)
     *             .send(true)
     *             .manage(true)
     *             .build());
     *         final var example = EventhubFunctions.getAuthorizationRule(GetAuthorizationRuleArgs.builder()
     *             .name(exampleAuthorizationRule.name())
     *             .namespaceName(exampleEventHubNamespace.name())
     *             .eventhubName(exampleEventHub.name())
     *             .resourceGroupName(exampleResourceGroup.name())
     *             .build());
     *         final var exampleGetSas = EventhubFunctions.getSas(GetSasArgs.builder()
     *             .connectionString(example.applyValue(getAuthorizationRuleResult -> getAuthorizationRuleResult).applyValue(example -> example.applyValue(getAuthorizationRuleResult -> getAuthorizationRuleResult.primaryConnectionString())))
     *             .expiry("2023-06-23T00:00:00Z")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * resources:
     *   exampleResourceGroup:
     *     type: azure:core:ResourceGroup
     *     name: example
     *     properties:
     *       name: example-resources
     *       location: West Europe
     *   exampleEventHubNamespace:
     *     type: azure:eventhub:EventHubNamespace
     *     name: example
     *     properties:
     *       name: example-ehn
     *       location: ${exampleResourceGroup.location}
     *       resourceGroupName: ${exampleResourceGroup.name}
     *       sku: Basic
     *   exampleEventHub:
     *     type: azure:eventhub:EventHub
     *     name: example
     *     properties:
     *       name: example-eh
     *       namespaceName: ${exampleEventHubNamespace.name}
     *       resourceGroupName: ${exampleResourceGroup.name}
     *       partitionCount: 1
     *       messageRetention: 1
     *   exampleAuthorizationRule:
     *     type: azure:eventhub:AuthorizationRule
     *     name: example
     *     properties:
     *       name: example-ehar
     *       namespaceName: ${exampleEventHubNamespace.name}
     *       eventhubName: ${exampleEventHub.name}
     *       resourceGroupName: ${exampleResourceGroup.name}
     *       listen: true
     *       send: true
     *       manage: true
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:eventhub:getAuthorizationRule
     *       Arguments:
     *         name: ${exampleAuthorizationRule.name}
     *         namespaceName: ${exampleEventHubNamespace.name}
     *         eventhubName: ${exampleEventHub.name}
     *         resourceGroupName: ${exampleResourceGroup.name}
     *   exampleGetSas:
     *     fn::invoke:
     *       Function: azure:eventhub:getSas
     *       Arguments:
     *         connectionString: ${example.primaryConnectionString}
     *         expiry: 2023-06-23T00:00:00Z
     * ```
     * 
     * @param argument A collection of arguments for invoking getSas.
     * @return A collection of values returned by getSas.
     */
    public suspend fun getSas(argument: GetSasPlainArgs): GetSasResult =
        getSasResultToKotlin(getSasPlain(argument.toJava()).await())

    /**
     * @see [getSas].
     * @param connectionString The connection string for the Event Hub to which this SAS applies.
     * @param expiry The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
     * @return A collection of values returned by getSas.
     */
    public suspend fun getSas(connectionString: String, expiry: String): GetSasResult {
        val argument = GetSasPlainArgs(
            connectionString = connectionString,
            expiry = expiry,
        )
        return getSasResultToKotlin(getSasPlain(argument.toJava()).await())
    }

    /**
     * @see [getSas].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetSasPlainArgs].
     * @return A collection of values returned by getSas.
     */
    public suspend fun getSas(argument: suspend GetSasPlainArgsBuilder.() -> Unit): GetSasResult {
        val builder = GetSasPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getSasResultToKotlin(getSasPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to access information about an existing ServiceBus Namespace.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.servicebus.getNamespace({
     *     name: "examplenamespace",
     *     resourceGroupName: "example-resources",
     * });
     * export const location = example.then(example => example.location);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.servicebus.get_namespace(name="examplenamespace",
     *     resource_group_name="example-resources")
     * pulumi.export("location", example.location)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.ServiceBus.GetNamespace.Invoke(new()
     *     {
     *         Name = "examplenamespace",
     *         ResourceGroupName = "example-resources",
     *     });
     *     return new Dictionary
     *     {
     *         ["location"] = example.Apply(getNamespaceResult => getNamespaceResult.Location),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := servicebus.LookupNamespace(ctx, &servicebus.LookupNamespaceArgs{
     * 			Name:              "examplenamespace",
     * 			ResourceGroupName: "example-resources",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("location", example.Location)
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.servicebus.ServicebusFunctions;
     * import com.pulumi.azure.servicebus.inputs.GetNamespaceArgs;
     * 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 = ServicebusFunctions.getNamespace(GetNamespaceArgs.builder()
     *             .name("examplenamespace")
     *             .resourceGroupName("example-resources")
     *             .build());
     *         ctx.export("location", example.applyValue(getNamespaceResult -> getNamespaceResult.location()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:servicebus:getNamespace
     *       Arguments:
     *         name: examplenamespace
     *         resourceGroupName: example-resources
     * outputs:
     *   location: ${example.location}
     * ```
     * 
     * @param argument A collection of arguments for invoking getServiceBusNamespace.
     * @return A collection of values returned by getServiceBusNamespace.
     */
    @Deprecated(
        message = """
  azure.eventhub.getServiceBusNamespace has been deprecated in favor of
      azure.servicebus.getNamespace
  """,
    )
    public suspend fun getServiceBusNamespace(argument: GetServiceBusNamespacePlainArgs): GetServiceBusNamespaceResult =
        getServiceBusNamespaceResultToKotlin(getServiceBusNamespacePlain(argument.toJava()).await())

    /**
     * @see [getServiceBusNamespace].
     * @param name Specifies the name of the ServiceBus Namespace.
     * @param resourceGroupName Specifies the name of the Resource Group where the ServiceBus Namespace exists.
     * @return A collection of values returned by getServiceBusNamespace.
     */
    @Deprecated(
        message = """
  azure.eventhub.getServiceBusNamespace has been deprecated in favor of
      azure.servicebus.getNamespace
  """,
    )
    public suspend fun getServiceBusNamespace(name: String, resourceGroupName: String): GetServiceBusNamespaceResult {
        val argument = GetServiceBusNamespacePlainArgs(
            name = name,
            resourceGroupName = resourceGroupName,
        )
        return getServiceBusNamespaceResultToKotlin(getServiceBusNamespacePlain(argument.toJava()).await())
    }

    /**
     * @see [getServiceBusNamespace].
     * @param argument Builder for [com.pulumi.azure.eventhub.kotlin.inputs.GetServiceBusNamespacePlainArgs].
     * @return A collection of values returned by getServiceBusNamespace.
     */
    @Deprecated(
        message = """
  azure.eventhub.getServiceBusNamespace has been deprecated in favor of
      azure.servicebus.getNamespace
  """,
    )
    public suspend fun getServiceBusNamespace(argument: suspend GetServiceBusNamespacePlainArgsBuilder.() -> Unit): GetServiceBusNamespaceResult {
        val builder = GetServiceBusNamespacePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getServiceBusNamespaceResultToKotlin(getServiceBusNamespacePlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy