get Authorization Rule
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,
});
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"])
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,
});
});
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
})
}
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());
}
}
variables:
test:
fn::invoke:
function: azure:eventhub:getAuthorizationRule
arguments:
name: test
namespaceName: ${testAzurermEventhubNamespace.name}
eventhubName: ${testAzurermEventhub.name}
resourceGroupName: ${testAzurermResourceGroup.name}
API Providers
This data source uses the following Azure API Providers:
Microsoft.EventHub
: 2024-01-01
Return
A collection of values returned by getAuthorizationRule.
Parameters
A collection of arguments for invoking getAuthorizationRule.
Return
A collection of values returned by getAuthorizationRule.
Parameters
Specifies the name of the EventHub.
Specifies the name of the EventHub Authorization Rule resource. be created.
Specifies the name of the grandparent EventHub Namespace.
The name of the resource group in which the EventHub Authorization Rule's grandparent Namespace exists.
See also
Return
A collection of values returned by getAuthorizationRule.
Parameters
Builder for com.pulumi.azure.eventhub.kotlin.inputs.GetAuthorizationRulePlainArgs.