We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.servicebus.getTopicAuthorizationRule
Explore with Pulumi AI
Use this data source to access information about a ServiceBus Topic Authorization Rule within a ServiceBus Topic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getTopicAuthorizationRule({
    name: "example-tfex_name",
    resourceGroupName: "example-resources",
    namespaceName: "example-namespace",
    topicName: "example-servicebus_topic",
});
export const servicebusAuthorizationRuleId = exampleAzuremServicebusTopicAuthorizationRule.id;
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_topic_authorization_rule(name="example-tfex_name",
    resource_group_name="example-resources",
    namespace_name="example-namespace",
    topic_name="example-servicebus_topic")
pulumi.export("servicebusAuthorizationRuleId", example_azurem_servicebus_topic_authorization_rule["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 {
		_, err := servicebus.LookupTopicAuthorizationRule(ctx, &servicebus.LookupTopicAuthorizationRuleArgs{
			Name:              "example-tfex_name",
			ResourceGroupName: pulumi.StringRef("example-resources"),
			NamespaceName:     pulumi.StringRef("example-namespace"),
			TopicName:         pulumi.StringRef("example-servicebus_topic"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("servicebusAuthorizationRuleId", exampleAzuremServicebusTopicAuthorizationRule.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.ServiceBus.GetTopicAuthorizationRule.Invoke(new()
    {
        Name = "example-tfex_name",
        ResourceGroupName = "example-resources",
        NamespaceName = "example-namespace",
        TopicName = "example-servicebus_topic",
    });
    return new Dictionary<string, object?>
    {
        ["servicebusAuthorizationRuleId"] = exampleAzuremServicebusTopicAuthorizationRule.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.GetTopicAuthorizationRuleArgs;
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.getTopicAuthorizationRule(GetTopicAuthorizationRuleArgs.builder()
            .name("example-tfex_name")
            .resourceGroupName("example-resources")
            .namespaceName("example-namespace")
            .topicName("example-servicebus_topic")
            .build());
        ctx.export("servicebusAuthorizationRuleId", exampleAzuremServicebusTopicAuthorizationRule.id());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:servicebus:getTopicAuthorizationRule
      arguments:
        name: example-tfex_name
        resourceGroupName: example-resources
        namespaceName: example-namespace
        topicName: example-servicebus_topic
outputs:
  servicebusAuthorizationRuleId: ${exampleAzuremServicebusTopicAuthorizationRule.id}
Using getTopicAuthorizationRule
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 getTopicAuthorizationRule(args: GetTopicAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetTopicAuthorizationRuleResult>
function getTopicAuthorizationRuleOutput(args: GetTopicAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetTopicAuthorizationRuleResult>def get_topic_authorization_rule(name: Optional[str] = None,
                                 namespace_name: Optional[str] = None,
                                 queue_name: Optional[str] = None,
                                 resource_group_name: Optional[str] = None,
                                 topic_id: Optional[str] = None,
                                 topic_name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetTopicAuthorizationRuleResult
def get_topic_authorization_rule_output(name: Optional[pulumi.Input[str]] = None,
                                 namespace_name: Optional[pulumi.Input[str]] = None,
                                 queue_name: Optional[pulumi.Input[str]] = None,
                                 resource_group_name: Optional[pulumi.Input[str]] = None,
                                 topic_id: Optional[pulumi.Input[str]] = None,
                                 topic_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetTopicAuthorizationRuleResult]func LookupTopicAuthorizationRule(ctx *Context, args *LookupTopicAuthorizationRuleArgs, opts ...InvokeOption) (*LookupTopicAuthorizationRuleResult, error)
func LookupTopicAuthorizationRuleOutput(ctx *Context, args *LookupTopicAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupTopicAuthorizationRuleResultOutput> Note: This function is named LookupTopicAuthorizationRule in the Go SDK.
public static class GetTopicAuthorizationRule 
{
    public static Task<GetTopicAuthorizationRuleResult> InvokeAsync(GetTopicAuthorizationRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetTopicAuthorizationRuleResult> Invoke(GetTopicAuthorizationRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTopicAuthorizationRuleResult> getTopicAuthorizationRule(GetTopicAuthorizationRuleArgs args, InvokeOptions options)
public static Output<GetTopicAuthorizationRuleResult> getTopicAuthorizationRule(GetTopicAuthorizationRuleArgs args, InvokeOptions options)
fn::invoke:
  function: azure:servicebus/getTopicAuthorizationRule:getTopicAuthorizationRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the ServiceBus Topic Authorization Rule resource.
- NamespaceName string
- The name of the ServiceBus Namespace.
- QueueName string
- ResourceGroup stringName 
- The name of the resource group in which the ServiceBus Namespace exists.
- TopicId string
- TopicName string
- The name of the ServiceBus Topic.
- Name string
- The name of the ServiceBus Topic Authorization Rule resource.
- NamespaceName string
- The name of the ServiceBus Namespace.
- QueueName string
- ResourceGroup stringName 
- The name of the resource group in which the ServiceBus Namespace exists.
- TopicId string
- TopicName string
- The name of the ServiceBus Topic.
- name String
- The name of the ServiceBus Topic Authorization Rule resource.
- namespaceName String
- The name of the ServiceBus Namespace.
- queueName String
- resourceGroup StringName 
- The name of the resource group in which the ServiceBus Namespace exists.
- topicId String
- topicName String
- The name of the ServiceBus Topic.
- name string
- The name of the ServiceBus Topic Authorization Rule resource.
- namespaceName string
- The name of the ServiceBus Namespace.
- queueName string
- resourceGroup stringName 
- The name of the resource group in which the ServiceBus Namespace exists.
- topicId string
- topicName string
- The name of the ServiceBus Topic.
- name str
- The name of the ServiceBus Topic Authorization Rule resource.
- namespace_name str
- The name of the ServiceBus Namespace.
- queue_name str
- resource_group_ strname 
- The name of the resource group in which the ServiceBus Namespace exists.
- topic_id str
- topic_name str
- The name of the ServiceBus Topic.
- name String
- The name of the ServiceBus Topic Authorization Rule resource.
- namespaceName String
- The name of the ServiceBus Namespace.
- queueName String
- resourceGroup StringName 
- The name of the resource group in which the ServiceBus Namespace exists.
- topicId String
- topicName String
- The name of the ServiceBus Topic.
getTopicAuthorizationRule 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 Topic 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 Topic authorization Rule.
- SecondaryConnection stringString 
- The Secondary Connection String for the ServiceBus Topic authorization Rule.
- SecondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- SecondaryKey string
- The Secondary Key for the ServiceBus Topic authorization Rule.
- Send bool
- NamespaceName string
- QueueName string
- ResourceGroup stringName 
- TopicId string
- TopicName string
- 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 Topic 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 Topic authorization Rule.
- SecondaryConnection stringString 
- The Secondary Connection String for the ServiceBus Topic authorization Rule.
- SecondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- SecondaryKey string
- The Secondary Key for the ServiceBus Topic authorization Rule.
- Send bool
- NamespaceName string
- QueueName string
- ResourceGroup stringName 
- TopicId string
- TopicName string
- 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 Topic 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 Topic authorization Rule.
- secondaryConnection StringString 
- The Secondary Connection String for the ServiceBus Topic authorization Rule.
- secondaryConnection StringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondaryKey String
- The Secondary Key for the ServiceBus Topic authorization Rule.
- send Boolean
- namespaceName String
- queueName String
- resourceGroup StringName 
- topicId String
- topicName String
- 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 Topic 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 Topic authorization Rule.
- secondaryConnection stringString 
- The Secondary Connection String for the ServiceBus Topic authorization Rule.
- secondaryConnection stringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondaryKey string
- The Secondary Key for the ServiceBus Topic authorization Rule.
- send boolean
- namespaceName string
- queueName string
- resourceGroup stringName 
- topicId string
- topicName string
- 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 Topic 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 Topic authorization Rule.
- secondary_connection_ strstring 
- The Secondary Connection String for the ServiceBus Topic authorization Rule.
- secondary_connection_ strstring_ alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondary_key str
- The Secondary Key for the ServiceBus Topic authorization Rule.
- send bool
- namespace_name str
- queue_name str
- resource_group_ strname 
- topic_id str
- topic_name str
- 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 Topic 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 Topic authorization Rule.
- secondaryConnection StringString 
- The Secondary Connection String for the ServiceBus Topic authorization Rule.
- secondaryConnection StringString Alias 
- The alias Secondary Connection String for the ServiceBus Namespace
- secondaryKey String
- The Secondary Key for the ServiceBus Topic authorization Rule.
- send Boolean
- namespaceName String
- queueName String
- resourceGroup StringName 
- topicId String
- topicName String
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.