1. Packages
  2. Azure Classic
  3. API Docs
  4. eventhub
  5. getNamespaceAuthorizationRule

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.eventhub.getNamespaceAuthorizationRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    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 = exampleAzuremEventhubNamespaceAuthorizationRule.id;
    
    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_azurem_eventhub_namespace_authorization_rule["id"])
    
    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.LookupNamespaceAuthorizationRule(ctx, &eventhub.LookupNamespaceAuthorizationRuleArgs{
    			Name:              "navi",
    			ResourceGroupName: "example-resources",
    			NamespaceName:     "example-ns",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("eventhubAuthorizationRuleId", exampleAzuremEventhubNamespaceAuthorizationRule.Id)
    		return nil
    	})
    }
    
    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"] = exampleAzuremEventhubNamespaceAuthorizationRule.Id,
        };
    });
    
    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", exampleAzuremEventhubNamespaceAuthorizationRule.id());
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:eventhub:getNamespaceAuthorizationRule
          Arguments:
            name: navi
            resourceGroupName: example-resources
            namespaceName: example-ns
    outputs:
      eventhubAuthorizationRuleId: ${exampleAzuremEventhubNamespaceAuthorizationRule.id}
    

    Using getNamespaceAuthorizationRule

    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 getNamespaceAuthorizationRule(args: GetNamespaceAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetNamespaceAuthorizationRuleResult>
    function getNamespaceAuthorizationRuleOutput(args: GetNamespaceAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetNamespaceAuthorizationRuleResult>
    def get_namespace_authorization_rule(name: Optional[str] = None,
                                         namespace_name: Optional[str] = None,
                                         resource_group_name: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetNamespaceAuthorizationRuleResult
    def get_namespace_authorization_rule_output(name: Optional[pulumi.Input[str]] = None,
                                         namespace_name: Optional[pulumi.Input[str]] = None,
                                         resource_group_name: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceAuthorizationRuleResult]
    func LookupNamespaceAuthorizationRule(ctx *Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error)
    func LookupNamespaceAuthorizationRuleOutput(ctx *Context, args *LookupNamespaceAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupNamespaceAuthorizationRuleResultOutput

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

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

    The following arguments are supported:

    Name string
    The name of the EventHub Authorization Rule resource.
    NamespaceName string
    Specifies the name of the EventHub Namespace.
    ResourceGroupName string
    The name of the resource group in which the EventHub Namespace exists.
    Name string
    The name of the EventHub Authorization Rule resource.
    NamespaceName string
    Specifies the name of the EventHub Namespace.
    ResourceGroupName string
    The name of the resource group in which the EventHub Namespace exists.
    name String
    The name of the EventHub Authorization Rule resource.
    namespaceName String
    Specifies the name of the EventHub Namespace.
    resourceGroupName String
    The name of the resource group in which the EventHub Namespace exists.
    name string
    The name of the EventHub Authorization Rule resource.
    namespaceName string
    Specifies the name of the EventHub Namespace.
    resourceGroupName string
    The name of the resource group in which the EventHub Namespace exists.
    name str
    The name of the EventHub Authorization Rule resource.
    namespace_name str
    Specifies the name of the EventHub Namespace.
    resource_group_name str
    The name of the resource group in which the EventHub Namespace exists.
    name String
    The name of the EventHub Authorization Rule resource.
    namespaceName String
    Specifies the name of the EventHub Namespace.
    resourceGroupName String
    The name of the resource group in which the EventHub Namespace exists.

    getNamespaceAuthorizationRule Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Listen bool
    Does this Authorization Rule have permissions to Listen to the Event Hub?
    Manage bool
    Does this Authorization Rule have permissions to Manage to the Event Hub?
    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.
    Send bool
    Does this Authorization Rule have permissions to Send to the Event Hub?
    Id string
    The provider-assigned unique ID for this managed resource.
    Listen bool
    Does this Authorization Rule have permissions to Listen to the Event Hub?
    Manage bool
    Does this Authorization Rule have permissions to Manage to the Event Hub?
    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.
    Send bool
    Does this Authorization Rule have permissions to Send to the Event Hub?
    id String
    The provider-assigned unique ID for this managed resource.
    listen Boolean
    Does this Authorization Rule have permissions to Listen to the Event Hub?
    manage Boolean
    Does this Authorization Rule have permissions to Manage to the Event Hub?
    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.
    send Boolean
    Does this Authorization Rule have permissions to Send to the Event Hub?
    id string
    The provider-assigned unique ID for this managed resource.
    listen boolean
    Does this Authorization Rule have permissions to Listen to the Event Hub?
    manage boolean
    Does this Authorization Rule have permissions to Manage to the Event Hub?
    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.
    send boolean
    Does this Authorization Rule have permissions to Send to the Event Hub?
    id str
    The provider-assigned unique ID for this managed resource.
    listen bool
    Does this Authorization Rule have permissions to Listen to the Event Hub?
    manage bool
    Does this Authorization Rule have permissions to Manage to the Event Hub?
    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.
    send bool
    Does this Authorization Rule have permissions to Send to the Event Hub?
    id String
    The provider-assigned unique ID for this managed resource.
    listen Boolean
    Does this Authorization Rule have permissions to Listen to the Event Hub?
    manage Boolean
    Does this Authorization Rule have permissions to Manage to the Event Hub?
    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.
    send Boolean
    Does this Authorization Rule have permissions to Send to the Event Hub?

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi