We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.servicebus.getQueueAuthorizationRule
Explore with Pulumi AI
Use this data source to access information about an existing ServiceBus Queue Authorisation Rule within a ServiceBus Queue.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getQueueAuthorizationRule({
    name: "example-tfex_name",
    resourceGroupName: "example-resources",
    queueName: "example-servicebus_queue",
    namespaceName: "example-namespace",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_queue_authorization_rule(name="example-tfex_name",
    resource_group_name="example-resources",
    queue_name="example-servicebus_queue",
    namespace_name="example-namespace")
pulumi.export("id", 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.LookupQueueAuthorizationRule(ctx, &servicebus.LookupQueueAuthorizationRuleArgs{
			Name:              "example-tfex_name",
			ResourceGroupName: pulumi.StringRef("example-resources"),
			QueueName:         pulumi.StringRef("example-servicebus_queue"),
			NamespaceName:     pulumi.StringRef("example-namespace"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", 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.GetQueueAuthorizationRule.Invoke(new()
    {
        Name = "example-tfex_name",
        ResourceGroupName = "example-resources",
        QueueName = "example-servicebus_queue",
        NamespaceName = "example-namespace",
    });
    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getQueueAuthorizationRuleResult => getQueueAuthorizationRuleResult.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.GetQueueAuthorizationRuleArgs;
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.getQueueAuthorizationRule(GetQueueAuthorizationRuleArgs.builder()
            .name("example-tfex_name")
            .resourceGroupName("example-resources")
            .queueName("example-servicebus_queue")
            .namespaceName("example-namespace")
            .build());
        ctx.export("id", example.applyValue(getQueueAuthorizationRuleResult -> getQueueAuthorizationRuleResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:servicebus:getQueueAuthorizationRule
      arguments:
        name: example-tfex_name
        resourceGroupName: example-resources
        queueName: example-servicebus_queue
        namespaceName: example-namespace
outputs:
  id: ${example.id}
Using getQueueAuthorizationRule
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 getQueueAuthorizationRule(args: GetQueueAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetQueueAuthorizationRuleResult>
function getQueueAuthorizationRuleOutput(args: GetQueueAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetQueueAuthorizationRuleResult>def get_queue_authorization_rule(name: Optional[str] = None,
                                 namespace_name: Optional[str] = None,
                                 queue_id: Optional[str] = None,
                                 queue_name: Optional[str] = None,
                                 resource_group_name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetQueueAuthorizationRuleResult
def get_queue_authorization_rule_output(name: Optional[pulumi.Input[str]] = None,
                                 namespace_name: Optional[pulumi.Input[str]] = None,
                                 queue_id: Optional[pulumi.Input[str]] = None,
                                 queue_name: Optional[pulumi.Input[str]] = None,
                                 resource_group_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetQueueAuthorizationRuleResult]func LookupQueueAuthorizationRule(ctx *Context, args *LookupQueueAuthorizationRuleArgs, opts ...InvokeOption) (*LookupQueueAuthorizationRuleResult, error)
func LookupQueueAuthorizationRuleOutput(ctx *Context, args *LookupQueueAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupQueueAuthorizationRuleResultOutput> Note: This function is named LookupQueueAuthorizationRule in the Go SDK.
public static class GetQueueAuthorizationRule 
{
    public static Task<GetQueueAuthorizationRuleResult> InvokeAsync(GetQueueAuthorizationRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetQueueAuthorizationRuleResult> Invoke(GetQueueAuthorizationRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetQueueAuthorizationRuleResult> getQueueAuthorizationRule(GetQueueAuthorizationRuleArgs args, InvokeOptions options)
public static Output<GetQueueAuthorizationRuleResult> getQueueAuthorizationRule(GetQueueAuthorizationRuleArgs args, InvokeOptions options)
fn::invoke:
  function: azure:servicebus/getQueueAuthorizationRule:getQueueAuthorizationRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of this ServiceBus Queue Authorisation Rule.
- NamespaceName string
- The name of the ServiceBus Namespace.
- QueueId string
- QueueName string
- The name of the ServiceBus Queue.
- ResourceGroup stringName 
- The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
- Name string
- The name of this ServiceBus Queue Authorisation Rule.
- NamespaceName string
- The name of the ServiceBus Namespace.
- QueueId string
- QueueName string
- The name of the ServiceBus Queue.
- ResourceGroup stringName 
- The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
- name String
- The name of this ServiceBus Queue Authorisation Rule.
- namespaceName String
- The name of the ServiceBus Namespace.
- queueId String
- queueName String
- The name of the ServiceBus Queue.
- resourceGroup StringName 
- The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
- name string
- The name of this ServiceBus Queue Authorisation Rule.
- namespaceName string
- The name of the ServiceBus Namespace.
- queueId string
- queueName string
- The name of the ServiceBus Queue.
- resourceGroup stringName 
- The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
- name str
- The name of this ServiceBus Queue Authorisation Rule.
- namespace_name str
- The name of the ServiceBus Namespace.
- queue_id str
- queue_name str
- The name of the ServiceBus Queue.
- resource_group_ strname 
- The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
- name String
- The name of this ServiceBus Queue Authorisation Rule.
- namespaceName String
- The name of the ServiceBus Namespace.
- queueId String
- queueName String
- The name of the ServiceBus Queue.
- resourceGroup StringName 
- The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
getQueueAuthorizationRule Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Listen bool
- Manage bool
- Name string
- PrimaryConnection stringString 
- The Primary Connection String for the ServiceBus Queue authorization Rule.
- PrimaryConnection stringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- PrimaryKey string
- The Primary Key for the ServiceBus Queue authorization Rule.
- SecondaryConnection stringString 
- The Secondary Connection String for the ServiceBus Queue authorization Rule.
- SecondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- SecondaryKey string
- The Secondary Key for the ServiceBus Queue authorization Rule.
- Send bool
- NamespaceName string
- QueueId string
- QueueName string
- ResourceGroup stringName 
- Id string
- The provider-assigned unique ID for this managed resource.
- Listen bool
- Manage bool
- Name string
- PrimaryConnection stringString 
- The Primary Connection String for the ServiceBus Queue authorization Rule.
- PrimaryConnection stringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- PrimaryKey string
- The Primary Key for the ServiceBus Queue authorization Rule.
- SecondaryConnection stringString 
- The Secondary Connection String for the ServiceBus Queue authorization Rule.
- SecondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- SecondaryKey string
- The Secondary Key for the ServiceBus Queue authorization Rule.
- Send bool
- NamespaceName string
- QueueId string
- QueueName string
- ResourceGroup stringName 
- id String
- The provider-assigned unique ID for this managed resource.
- listen Boolean
- manage Boolean
- name String
- primaryConnection StringString 
- The Primary Connection String for the ServiceBus Queue authorization Rule.
- primaryConnection StringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primaryKey String
- The Primary Key for the ServiceBus Queue authorization Rule.
- secondaryConnection StringString 
- The Secondary Connection String for the ServiceBus Queue authorization Rule.
- secondaryConnection StringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondaryKey String
- The Secondary Key for the ServiceBus Queue authorization Rule.
- send Boolean
- namespaceName String
- queueId String
- queueName String
- resourceGroup StringName 
- id string
- The provider-assigned unique ID for this managed resource.
- listen boolean
- manage boolean
- name string
- primaryConnection stringString 
- The Primary Connection String for the ServiceBus Queue authorization Rule.
- primaryConnection stringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primaryKey string
- The Primary Key for the ServiceBus Queue authorization Rule.
- secondaryConnection stringString 
- The Secondary Connection String for the ServiceBus Queue authorization Rule.
- secondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondaryKey string
- The Secondary Key for the ServiceBus Queue authorization Rule.
- send boolean
- namespaceName string
- queueId string
- queueName string
- resourceGroup stringName 
- id str
- The provider-assigned unique ID for this managed resource.
- listen bool
- manage bool
- name str
- primary_connection_ strstring 
- The Primary Connection String for the ServiceBus Queue authorization Rule.
- primary_connection_ strstring_ alias 
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primary_key str
- The Primary Key for the ServiceBus Queue authorization Rule.
- secondary_connection_ strstring 
- The Secondary Connection String for the ServiceBus Queue authorization Rule.
- secondary_connection_ strstring_ alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondary_key str
- The Secondary Key for the ServiceBus Queue authorization Rule.
- send bool
- namespace_name str
- queue_id str
- queue_name str
- resource_group_ strname 
- id String
- The provider-assigned unique ID for this managed resource.
- listen Boolean
- manage Boolean
- name String
- primaryConnection StringString 
- The Primary Connection String for the ServiceBus Queue authorization Rule.
- primaryConnection StringString Alias 
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primaryKey String
- The Primary Key for the ServiceBus Queue authorization Rule.
- secondaryConnection StringString 
- The Secondary Connection String for the ServiceBus Queue authorization Rule.
- secondaryConnection StringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondaryKey String
- The Secondary Key for the ServiceBus Queue authorization Rule.
- send Boolean
- namespaceName String
- queueId String
- queueName String
- resourceGroup StringName 
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.