Skip to content

Commit bab617f

Browse files
committed
Post to custom topic - review & update
1 parent ec811bf commit bab617f

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

articles/event-grid/post-to-custom-topic.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Post event to custom Azure Event Grid topic
33
description: This article describes how to post an event to a custom topic. It shows the format of the post and event data.
44
ms.topic: conceptual
5-
ms.date: 08/19/2021
5+
ms.date: 11/17/2022
66
ms.custom: devx-track-azurepowershell
77
---
88

@@ -16,43 +16,35 @@ This article describes how to post an event to a custom topic using an access ke
1616
1717
## Endpoint
1818

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:
2420

2521
```azurecli-interactive
2622
az eventgrid topic show --name <topic-name> -g <topic-resource-group> --query "endpoint"
2723
```
2824

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:
3026

3127
```powershell
3228
(Get-AzEventGridTopic -ResourceGroupName <topic-resource-group> -Name <topic-name>).Endpoint
3329
```
3430

3531
## Header
3632

37-
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:
4234

4335
```azurecli
4436
az eventgrid topic key list --name <topic-name> -g <topic-resource-group> --query "key1"
4537
```
4638

47-
To get the key for a custom topic with PowerShell, use:
39+
To get the key for a custom topic using PowerShell, use:
4840

4941
```powershell
5042
(Get-AzEventGridTopicKey -ResourceGroupName <topic-resource-group> -Name <topic-name>).Key1
5143
```
5244

5345
## Event data
5446

55-
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:
5648

5749
```json
5850
[
@@ -69,7 +61,7 @@ For custom topics, the top-level data contains the same fields as standard resou
6961
]
7062
```
7163

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.
7365

7466
For example, a valid event data schema is:
7567

0 commit comments

Comments
 (0)