Skip to content

Commit 70e84ba

Browse files
authored
Merge pull request #218770 from spelluru/egridfresh1117
Event Grid articles - review & update
2 parents 7d4c295 + bab617f commit 70e84ba

File tree

8 files changed

+96
-89
lines changed

8 files changed

+96
-89
lines changed

articles/event-grid/event-domains.md

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,31 @@
22
title: Event Domains in Azure Event Grid
33
description: This article describes how to use event domains to manage the flow of custom events to your various business organizations, customers, or applications.
44
ms.topic: conceptual
5-
ms.date: 04/13/2021
5+
ms.date: 11/17/2022
66
---
77

88
# Understand event domains for managing Event Grid topics
9-
10-
This article describes how to use event domains to manage the flow of custom events to your various business organizations, customers, or applications. Use event domains to:
9+
An event domain is a management tool for large number of Event Grid topics related to the same application. You can think of it as a meta-topic that can have thousands of individual topics. It allows an event publisher to publish events to thousands of topics at the same time. Domains also give you authentication and authorization control over each topic so you can partition your tenants. This article describes how to use event domains to manage the flow of custom events to your various business organizations, customers, or applications. Use event domains to:
1110

1211
* Manage multitenant eventing architectures at scale.
13-
* Manage your authorization and authentication.
12+
* Manage your authentication and authorization.
1413
* Partition your topics without managing each individually.
1514
* Avoid individually publishing to each of your topic endpoints.
1615

17-
## Event domain overview
18-
19-
An event domain is a management tool for large numbers of Event Grid topics related to the same application. You can think of it as a meta-topic that can have thousands of individual topics.
20-
21-
Event domains provide you the same architecture used by Azure services like Storage and IoT Hub to publish their events. They allow you to publish events to thousands of topics. Domains also give you authorization and authentication control over each topic so you can partition your tenants.
22-
2316
## Example use case
2417
[!INCLUDE [event-grid-domain-example-use-case.md](./includes/event-grid-domain-example-use-case.md)]
2518

2619
## Access management
2720

28-
With a domain, you get fine grain authorization and authentication control over each topic via Azure role-based access control (Azure RBAC). You can use these roles to restrict each tenant in your application to only the topics you wish to grant them access to.
29-
30-
Azure RBAC in event domains works the same way [managed access control](security-authorization.md) works in the rest of Event Grid and Azure. Use Azure RBAC to create and enforce custom role definitions in event domains.
21+
With a domain, you get fine grain authorization and authentication control over each topic via Azure role-based access control (Azure RBAC). You can use these roles to restrict each tenant in your application to only the topics you wish to grant them access to. Azure RBAC in event domains works the same way [managed access control](security-authorization.md) works in the rest of Event Grid and Azure. Use Azure RBAC to create and enforce custom role definitions in event domains.
3122

3223
### Built in roles
3324

34-
Event Grid has two built-in role definitions to make Azure RBAC easier for working with event domains. These roles are **EventGrid EventSubscription Contributor (Preview)** and **EventGrid EventSubscription Reader (Preview)**. You assign these roles to users who need to subscribe to topics in your event domain. You scope the role assignment to only the topic that users need to subscribe to.
35-
36-
For information about these roles, see [Built-in roles for Event Grid](security-authorization.md#built-in-roles).
25+
Event Grid has two built-in role definitions to make Azure RBAC easier for working with event domains. These roles are **EventGrid EventSubscription Contributor** and **EventGrid EventSubscription Reader**. You assign these roles to users who need to subscribe to topics in your event domain. You scope the role assignment to only the topic that users need to subscribe to. For information about these roles, see [Built-in roles for Event Grid](security-authorization.md#built-in-roles).
3726

3827
## Subscribing to topics
3928

40-
Subscribing to events on a topic within an event domain is the same as [creating an Event Subscription on a custom topic](./custom-event-quickstart.md) or subscribing to an event from an Azure service.
29+
Subscribing to events for a topic within an event domain is the same as [creating an Event Subscription on a custom topic](./custom-event-quickstart.md) or subscribing to an event from an Azure service.
4130

4231
> [!IMPORTANT]
4332
> Domain topic is considered an **auto-managed** resource in Event Grid. You can create an event subscription at the [domain scope](#domain-scope-subscriptions) without creating the domain topic. In this case, Event Grid automatically creates the domain topic on your behalf. Of course, you can still choose to create the domain topic manually. This behavior allows you to worry about one less resource when dealing with a huge number of domain topics. When the last subscription to a domain topic is deleted, the domain topic is also deleted irrespective of whether the domain topic was manually created or auto-created.
@@ -48,11 +37,7 @@ Event domains also allow for domain-scope subscriptions. An event subscription o
4837

4938
## Publishing to an event domain
5039

51-
When you create an event domain, you're given a publishing endpoint similar to if you had created a topic in Event Grid.
52-
53-
To publish events to any topic in an Event Domain, push the events to the domain's endpoint the [same way you would for a custom topic](./post-to-custom-topic.md). The only difference is that you must specify the topic you'd like the event to be delivered to.
54-
55-
For example, publishing the following array of events would send event with `"id": "1111"` to topic `foo` while the event with `"id": "2222"` would be sent to topic `bar`:
40+
When you create an event domain, you're given a publishing endpoint similar to if you had created a topic in Event Grid. To publish events to any topic in an event domain, push the events to the domain's endpoint the [same way you would for a custom topic](./post-to-custom-topic.md). The only difference is that you must specify the topic you'd like the event to be delivered to. For example, publishing the following array of events would send event with `"id": "1111"` to topic `foo` while the event with `"id": "2222"` would be sent to topic `bar`:
5641

5742
```json
5843
[{
@@ -95,12 +80,7 @@ Here are the limits and quotas related to event domains:
9580
If these limits don't suit you, open a support ticket or send an email to [[email protected]](mailto:[email protected]).
9681

9782
## Pricing
98-
Event domains use the same [operations pricing](https://azure.microsoft.com/pricing/details/event-grid/) that all other features in Event Grid use.
99-
100-
Operations work the same in event domains as they do in custom topics. Each ingress of an event to an event domain is an operation, and each delivery attempt for an event is an operation.
101-
102-
83+
Event domains use the same [operations pricing](https://azure.microsoft.com/pricing/details/event-grid/) that all other features in Event Grid use. Operations work the same in event domains as they do in custom topics. Each ingress of an event to an event domain is an operation, and each delivery attempt for an event is an operation.
10384

10485
## Next steps
105-
106-
* To learn about setting up event domains, creating topics, creating event subscriptions, and publishing events, see [Manage event domains](./how-to-event-domains.md).
86+
To learn about setting up event domains, creating topics, creating event subscriptions, and publishing events, see [Manage event domains](./how-to-event-domains.md).

articles/event-grid/event-schema-key-vault.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
title: Azure Key Vault as Event Grid source
33
description: Describes the properties and schema provided for Azure Key Vault events with Azure Event Grid
44
ms.topic: conceptual
5-
ms.date: 09/15/2021
5+
ms.date: 11/17/2022
66
---
77

88
# Azure Key Vault as Event Grid source
99

10-
This article provides the properties and schema for events in [Azure Key Vault](../key-vault/index.yml). For an introduction to event schemas, see [Azure Event Grid event schema](event-schema.md).
10+
This article provides the properties and schema for events in [Azure Key Vault](../key-vault/index.yml). For an introduction to event schemas, see [Azure Event Grid event schema](event-schema.md) and [Cloud event schema](cloud-event-schema.md).
1111

1212

1313
## Available event types

articles/event-grid/handler-service-bus.md

Lines changed: 73 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
title: Service Bus queues and topics as event handlers for Azure Event Grid events
33
description: Describes how you can use Service Bus queues and topics as event handlers for Azure Event Grid events.
44
ms.topic: conceptual
5-
ms.date: 09/30/2021
5+
ms.date: 11/17/2022
66
---
77

88
# Service Bus queues and topics as event handlers for Azure Event Grid events
9-
An event handler is the place where the event is sent. The handler takes some further action to process the event. Several Azure services are automatically configured to handle events and **Azure Service Bus** is one of them.
10-
11-
You can use a Service queue or topic as a handler for events from Event Grid.
9+
An event handler receives events from an event source via Event Grid, and processes those events. You can use instances of a few Azure services to handle events and **Azure Service Bus** is one of them. This article shows you how to use a Service Bus queue or topic as a handler for events from Event Grid.
1210

1311
## Service Bus queues
1412

15-
> [!NOTE]
16-
> Session enabled queues are not supported as event handlers for Azure Event Grid events
17-
18-
You can route events in Event Grid directly to Service Bus queues for use in buffering or command & control scenarios in enterprise applications.
13+
You can route events in Event Grid directly to Service Bus queues for use in buffering or command and control scenarios in enterprise applications.
1914

20-
In the Azure portal, while creating an event subscription, select **Service Bus Queue** as endpoint type and then click **select an endpoint** to choose a Service Bus queue.
15+
### Use Azure portal
16+
In the Azure portal, while creating an event subscription, select **Service Bus Queue** as the endpoint type and then click **select an endpoint** to choose a Service Bus queue.
2117

22-
### Using CLI to add a Service Bus queue handler
18+
:::image type="content" source="./media/handler-service-bus/queue.png" lightbox="./media/handler-service-bus/queue.png" alt-text="Screenshot showing the configuration of a Service Bus queue handler.":::
2319

24-
For Azure CLI, the following example subscribes and connects an event grid topic to a Service Bus queue:
20+
> [!NOTE]
21+
> Session enabled queues are not supported as event handlers for Azure Event Grid events
22+
23+
### Use Azure CLI
24+
Use the [`az eventgrid event-subscription create`](/cli/azure/eventgrid/event-subscription) command with `--endpoint-type` set to `servicebusqueue` and `--endpoint` set to `/subscriptions/{AZURE SUBSCRIPTION}/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.ServiceBus/namespaces/<NAMESPACE NAME>/queues/<QUEUE NAME>`. Here's an example:
2525

2626
```azurecli-interactive
2727
az eventgrid event-subscription create \
@@ -31,15 +31,33 @@ az eventgrid event-subscription create \
3131
--endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/queues/queue1
3232
```
3333

34+
You can also use the [`az eventgrid topic event-subscription`](/cli/azure/eventgrid/topic/event-subscription) command for custom topics, the [`az eventgrid system-topic event-subscription`](/cli/azure/eventgrid/system-topic/event-subscription) command for system topics, and the [`az eventgrid partner topic event-subscription create`](/cli/azure/eventgrid/partner/topic/event-subscription#az-eventgrid-partner-topic-event-subscription-create) command for partner topics.
35+
36+
### Use Azure PowerShell
37+
Use the [New-AzEventGridSubscription](/powershell/module/az.eventgrid/new-azeventgridsubscription) command with `-EndpointType` set to `servicebusqueue` and `-Endpoint` set to `/subscriptions/{AZURE SUBSCRIPTION}/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.ServiceBus/namespaces/<NAMESPACE NAME>/queues/<QUEUE NAME>`. Here's an example:
38+
39+
40+
```azurepowershell-interactive
41+
New-AzEventGridSubscription -ResourceGroup MyResourceGroup `
42+
-TopicName Topic1 `
43+
-EndpointType servicebusqueue `
44+
-Endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/queues/queue1 `
45+
-EventSubscriptionName EventSubscription1
46+
```
47+
48+
You can also use the [`New-AzEventGridSystemTopicEventSubscription`](/powershell/module/az.eventgrid/new-azeventgridsystemtopiceventsubscription) command for system topics, and the [`New-AzEventGridPartnerTopicEventSubscription`](/powershell/module/az.eventgrid/new-azeventgridpartnertopiceventsubscription) command for partner topics.
49+
3450
## Service Bus topics
3551

36-
You can route events in Event Grid directly to Service Bus topics to handle Azure system events with Service Bus topics, or for command & control messaging scenarios.
52+
You can route events in Event Grid directly to Service Bus topics for command and control messaging scenarios.
3753

38-
In the Azure portal, while creating an event subscription, select **Service Bus Topic** as endpoint type and then click **select and endpoint** to choose a Service Bus topic.
54+
### Use Azure portal
55+
In the Azure portal, while creating an event subscription, select **Service Bus Topic** as the endpoint type and then click **select an endpoint** to choose a Service Bus topic.
3956

40-
### Using CLI to add a Service Bus topic handler
57+
:::image type="content" source="./media/handler-service-bus/topic.png" lightbox="./media/handler-service-bus/topic.png" alt-text="Screenshot showing the configuration of a Service Bus topic handler.":::
4158

42-
For Azure CLI, the following example subscribes and connects an event grid topic to a Service Bus topic:
59+
### Use Azure CLI
60+
Use the [`az eventgrid event-subscription create`](/cli/azure/eventgrid/event-subscription) command with `--endpoint-type` set to `servicebustopic` and `--endpoint` set to `/subscriptions/{AZURE SUBSCRIPTION}/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.ServiceBus/namespaces/<NAMESPACE NAME>/topics/<TOPIC NAME>`. Here's an example:
4361

4462
```azurecli-interactive
4563
az eventgrid event-subscription create \
@@ -49,12 +67,52 @@ az eventgrid event-subscription create \
4967
--endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/topics/topic1
5068
```
5169

70+
You can also use the [`az eventgrid topic event-subscription`](/cli/azure/eventgrid/topic/event-subscription) command for custom topics, the [`az eventgrid system-topic event-subscription`](/cli/azure/eventgrid/system-topic/event-subscription) command for system topics, and the [`az eventgrid partner topic event-subscription create`](/cli/azure/eventgrid/partner/topic/event-subscription#az-eventgrid-partner-topic-event-subscription-create) command for partner topics.
71+
72+
### Use Azure PowerShell
73+
Use the [New-AzEventGridSubscription](/powershell/module/az.eventgrid/new-azeventgridsubscription) command with `-EndpointType` set to `servicebustopic` and `-Endpoint` set to `/subscriptions/{AZURE SUBSCRIPTION}/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.ServiceBus/namespaces/<NAMESPACE NAME>/topics/<TOPIC NAME>`. Here's an example:
74+
75+
76+
```azurepowershell-interactive
77+
New-AzEventGridSubscription -ResourceGroup MyResourceGroup `
78+
-TopicName Topic1 `
79+
-EndpointType servicebustopic `
80+
-Endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/topics/topic1 `
81+
-EventSubscriptionName EventSubscription1
82+
```
83+
84+
You can also use the [`New-AzEventGridSystemTopicEventSubscription`](/powershell/module/az.eventgrid/new-azeventgridsystemtopiceventsubscription) command for system topics, and the [`New-AzEventGridPartnerTopicEventSubscription`](/powershell/module/az.eventgrid/new-azeventgridpartnertopiceventsubscription) command for partner topics.
85+
86+
5287
[!INCLUDE [event-grid-message-headers](./includes/event-grid-message-headers.md)]
5388

5489
When sending an event to a Service Bus queue or topic as a brokered message, the `messageid` of the brokered message is an internal system ID.
5590

5691
The internal system ID for the message will be maintained across redelivery of the event so that you can avoid duplicate deliveries by turning on **duplicate detection** on the service bus entity. We recommend that you enable duration of the duplicate detection on the Service Bus entity to be either the time-to-live (TTL) of the event or max retry duration, whichever is longer.
5792

93+
## Delivery properties
94+
Event subscriptions allow you to set up HTTP headers that are included in delivered events. This capability allows you to set custom headers that are required by a destination. You can set custom headers on the events that are delivered to Azure Service Bus queues and topics.
95+
96+
Azure Service Bus supports the use of following message properties when sending single messages.
97+
98+
| Header name | Header type |
99+
| :-- | :-- |
100+
| `MessageId` | Dynamic |
101+
| `PartitionKey` | Static or dynamic |
102+
| `SessionId` | Static or dynamic |
103+
| `CorrelationId` | Static or dynamic |
104+
| `Label` | Static or dynamic |
105+
| `ReplyTo` | Static or dynamic |
106+
| `ReplyToSessionId` | Static or dynamic |
107+
| `To` |Static or dynamic |
108+
| `ViaPartitionKey` | Static or dynamic |
109+
110+
> [!NOTE]
111+
> - The default value of `MessageId` is the internal ID of the Event Grid event. You can override it. For example, `data.field`.
112+
> - You can only set either `SessionId` or `MessageId`.
113+
114+
For more information, see [Custom delivery properties](delivery-properties.md).
115+
58116
## REST examples (for PUT)
59117

60118
### Service Bus queue
@@ -146,28 +204,6 @@ The internal system ID for the message will be maintained across redelivery of t
146204
}
147205
```
148206

149-
## Delivery properties
150-
Event subscriptions allow you to set up HTTP headers that are included in delivered events. This capability allows you to set custom headers that are required by a destination. You can set custom headers on the events that are delivered to Azure Service Bus queues and topics.
151-
152-
Azure Service Bus supports the use of following message properties when sending single messages.
153-
154-
| Header name | Header type |
155-
| :-- | :-- |
156-
| `MessageId` | Dynamic |
157-
| `PartitionKey` | Static or dynamic |
158-
| `SessionId` | Static or dynamic |
159-
| `CorrelationId` | Static or dynamic |
160-
| `Label` | Static or dynamic |
161-
| `ReplyTo` | Static or dynamic |
162-
| `ReplyToSessionId` | Static or dynamic |
163-
| `To` |Static or dynamic |
164-
| `ViaPartitionKey` | Static or dynamic |
165-
166-
> [!NOTE]
167-
> - The default value of `MessageId` is the internal ID of the Event Grid event. You can override it. For example, `data.field`.
168-
> - You can only set either `SessionId` or `MessageId`.
169-
170-
For more information, see [Custom delivery properties](delivery-properties.md).
171207

172208
## Next steps
173209
See the [Event handlers](event-handlers.md) article for a list of supported event handlers.

0 commit comments

Comments
 (0)