Microsoft.ServiceBus namespaces/topics/subscriptions 2021-01-01-preview

Template format

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

  "name": "string",
  "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions",
  "apiVersion": "2021-01-01-preview",
  "properties": {
    "lockDuration": "string",
    "requiresSession": "boolean",
    "defaultMessageTimeToLive": "string",
    "deadLetteringOnFilterEvaluationExceptions": "boolean",
    "deadLetteringOnMessageExpiration": "boolean",
    "duplicateDetectionHistoryTimeWindow": "string",
    "maxDeliveryCount": "integer",
    "status": "string",
    "enableBatchedOperations": "boolean",
    "autoDeleteOnIdle": "string",
    "forwardTo": "string",
    "forwardDeadLetteredMessagesTo": "string"

Property values

The following tables describe the values you need to set in the schema.

Microsoft.ServiceBus/namespaces/topics/subscriptions object


In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes The subscription name.
type enum Yes For JSON -subscriptions

See Set name and type for child resources.
apiVersion enum Yes For JSON - 2021-01-01-preview
properties object Yes Properties of subscriptions resource. - SBSubscriptionProperties object

SBSubscriptionProperties object

Name Type Required Value
lockDuration string No ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
requiresSession boolean No Value indicating if a subscription supports the concept of sessions.
defaultMessageTimeToLive string No ISO 8061 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.
deadLetteringOnFilterEvaluationExceptions boolean No Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.
deadLetteringOnMessageExpiration boolean No Value that indicates whether a subscription has dead letter support when a message expires.
duplicateDetectionHistoryTimeWindow string No ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
maxDeliveryCount integer No Number of maximum deliveries.
status enum No Enumerates the possible values for the status of a messaging entity. - Active, Disabled, Restoring, SendDisabled, ReceiveDisabled, Creating, Deleting, Renaming, Unknown
enableBatchedOperations boolean No Value that indicates whether server-side batched operations are enabled.
autoDeleteOnIdle string No ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes.
forwardTo string No Queue/Topic name to forward the messages
forwardDeadLetteredMessagesTo string No Queue/Topic name to forward the Dead Letter message

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
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