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/event-domains.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,65 +48,66 @@ Event domains also allow for domain-scope subscriptions. An event subscription o
48
48
49
49
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`.
When using the **Event Grid event schema**, specify the name of the Event Grid topic in the domain as a value for the `topic` property. In the following example, `topic` property is set to `foo` for the first event and to `bar` for the second event.
51
+
# [Cloud event schema](#tab/cloud-event-schema)
52
+
53
+
When using the **cloud event schema**, specify the name of the Event Grid topic in the domain as a value for the `source` property. In the following example, `source` property is set to `foo` for the first event and to `bar` for the second event.
54
+
55
+
If you want to use a different field to specify the intended topic in the domain, specify input schema mapping when creating the domain. For example, if you're using the REST API, use the [properties.inputSchemaMapping](/rest/api/eventgrid/controlplane-preview/domains/create-or-update#jsoninputschemamapping) property when to map that field to `properties.topic`. If you're using the .NET SDK, use [`EventGridJsonInputSchemaMapping`](/dotnet/api/azure.resourcemanager.eventgrid.models.eventgridjsoninputschemamapping). Other SDKs also support the schema mapping.
53
56
54
57
```json
55
58
[{
56
-
"topic": "foo",
59
+
"source": "foo",
57
60
"id": "1111",
58
-
"eventType": "maintenanceRequested",
61
+
"type": "maintenanceRequested",
59
62
"subject": "myapp/vehicles/diggers",
60
-
"eventTime": "2018-10-30T21:03:07+00:00",
63
+
"time": "2018-10-30T21:03:07+00:00",
61
64
"data": {
62
65
"make": "Contoso",
63
66
"model": "Small Digger"
64
67
},
65
-
"dataVersion": "1.0"
68
+
"specversion": "1.0"
66
69
},
67
70
{
68
-
"topic": "bar",
71
+
"source": "bar",
69
72
"id": "2222",
70
-
"eventType": "maintenanceCompleted",
73
+
"type": "maintenanceCompleted",
71
74
"subject": "myapp/vehicles/tractors",
72
-
"eventTime": "2018-10-30T21:04:12+00:00",
75
+
"time": "2018-10-30T21:04:12+00:00",
73
76
"data": {
74
77
"make": "Contoso",
75
78
"model": "Big Tractor"
76
79
},
77
-
"dataVersion": "1.0"
80
+
"specversion": "1.0"
78
81
}]
79
82
```
80
-
# [Cloud event schema](#tab/cloud-event-schema)
81
-
82
-
When using the **cloud event schema**, specify the name of the Event Grid topic in the domain as a value for the `source` property. In the following example, `source` property is set to `foo` for the first event and to `bar` for the second event.
83
83
84
-
If you want to use a different field to specify the intended topic in the domain, specify input schema mapping when creating the domain. For example, if you're using the REST API, use the [properties.inputSchemaMapping](/rest/api/eventgrid/controlplane-preview/domains/create-or-update#jsoninputschemamapping) property when to map that field to `properties.topic`. If you're using the .NET SDK, use [`EventGridJsonInputSchemaMapping`](/dotnet/api/azure.resourcemanager.eventgrid.models.eventgridjsoninputschemamapping). Other SDKs also support the schema mapping.
When using the **Event Grid event schema**, specify the name of the Event Grid topic in the domain as a value for the `topic` property. In the following example, `topic` property is set to `foo` for the first event and to `bar` for the second event.
|`topic`| string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
35
+
|`source`| string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
35
36
|`subject`| string | Publisher-defined path to the event subject. |
36
-
|`eventType`| string | One of the registered event types for this event source. |
37
-
|`eventTime`| string | The time the event is generated based on the provider's UTC time. |
37
+
|`type`| string | One of the registered event types for this event source. |
38
+
|`time`| string | The time the event is generated based on the provider's UTC time. |
38
39
|`id`| string | Unique identifier for the event. |
39
40
|`data`| object | Blob storage event data. |
40
-
|`dataVersion`| string | The schema version of the data object. The publisher defines the schema version. |
41
-
|`metadataVersion`| string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
|`dataVersion`| string | The schema version of the data object. The publisher defines the schema version. |
56
+
|`metadataVersion`| string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
|`topic`| string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
174
+
|`source`| string | Full resource path to the event source. This field isn't writeable. Event Grid provides this value. |
169
175
|`subject`| string | Publisher-defined path to the event subject. |
170
-
|`eventType`| string | One of the registered event types for this event source. |
171
-
|`eventTime`| string | The time the event is generated based on the provider's UTC time. |
176
+
|`type`| string | One of the registered event types for this event source. |
177
+
|`time`| string | The time the event is generated based on the provider's UTC time. |
172
178
|`id`| string | Unique identifier for the event. |
173
179
|`data`| object | API Management event data. |
174
-
|`dataVersion`| string | The schema version of the data object. The publisher defines the schema version. |
175
-
|`metadataVersion`| string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
|`dataVersion`| string | The schema version of the data object. The publisher defines the schema version. |
195
+
|`metadataVersion`| string | The schema version of the event metadata. Event Grid defines the schema of the top-level properties. Event Grid provides this value. |
0 commit comments