get Authorization Rule
suspend fun getAuthorizationRule(argument: GetAuthorizationRulePlainArgs): GetAuthorizationRuleResult
Use this data source to access information about an existing Event Hubs Authorization Rule within an Event Hub.
Example Usage
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,
});
Content copied to clipboard
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"])
Content copied to clipboard
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,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: azure:eventhub:getAuthorizationRule
arguments:
name: test
namespaceName: ${testAzurermEventhubNamespace.name}
eventhubName: ${testAzurermEventhub.name}
resourceGroupName: ${testAzurermResourceGroup.name}
Content copied to clipboard
Return
A collection of values returned by getAuthorizationRule.
Parameters
argument
A collection of arguments for invoking getAuthorizationRule.
suspend fun getAuthorizationRule(eventhubName: String, listen: Boolean? = null, manage: Boolean? = null, name: String, namespaceName: String, resourceGroupName: String, send: Boolean? = null): GetAuthorizationRuleResult
Return
A collection of values returned by getAuthorizationRule.
Parameters
eventhub Name
Specifies the name of the EventHub.
listen
manage
name
Specifies the name of the EventHub Authorization Rule resource. be created.
namespace Name
Specifies the name of the grandparent EventHub Namespace.
resource Group Name
The name of the resource group in which the EventHub Authorization Rule's grandparent Namespace exists.
send
See also
suspend fun getAuthorizationRule(argument: suspend GetAuthorizationRulePlainArgsBuilder.() -> Unit): GetAuthorizationRuleResult
Return
A collection of values returned by getAuthorizationRule.
Parameters
argument
Builder for com.pulumi.azure.eventhub.kotlin.inputs.GetAuthorizationRulePlainArgs.