get Namespace Authorization Rule
suspend fun getNamespaceAuthorizationRule(argument: GetNamespaceAuthorizationRulePlainArgs): GetNamespaceAuthorizationRuleResult
Use this data source to access information about an Authorization Rule for an Event Hub Namespace.
Example Usage
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);
Content copied to clipboard
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)
Content copied to clipboard
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<string, object?>
{
["eventhubAuthorizationRuleId"] = example.Apply(getNamespaceAuthorizationRuleResult => getNamespaceAuthorizationRuleResult.Id),
};
});
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 {
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
})
}
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.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()));
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:eventhub:getNamespaceAuthorizationRule
arguments:
name: navi
resourceGroupName: example-resources
namespaceName: example-ns
outputs:
eventhubAuthorizationRuleId: ${example.id}
Content copied to clipboard
Return
A collection of values returned by getNamespaceAuthorizationRule.
Parameters
argument
A collection of arguments for invoking getNamespaceAuthorizationRule.
suspend fun getNamespaceAuthorizationRule(name: String, namespaceName: String, resourceGroupName: String): GetNamespaceAuthorizationRuleResult
Return
A collection of values returned by getNamespaceAuthorizationRule.
Parameters
name
The name of the EventHub Authorization Rule resource.
namespace Name
Specifies the name of the EventHub Namespace.
resource Group Name
The name of the resource group in which the EventHub Namespace exists.
See also
suspend fun getNamespaceAuthorizationRule(argument: suspend GetNamespaceAuthorizationRulePlainArgsBuilder.() -> Unit): GetNamespaceAuthorizationRuleResult
Return
A collection of values returned by getNamespaceAuthorizationRule.
Parameters
argument
Builder for com.pulumi.azure.eventhub.kotlin.inputs.GetNamespaceAuthorizationRulePlainArgs.