You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-grid/post-to-custom-topic.md
+7-15Lines changed: 7 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Post event to custom Azure Event Grid topic
3
3
description: This article describes how to post an event to a custom topic. It shows the format of the post and event data.
4
4
ms.topic: conceptual
5
-
ms.date: 08/19/2021
5
+
ms.date: 11/17/2022
6
6
ms.custom: devx-track-azurepowershell
7
7
---
8
8
@@ -16,43 +16,35 @@ This article describes how to post an event to a custom topic using an access ke
16
16
17
17
## Endpoint
18
18
19
-
When sending the HTTP POST to a custom topic, use the URI format: `https://<topic-endpoint>?api-version=2018-01-01`.
20
-
21
-
For example, a valid URI is: `https://exampletopic.westus2-1.eventgrid.azure.net/api/events?api-version=2018-01-01`.
22
-
23
-
To get the endpoint for a custom topic with Azure CLI, use:
19
+
When sending the HTTP POST to a custom topic, use the URI format: `https://<topic-endpoint>?api-version=2018-01-01`. For example, a valid URI is: `https://exampletopic.westus2-1.eventgrid.azure.net/api/events?api-version=2018-01-01`. To get the endpoint for a custom topic using Azure CLI, use:
24
20
25
21
```azurecli-interactive
26
22
az eventgrid topic show --name <topic-name> -g <topic-resource-group> --query "endpoint"
27
23
```
28
24
29
-
To get the endpoint for a custom topic with Azure PowerShell, use:
25
+
To get the endpoint for a custom topic using Azure PowerShell, use:
In the request, include a header value named `aeg-sas-key` that contains a key for authentication.
38
-
39
-
For example, a valid header value is `aeg-sas-key: VXbGWce53249Mt8wuotr0GPmyJ/nDT4hgdEj9DpBeRr38arnnm5OFg==`.
40
-
41
-
To get the key for a custom topic with Azure CLI, use:
33
+
In the request, include a header value named `aeg-sas-key` that contains a key for authentication. For example, a valid header value is `aeg-sas-key: xxxxxxxxxxxxxxxxxxxxxxx`. To get the key for a custom topic using Azure CLI, use:
42
34
43
35
```azurecli
44
36
az eventgrid topic key list --name <topic-name> -g <topic-resource-group> --query "key1"
45
37
```
46
38
47
-
To get the key for a custom topic with PowerShell, use:
39
+
To get the key for a custom topic using PowerShell, use:
For custom topics, the top-level data contains the same fields as standard resource-defined events. One of those properties is a data property that contains properties unique to the custom topic. As event publisher, you determine the properties for that data object. Use the following schema:
47
+
For custom topics, the top-level data contains the same fields as standard resource-defined events. One of those properties is a `data` property that contains properties unique to the custom topic. As an event publisher, you determine properties for that data object. Here's the schema:
56
48
57
49
```json
58
50
[
@@ -69,7 +61,7 @@ For custom topics, the top-level data contains the same fields as standard resou
69
61
]
70
62
```
71
63
72
-
For a description of these properties, see [Azure Event Grid event schema](event-schema.md). When posting events to an event grid topic, the array can have a total size of up to 1 MB. The maximum allowed size for an event is also 1 MB. Events over 64 KB are charged in 64-KB increments. When receiving events in a batch, the maximum allowed number of events is 5,000 per batch.
64
+
For a description of these properties, see [Azure Event Grid event schema](event-schema.md). When posting events to an Event Grid topic, the array can have a total size of up to 1 MB. The maximum allowed size for an event is also 1 MB. Events over 64 KB are charged in 64-KB increments. When receiving events in a batch, the maximum allowed number of events is 5,000 per batch.
0 commit comments