Microsoft.ServiceBus namespaces/topics/subscriptions/rules
Bicep resource definition
The namespaces/topics/subscriptions/rules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
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@2024-01-01' = {
parent: resourceSymbolicName
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
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 |
---|
Microsoft.ServiceBus/namespaces/topics/subscriptions/rules
Name | Description | Value |
---|---|---|
name | The resource name | string Constraints: Min length = 1 Max length = 1 (required) |
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/topics/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 |
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 |
ARM template resource definition
The namespaces/topics/subscriptions/rules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
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": "2024-01-01",
"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
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 |
---|
Microsoft.ServiceBus/namespaces/topics/subscriptions/rules
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2024-01-01' |
name | The resource name | string Constraints: Min length = 1 Max length = 1 (required) |
properties | Properties of Rule resource | Ruleproperties |
type | The resource type | 'Microsoft.ServiceBus/namespaces/topics/subscriptions/rules' |
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 |
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 |
---|---|
Correlating messages over Logic Apps using Service Bus |
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@2024-01-01"
name = "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
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 |
---|
Microsoft.ServiceBus/namespaces/topics/subscriptions/rules
Name | Description | Value |
---|---|---|
name | The resource name | string Constraints: Min length = 1 Max length = 1 (required) |
parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: namespaces/topics/subscriptions |
properties | Properties of Rule resource | Ruleproperties |
type | The resource type | "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules@2024-01-01" |
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 |
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 |