Microsoft.EventGrid eventSubscriptions 2018-05-01-preview
The eventSubscriptions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.EventGrid/eventSubscriptions resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.EventGrid/eventSubscriptions@2018-05-01-preview' = {
scope: resourceSymbolicName or scope
name: 'string'
properties: {
deadLetterDestination: {
endpointType: 'string'
// For remaining properties, see DeadLetterDestination objects
}
destination: {
endpointType: 'string'
// For remaining properties, see EventSubscriptionDestination objects
}
eventDeliverySchema: 'string'
filter: {
includedEventTypes: [
'string'
]
isSubjectCaseSensitive: bool
subjectBeginsWith: 'string'
subjectEndsWith: 'string'
}
labels: [
'string'
]
retryPolicy: {
eventTimeToLiveInMinutes: int
maxDeliveryAttempts: int
}
}
}
Set the endpointType property to specify the type of object.
For StorageBlob, use:
{
endpointType: 'StorageBlob'
properties: {
blobContainerName: 'string'
resourceId: 'string'
}
}
Set the endpointType property to specify the type of object.
For EventHub, use:
{
endpointType: 'EventHub'
properties: {
resourceId: 'string'
}
}
For HybridConnection, use:
{
endpointType: 'HybridConnection'
properties: {
resourceId: 'string'
}
}
For StorageQueue, use:
{
endpointType: 'StorageQueue'
properties: {
queueName: 'string'
resourceId: 'string'
}
}
For WebHook, use:
{
endpointType: 'WebHook'
properties: {
endpointUrl: 'string'
}
}
Name | Description | Value |
---|---|---|
endpointType | Set to 'StorageBlob' for type StorageBlobDeadLetterDestination. | 'StorageBlob' (required) |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'EventHub' (required) |
properties | Event Hub Properties of the event subscription destination | EventHubEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
resourceId | The Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
endpointType | Set to 'EventHub' for type EventHubEventSubscriptionDestination. Set to 'HybridConnection' for type HybridConnectionEventSubscriptionDestination. Set to 'StorageQueue' for type StorageQueueEventSubscriptionDestination. Set to 'WebHook' for type WebHookEventSubscriptionDestination. | 'EventHub' 'HybridConnection' 'StorageQueue' 'WebHook' (required) |
Name | Description | Value |
---|---|---|
includedEventTypes | A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all event types, the string "all" needs to be specified as an element in this list. |
string[] |
isSubjectCaseSensitive | Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter should be compared in a case sensitive manner. |
bool |
subjectBeginsWith | An optional string to filter events for an event subscription based on a resource path prefix. The format of this depends on the publisher of the events. Wildcard characters are not supported in this path. |
string |
subjectEndsWith | An optional string to filter events for an event subscription based on a resource path suffix. Wildcard characters are not supported in this path. |
string |
Name | Description | Value |
---|---|---|
deadLetterDestination | The DeadLetter destination of the event subscription. | DeadLetterDestination |
destination | Information about the destination where events have to be delivered for the event subscription. | EventSubscriptionDestination |
eventDeliverySchema | The event delivery schema for the event subscription. | 'CloudEventV01Schema' 'EventGridSchema' 'InputEventSchema' |
filter | Information about the filter for the event subscription. | EventSubscriptionFilter |
labels | List of user defined labels. | string[] |
retryPolicy | The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. | RetryPolicy |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'HybridConnection' (required) |
properties | Hybrid connection Properties of the event subscription destination | HybridConnectionEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
resourceId | The Azure Resource ID of an hybrid connection that is the destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
properties | Properties of the event subscription | EventSubscriptionProperties |
scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
Name | Description | Value |
---|---|---|
eventTimeToLiveInMinutes | Time To Live (in minutes) for events. | int |
maxDeliveryAttempts | Maximum number of delivery retry attempts for events. | int |
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 |
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 |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'StorageQueue' (required) |
properties | Storage Queue Properties of the event subscription destination | StorageQueueEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
queueName | The name of the Storage queue under a storage account that is the destination of an event subscription. | string |
resourceId | The Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'WebHook' (required) |
properties | WebHook Properties of the event subscription destination | WebHookEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
endpointUrl | The URL that represents the endpoint of the destination of an event subscription. | string |
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File | Description |
---|---|
Create Azure Event Grid Custom Topic and Queue Subscription | Creates an Azure Event Grid custom topic and a service bus queue subscription. Template originally authored by Markus Meyer. |
Create Azure Event Grid Custom Topic and Subscription | Creates an Azure Event Grid custom topic and a webhook subscription. Template originally authored by John Downs. |
The eventSubscriptions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.EventGrid/eventSubscriptions resource, add the following JSON to your template.
{
"type": "Microsoft.EventGrid/eventSubscriptions",
"apiVersion": "2018-05-01-preview",
"name": "string",
"properties": {
"deadLetterDestination": {
"endpointType": "string"
// For remaining properties, see DeadLetterDestination objects
},
"destination": {
"endpointType": "string"
// For remaining properties, see EventSubscriptionDestination objects
},
"eventDeliverySchema": "string",
"filter": {
"includedEventTypes": [ "string" ],
"isSubjectCaseSensitive": "bool",
"subjectBeginsWith": "string",
"subjectEndsWith": "string"
},
"labels": [ "string" ],
"retryPolicy": {
"eventTimeToLiveInMinutes": "int",
"maxDeliveryAttempts": "int"
}
}
}
Set the endpointType property to specify the type of object.
For StorageBlob, use:
{
"endpointType": "StorageBlob",
"properties": {
"blobContainerName": "string",
"resourceId": "string"
}
}
Set the endpointType property to specify the type of object.
For EventHub, use:
{
"endpointType": "EventHub",
"properties": {
"resourceId": "string"
}
}
For HybridConnection, use:
{
"endpointType": "HybridConnection",
"properties": {
"resourceId": "string"
}
}
For StorageQueue, use:
{
"endpointType": "StorageQueue",
"properties": {
"queueName": "string",
"resourceId": "string"
}
}
For WebHook, use:
{
"endpointType": "WebHook",
"properties": {
"endpointUrl": "string"
}
}
Name | Description | Value |
---|---|---|
endpointType | Set to 'StorageBlob' for type StorageBlobDeadLetterDestination. | 'StorageBlob' (required) |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'EventHub' (required) |
properties | Event Hub Properties of the event subscription destination | EventHubEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
resourceId | The Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
endpointType | Set to 'EventHub' for type EventHubEventSubscriptionDestination. Set to 'HybridConnection' for type HybridConnectionEventSubscriptionDestination. Set to 'StorageQueue' for type StorageQueueEventSubscriptionDestination. Set to 'WebHook' for type WebHookEventSubscriptionDestination. | 'EventHub' 'HybridConnection' 'StorageQueue' 'WebHook' (required) |
Name | Description | Value |
---|---|---|
includedEventTypes | A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all event types, the string "all" needs to be specified as an element in this list. |
string[] |
isSubjectCaseSensitive | Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter should be compared in a case sensitive manner. |
bool |
subjectBeginsWith | An optional string to filter events for an event subscription based on a resource path prefix. The format of this depends on the publisher of the events. Wildcard characters are not supported in this path. |
string |
subjectEndsWith | An optional string to filter events for an event subscription based on a resource path suffix. Wildcard characters are not supported in this path. |
string |
Name | Description | Value |
---|---|---|
deadLetterDestination | The DeadLetter destination of the event subscription. | DeadLetterDestination |
destination | Information about the destination where events have to be delivered for the event subscription. | EventSubscriptionDestination |
eventDeliverySchema | The event delivery schema for the event subscription. | 'CloudEventV01Schema' 'EventGridSchema' 'InputEventSchema' |
filter | Information about the filter for the event subscription. | EventSubscriptionFilter |
labels | List of user defined labels. | string[] |
retryPolicy | The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. | RetryPolicy |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'HybridConnection' (required) |
properties | Hybrid connection Properties of the event subscription destination | HybridConnectionEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
resourceId | The Azure Resource ID of an hybrid connection that is the destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2018-05-01-preview' |
name | The resource name | string (required) |
properties | Properties of the event subscription | EventSubscriptionProperties |
type | The resource type | 'Microsoft.EventGrid/eventSubscriptions' |
Name | Description | Value |
---|---|---|
eventTimeToLiveInMinutes | Time To Live (in minutes) for events. | int |
maxDeliveryAttempts | Maximum number of delivery retry attempts for events. | int |
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 |
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 |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'StorageQueue' (required) |
properties | Storage Queue Properties of the event subscription destination | StorageQueueEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
queueName | The name of the Storage queue under a storage account that is the destination of an event subscription. | string |
resourceId | The Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'WebHook' (required) |
properties | WebHook Properties of the event subscription destination | WebHookEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
endpointUrl | The URL that represents the endpoint of the destination of an event subscription. | string |
The following Azure Quickstart templates deploy this resource type.
Template | Description |
---|---|
Create Azure Event Grid Custom Topic and Queue Subscription |
Creates an Azure Event Grid custom topic and a service bus queue subscription. Template originally authored by Markus Meyer. |
Create Azure Event Grid Custom Topic and Subscription |
Creates an Azure Event Grid custom topic and a webhook subscription. Template originally authored by John Downs. |
Create Azure Event Grid Custom Topic Subscription |
Creates an Azure Event Grid custom topic and a service bus topic subscription. Template originally authored by Markus Meyer. |
Create Event Grid custom topic and event hub handler |
Creates an Azure Event Grid custom topic and event hub to handle the events. |
Create Event Grid subscription for resource events |
Creates Event Grid subscription to either resource group or Azure subscription. |
Custom Azure Event Grid Topic/Subscription with CloudEvents |
Creates a custom Azure Event Grid topic, a webhook subscription having CloudEvents schema, and a Logic App as an event handler. Template originally authored by Justin Yoo. |
The eventSubscriptions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.EventGrid/eventSubscriptions resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.EventGrid/eventSubscriptions@2018-05-01-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
deadLetterDestination = {
endpointType = "string"
// For remaining properties, see DeadLetterDestination objects
}
destination = {
endpointType = "string"
// For remaining properties, see EventSubscriptionDestination objects
}
eventDeliverySchema = "string"
filter = {
includedEventTypes = [
"string"
]
isSubjectCaseSensitive = bool
subjectBeginsWith = "string"
subjectEndsWith = "string"
}
labels = [
"string"
]
retryPolicy = {
eventTimeToLiveInMinutes = int
maxDeliveryAttempts = int
}
}
})
}
Set the endpointType property to specify the type of object.
For StorageBlob, use:
{
endpointType = "StorageBlob"
properties = {
blobContainerName = "string"
resourceId = "string"
}
}
Set the endpointType property to specify the type of object.
For EventHub, use:
{
endpointType = "EventHub"
properties = {
resourceId = "string"
}
}
For HybridConnection, use:
{
endpointType = "HybridConnection"
properties = {
resourceId = "string"
}
}
For StorageQueue, use:
{
endpointType = "StorageQueue"
properties = {
queueName = "string"
resourceId = "string"
}
}
For WebHook, use:
{
endpointType = "WebHook"
properties = {
endpointUrl = "string"
}
}
Name | Description | Value |
---|---|---|
endpointType | Set to 'StorageBlob' for type StorageBlobDeadLetterDestination. | 'StorageBlob' (required) |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'EventHub' (required) |
properties | Event Hub Properties of the event subscription destination | EventHubEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
resourceId | The Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
endpointType | Set to 'EventHub' for type EventHubEventSubscriptionDestination. Set to 'HybridConnection' for type HybridConnectionEventSubscriptionDestination. Set to 'StorageQueue' for type StorageQueueEventSubscriptionDestination. Set to 'WebHook' for type WebHookEventSubscriptionDestination. | 'EventHub' 'HybridConnection' 'StorageQueue' 'WebHook' (required) |
Name | Description | Value |
---|---|---|
includedEventTypes | A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all event types, the string "all" needs to be specified as an element in this list. |
string[] |
isSubjectCaseSensitive | Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter should be compared in a case sensitive manner. |
bool |
subjectBeginsWith | An optional string to filter events for an event subscription based on a resource path prefix. The format of this depends on the publisher of the events. Wildcard characters are not supported in this path. |
string |
subjectEndsWith | An optional string to filter events for an event subscription based on a resource path suffix. Wildcard characters are not supported in this path. |
string |
Name | Description | Value |
---|---|---|
deadLetterDestination | The DeadLetter destination of the event subscription. | DeadLetterDestination |
destination | Information about the destination where events have to be delivered for the event subscription. | EventSubscriptionDestination |
eventDeliverySchema | The event delivery schema for the event subscription. | 'CloudEventV01Schema' 'EventGridSchema' 'InputEventSchema' |
filter | Information about the filter for the event subscription. | EventSubscriptionFilter |
labels | List of user defined labels. | string[] |
retryPolicy | The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. | RetryPolicy |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'HybridConnection' (required) |
properties | Hybrid connection Properties of the event subscription destination | HybridConnectionEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
resourceId | The Azure Resource ID of an hybrid connection that is the destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
parent_id | The ID of the resource to apply this extension resource to. | string (required) |
properties | Properties of the event subscription | EventSubscriptionProperties |
type | The resource type | "Microsoft.EventGrid/eventSubscriptions@2018-05-01-preview" |
Name | Description | Value |
---|---|---|
eventTimeToLiveInMinutes | Time To Live (in minutes) for events. | int |
maxDeliveryAttempts | Maximum number of delivery retry attempts for events. | int |
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 |
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 |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'StorageQueue' (required) |
properties | Storage Queue Properties of the event subscription destination | StorageQueueEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
queueName | The name of the Storage queue under a storage account that is the destination of an event subscription. | string |
resourceId | The Azure Resource ID of the storage account that contains the queue that is the destination of an event subscription. | string |
Name | Description | Value |
---|---|---|
endpointType | Type of the endpoint for the event subscription destination | 'WebHook' (required) |
properties | WebHook Properties of the event subscription destination | WebHookEventSubscriptionDestinationProperties |
Name | Description | Value |
---|---|---|
endpointUrl | The URL that represents the endpoint of the destination of an event subscription. | string |