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

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.servicebus.getTopic

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    Use this data source to access information about an existing Service Bus Topic.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.servicebus.getTopic({
        name: "existing",
        namespaceId: "existing",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.servicebus.get_topic(name="existing",
        namespace_id="existing")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := servicebus.LookupTopic(ctx, &servicebus.LookupTopicArgs{
    			Name:        "existing",
    			NamespaceId: pulumi.StringRef("existing"),
    		}, 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.GetTopic.Invoke(new()
        {
            Name = "existing",
            NamespaceId = "existing",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getTopicResult => getTopicResult.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.GetTopicArgs;
    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.getTopic(GetTopicArgs.builder()
                .name("existing")
                .namespaceId("existing")
                .build());
    
            ctx.export("id", example.applyValue(getTopicResult -> getTopicResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:servicebus:getTopic
          Arguments:
            name: existing
            namespaceId: existing
    outputs:
      id: ${example.id}
    

    Using getTopic

    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 getTopic(args: GetTopicArgs, opts?: InvokeOptions): Promise<GetTopicResult>
    function getTopicOutput(args: GetTopicOutputArgs, opts?: InvokeOptions): Output<GetTopicResult>
    def get_topic(name: Optional[str] = None,
                  namespace_id: Optional[str] = None,
                  namespace_name: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetTopicResult
    def get_topic_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[GetTopicResult]
    func LookupTopic(ctx *Context, args *LookupTopicArgs, opts ...InvokeOption) (*LookupTopicResult, error)
    func LookupTopicOutput(ctx *Context, args *LookupTopicOutputArgs, opts ...InvokeOption) LookupTopicResultOutput

    > Note: This function is named LookupTopic in the Go SDK.

    public static class GetTopic 
    {
        public static Task<GetTopicResult> InvokeAsync(GetTopicArgs args, InvokeOptions? opts = null)
        public static Output<GetTopicResult> Invoke(GetTopicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTopicResult> getTopic(GetTopicArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:servicebus/getTopic:getTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of this Service Bus Topic.
    NamespaceId string
    The ID of the ServiceBus Namespace where the Service Bus Topic exists.
    NamespaceName string
    The name of the Service Bus Namespace.

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

    ResourceGroupName string

    The name of the Resource Group where the Service Bus Topic exists.

    Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.

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

    Name string
    The name of this Service Bus Topic.
    NamespaceId string
    The ID of the ServiceBus Namespace where the Service Bus Topic exists.
    NamespaceName string
    The name of the Service Bus Namespace.

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

    ResourceGroupName string

    The name of the Resource Group where the Service Bus Topic exists.

    Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.

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

    name String
    The name of this Service Bus Topic.
    namespaceId String
    The ID of the ServiceBus Namespace where the Service Bus Topic exists.
    namespaceName String
    The name of the Service Bus Namespace.

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

    resourceGroupName String

    The name of the Resource Group where the Service Bus Topic exists.

    Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.

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

    name string
    The name of this Service Bus Topic.
    namespaceId string
    The ID of the ServiceBus Namespace where the Service Bus Topic exists.
    namespaceName string
    The name of the Service Bus Namespace.

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

    resourceGroupName string

    The name of the Resource Group where the Service Bus Topic exists.

    Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.

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

    name str
    The name of this Service Bus Topic.
    namespace_id str
    The ID of the ServiceBus Namespace where the Service Bus Topic exists.
    namespace_name str
    The name of the Service Bus Namespace.

    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

    The name of the Resource Group where the Service Bus Topic exists.

    Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.

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

    name String
    The name of this Service Bus Topic.
    namespaceId String
    The ID of the ServiceBus Namespace where the Service Bus Topic exists.
    namespaceName String
    The name of the Service Bus Namespace.

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

    resourceGroupName String

    The name of the Resource Group where the Service Bus Topic exists.

    Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.

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

    getTopic Result

    The following output properties are available:

    AutoDeleteOnIdle string
    The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
    DefaultMessageTtl string
    The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
    DuplicateDetectionHistoryTimeWindow string
    The ISO 8601 timespan duration during which duplicates can be detected.
    EnableBatchedOperations bool
    Boolean flag which controls if server-side batched operations are enabled.
    EnableExpress bool
    Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
    EnablePartitioning bool
    Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
    Id string
    The provider-assigned unique ID for this managed resource.
    MaxSizeInMegabytes int
    Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
    Name string
    RequiresDuplicateDetection bool
    Boolean flag which controls whether the Topic requires duplicate detection.
    Status string
    The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
    SupportOrdering bool
    Boolean flag which controls whether the Topic supports ordering.
    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.

    AutoDeleteOnIdle string
    The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
    DefaultMessageTtl string
    The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
    DuplicateDetectionHistoryTimeWindow string
    The ISO 8601 timespan duration during which duplicates can be detected.
    EnableBatchedOperations bool
    Boolean flag which controls if server-side batched operations are enabled.
    EnableExpress bool
    Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
    EnablePartitioning bool
    Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
    Id string
    The provider-assigned unique ID for this managed resource.
    MaxSizeInMegabytes int
    Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
    Name string
    RequiresDuplicateDetection bool
    Boolean flag which controls whether the Topic requires duplicate detection.
    Status string
    The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
    SupportOrdering bool
    Boolean flag which controls whether the Topic supports ordering.
    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.

    autoDeleteOnIdle String
    The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
    defaultMessageTtl String
    The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
    duplicateDetectionHistoryTimeWindow String
    The ISO 8601 timespan duration during which duplicates can be detected.
    enableBatchedOperations Boolean
    Boolean flag which controls if server-side batched operations are enabled.
    enableExpress Boolean
    Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
    enablePartitioning Boolean
    Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
    id String
    The provider-assigned unique ID for this managed resource.
    maxSizeInMegabytes Integer
    Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
    name String
    requiresDuplicateDetection Boolean
    Boolean flag which controls whether the Topic requires duplicate detection.
    status String
    The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
    supportOrdering Boolean
    Boolean flag which controls whether the Topic supports ordering.
    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.

    autoDeleteOnIdle string
    The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
    defaultMessageTtl string
    The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
    duplicateDetectionHistoryTimeWindow string
    The ISO 8601 timespan duration during which duplicates can be detected.
    enableBatchedOperations boolean
    Boolean flag which controls if server-side batched operations are enabled.
    enableExpress boolean
    Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
    enablePartitioning boolean
    Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
    id string
    The provider-assigned unique ID for this managed resource.
    maxSizeInMegabytes number
    Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
    name string
    requiresDuplicateDetection boolean
    Boolean flag which controls whether the Topic requires duplicate detection.
    status string
    The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
    supportOrdering boolean
    Boolean flag which controls whether the Topic supports ordering.
    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.

    auto_delete_on_idle str
    The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
    default_message_ttl str
    The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
    duplicate_detection_history_time_window str
    The ISO 8601 timespan duration during which duplicates can be detected.
    enable_batched_operations bool
    Boolean flag which controls if server-side batched operations are enabled.
    enable_express bool
    Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
    enable_partitioning bool
    Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
    id str
    The provider-assigned unique ID for this managed resource.
    max_size_in_megabytes int
    Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
    name str
    requires_duplicate_detection bool
    Boolean flag which controls whether the Topic requires duplicate detection.
    status str
    The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
    support_ordering bool
    Boolean flag which controls whether the Topic supports ordering.
    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.

    autoDeleteOnIdle String
    The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
    defaultMessageTtl String
    The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
    duplicateDetectionHistoryTimeWindow String
    The ISO 8601 timespan duration during which duplicates can be detected.
    enableBatchedOperations Boolean
    Boolean flag which controls if server-side batched operations are enabled.
    enableExpress Boolean
    Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
    enablePartitioning Boolean
    Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
    id String
    The provider-assigned unique ID for this managed resource.
    maxSizeInMegabytes Number
    Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
    name String
    requiresDuplicateDetection Boolean
    Boolean flag which controls whether the Topic requires duplicate detection.
    status String
    The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
    supportOrdering Boolean
    Boolean flag which controls whether the Topic supports ordering.
    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 v5.73.0 published on Monday, Apr 22, 2024 by Pulumi