Skip to content

Commit dc9a0f5

Browse files
joexumsftjnlycklama
authored andcommitted
[Event Grid] [AppConfiguration] Add snapshot events support (#25393)
* Add snapshot events * Add example ref * Remove unneeded code * Applied comments * Move base properties back to events * Applied comment * remove unneeded code * Update description * Fix lintdiff failure
1 parent 33da52b commit dc9a0f5

File tree

5 files changed

+107
-0
lines changed

5 files changed

+107
-0
lines changed

specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,58 @@
5050
"type": "string"
5151
}
5252
}
53+
},
54+
"AppConfigurationSnapshotEventData": {
55+
"description": "Schema of common properties of snapshot events",
56+
"type": "object",
57+
"properties": {
58+
"name": {
59+
"description": "The name of the snapshot.",
60+
"type": "string"
61+
},
62+
"etag": {
63+
"description": "The etag representing the new state of the snapshot.",
64+
"type": "string"
65+
},
66+
"syncToken": {
67+
"description": "The sync token representing the server state after the event.",
68+
"type": "string"
69+
}
70+
}
71+
},
72+
"AppConfigurationSnapshotCreatedEventData": {
73+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.SnapshotCreated event.",
74+
"type": "object",
75+
"allOf": [
76+
{
77+
"$ref": "#/definitions/AppConfigurationSnapshotEventData"
78+
}
79+
],
80+
"x-ms-examples": {
81+
"snapshotCreatedCloudEventsSchema": {
82+
"$ref": "./examples/cloud-events-schema/snapshot_created.json"
83+
},
84+
"snapshotCreatedEventGridSchema": {
85+
"$ref": "./examples/event-grid-schema/snapshot_created.json"
86+
}
87+
}
88+
},
89+
"AppConfigurationSnapshotModifiedEventData": {
90+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.SnapshotModified event.",
91+
"type": "object",
92+
"allOf": [
93+
{
94+
"$ref": "#/definitions/AppConfigurationSnapshotEventData"
95+
}
96+
],
97+
"x-ms-examples": {
98+
"snapshotModifiedCloudEventsSchema": {
99+
"$ref": "./examples/cloud-events-schema/snapshot_modified.json"
100+
},
101+
"snapshotModifiedEventGridSchema": {
102+
"$ref": "./examples/event-grid-schema/snapshot_modified.json"
103+
}
104+
}
53105
}
54106
}
55107
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.appconfiguration/configurationstores/contoso",
3+
"subject": "https://contoso.azconfig.io/kvsnapshots/Foo",
4+
"type": "Microsoft.AppConfiguration.SnapshotCreated",
5+
"time": "2023-09-02T20:05:03.0000000Z",
6+
"id": "84e17ea4-66db-4b54-8050-df8f7763f87b",
7+
"data": {
8+
"name": "Foo",
9+
"etag": "FnUExLaj2moIi4tJX9AXn9sakm0",
10+
"syncToken": "zAJw6V16=Njo1IzUxNjQ2NzM=;sn=5164673"
11+
},
12+
"specversion": "1.0"
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.appconfiguration/configurationstores/contoso",
3+
"subject": "https://contoso.azconfig.io/snapshots/Foo",
4+
"type": "Microsoft.AppConfiguration.SnapshotModified",
5+
"time": "2023-09-03T20:05:03.0000000Z",
6+
"id": "84e17ea4-66db-4b54-8050-df8f7763f87b",
7+
"data": {
8+
"name": "Foo",
9+
"etag": "FnUExLaj2moIi4tJX9AXn9sakm0",
10+
"syncToken": "zAJw6V16=Njo1IzUxNjQ2NzM=;sn=5164673"
11+
},
12+
"specversion": "1.0"
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": "84e17ea4-66db-4b54-8050-df8f7763f87b",
3+
"topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.appconfiguration/configurationstores/contoso",
4+
"subject": "https://contoso.azconfig.io/snapshots/Foo",
5+
"data": {
6+
"Name": "Foo",
7+
"etag": "FnUExLaj2moIi4tJX9AXn9sakm0",
8+
"syncToken": "zAJw6V16=Njo1IzUxNjQ2NzM=;sn=5164673"
9+
},
10+
"eventType": "Microsoft.AppConfiguration.SnapshotCreated",
11+
"eventTime": "2023-09-02T20:05:03Z",
12+
"dataVersion": "1",
13+
"metadataVersion": "1"
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "84e17ea4-66db-4b54-8050-df8f7763f87b",
3+
"topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.appconfiguration/configurationstores/contoso",
4+
"subject": "https://contoso.azconfig.io/snapshots/Foo",
5+
"data": {
6+
"name": "Foo",
7+
"label": "FizzBuzz",
8+
"etag": "FnUExLaj2moIi4tJX9AXn9sakm0",
9+
"syncToken": "zAJw6V16=Njo1IzUxNjQ2NzM=;sn=5164673"
10+
},
11+
"eventType": "Microsoft.AppConfiguration.SnapshotModified",
12+
"eventTime": "2023-09-03T20:05:03Z",
13+
"dataVersion": "1",
14+
"metadataVersion": "1"
15+
}

0 commit comments

Comments
 (0)