Skip to content

Commit 263caed

Browse files
Event Grid MQTT System events (#25526)
* added event grid namespace system events * Create client_created_or_updated.json * Add files via upload * Create client_created_or_updated.json * Add files via upload * Update clientsession_disconnected.json * Update client_deleted.json * Update clientsession_connected.json * Update clientsession_connected.json * Update clientsession_disconnected.json * keyvalue_deleted * addressed prettiercheck and added object type * fixes for eg events * more changes * paths * disconnect enum * date time * arch board updates * brace * fix * fix * fix casing * fix description * revert swagger changes * add x-ms-examples * apply prettier --------- Co-authored-by: George Guirguis <[email protected]>
1 parent 1a37016 commit 263caed

File tree

11 files changed

+383
-37
lines changed

11 files changed

+383
-37
lines changed

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

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -262,43 +262,6 @@
262262
"CustomEventEvent": {
263263
"type": "object",
264264
"description": "Properties of an event published to an Event Grid topic using a custom schema"
265-
},
266-
"SubscriptionValidationEventData": {
267-
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event.",
268-
"type": "object",
269-
"properties": {
270-
"validationCode": {
271-
"description": "The validation code sent by Azure Event Grid to validate an event subscription. To complete the validation handshake, the subscriber must either respond with this validation code as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).",
272-
"type": "string",
273-
"readOnly": true
274-
},
275-
"validationUrl": {
276-
"description": "The validation URL sent by Azure Event Grid (available starting version 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the validationCode as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).",
277-
"type": "string",
278-
"readOnly": true
279-
}
280-
}
281-
},
282-
"SubscriptionValidationResponse": {
283-
"description": "To complete an event subscription validation handshake, a subscriber can use either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the validationCode is used, the SubscriptionValidationResponse can be used to build the response.",
284-
"type": "object",
285-
"properties": {
286-
"validationResponse": {
287-
"description": "The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.",
288-
"type": "string"
289-
}
290-
}
291-
},
292-
"SubscriptionDeletedEventData": {
293-
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event.",
294-
"type": "object",
295-
"properties": {
296-
"eventSubscriptionId": {
297-
"description": "The Azure resource ID of the deleted event subscription.",
298-
"type": "string",
299-
"readOnly": true
300-
}
301-
}
302265
}
303266
},
304267
"parameters": {
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2018-01-01",
5+
"title": "EventGrid SystemEvents",
6+
"description": "Azure EventGrid System Events"
7+
},
8+
"paths": {},
9+
"definitions": {
10+
"SubscriptionValidationEventData": {
11+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event.",
12+
"type": "object",
13+
"properties": {
14+
"validationCode": {
15+
"description": "The validation code sent by Azure Event Grid to validate an event subscription. To complete the validation handshake, the subscriber must either respond with this validation code as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).",
16+
"type": "string",
17+
"readOnly": true
18+
},
19+
"validationUrl": {
20+
"description": "The validation URL sent by Azure Event Grid (available starting version 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the validationCode as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).",
21+
"type": "string",
22+
"readOnly": true
23+
}
24+
}
25+
},
26+
"SubscriptionValidationResponse": {
27+
"description": "To complete an event subscription validation handshake, a subscriber can use either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the validationCode is used, the SubscriptionValidationResponse can be used to build the response.",
28+
"type": "object",
29+
"properties": {
30+
"validationResponse": {
31+
"description": "The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.",
32+
"type": "string"
33+
}
34+
}
35+
},
36+
"SubscriptionDeletedEventData": {
37+
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event.",
38+
"type": "object",
39+
"properties": {
40+
"eventSubscriptionId": {
41+
"description": "The Azure resource ID of the deleted event subscription.",
42+
"type": "string",
43+
"readOnly": true
44+
}
45+
}
46+
},
47+
"EventGridMQTTClientCreatedOrUpdatedEventData": {
48+
"type": "object",
49+
"description": "Event data for Microsoft.EventGrid.MQTTClientCreatedOrUpdated event.",
50+
"allOf": [
51+
{
52+
"$ref": "#/definitions/EventGridMQTTClientEventData"
53+
}
54+
],
55+
"properties": {
56+
"state": {
57+
"type": "string",
58+
"description": "Configured state of the client. The value could be Enabled or Disabled",
59+
"enum": [
60+
"Enabled",
61+
"Disabled"
62+
],
63+
"x-ms-enum": {
64+
"name": "EventGridMqttClientState",
65+
"modelAsString": true
66+
}
67+
},
68+
"createdOn": {
69+
"type": "string",
70+
"format": "date-time",
71+
"description": "Time the client resource is created based on the provider's UTC time."
72+
},
73+
"updatedOn": {
74+
"type": "string",
75+
"format": "date-time",
76+
"description": "Time the client resource is last updated based on the provider's UTC time. If the client resource was never updated, this value is identical to the value of the 'createdOn' property."
77+
},
78+
"attributes": {
79+
"type": "object",
80+
"description": "The key-value attributes that are assigned to the client resource.",
81+
"additionalProperties": {
82+
"type": "string"
83+
}
84+
}
85+
},
86+
"x-ms-examples": {
87+
"EventGridMQTTClientCreatedOrUpdatedCloudEventsSchema": {
88+
"$ref": "./examples/cloud-events-schema/client_created_or_updated.json"
89+
},
90+
"EventGridMQTTClientCreatedOrUpdatedEventGridSchema": {
91+
"$ref": "./examples/event-grid-schema/client_created_or_updated.json"
92+
}
93+
}
94+
},
95+
"EventGridMQTTClientDeletedEventData": {
96+
"type": "object",
97+
"description": "Event data for Microsoft.EventGrid.MQTTClientDeleted event.",
98+
"allOf": [
99+
{
100+
"$ref": "#/definitions/EventGridMQTTClientEventData"
101+
}
102+
],
103+
"properties": {},
104+
"x-ms-examples": {
105+
"EventGridMQTTClientDeletedCloudEventsSchema": {
106+
"$ref": "./examples/cloud-events-schema/client_deleted.json"
107+
},
108+
"EventGridMQTTClientDeletedEventGridSchema": {
109+
"$ref": "./examples/event-grid-schema/client_deleted.json"
110+
}
111+
}
112+
},
113+
"EventGridMQTTClientSessionConnectedEventData": {
114+
"type": "object",
115+
"description": "Event data for Microsoft.EventGrid.MQTTClientSessionConnected event.",
116+
"allOf": [
117+
{
118+
"$ref": "#/definitions/EventGridMQTTClientEventData"
119+
}
120+
],
121+
"properties": {
122+
"clientSessionName": {
123+
"type": "string",
124+
"description": "Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, and supports UTF-8 characters."
125+
},
126+
"sequenceNumber": {
127+
"type": "number",
128+
"format": "int64",
129+
"description": "A number that helps indicate order of MQTT client session connected or disconnected events. Latest event will have a sequence number that is higher than the previous event."
130+
}
131+
},
132+
"x-ms-examples": {
133+
"EventGridMQTTClientSessionConnectedCloudEventsSchema": {
134+
"$ref": "./examples/cloud-events-schema/clientsession_connected.json"
135+
},
136+
"EventGridMQTTClientSessionConnectedEventGridSchema": {
137+
"$ref": "./examples/event-grid-schema/clientsession_connected.json"
138+
}
139+
}
140+
},
141+
"EventGridMQTTClientSessionDisconnectedEventData": {
142+
"type": "object",
143+
"description": "Event data for Microsoft.EventGrid.MQTTClientSessionDisconnected event.",
144+
"allOf": [
145+
{
146+
"$ref": "#/definitions/EventGridMQTTClientEventData"
147+
}
148+
],
149+
"properties": {
150+
"clientSessionName": {
151+
"type": "string",
152+
"description": "Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, and supports UTF-8 characters."
153+
},
154+
"sequenceNumber": {
155+
"type": "integer",
156+
"format": "int64",
157+
"description": "A number that helps indicate order of MQTT client session connected or disconnected events. Latest event will have a sequence number that is higher than the previous event."
158+
},
159+
"disconnectionReason": {
160+
"type": "string",
161+
"description": "Reason for the disconnection of the MQTT client's session. The value could be one of the values in the disconnection reasons table.",
162+
"enum": [
163+
"ClientAuthenticationError",
164+
"ClientAuthorizationError",
165+
"ClientError",
166+
"ClientInitiatedDisconnect",
167+
"ConnectionLost",
168+
"IpForbidden",
169+
"QuotaExceeded",
170+
"ServerError",
171+
"ServerInitiatedDisconnect",
172+
"SessionOverflow",
173+
"SessionTakenOver"
174+
],
175+
"x-ms-enum": {
176+
"name": "EventGridMqttClientDisconnectionReason",
177+
"modelAsString": true,
178+
"values": [
179+
{
180+
"value": "ClientAuthenticationError",
181+
"description": "The client got disconnected for any authentication reasons (for example, certificate expired, client got disabled, or client configuration changed)."
182+
},
183+
{
184+
"value": "ClientAuthorizationError",
185+
"description": "The client got disconnected for any authorization reasons (for example, because of a change in the configuration of topic spaces, permission bindings, or client groups)."
186+
},
187+
{
188+
"value": "ClientError",
189+
"description": "The client sent a bad request or used one of the unsupported features that resulted in a connection termination by the service."
190+
},
191+
{
192+
"value": "ClientInitiatedDisconnect",
193+
"description": "The client initiates a graceful disconnect through a DISCONNECT packet for MQTT or a close frame for MQTT over WebSocket."
194+
},
195+
{
196+
"value": "ConnectionLost",
197+
"description": "The client-server connection is lost. (EXCHANGE ONLINE PROTECTION)."
198+
},
199+
{
200+
"value": "IpForbidden",
201+
"description": "The client's IP address is blocked by IP filter or Private links configuration."
202+
},
203+
{
204+
"value": "QuotaExceeded",
205+
"description": "The client exceeded one or more of the throttling limits that resulted in a connection termination by the service."
206+
},
207+
{
208+
"value": "ServerError",
209+
"description": "The connection got terminated due to an unexpected server error."
210+
},
211+
{
212+
"value": "ServerInitiatedDisconnect",
213+
"description": "The server initiates a graceful disconnect for any operational reason."
214+
},
215+
{
216+
"value": "SessionOverflow",
217+
"description": "The client's queue for unacknowledged QoS1 messages reached its limit, which resulted in a connection termination by the server."
218+
},
219+
{
220+
"value": "SessionTakenOver",
221+
"description": "The client reconnected with the same authentication name, which resulted in the termination of the previous connection."
222+
}
223+
]
224+
}
225+
}
226+
},
227+
"x-ms-examples": {
228+
"EventGridMQTTClientSessionDisconnectedCloudEventsSchema": {
229+
"$ref": "./examples/cloud-events-schema/clientsession_disconnected.json"
230+
},
231+
"EventGridMQTTClientSessionDisconnectedEventGridSchema": {
232+
"$ref": "./examples/event-grid-schema/clientsession_disconnected.json"
233+
}
234+
}
235+
},
236+
"EventGridMQTTClientEventData": {
237+
"type": "object",
238+
"description": "Schema of the Data property of an EventGridEvent for MQTT Client state changes.",
239+
"properties": {
240+
"clientAuthenticationName": {
241+
"type": "string",
242+
"description": "Unique identifier for the MQTT client that the client presents to the service for authentication. This case-sensitive string can be up to 128 characters long, and supports UTF-8 characters."
243+
},
244+
"clientName": {
245+
"type": "string",
246+
"description": "Name of the client resource in the Event Grid namespace."
247+
},
248+
"namespaceName": {
249+
"type": "string",
250+
"description": "Name of the Event Grid namespace where the MQTT client was created or updated."
251+
}
252+
}
253+
}
254+
}
255+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"specversion": "1.0",
3+
"id": "383d1562-c95f-4095-936c-688e72c6b2bb",
4+
"time": "2023-07-29T01:14:35.8928724Z",
5+
"type": "Microsoft.EventGrid.MQTTClientCreatedOrUpdated",
6+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns",
7+
"subject": "clients/client1",
8+
"data": {
9+
"createdOn": "2023-07-29T01:14:34.2048108Z",
10+
"updatedOn": "2023-07-29T01:14:34.2048108Z",
11+
"namespaceName": "myns",
12+
"clientName": "client1",
13+
"clientAuthenticationName": "client1",
14+
"state": "Enabled",
15+
"attributes": {
16+
"attribute1": "value1"
17+
}
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"specversion": "1.0",
3+
"id": "2a93aaf9-66c2-4f8e-9ba3-8d899c10bf17",
4+
"time": "2023-07-29T01:30:52.5620566Z",
5+
"type": "Microsoft.EventGrid.MQTTClientDeleted",
6+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns",
7+
"subject": "clients/client1",
8+
"data": {
9+
"namespaceName": "myns",
10+
"clientName": "client1",
11+
"clientAuthenticationName": "client1"
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"specversion": "1.0",
3+
"id": "5249c38a-a048-46dd-8f60-df34fcdab06c",
4+
"time": "2023-07-29T01:23:49.6454046Z",
5+
"type": "Microsoft.EventGrid.MQTTClientSessionConnected",
6+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns",
7+
"subject": "clients/client1/sessions/session1",
8+
"data": {
9+
"namespaceName": "myns",
10+
"clientAuthenticationName": "client1",
11+
"clientSessionName": "session1",
12+
"sequenceNumber": 1
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"specversion": "1.0",
3+
"id": "e30e5174-787d-4e19-8812-580148bfcf7b",
4+
"time": "2023-07-29T01:27:40.2446871Z",
5+
"type": "Microsoft.EventGrid.MQTTClientSessionDisconnected",
6+
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns",
7+
"subject": "clients/client1/sessions/session1",
8+
"data": {
9+
"namespaceName": "myns",
10+
"clientAuthenticationName": "client1",
11+
"clientSessionName": "session1",
12+
"sequenceNumber": 1,
13+
"disconnectionReason": "ClientInitiatedDisconnect"
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"id": "383d1562-c95f-4095-936c-688e72c6b2bb",
3+
"eventTime": "2023-07-29T01:14:35.8928724Z",
4+
"eventType": "Microsoft.EventGrid.MQTTClientCreatedOrUpdated",
5+
"topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns",
6+
"subject": "clients/client1",
7+
"dataVersion": "1",
8+
"metadataVersion": "1",
9+
"data": {
10+
"createdOn": "2023-07-29T01:14:34.2048108Z",
11+
"updatedOn": "2023-07-29T01:14:34.2048108Z",
12+
"namespaceName": "myns",
13+
"clientName": "client1",
14+
"clientAuthenticationName": "client1",
15+
"state": "Enabled",
16+
"attributes": {
17+
"attribute1": "value1"
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)