Share via


Microsoft.EventGrid namespaces/topics/eventSubscriptions 2023-06-01-preview

Bicep resource definition

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

resource symbolicname 'Microsoft.EventGrid/namespaces/topics/eventSubscriptions@2023-06-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    deliveryConfiguration: {
      deliveryMode: 'string'
      queue: {
        deadLetterDestinationWithResourceIdentity: {
          deadLetterDestination: {
            endpointType: 'string'
            // For remaining properties, see DeadLetterDestination objects
          }
          identity: {
            type: 'string'
            userAssignedIdentity: 'string'
          }
        }
        eventTimeToLive: 'string'
        maxDeliveryCount: int
        receiveLockDurationInSeconds: int
      }
    }
    eventDeliverySchema: 'string'
    filtersConfiguration: {
      filters: [
        {
          key: 'string'
          operatorType: 'string'
          // For remaining properties, see Filter objects
        }
      ]
      includedEventTypes: [
        'string'
      ]
    }
  }
}

Filter objects

Set the operatorType property to specify the type of object.

For BoolEquals, use:

{
  operatorType: 'BoolEquals'
  value: bool
}

For IsNotNull, use:

{
  operatorType: 'IsNotNull'
}

For IsNullOrUndefined, use:

{
  operatorType: 'IsNullOrUndefined'
}

For NumberGreaterThan, use:

{
  operatorType: 'NumberGreaterThan'
  value: int
}

For NumberGreaterThanOrEquals, use:

{
  operatorType: 'NumberGreaterThanOrEquals'
  value: int
}

For NumberIn, use:

{
  operatorType: 'NumberIn'
  values: [
    int
  ]
}

For NumberInRange, use:

{
  operatorType: 'NumberInRange'
  values: [
    [
      int
    ]
  ]
}

For NumberLessThan, use:

{
  operatorType: 'NumberLessThan'
  value: int
}

For NumberLessThanOrEquals, use:

{
  operatorType: 'NumberLessThanOrEquals'
  value: int
}

For NumberNotIn, use:

{
  operatorType: 'NumberNotIn'
  values: [
    int
  ]
}

For NumberNotInRange, use:

{
  operatorType: 'NumberNotInRange'
  values: [
    [
      int
    ]
  ]
}

For StringBeginsWith, use:

{
  operatorType: 'StringBeginsWith'
  values: [
    'string'
  ]
}

For StringContains, use:

{
  operatorType: 'StringContains'
  values: [
    'string'
  ]
}

For StringEndsWith, use:

{
  operatorType: 'StringEndsWith'
  values: [
    'string'
  ]
}

For StringIn, use:

{
  operatorType: 'StringIn'
  values: [
    'string'
  ]
}

For StringNotBeginsWith, use:

{
  operatorType: 'StringNotBeginsWith'
  values: [
    'string'
  ]
}

For StringNotContains, use:

{
  operatorType: 'StringNotContains'
  values: [
    'string'
  ]
}

For StringNotEndsWith, use:

{
  operatorType: 'StringNotEndsWith'
  values: [
    'string'
  ]
}

For StringNotIn, use:

{
  operatorType: 'StringNotIn'
  values: [
    'string'
  ]
}

DeadLetterDestination objects

Set the endpointType property to specify the type of object.

For StorageBlob, use:

{
  endpointType: 'StorageBlob'
  properties: {
    blobContainerName: 'string'
    resourceId: 'string'
  }
}

Property Values

Microsoft.EventGrid/namespaces/topics/eventSubscriptions

Name Description Value
name The resource name string

Constraints:
Min length = 3
Max length = 50
Pattern = ^[a-zA-Z0-9-]*$ (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
properties Properties of the event subscription. SubscriptionProperties

BoolEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'BoolEquals' (required)
value The boolean filter value. bool

DeadLetterDestination

Name Description Value
endpointType Set to 'StorageBlob' for type StorageBlobDeadLetterDestination. 'StorageBlob' (required)

DeadLetterWithResourceIdentity

Name Description Value
deadLetterDestination Information about the destination where events have to be delivered for the event subscription.
Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
DeadLetterDestination
identity The identity to use when dead-lettering events. EventSubscriptionIdentity

DeliveryConfiguration

Name Description Value
deliveryMode Delivery mode of the event subscription. 'Queue'
queue This property should be populated when deliveryMode is queue and represents information about the queue subscription. QueueInfo

EventSubscriptionIdentity

Name Description Value
type The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity. 'SystemAssigned'
'UserAssigned'
userAssignedIdentity The user identity associated with the resource. string

Filter

Name Description Value
key The field/property in the event based on which you want to filter. string
operatorType Set to 'BoolEquals' for type BoolEqualsFilter. Set to 'IsNotNull' for type IsNotNullFilter. Set to 'IsNullOrUndefined' for type IsNullOrUndefinedFilter. Set to 'NumberGreaterThan' for type NumberGreaterThanFilter. Set to 'NumberGreaterThanOrEquals' for type NumberGreaterThanOrEqualsFilter. Set to 'NumberIn' for type NumberInFilter. Set to 'NumberInRange' for type NumberInRangeFilter. Set to 'NumberLessThan' for type NumberLessThanFilter. Set to 'NumberLessThanOrEquals' for type NumberLessThanOrEqualsFilter. Set to 'NumberNotIn' for type NumberNotInFilter. Set to 'NumberNotInRange' for type NumberNotInRangeFilter. Set to 'StringBeginsWith' for type StringBeginsWithFilter. Set to 'StringContains' for type StringContainsFilter. Set to 'StringEndsWith' for type StringEndsWithFilter. Set to 'StringIn' for type StringInFilter. Set to 'StringNotBeginsWith' for type StringNotBeginsWithFilter. Set to 'StringNotContains' for type StringNotContainsFilter. Set to 'StringNotEndsWith' for type StringNotEndsWithFilter. Set to 'StringNotIn' for type StringNotInFilter. 'BoolEquals'
'IsNotNull'
'IsNullOrUndefined'
'NumberGreaterThan'
'NumberGreaterThanOrEquals'
'NumberIn'
'NumberInRange'
'NumberLessThan'
'NumberLessThanOrEquals'
'NumberNotIn'
'NumberNotInRange'
'StringBeginsWith'
'StringContains'
'StringEndsWith'
'StringIn'
'StringNotBeginsWith'
'StringNotContains'
'StringNotEndsWith'
'StringNotIn' (required)

FiltersConfiguration

Name Description Value
filters An array of filters that are used for filtering event subscriptions. Filter[]
includedEventTypes A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. string[]

IsNotNullFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'IsNotNull' (required)

IsNullOrUndefinedFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'IsNullOrUndefined' (required)

NumberGreaterThanFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberGreaterThan' (required)
value The filter value. int

NumberGreaterThanOrEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberGreaterThanOrEquals' (required)
value The filter value. int

NumberInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberIn' (required)
values The set of filter values. int[]

NumberInRangeFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberInRange' (required)
values The set of filter values. int[][]

NumberLessThanFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberLessThan' (required)
value The filter value. int

NumberLessThanOrEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberLessThanOrEquals' (required)
value The filter value. int

NumberNotInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberNotIn' (required)
values The set of filter values. int[]

NumberNotInRangeFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberNotInRange' (required)
values The set of filter values. int[][]

QueueInfo

Name Description Value
deadLetterDestinationWithResourceIdentity The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
Uses the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being used during delivery / dead-lettering.
DeadLetterWithResourceIdentity
eventTimeToLive Time span duration in ISO 8601 format that determines how long messages are available to the subscription from the time the message was published.
This duration value is expressed using the following format: 'P(n)Y(n)M(n)DT(n)H(n)M(n)S', where:
- (n) is replaced by the value of each time element that follows the (n).
- P is the duration (or Period) designator and is always placed at the beginning of the duration.
- Y is the year designator, and it follows the value for the number of years.
- M is the month designator, and it follows the value for the number of months.
- W is the week designator, and it follows the value for the number of weeks.
- D is the day designator, and it follows the value for the number of days.
- T is the time designator, and it precedes the time components.
- H is the hour designator, and it follows the value for the number of hours.
- M is the minute designator, and it follows the value for the number of minutes.
- S is the second designator, and it follows the value for the number of seconds.
This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, and its maximum is determined
by topic’s EventRetentionInDays value. The followings are examples of valid values:
- 'P0DT23H12M' or 'PT23H12M': for duration of 23 hours and 12 minutes.
- 'P1D' or 'P1DT0H0M0S': for duration of 1 day.
string
maxDeliveryCount The maximum delivery count of the events. int
receiveLockDurationInSeconds Maximum period in seconds in which once the message is in received (by the client) state and waiting to be accepted, released or rejected.
If this time elapsed after a message has been received by the client and not transitioned into accepted (not processed), released or rejected,
the message is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 seconds and maximum is 300 seconds.
int

StorageBlobDeadLetterDestination

Name Description Value
endpointType Type of the endpoint for the dead letter destination 'StorageBlob' (required)
properties The properties of the Storage Blob based deadletter destination StorageBlobDeadLetterDestinationProperties

StorageBlobDeadLetterDestinationProperties

Name Description Value
blobContainerName The name of the Storage blob container that is the destination of the deadletter events string
resourceId The Azure Resource ID of the storage account that is the destination of the deadletter events string

StringBeginsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringBeginsWith' (required)
values The set of filter values. string[]

StringContainsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringContains' (required)
values The set of filter values. string[]

StringEndsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringEndsWith' (required)
values The set of filter values. string[]

StringInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringIn' (required)
values The set of filter values. string[]

StringNotBeginsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotBeginsWith' (required)
values The set of filter values. string[]

StringNotContainsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotContains' (required)
values The set of filter values. string[]

StringNotEndsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotEndsWith' (required)
values The set of filter values. string[]

StringNotInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotIn' (required)
values The set of filter values. string[]

SubscriptionProperties

Name Description Value
deliveryConfiguration Information about the delivery configuration of the event subscription. DeliveryConfiguration
eventDeliverySchema The event delivery schema for the event subscription. 'CloudEventSchemaV1_0'
filtersConfiguration Information about the filter for the event subscription. FiltersConfiguration

ARM template resource definition

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

{
  "type": "Microsoft.EventGrid/namespaces/topics/eventSubscriptions",
  "apiVersion": "2023-06-01-preview",
  "name": "string",
  "properties": {
    "deliveryConfiguration": {
      "deliveryMode": "string",
      "queue": {
        "deadLetterDestinationWithResourceIdentity": {
          "deadLetterDestination": {
            "endpointType": "string"
            // For remaining properties, see DeadLetterDestination objects
          },
          "identity": {
            "type": "string",
            "userAssignedIdentity": "string"
          }
        },
        "eventTimeToLive": "string",
        "maxDeliveryCount": "int",
        "receiveLockDurationInSeconds": "int"
      }
    },
    "eventDeliverySchema": "string",
    "filtersConfiguration": {
      "filters": [ {
        "key": "string",
        "operatorType": "string"
        // For remaining properties, see Filter objects
      } ],
      "includedEventTypes": [ "string" ]
    }
  }
}

Filter objects

Set the operatorType property to specify the type of object.

For BoolEquals, use:

{
  "operatorType": "BoolEquals",
  "value": "bool"
}

For IsNotNull, use:

{
  "operatorType": "IsNotNull"
}

For IsNullOrUndefined, use:

{
  "operatorType": "IsNullOrUndefined"
}

For NumberGreaterThan, use:

{
  "operatorType": "NumberGreaterThan",
  "value": "int"
}

For NumberGreaterThanOrEquals, use:

{
  "operatorType": "NumberGreaterThanOrEquals",
  "value": "int"
}

For NumberIn, use:

{
  "operatorType": "NumberIn",
  "values": [ "int" ]
}

For NumberInRange, use:

{
  "operatorType": "NumberInRange",
  "values": [
    [ "int" ]
  ]
}

For NumberLessThan, use:

{
  "operatorType": "NumberLessThan",
  "value": "int"
}

For NumberLessThanOrEquals, use:

{
  "operatorType": "NumberLessThanOrEquals",
  "value": "int"
}

For NumberNotIn, use:

{
  "operatorType": "NumberNotIn",
  "values": [ "int" ]
}

For NumberNotInRange, use:

{
  "operatorType": "NumberNotInRange",
  "values": [
    [ "int" ]
  ]
}

For StringBeginsWith, use:

{
  "operatorType": "StringBeginsWith",
  "values": [ "string" ]
}

For StringContains, use:

{
  "operatorType": "StringContains",
  "values": [ "string" ]
}

For StringEndsWith, use:

{
  "operatorType": "StringEndsWith",
  "values": [ "string" ]
}

For StringIn, use:

{
  "operatorType": "StringIn",
  "values": [ "string" ]
}

For StringNotBeginsWith, use:

{
  "operatorType": "StringNotBeginsWith",
  "values": [ "string" ]
}

For StringNotContains, use:

{
  "operatorType": "StringNotContains",
  "values": [ "string" ]
}

For StringNotEndsWith, use:

{
  "operatorType": "StringNotEndsWith",
  "values": [ "string" ]
}

For StringNotIn, use:

{
  "operatorType": "StringNotIn",
  "values": [ "string" ]
}

DeadLetterDestination objects

Set the endpointType property to specify the type of object.

For StorageBlob, use:

{
  "endpointType": "StorageBlob",
  "properties": {
    "blobContainerName": "string",
    "resourceId": "string"
  }
}

Property Values

Microsoft.EventGrid/namespaces/topics/eventSubscriptions

Name Description Value
apiVersion The api version '2023-06-01-preview'
name The resource name string

Constraints:
Min length = 3
Max length = 50
Pattern = ^[a-zA-Z0-9-]*$ (required)
properties Properties of the event subscription. SubscriptionProperties
type The resource type 'Microsoft.EventGrid/namespaces/topics/eventSubscriptions'

BoolEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'BoolEquals' (required)
value The boolean filter value. bool

DeadLetterDestination

Name Description Value
endpointType Set to 'StorageBlob' for type StorageBlobDeadLetterDestination. 'StorageBlob' (required)

DeadLetterWithResourceIdentity

Name Description Value
deadLetterDestination Information about the destination where events have to be delivered for the event subscription.
Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
DeadLetterDestination
identity The identity to use when dead-lettering events. EventSubscriptionIdentity

DeliveryConfiguration

Name Description Value
deliveryMode Delivery mode of the event subscription. 'Queue'
queue This property should be populated when deliveryMode is queue and represents information about the queue subscription. QueueInfo

EventSubscriptionIdentity

Name Description Value
type The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity. 'SystemAssigned'
'UserAssigned'
userAssignedIdentity The user identity associated with the resource. string

Filter

Name Description Value
key The field/property in the event based on which you want to filter. string
operatorType Set to 'BoolEquals' for type BoolEqualsFilter. Set to 'IsNotNull' for type IsNotNullFilter. Set to 'IsNullOrUndefined' for type IsNullOrUndefinedFilter. Set to 'NumberGreaterThan' for type NumberGreaterThanFilter. Set to 'NumberGreaterThanOrEquals' for type NumberGreaterThanOrEqualsFilter. Set to 'NumberIn' for type NumberInFilter. Set to 'NumberInRange' for type NumberInRangeFilter. Set to 'NumberLessThan' for type NumberLessThanFilter. Set to 'NumberLessThanOrEquals' for type NumberLessThanOrEqualsFilter. Set to 'NumberNotIn' for type NumberNotInFilter. Set to 'NumberNotInRange' for type NumberNotInRangeFilter. Set to 'StringBeginsWith' for type StringBeginsWithFilter. Set to 'StringContains' for type StringContainsFilter. Set to 'StringEndsWith' for type StringEndsWithFilter. Set to 'StringIn' for type StringInFilter. Set to 'StringNotBeginsWith' for type StringNotBeginsWithFilter. Set to 'StringNotContains' for type StringNotContainsFilter. Set to 'StringNotEndsWith' for type StringNotEndsWithFilter. Set to 'StringNotIn' for type StringNotInFilter. 'BoolEquals'
'IsNotNull'
'IsNullOrUndefined'
'NumberGreaterThan'
'NumberGreaterThanOrEquals'
'NumberIn'
'NumberInRange'
'NumberLessThan'
'NumberLessThanOrEquals'
'NumberNotIn'
'NumberNotInRange'
'StringBeginsWith'
'StringContains'
'StringEndsWith'
'StringIn'
'StringNotBeginsWith'
'StringNotContains'
'StringNotEndsWith'
'StringNotIn' (required)

FiltersConfiguration

Name Description Value
filters An array of filters that are used for filtering event subscriptions. Filter[]
includedEventTypes A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. string[]

IsNotNullFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'IsNotNull' (required)

IsNullOrUndefinedFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'IsNullOrUndefined' (required)

NumberGreaterThanFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberGreaterThan' (required)
value The filter value. int

NumberGreaterThanOrEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberGreaterThanOrEquals' (required)
value The filter value. int

NumberInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberIn' (required)
values The set of filter values. int[]

NumberInRangeFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberInRange' (required)
values The set of filter values. int[][]

NumberLessThanFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberLessThan' (required)
value The filter value. int

NumberLessThanOrEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberLessThanOrEquals' (required)
value The filter value. int

NumberNotInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberNotIn' (required)
values The set of filter values. int[]

NumberNotInRangeFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberNotInRange' (required)
values The set of filter values. int[][]

QueueInfo

Name Description Value
deadLetterDestinationWithResourceIdentity The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
Uses the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being used during delivery / dead-lettering.
DeadLetterWithResourceIdentity
eventTimeToLive Time span duration in ISO 8601 format that determines how long messages are available to the subscription from the time the message was published.
This duration value is expressed using the following format: 'P(n)Y(n)M(n)DT(n)H(n)M(n)S', where:
- (n) is replaced by the value of each time element that follows the (n).
- P is the duration (or Period) designator and is always placed at the beginning of the duration.
- Y is the year designator, and it follows the value for the number of years.
- M is the month designator, and it follows the value for the number of months.
- W is the week designator, and it follows the value for the number of weeks.
- D is the day designator, and it follows the value for the number of days.
- T is the time designator, and it precedes the time components.
- H is the hour designator, and it follows the value for the number of hours.
- M is the minute designator, and it follows the value for the number of minutes.
- S is the second designator, and it follows the value for the number of seconds.
This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, and its maximum is determined
by topic’s EventRetentionInDays value. The followings are examples of valid values:
- 'P0DT23H12M' or 'PT23H12M': for duration of 23 hours and 12 minutes.
- 'P1D' or 'P1DT0H0M0S': for duration of 1 day.
string
maxDeliveryCount The maximum delivery count of the events. int
receiveLockDurationInSeconds Maximum period in seconds in which once the message is in received (by the client) state and waiting to be accepted, released or rejected.
If this time elapsed after a message has been received by the client and not transitioned into accepted (not processed), released or rejected,
the message is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 seconds and maximum is 300 seconds.
int

StorageBlobDeadLetterDestination

Name Description Value
endpointType Type of the endpoint for the dead letter destination 'StorageBlob' (required)
properties The properties of the Storage Blob based deadletter destination StorageBlobDeadLetterDestinationProperties

StorageBlobDeadLetterDestinationProperties

Name Description Value
blobContainerName The name of the Storage blob container that is the destination of the deadletter events string
resourceId The Azure Resource ID of the storage account that is the destination of the deadletter events string

StringBeginsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringBeginsWith' (required)
values The set of filter values. string[]

StringContainsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringContains' (required)
values The set of filter values. string[]

StringEndsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringEndsWith' (required)
values The set of filter values. string[]

StringInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringIn' (required)
values The set of filter values. string[]

StringNotBeginsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotBeginsWith' (required)
values The set of filter values. string[]

StringNotContainsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotContains' (required)
values The set of filter values. string[]

StringNotEndsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotEndsWith' (required)
values The set of filter values. string[]

StringNotInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotIn' (required)
values The set of filter values. string[]

SubscriptionProperties

Name Description Value
deliveryConfiguration Information about the delivery configuration of the event subscription. DeliveryConfiguration
eventDeliverySchema The event delivery schema for the event subscription. 'CloudEventSchemaV1_0'
filtersConfiguration Information about the filter for the event subscription. FiltersConfiguration

Usage Examples

Terraform (AzAPI provider) resource definition

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.EventGrid/namespaces/topics/eventSubscriptions@2023-06-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      deliveryConfiguration = {
        deliveryMode = "string"
        queue = {
          deadLetterDestinationWithResourceIdentity = {
            deadLetterDestination = {
              endpointType = "string"
              // For remaining properties, see DeadLetterDestination objects
            }
            identity = {
              type = "string"
              userAssignedIdentity = "string"
            }
          }
          eventTimeToLive = "string"
          maxDeliveryCount = int
          receiveLockDurationInSeconds = int
        }
      }
      eventDeliverySchema = "string"
      filtersConfiguration = {
        filters = [
          {
            key = "string"
            operatorType = "string"
            // For remaining properties, see Filter objects
          }
        ]
        includedEventTypes = [
          "string"
        ]
      }
    }
  }
}

Filter objects

Set the operatorType property to specify the type of object.

For BoolEquals, use:

{
  operatorType = "BoolEquals"
  value = bool
}

For IsNotNull, use:

{
  operatorType = "IsNotNull"
}

For IsNullOrUndefined, use:

{
  operatorType = "IsNullOrUndefined"
}

For NumberGreaterThan, use:

{
  operatorType = "NumberGreaterThan"
  value = int
}

For NumberGreaterThanOrEquals, use:

{
  operatorType = "NumberGreaterThanOrEquals"
  value = int
}

For NumberIn, use:

{
  operatorType = "NumberIn"
  values = [
    int
  ]
}

For NumberInRange, use:

{
  operatorType = "NumberInRange"
  values = [
    [
      int
    ]
  ]
}

For NumberLessThan, use:

{
  operatorType = "NumberLessThan"
  value = int
}

For NumberLessThanOrEquals, use:

{
  operatorType = "NumberLessThanOrEquals"
  value = int
}

For NumberNotIn, use:

{
  operatorType = "NumberNotIn"
  values = [
    int
  ]
}

For NumberNotInRange, use:

{
  operatorType = "NumberNotInRange"
  values = [
    [
      int
    ]
  ]
}

For StringBeginsWith, use:

{
  operatorType = "StringBeginsWith"
  values = [
    "string"
  ]
}

For StringContains, use:

{
  operatorType = "StringContains"
  values = [
    "string"
  ]
}

For StringEndsWith, use:

{
  operatorType = "StringEndsWith"
  values = [
    "string"
  ]
}

For StringIn, use:

{
  operatorType = "StringIn"
  values = [
    "string"
  ]
}

For StringNotBeginsWith, use:

{
  operatorType = "StringNotBeginsWith"
  values = [
    "string"
  ]
}

For StringNotContains, use:

{
  operatorType = "StringNotContains"
  values = [
    "string"
  ]
}

For StringNotEndsWith, use:

{
  operatorType = "StringNotEndsWith"
  values = [
    "string"
  ]
}

For StringNotIn, use:

{
  operatorType = "StringNotIn"
  values = [
    "string"
  ]
}

DeadLetterDestination objects

Set the endpointType property to specify the type of object.

For StorageBlob, use:

{
  endpointType = "StorageBlob"
  properties = {
    blobContainerName = "string"
    resourceId = "string"
  }
}

Property Values

Microsoft.EventGrid/namespaces/topics/eventSubscriptions

Name Description Value
name The resource name string

Constraints:
Min length = 3
Max length = 50
Pattern = ^[a-zA-Z0-9-]*$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: namespaces/topics
properties Properties of the event subscription. SubscriptionProperties
type The resource type "Microsoft.EventGrid/namespaces/topics/eventSubscriptions@2023-06-01-preview"

BoolEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'BoolEquals' (required)
value The boolean filter value. bool

DeadLetterDestination

Name Description Value
endpointType Set to 'StorageBlob' for type StorageBlobDeadLetterDestination. 'StorageBlob' (required)

DeadLetterWithResourceIdentity

Name Description Value
deadLetterDestination Information about the destination where events have to be delivered for the event subscription.
Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering.
DeadLetterDestination
identity The identity to use when dead-lettering events. EventSubscriptionIdentity

DeliveryConfiguration

Name Description Value
deliveryMode Delivery mode of the event subscription. 'Queue'
queue This property should be populated when deliveryMode is queue and represents information about the queue subscription. QueueInfo

EventSubscriptionIdentity

Name Description Value
type The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity. 'SystemAssigned'
'UserAssigned'
userAssignedIdentity The user identity associated with the resource. string

Filter

Name Description Value
key The field/property in the event based on which you want to filter. string
operatorType Set to 'BoolEquals' for type BoolEqualsFilter. Set to 'IsNotNull' for type IsNotNullFilter. Set to 'IsNullOrUndefined' for type IsNullOrUndefinedFilter. Set to 'NumberGreaterThan' for type NumberGreaterThanFilter. Set to 'NumberGreaterThanOrEquals' for type NumberGreaterThanOrEqualsFilter. Set to 'NumberIn' for type NumberInFilter. Set to 'NumberInRange' for type NumberInRangeFilter. Set to 'NumberLessThan' for type NumberLessThanFilter. Set to 'NumberLessThanOrEquals' for type NumberLessThanOrEqualsFilter. Set to 'NumberNotIn' for type NumberNotInFilter. Set to 'NumberNotInRange' for type NumberNotInRangeFilter. Set to 'StringBeginsWith' for type StringBeginsWithFilter. Set to 'StringContains' for type StringContainsFilter. Set to 'StringEndsWith' for type StringEndsWithFilter. Set to 'StringIn' for type StringInFilter. Set to 'StringNotBeginsWith' for type StringNotBeginsWithFilter. Set to 'StringNotContains' for type StringNotContainsFilter. Set to 'StringNotEndsWith' for type StringNotEndsWithFilter. Set to 'StringNotIn' for type StringNotInFilter. 'BoolEquals'
'IsNotNull'
'IsNullOrUndefined'
'NumberGreaterThan'
'NumberGreaterThanOrEquals'
'NumberIn'
'NumberInRange'
'NumberLessThan'
'NumberLessThanOrEquals'
'NumberNotIn'
'NumberNotInRange'
'StringBeginsWith'
'StringContains'
'StringEndsWith'
'StringIn'
'StringNotBeginsWith'
'StringNotContains'
'StringNotEndsWith'
'StringNotIn' (required)

FiltersConfiguration

Name Description Value
filters An array of filters that are used for filtering event subscriptions. Filter[]
includedEventTypes A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. string[]

IsNotNullFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'IsNotNull' (required)

IsNullOrUndefinedFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'IsNullOrUndefined' (required)

NumberGreaterThanFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberGreaterThan' (required)
value The filter value. int

NumberGreaterThanOrEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberGreaterThanOrEquals' (required)
value The filter value. int

NumberInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberIn' (required)
values The set of filter values. int[]

NumberInRangeFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberInRange' (required)
values The set of filter values. int[][]

NumberLessThanFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberLessThan' (required)
value The filter value. int

NumberLessThanOrEqualsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberLessThanOrEquals' (required)
value The filter value. int

NumberNotInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberNotIn' (required)
values The set of filter values. int[]

NumberNotInRangeFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'NumberNotInRange' (required)
values The set of filter values. int[][]

QueueInfo

Name Description Value
deadLetterDestinationWithResourceIdentity The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination.
Uses the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being used during delivery / dead-lettering.
DeadLetterWithResourceIdentity
eventTimeToLive Time span duration in ISO 8601 format that determines how long messages are available to the subscription from the time the message was published.
This duration value is expressed using the following format: 'P(n)Y(n)M(n)DT(n)H(n)M(n)S', where:
- (n) is replaced by the value of each time element that follows the (n).
- P is the duration (or Period) designator and is always placed at the beginning of the duration.
- Y is the year designator, and it follows the value for the number of years.
- M is the month designator, and it follows the value for the number of months.
- W is the week designator, and it follows the value for the number of weeks.
- D is the day designator, and it follows the value for the number of days.
- T is the time designator, and it precedes the time components.
- H is the hour designator, and it follows the value for the number of hours.
- M is the minute designator, and it follows the value for the number of minutes.
- S is the second designator, and it follows the value for the number of seconds.
This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, and its maximum is determined
by topic’s EventRetentionInDays value. The followings are examples of valid values:
- 'P0DT23H12M' or 'PT23H12M': for duration of 23 hours and 12 minutes.
- 'P1D' or 'P1DT0H0M0S': for duration of 1 day.
string
maxDeliveryCount The maximum delivery count of the events. int
receiveLockDurationInSeconds Maximum period in seconds in which once the message is in received (by the client) state and waiting to be accepted, released or rejected.
If this time elapsed after a message has been received by the client and not transitioned into accepted (not processed), released or rejected,
the message is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 seconds and maximum is 300 seconds.
int

StorageBlobDeadLetterDestination

Name Description Value
endpointType Type of the endpoint for the dead letter destination 'StorageBlob' (required)
properties The properties of the Storage Blob based deadletter destination StorageBlobDeadLetterDestinationProperties

StorageBlobDeadLetterDestinationProperties

Name Description Value
blobContainerName The name of the Storage blob container that is the destination of the deadletter events string
resourceId The Azure Resource ID of the storage account that is the destination of the deadletter events string

StringBeginsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringBeginsWith' (required)
values The set of filter values. string[]

StringContainsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringContains' (required)
values The set of filter values. string[]

StringEndsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringEndsWith' (required)
values The set of filter values. string[]

StringInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringIn' (required)
values The set of filter values. string[]

StringNotBeginsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotBeginsWith' (required)
values The set of filter values. string[]

StringNotContainsFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotContains' (required)
values The set of filter values. string[]

StringNotEndsWithFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotEndsWith' (required)
values The set of filter values. string[]

StringNotInFilter

Name Description Value
operatorType The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. 'StringNotIn' (required)
values The set of filter values. string[]

SubscriptionProperties

Name Description Value
deliveryConfiguration Information about the delivery configuration of the event subscription. DeliveryConfiguration
eventDeliverySchema The event delivery schema for the event subscription. 'CloudEventSchemaV1_0'
filtersConfiguration Information about the filter for the event subscription. FiltersConfiguration