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

Bicep resource definition

The namespaces/topics/subscriptions/rules 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/subscriptions/rules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.ServiceBus/namespaces/topics/subscriptions/rules@2022-10-01-preview' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    action: {
      compatibilityLevel: int
      requiresPreprocessing: bool
      sqlExpression: 'string'
    }
    correlationFilter: {
      contentType: 'string'
      correlationId: 'string'
      label: 'string'
      messageId: 'string'
      properties: {
        {customized property}: 'string'
      }
      replyTo: 'string'
      replyToSessionId: 'string'
      requiresPreprocessing: bool
      sessionId: 'string'
      to: 'string'
    }
    filterType: 'string'
    sqlFilter: {
      compatibilityLevel: int
      requiresPreprocessing: bool
      sqlExpression: 'string'
    }
  }
}

Property values

namespaces/topics/subscriptions/rules

Name Description Value
name The resource name

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

Character limit: 1-50

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

Start and end with alphnumeric.
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: subscriptions
properties Properties of Rule resource Ruleproperties

Ruleproperties

Name Description Value
action Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression. Action
correlationFilter Properties of correlationFilter CorrelationFilter
filterType Filter type that is evaluated against a BrokeredMessage. 'CorrelationFilter'
'SqlFilter'
sqlFilter Properties of sqlFilter SqlFilter

Action

Name Description Value
compatibilityLevel This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. int
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sqlExpression SQL expression. e.g. MyProperty='ABC' string

CorrelationFilter

Name Description Value
contentType Content type of the message. string
correlationId Identifier of the correlation. string
label Application specific label. string
messageId Identifier of the message. string
properties dictionary object for custom filters CorrelationFilterProperties
replyTo Address of the queue to reply to. string
replyToSessionId Session identifier to reply to. string
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sessionId Session identifier. string
to Address to send to. string

CorrelationFilterProperties

Name Description Value
{customized property} string

SqlFilter

Name Description Value
compatibilityLevel This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. int
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sqlExpression The SQL expression. e.g. MyProperty='ABC' string

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

ARM template resource definition

The namespaces/topics/subscriptions/rules 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/subscriptions/rules resource, add the following JSON to your template.

{
  "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules",
  "apiVersion": "2022-10-01-preview",
  "name": "string",
  "properties": {
    "action": {
      "compatibilityLevel": "int",
      "requiresPreprocessing": "bool",
      "sqlExpression": "string"
    },
    "correlationFilter": {
      "contentType": "string",
      "correlationId": "string",
      "label": "string",
      "messageId": "string",
      "properties": {
        "{customized property}": "string"
      },
      "replyTo": "string",
      "replyToSessionId": "string",
      "requiresPreprocessing": "bool",
      "sessionId": "string",
      "to": "string"
    },
    "filterType": "string",
    "sqlFilter": {
      "compatibilityLevel": "int",
      "requiresPreprocessing": "bool",
      "sqlExpression": "string"
    }
  }
}

Property values

namespaces/topics/subscriptions/rules

Name Description Value
type The resource type 'Microsoft.ServiceBus/namespaces/topics/subscriptions/rules'
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-50

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

Start and end with alphnumeric.
properties Properties of Rule resource Ruleproperties

Ruleproperties

Name Description Value
action Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression. Action
correlationFilter Properties of correlationFilter CorrelationFilter
filterType Filter type that is evaluated against a BrokeredMessage. 'CorrelationFilter'
'SqlFilter'
sqlFilter Properties of sqlFilter SqlFilter

Action

Name Description Value
compatibilityLevel This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. int
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sqlExpression SQL expression. e.g. MyProperty='ABC' string

CorrelationFilter

Name Description Value
contentType Content type of the message. string
correlationId Identifier of the correlation. string
label Application specific label. string
messageId Identifier of the message. string
properties dictionary object for custom filters CorrelationFilterProperties
replyTo Address of the queue to reply to. string
replyToSessionId Session identifier to reply to. string
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sessionId Session identifier. string
to Address to send to. string

CorrelationFilterProperties

Name Description Value
{customized property} string

SqlFilter

Name Description Value
compatibilityLevel This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. int
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sqlExpression The SQL expression. e.g. MyProperty='ABC' string

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

Terraform (AzAPI provider) resource definition

The namespaces/topics/subscriptions/rules 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/subscriptions/rules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules@2022-10-01-preview"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      action = {
        compatibilityLevel = int
        requiresPreprocessing = bool
        sqlExpression = "string"
      }
      correlationFilter = {
        contentType = "string"
        correlationId = "string"
        label = "string"
        messageId = "string"
        properties = {
          {customized property} = "string"
        }
        replyTo = "string"
        replyToSessionId = "string"
        requiresPreprocessing = bool
        sessionId = "string"
        to = "string"
      }
      filterType = "string"
      sqlFilter = {
        compatibilityLevel = int
        requiresPreprocessing = bool
        sqlExpression = "string"
      }
    }
  })
}

Property values

namespaces/topics/subscriptions/rules

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

Character limit: 1-50

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

Start and end with alphnumeric.
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: subscriptions
properties Properties of Rule resource Ruleproperties

Ruleproperties

Name Description Value
action Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression. Action
correlationFilter Properties of correlationFilter CorrelationFilter
filterType Filter type that is evaluated against a BrokeredMessage. "CorrelationFilter"
"SqlFilter"
sqlFilter Properties of sqlFilter SqlFilter

Action

Name Description Value
compatibilityLevel This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. int
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sqlExpression SQL expression. e.g. MyProperty='ABC' string

CorrelationFilter

Name Description Value
contentType Content type of the message. string
correlationId Identifier of the correlation. string
label Application specific label. string
messageId Identifier of the message. string
properties dictionary object for custom filters CorrelationFilterProperties
replyTo Address of the queue to reply to. string
replyToSessionId Session identifier to reply to. string
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sessionId Session identifier. string
to Address to send to. string

CorrelationFilterProperties

Name Description Value
{customized property} string

SqlFilter

Name Description Value
compatibilityLevel This property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20. int
requiresPreprocessing Value that indicates whether the rule action requires preprocessing. bool
sqlExpression The SQL expression. e.g. MyProperty='ABC' string