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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.servicebus.getQueueAuthorizationRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:servicebus/getQueueAuthorizationRule:getQueueAuthorizationRule
      arguments:
        # arguments dictionary

    The 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.
    ResourceGroupName string
    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.
    ResourceGroupName string
    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.
    resourceGroupName String
    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.
    resourceGroupName string
    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_name str
    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.
    resourceGroupName String
    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
    PrimaryConnectionString string
    The Primary Connection String for the ServiceBus Queue authorization Rule.
    PrimaryConnectionStringAlias string
    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.
    SecondaryConnectionString string
    The Secondary Connection String for the ServiceBus Queue authorization Rule.
    SecondaryConnectionStringAlias string
    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
    ResourceGroupName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Listen bool
    Manage bool
    Name string
    PrimaryConnectionString string
    The Primary Connection String for the ServiceBus Queue authorization Rule.
    PrimaryConnectionStringAlias string
    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.
    SecondaryConnectionString string
    The Secondary Connection String for the ServiceBus Queue authorization Rule.
    SecondaryConnectionStringAlias string
    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
    ResourceGroupName string
    id String
    The provider-assigned unique ID for this managed resource.
    listen Boolean
    manage Boolean
    name String
    primaryConnectionString String
    The Primary Connection String for the ServiceBus Queue authorization Rule.
    primaryConnectionStringAlias String
    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.
    secondaryConnectionString String
    The Secondary Connection String for the ServiceBus Queue authorization Rule.
    secondaryConnectionStringAlias String
    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
    resourceGroupName String
    id string
    The provider-assigned unique ID for this managed resource.
    listen boolean
    manage boolean
    name string
    primaryConnectionString string
    The Primary Connection String for the ServiceBus Queue authorization Rule.
    primaryConnectionStringAlias string
    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.
    secondaryConnectionString string
    The Secondary Connection String for the ServiceBus Queue authorization Rule.
    secondaryConnectionStringAlias string
    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
    resourceGroupName string
    id str
    The provider-assigned unique ID for this managed resource.
    listen bool
    manage bool
    name str
    primary_connection_string str
    The Primary Connection String for the ServiceBus Queue 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 Key for the ServiceBus Queue authorization Rule.
    secondary_connection_string str
    The Secondary Connection String for the ServiceBus Queue authorization Rule.
    secondary_connection_string_alias str
    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_name str
    id String
    The provider-assigned unique ID for this managed resource.
    listen Boolean
    manage Boolean
    name String
    primaryConnectionString String
    The Primary Connection String for the ServiceBus Queue authorization Rule.
    primaryConnectionStringAlias String
    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.
    secondaryConnectionString String
    The Secondary Connection String for the ServiceBus Queue authorization Rule.
    secondaryConnectionStringAlias String
    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
    resourceGroupName String

    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 v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi