Skip to content

Commit fa5a790

Browse files
authored
Merge pull request #146731 from spelluru/egridcloudevents0211
CloudEvents examples for event sources
2 parents 9ef4ceb + 32a2373 commit fa5a790

17 files changed

+3132
-631
lines changed

articles/event-grid/event-schema-app-configuration.md

Lines changed: 75 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
title: Azure App Configuration as Event Grid source
33
description: This article describes how to use Azure App Configuration as an Event Grid event source. It provides the schema and links to tutorial and how-to articles.
44
ms.topic: conceptual
5-
ms.date: 07/07/2020
5+
ms.date: 02/11/2021
66
---
77

88
# Azure App Configuration as an Event Grid source
99
This article provides the properties and schema for Azure App Configuration events. For an introduction to event schemas, see [Azure Event Grid event schema](event-schema.md). It also gives you a list of quick starts and tutorials to use Azure App Configuration as an event source.
1010

11-
## Event Grid event schema
12-
13-
### Available event types
11+
## Available event types
1412

1513
Azure App Configuration emits the following event types:
1614

@@ -19,8 +17,9 @@ Azure App Configuration emits the following event types:
1917
| Microsoft.AppConfiguration.KeyValueModified | Raised when a key-value is created or replaced. |
2018
| Microsoft.AppConfiguration.KeyValueDeleted | Raised when a key-value is deleted. |
2119

22-
### Example event
20+
## Example event
2321

22+
# [Event Grid event schema](#tab/event-grid-event-schema)
2423
The following example shows the schema of a key-value modified event:
2524

2625
```json
@@ -58,29 +57,87 @@ The schema for a key-value deleted event is similar:
5857
"metadataVersion": "1"
5958
}]
6059
```
61-
62-
### Event properties
60+
# [Cloud event schema](#tab/cloud-event-schema)
61+
62+
The following example shows the schema of a key-value modified event:
63+
64+
```json
65+
[{
66+
"id": "84e17ea4-66db-4b54-8050-df8f7763f87b",
67+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.appconfiguration/configurationstores/contoso",
68+
"subject": "https://contoso.azconfig.io/kv/Foo?label=FizzBuzz",
69+
"data": {
70+
"key": "Foo",
71+
"label": "FizzBuzz",
72+
"etag": "FnUExLaj2moIi4tJX9AXn9sakm0"
73+
},
74+
"type": "Microsoft.AppConfiguration.KeyValueModified",
75+
"time": "2019-05-31T20:05:03Z",
76+
"specversion": "1.0"
77+
}]
78+
```
79+
80+
The schema for a key-value deleted event is similar:
81+
82+
```json
83+
[{
84+
"id": "84e17ea4-66db-4b54-8050-df8f7763f87b",
85+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.appconfiguration/configurationstores/contoso",
86+
"subject": "https://contoso.azconfig.io/kv/Foo?label=FizzBuzz",
87+
"data": {
88+
"key": "Foo",
89+
"label": "FizzBuzz",
90+
"etag": "FnUExLaj2moIi4tJX9AXn9sakm0"
91+
},
92+
"type": "Microsoft.AppConfiguration.KeyValueDeleted",
93+
"time": "2019-05-31T20:05:03Z",
94+
"specversion": "1.0"
95+
}]
96+
```
97+
98+
---
99+
100+
## Event properties
63101

102+
# [Event Grid event schema](#tab/event-grid-event-schema)
64103
An event has the following top-level data:
65104

66105
| Property | Type | Description |
67106
| -------- | ---- | ----------- |
68-
| topic | string | Full resource path to the event source. This field is not writeable. Event Grid provides this value. |
69-
| subject | string | Publisher-defined path to the event subject. |
70-
| eventType | string | One of the registered event types for this event source. |
71-
| eventTime | string | The time the event is generated based on the provider's UTC time. |
72-
| ID | string | Unique identifier for the event. |
73-
| data | object | App Configuration event data. |
74-
| dataVersion | string | The schema version of the data object. The publisher defines the schema version. |
75-
| metadataVersion | string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
107+
| `topic` | string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
108+
| `subject` | string | Publisher-defined path to the event subject. |
109+
| `eventType` | string | One of the registered event types for this event source. |
110+
| `eventTime` | string | The time the event is generated based on the provider's UTC time. |
111+
| `id` | string | Unique identifier for the event. |
112+
| `data` | object | App Configuration event data. |
113+
| `dataVersion` | string | The schema version of the data object. The publisher defines the schema version. |
114+
| `metadataVersion` | string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
115+
116+
117+
# [Cloud event schema](#tab/cloud-event-schema)
118+
119+
An event has the following top-level data:
120+
121+
| Property | Type | Description |
122+
| -------- | ---- | ----------- |
123+
| `source` | string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
124+
| `subject` | string | Publisher-defined path to the event subject. |
125+
| `type` | string | One of the registered event types for this event source. |
126+
| `time` | string | The time the event is generated based on the provider's UTC time. |
127+
| `id` | string | Unique identifier for the event. |
128+
| `data` | object | App Configuration event data. |
129+
| `specversion` | string | CloudEvents schema specification version. |
130+
131+
---
76132

77133
The data object has the following properties:
78134

79135
| Property | Type | Description |
80136
| -------- | ---- | ----------- |
81-
| key | string | The key of the key-value that was modified or deleted. |
82-
| label | string | The label, if any, of the key-value that was modified or deleted. |
83-
| etag | string | For `KeyValueModified` the etag of the new key-value. For `KeyValueDeleted` the etag of the key-value that was deleted. |
137+
| `key` | string | The key of the key-value that was modified or deleted. |
138+
| `label` | string | The label, if any, of the key-value that was modified or deleted. |
139+
| `etag` | string | For `KeyValueModified` the etag of the new key-value. For `KeyValueDeleted` the etag of the key-value that was deleted. |
140+
84141

85142
## Tutorials and how-tos
86143

0 commit comments

Comments
 (0)