GetAuthorizationRule

Use this data source to access information about an existing Event Hubs Authorization Rule within an Event Hub.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Azure.EventHub.GetAuthorizationRule.InvokeAsync(new Azure.EventHub.GetAuthorizationRuleArgs
        {
            EventhubName = azurerm_eventhub.Test.Name,
            Name = "test",
            NamespaceName = azurerm_eventhub_namespace.Test.Name,
            ResourceGroupName = azurerm_resource_group.Test.Name,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/eventhub"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := eventhub.LookupAuthorizationRule(ctx, &eventhub.LookupAuthorizationRuleArgs{
            EventhubName:      azurerm_eventhub.Test.Name,
            Name:              "test",
            NamespaceName:     azurerm_eventhub_namespace.Test.Name,
            ResourceGroupName: azurerm_resource_group.Test.Name,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

test = azure.eventhub.get_authorization_rule(eventhub_name=azurerm_eventhub["test"]["name"],
    name="test",
    namespace_name=azurerm_eventhub_namespace["test"]["name"],
    resource_group_name=azurerm_resource_group["test"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const test = pulumi.all([azurerm_eventhub_test.name, azurerm_eventhub_namespace_test.name, azurerm_resource_group_test.name]).apply(([azurerm_eventhub_testName, azurerm_eventhub_namespace_testName, azurerm_resource_group_testName]) => azure.eventhub.getAuthorizationRule({
    eventhubName: azurerm_eventhub_testName,
    name: "test",
    namespaceName: azurerm_eventhub_namespace_testName,
    resourceGroupName: azurerm_resource_group_testName,
}, { async: true }));

Using GetAuthorizationRule

function getAuthorizationRule(args: GetAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetAuthorizationRuleResult>
function  get_authorization_rule(eventhub_name=None, listen=None, manage=None, name=None, namespace_name=None, resource_group_name=None, send=None, opts=None)
func LookupAuthorizationRule(ctx *Context, args *LookupAuthorizationRuleArgs, opts ...InvokeOption) (*LookupAuthorizationRuleResult, error)

Note: This function is named LookupAuthorizationRule in the Go SDK.

public static class GetAuthorizationRule {
    public static Task<GetAuthorizationRuleResult> InvokeAsync(GetAuthorizationRuleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

EventhubName string

Specifies the name of the EventHub.

Name string

Specifies the name of the EventHub Authorization Rule resource. be created.

NamespaceName string

Specifies the name of the grandparent EventHub Namespace.

ResourceGroupName string

The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.

Listen bool
Manage bool
Send bool
EventhubName string

Specifies the name of the EventHub.

Name string

Specifies the name of the EventHub Authorization Rule resource. be created.

NamespaceName string

Specifies the name of the grandparent EventHub Namespace.

ResourceGroupName string

The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.

Listen bool
Manage bool
Send bool
eventhubName string

Specifies the name of the EventHub.

name string

Specifies the name of the EventHub Authorization Rule resource. be created.

namespaceName string

Specifies the name of the grandparent EventHub Namespace.

resourceGroupName string

The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.

listen boolean
manage boolean
send boolean
eventhub_name str

Specifies the name of the EventHub.

name str

Specifies the name of the EventHub Authorization Rule resource. be created.

namespace_name str

Specifies the name of the grandparent EventHub Namespace.

resource_group_name str

The name of the resource group in which the EventHub Authorization Rule’s grandparent Namespace exists.

listen bool
manage bool
send bool

GetAuthorizationRule Result

The following output properties are available:

EventhubName string
Id string

The provider-assigned unique ID for this managed resource.

Location string
Name string
NamespaceName string
PrimaryConnectionString string

The Primary Connection String for the Event Hubs Authorization Rule.

PrimaryConnectionStringAlias string

The alias of the Primary Connection String for the Event Hubs Authorization Rule.

PrimaryKey string

The Primary Key for the Event Hubs Authorization Rule.

ResourceGroupName string
SecondaryConnectionString string

The Secondary Connection String for the Event Hubs Authorization Rule.

SecondaryConnectionStringAlias string

The alias of the Secondary Connection String for the Event Hubs Authorization Rule.

SecondaryKey string

The Secondary Key for the Event Hubs Authorization Rule.

Listen bool
Manage bool
Send bool
EventhubName string
Id string

The provider-assigned unique ID for this managed resource.

Location string
Name string
NamespaceName string
PrimaryConnectionString string

The Primary Connection String for the Event Hubs Authorization Rule.

PrimaryConnectionStringAlias string

The alias of the Primary Connection String for the Event Hubs Authorization Rule.

PrimaryKey string

The Primary Key for the Event Hubs Authorization Rule.

ResourceGroupName string
SecondaryConnectionString string

The Secondary Connection String for the Event Hubs Authorization Rule.

SecondaryConnectionStringAlias string

The alias of the Secondary Connection String for the Event Hubs Authorization Rule.

SecondaryKey string

The Secondary Key for the Event Hubs Authorization Rule.

Listen bool
Manage bool
Send bool
eventhubName string
id string

The provider-assigned unique ID for this managed resource.

location string
name string
namespaceName string
primaryConnectionString string

The Primary Connection String for the Event Hubs Authorization Rule.

primaryConnectionStringAlias string

The alias of the Primary Connection String for the Event Hubs Authorization Rule.

primaryKey string

The Primary Key for the Event Hubs Authorization Rule.

resourceGroupName string
secondaryConnectionString string

The Secondary Connection String for the Event Hubs Authorization Rule.

secondaryConnectionStringAlias string

The alias of the Secondary Connection String for the Event Hubs Authorization Rule.

secondaryKey string

The Secondary Key for the Event Hubs Authorization Rule.

listen boolean
manage boolean
send boolean
eventhub_name str
id str

The provider-assigned unique ID for this managed resource.

location str
name str
namespace_name str
primary_connection_string str

The Primary Connection String for the Event Hubs Authorization Rule.

primary_connection_string_alias str

The alias of the Primary Connection String for the Event Hubs Authorization Rule.

primary_key str

The Primary Key for the Event Hubs Authorization Rule.

resource_group_name str
secondary_connection_string str

The Secondary Connection String for the Event Hubs Authorization Rule.

secondary_connection_string_alias str

The alias of the Secondary Connection String for the Event Hubs Authorization Rule.

secondary_key str

The Secondary Key for the Event Hubs Authorization Rule.

listen bool
manage bool
send bool

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.