Microsoft.ServiceBus namespaces/topics 2022-10-01-preview

Bicep resource definition

The namespaces/topics resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.ServiceBus/namespaces/topics resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.ServiceBus/namespaces/topics@2022-10-01-preview' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    autoDeleteOnIdle: 'string'
    defaultMessageTimeToLive: 'string'
    duplicateDetectionHistoryTimeWindow: 'string'
    enableBatchedOperations: bool
    enableExpress: bool
    enablePartitioning: bool
    maxMessageSizeInKilobytes: int
    maxSizeInMegabytes: int
    requiresDuplicateDetection: bool
    status: 'string'
    supportOrdering: bool
  }
}

Property values

namespaces/topics

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)

Character limit: 1-260

Valid characters:
Alphanumerics, periods, hyphens, underscores, and slashes.

Start and end with alphanumeric.
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: namespaces
properties Properties of topic resource. SBTopicProperties

SBTopicProperties

Name Description Value
autoDeleteOnIdle ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. string
defaultMessageTimeToLive ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. string
duplicateDetectionHistoryTimeWindow ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. string
enableBatchedOperations Value that indicates whether server-side batched operations are enabled. bool
enableExpress Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. bool
enablePartitioning Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. bool
maxMessageSizeInKilobytes Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. int
maxSizeInMegabytes Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. int
requiresDuplicateDetection Value indicating if this topic requires duplicate detection. bool
status Enumerates the possible values for the status of a messaging entity. 'Active'
'Creating'
'Deleting'
'Disabled'
'ReceiveDisabled'
'Renaming'
'Restoring'
'SendDisabled'
'Unknown'
supportOrdering Value that indicates whether the topic supports ordering. bool

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Integration Patterns - Message Router - Service Bus

Deploy to Azure
Solution which shows how we can set up the Message Router pattern using a Service Bus Topic
Create Azure Event Grid Custom Topic Subscription

Deploy to Azure
Creates an Azure Event Grid custom topic and a service bus topic subscription. Template originally authored by Markus Meyer.
Correlating messages over Logic Apps using Service Bus

Deploy to Azure
which shows how we can correlate messages over Logic Apps using Azure Service Bus
Create a Service Bus namespace, topic, and subscription

Deploy to Azure
This template enables you to deploy a Service Bus Standard namespace, a topic, and a subscription.
Create a Service Bus namespace, topic, subscription and Rule

Deploy to Azure
This template enables you to deploy a Service Bus Standard namespace, a topic, a subscription and a rule.
Create a Service Bus Namespace and Topic

Deploy to Azure
This template creates a Service Bus Namespace and Topic.
Create a Service Bus Topic with Subscription and SQL Filter

Deploy to Azure
This template creates a Service Bus Namespace and Topic with a Subscription using a SQL Filter expression to recieve only the messages that match the defined SQL Filter Expression.

ARM template resource definition

The namespaces/topics resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.ServiceBus/namespaces/topics resource, add the following JSON to your template.

{
  "type": "Microsoft.ServiceBus/namespaces/topics",
  "apiVersion": "2022-10-01-preview",
  "name": "string",
  "properties": {
    "autoDeleteOnIdle": "string",
    "defaultMessageTimeToLive": "string",
    "duplicateDetectionHistoryTimeWindow": "string",
    "enableBatchedOperations": "bool",
    "enableExpress": "bool",
    "enablePartitioning": "bool",
    "maxMessageSizeInKilobytes": "int",
    "maxSizeInMegabytes": "int",
    "requiresDuplicateDetection": "bool",
    "status": "string",
    "supportOrdering": "bool"
  }
}

Property values

namespaces/topics

Name Description Value
type The resource type 'Microsoft.ServiceBus/namespaces/topics'
apiVersion The resource api version '2022-10-01-preview'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)

Character limit: 1-260

Valid characters:
Alphanumerics, periods, hyphens, underscores, and slashes.

Start and end with alphanumeric.
properties Properties of topic resource. SBTopicProperties

SBTopicProperties

Name Description Value
autoDeleteOnIdle ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. string
defaultMessageTimeToLive ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. string
duplicateDetectionHistoryTimeWindow ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. string
enableBatchedOperations Value that indicates whether server-side batched operations are enabled. bool
enableExpress Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. bool
enablePartitioning Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. bool
maxMessageSizeInKilobytes Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. int
maxSizeInMegabytes Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. int
requiresDuplicateDetection Value indicating if this topic requires duplicate detection. bool
status Enumerates the possible values for the status of a messaging entity. 'Active'
'Creating'
'Deleting'
'Disabled'
'ReceiveDisabled'
'Renaming'
'Restoring'
'SendDisabled'
'Unknown'
supportOrdering Value that indicates whether the topic supports ordering. bool

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Integration Patterns - Message Router - Service Bus

Deploy to Azure
Solution which shows how we can set up the Message Router pattern using a Service Bus Topic
Create Azure Event Grid Custom Topic Subscription

Deploy to Azure
Creates an Azure Event Grid custom topic and a service bus topic subscription. Template originally authored by Markus Meyer.
Correlating messages over Logic Apps using Service Bus

Deploy to Azure
which shows how we can correlate messages over Logic Apps using Azure Service Bus
Create a Service Bus namespace, topic, and subscription

Deploy to Azure
This template enables you to deploy a Service Bus Standard namespace, a topic, and a subscription.
Create a Service Bus namespace, topic, subscription and Rule

Deploy to Azure
This template enables you to deploy a Service Bus Standard namespace, a topic, a subscription and a rule.
Create a Service Bus Namespace and Topic

Deploy to Azure
This template creates a Service Bus Namespace and Topic.
Create a Service Bus Topic with Subscription and SQL Filter

Deploy to Azure
This template creates a Service Bus Namespace and Topic with a Subscription using a SQL Filter expression to recieve only the messages that match the defined SQL Filter Expression.

Terraform (AzAPI provider) resource definition

The namespaces/topics resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.ServiceBus/namespaces/topics resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceBus/namespaces/topics@2022-10-01-preview"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      autoDeleteOnIdle = "string"
      defaultMessageTimeToLive = "string"
      duplicateDetectionHistoryTimeWindow = "string"
      enableBatchedOperations = bool
      enableExpress = bool
      enablePartitioning = bool
      maxMessageSizeInKilobytes = int
      maxSizeInMegabytes = int
      requiresDuplicateDetection = bool
      status = "string"
      supportOrdering = bool
    }
  })
}

Property values

namespaces/topics

Name Description Value
type The resource type "Microsoft.ServiceBus/namespaces/topics@2022-10-01-preview"
name The resource name string (required)

Character limit: 1-260

Valid characters:
Alphanumerics, periods, hyphens, underscores, and slashes.

Start and end with alphanumeric.
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: namespaces
properties Properties of topic resource. SBTopicProperties

SBTopicProperties

Name Description Value
autoDeleteOnIdle ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. string
defaultMessageTimeToLive ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. string
duplicateDetectionHistoryTimeWindow ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. string
enableBatchedOperations Value that indicates whether server-side batched operations are enabled. bool
enableExpress Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. bool
enablePartitioning Value that indicates whether the topic to be partitioned across multiple message brokers is enabled. bool
maxMessageSizeInKilobytes Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. int
maxSizeInMegabytes Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. int
requiresDuplicateDetection Value indicating if this topic requires duplicate detection. bool
status Enumerates the possible values for the status of a messaging entity. "Active"
"Creating"
"Deleting"
"Disabled"
"ReceiveDisabled"
"Renaming"
"Restoring"
"SendDisabled"
"Unknown"
supportOrdering Value that indicates whether the topic supports ordering. bool