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

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.servicebus.getNamespaceAuthorizationRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Use this data source to access information about an existing ServiceBus Namespace Authorization Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.servicebus.getNamespaceAuthorizationRule({
        name: "examplerule",
        namespaceId: "examplenamespace",
    });
    export const ruleId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.servicebus.get_namespace_authorization_rule(name="examplerule",
        namespace_id="examplenamespace")
    pulumi.export("ruleId", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := servicebus.LookupNamespaceAuthorizationRule(ctx, &servicebus.LookupNamespaceAuthorizationRuleArgs{
    			Name:        "examplerule",
    			NamespaceId: pulumi.StringRef("examplenamespace"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ruleId", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ServiceBus.GetNamespaceAuthorizationRule.Invoke(new()
        {
            Name = "examplerule",
            NamespaceId = "examplenamespace",
        });
    
        return new Dictionary<string, object?>
        {
            ["ruleId"] = example.Apply(getNamespaceAuthorizationRuleResult => getNamespaceAuthorizationRuleResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.servicebus.ServicebusFunctions;
    import com.pulumi.azure.servicebus.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 = ServicebusFunctions.getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs.builder()
                .name("examplerule")
                .namespaceId("examplenamespace")
                .build());
    
            ctx.export("ruleId", example.applyValue(getNamespaceAuthorizationRuleResult -> getNamespaceAuthorizationRuleResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:servicebus:getNamespaceAuthorizationRule
          Arguments:
            name: examplerule
            namespaceId: examplenamespace
    outputs:
      ruleId: ${example.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_id: 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_id: 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:servicebus/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of the ServiceBus Namespace Authorization Rule.
    NamespaceId string
    Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
    NamespaceName string

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    ResourceGroupName string

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    Name string
    Specifies the name of the ServiceBus Namespace Authorization Rule.
    NamespaceId string
    Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
    NamespaceName string

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    ResourceGroupName string

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    name String
    Specifies the name of the ServiceBus Namespace Authorization Rule.
    namespaceId String
    Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
    namespaceName String

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resourceGroupName String

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    name string
    Specifies the name of the ServiceBus Namespace Authorization Rule.
    namespaceId string
    Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
    namespaceName string

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resourceGroupName string

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    name str
    Specifies the name of the ServiceBus Namespace Authorization Rule.
    namespace_id str
    Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
    namespace_name str

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resource_group_name str

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    name String
    Specifies the name of the ServiceBus Namespace Authorization Rule.
    namespaceId String
    Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
    namespaceName String

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resourceGroupName String

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    getNamespaceAuthorizationRule Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PrimaryConnectionString string
    The primary connection string for the authorization rule.
    PrimaryConnectionStringAlias string
    The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
    PrimaryKey string
    The primary access key for the authorization rule.
    SecondaryConnectionString string
    The secondary connection string for the authorization rule.
    SecondaryConnectionStringAlias string
    The alias Secondary Connection String for the ServiceBus Namespace
    SecondaryKey string
    The secondary access key for the authorization rule.
    NamespaceId string
    NamespaceName string

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    ResourceGroupName string

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PrimaryConnectionString string
    The primary connection string for the authorization rule.
    PrimaryConnectionStringAlias string
    The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
    PrimaryKey string
    The primary access key for the authorization rule.
    SecondaryConnectionString string
    The secondary connection string for the authorization rule.
    SecondaryConnectionStringAlias string
    The alias Secondary Connection String for the ServiceBus Namespace
    SecondaryKey string
    The secondary access key for the authorization rule.
    NamespaceId string
    NamespaceName string

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    ResourceGroupName string

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    id String
    The provider-assigned unique ID for this managed resource.
    name String
    primaryConnectionString String
    The primary connection string for the authorization rule.
    primaryConnectionStringAlias String
    The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
    primaryKey String
    The primary access key for the authorization rule.
    secondaryConnectionString String
    The secondary connection string for the authorization rule.
    secondaryConnectionStringAlias String
    The alias Secondary Connection String for the ServiceBus Namespace
    secondaryKey String
    The secondary access key for the authorization rule.
    namespaceId String
    namespaceName String

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resourceGroupName String

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    id string
    The provider-assigned unique ID for this managed resource.
    name string
    primaryConnectionString string
    The primary connection string for the authorization rule.
    primaryConnectionStringAlias string
    The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
    primaryKey string
    The primary access key for the authorization rule.
    secondaryConnectionString string
    The secondary connection string for the authorization rule.
    secondaryConnectionStringAlias string
    The alias Secondary Connection String for the ServiceBus Namespace
    secondaryKey string
    The secondary access key for the authorization rule.
    namespaceId string
    namespaceName string

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resourceGroupName string

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    id str
    The provider-assigned unique ID for this managed resource.
    name str
    primary_connection_string str
    The primary connection string for the authorization rule.
    primary_connection_string_alias str
    The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
    primary_key str
    The primary access key for the authorization rule.
    secondary_connection_string str
    The secondary connection string for the authorization rule.
    secondary_connection_string_alias str
    The alias Secondary Connection String for the ServiceBus Namespace
    secondary_key str
    The secondary access key for the authorization rule.
    namespace_id str
    namespace_name str

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resource_group_name str

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    id String
    The provider-assigned unique ID for this managed resource.
    name String
    primaryConnectionString String
    The primary connection string for the authorization rule.
    primaryConnectionStringAlias String
    The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
    primaryKey String
    The primary access key for the authorization rule.
    secondaryConnectionString String
    The secondary connection string for the authorization rule.
    secondaryConnectionStringAlias String
    The alias Secondary Connection String for the ServiceBus Namespace
    secondaryKey String
    The secondary access key for the authorization rule.
    namespaceId String
    namespaceName String

    Deprecated: namespace_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    resourceGroupName String

    Deprecated: resource_group_name will be removed in favour of the property namespace_id in version 4.0 of the AzureRM Provider.

    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 v6.2.0 published on Friday, Sep 27, 2024 by Pulumi