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

We recommend using Azure Native.

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

azure.servicebus.getTopicAuthorizationRule

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

    The 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
    ResourceGroupName string
    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
    ResourceGroupName string
    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
    resourceGroupName String
    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
    resourceGroupName string
    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_name str
    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
    resourceGroupName String
    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
    PrimaryConnectionString string
    The Primary Connection String for the ServiceBus Topic 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 Topic authorization Rule.
    SecondaryConnectionString string
    The Secondary Connection String for the ServiceBus Topic authorization Rule.
    SecondaryConnectionStringAlias string
    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
    ResourceGroupName string
    TopicId string
    TopicName 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 Topic 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 Topic authorization Rule.
    SecondaryConnectionString string
    The Secondary Connection String for the ServiceBus Topic authorization Rule.
    SecondaryConnectionStringAlias string
    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
    ResourceGroupName string
    TopicId string
    TopicName 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 Topic 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 Topic authorization Rule.
    secondaryConnectionString String
    The Secondary Connection String for the ServiceBus Topic authorization Rule.
    secondaryConnectionStringAlias String
    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
    resourceGroupName String
    topicId String
    topicName 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 Topic 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 Topic authorization Rule.
    secondaryConnectionString string
    The Secondary Connection String for the ServiceBus Topic authorization Rule.
    secondaryConnectionStringAlias string
    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
    resourceGroupName string
    topicId string
    topicName 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 Topic 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 Topic authorization Rule.
    secondary_connection_string str
    The Secondary Connection String for the ServiceBus Topic 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 Topic authorization Rule.
    send bool
    namespace_name str
    queue_name str
    resource_group_name str
    topic_id str
    topic_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 Topic 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 Topic authorization Rule.
    secondaryConnectionString String
    The Secondary Connection String for the ServiceBus Topic authorization Rule.
    secondaryConnectionStringAlias String
    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
    resourceGroupName String
    topicId String
    topicName 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 Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi