azure logo
Azure Classic v5.39.0, Apr 1 23

azure.eventhub.getAuthorizationRule

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var test = Azure.EventHub.GetAuthorizationRule.Invoke(new()
    {
        Name = "test",
        NamespaceName = azurerm_eventhub_namespace.Test.Name,
        EventhubName = azurerm_eventhub.Test.Name,
        ResourceGroupName = azurerm_resource_group.Test.Name,
    });

});
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:     azurerm_eventhub_namespace.Test.Name,
			EventhubName:      azurerm_eventhub.Test.Name,
			ResourceGroupName: azurerm_resource_group.Test.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(azurerm_eventhub_namespace.test().name())
            .eventhubName(azurerm_eventhub.test().name())
            .resourceGroupName(azurerm_resource_group.test().name())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

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

const test = azure.eventhub.getAuthorizationRule({
    name: "test",
    namespaceName: azurerm_eventhub_namespace.test.name,
    eventhubName: azurerm_eventhub.test.name,
    resourceGroupName: azurerm_resource_group.test.name,
});
variables:
  test:
    fn::invoke:
      Function: azure:eventhub:getAuthorizationRule
      Arguments:
        name: test
        namespaceName: ${azurerm_eventhub_namespace.test.name}
        eventhubName: ${azurerm_eventhub.test.name}
        resourceGroupName: ${azurerm_resource_group.test.name}

Using getAuthorizationRule

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAuthorizationRule(args: GetAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetAuthorizationRuleResult>
function getAuthorizationRuleOutput(args: GetAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetAuthorizationRuleResult>
def get_authorization_rule(eventhub_name: Optional[str] = None,
                           listen: Optional[bool] = None,
                           manage: Optional[bool] = None,
                           name: Optional[str] = None,
                           namespace_name: Optional[str] = None,
                           resource_group_name: Optional[str] = None,
                           send: Optional[bool] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAuthorizationRuleResult
def get_authorization_rule_output(eventhub_name: Optional[pulumi.Input[str]] = None,
                           listen: Optional[pulumi.Input[bool]] = None,
                           manage: Optional[pulumi.Input[bool]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           namespace_name: Optional[pulumi.Input[str]] = None,
                           resource_group_name: Optional[pulumi.Input[str]] = None,
                           send: Optional[pulumi.Input[bool]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAuthorizationRuleResult]
func LookupAuthorizationRule(ctx *Context, args *LookupAuthorizationRuleArgs, opts ...InvokeOption) (*LookupAuthorizationRuleResult, error)
func LookupAuthorizationRuleOutput(ctx *Context, args *LookupAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupAuthorizationRuleResultOutput

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

public static class GetAuthorizationRule 
{
    public static Task<GetAuthorizationRuleResult> InvokeAsync(GetAuthorizationRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetAuthorizationRuleResult> Invoke(GetAuthorizationRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAuthorizationRuleResult> getAuthorizationRule(GetAuthorizationRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:eventhub/getAuthorizationRule:getAuthorizationRule
  arguments:
    # arguments dictionary

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
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
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

getAuthorizationRule Result

The following output properties are available:

EventhubName string
Id string

The provider-assigned unique ID for this managed resource.

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.

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.

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
eventhubName string
id string

The provider-assigned unique ID for this managed resource.

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.

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
eventhubName String
id String

The provider-assigned unique ID for this managed resource.

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

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.