diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json index a34c66549942..bed95f500c07 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json @@ -262,43 +262,6 @@ "CustomEventEvent": { "type": "object", "description": "Properties of an event published to an Event Grid topic using a custom schema" - }, - "SubscriptionValidationEventData": { - "description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event.", - "type": "object", - "properties": { - "validationCode": { - "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).", - "type": "string", - "readOnly": true - }, - "validationUrl": { - "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).", - "type": "string", - "readOnly": true - } - } - }, - "SubscriptionValidationResponse": { - "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.", - "type": "object", - "properties": { - "validationResponse": { - "description": "The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.", - "type": "string" - } - } - }, - "SubscriptionDeletedEventData": { - "description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event.", - "type": "object", - "properties": { - "eventSubscriptionId": { - "description": "The Azure resource ID of the deleted event subscription.", - "type": "string", - "readOnly": true - } - } } }, "parameters": { diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/SystemEvents.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/SystemEvents.json new file mode 100644 index 000000000000..ec0a8c862678 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/SystemEvents.json @@ -0,0 +1,255 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-01-01", + "title": "EventGrid SystemEvents", + "description": "Azure EventGrid System Events" + }, + "paths": {}, + "definitions": { + "SubscriptionValidationEventData": { + "description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event.", + "type": "object", + "properties": { + "validationCode": { + "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).", + "type": "string", + "readOnly": true + }, + "validationUrl": { + "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).", + "type": "string", + "readOnly": true + } + } + }, + "SubscriptionValidationResponse": { + "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.", + "type": "object", + "properties": { + "validationResponse": { + "description": "The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription.", + "type": "string" + } + } + }, + "SubscriptionDeletedEventData": { + "description": "Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event.", + "type": "object", + "properties": { + "eventSubscriptionId": { + "description": "The Azure resource ID of the deleted event subscription.", + "type": "string", + "readOnly": true + } + } + }, + "EventGridMQTTClientCreatedOrUpdatedEventData": { + "type": "object", + "description": "Event data for Microsoft.EventGrid.MQTTClientCreatedOrUpdated event.", + "allOf": [ + { + "$ref": "#/definitions/EventGridMQTTClientEventData" + } + ], + "properties": { + "state": { + "type": "string", + "description": "Configured state of the client. The value could be Enabled or Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EventGridMqttClientState", + "modelAsString": true + } + }, + "createdOn": { + "type": "string", + "format": "date-time", + "description": "Time the client resource is created based on the provider's UTC time." + }, + "updatedOn": { + "type": "string", + "format": "date-time", + "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." + }, + "attributes": { + "type": "object", + "description": "The key-value attributes that are assigned to the client resource.", + "additionalProperties": { + "type": "string" + } + } + }, + "x-ms-examples": { + "EventGridMQTTClientCreatedOrUpdatedCloudEventsSchema": { + "$ref": "./examples/cloud-events-schema/client_created_or_updated.json" + }, + "EventGridMQTTClientCreatedOrUpdatedEventGridSchema": { + "$ref": "./examples/event-grid-schema/client_created_or_updated.json" + } + } + }, + "EventGridMQTTClientDeletedEventData": { + "type": "object", + "description": "Event data for Microsoft.EventGrid.MQTTClientDeleted event.", + "allOf": [ + { + "$ref": "#/definitions/EventGridMQTTClientEventData" + } + ], + "properties": {}, + "x-ms-examples": { + "EventGridMQTTClientDeletedCloudEventsSchema": { + "$ref": "./examples/cloud-events-schema/client_deleted.json" + }, + "EventGridMQTTClientDeletedEventGridSchema": { + "$ref": "./examples/event-grid-schema/client_deleted.json" + } + } + }, + "EventGridMQTTClientSessionConnectedEventData": { + "type": "object", + "description": "Event data for Microsoft.EventGrid.MQTTClientSessionConnected event.", + "allOf": [ + { + "$ref": "#/definitions/EventGridMQTTClientEventData" + } + ], + "properties": { + "clientSessionName": { + "type": "string", + "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." + }, + "sequenceNumber": { + "type": "number", + "format": "int64", + "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." + } + }, + "x-ms-examples": { + "EventGridMQTTClientSessionConnectedCloudEventsSchema": { + "$ref": "./examples/cloud-events-schema/clientsession_connected.json" + }, + "EventGridMQTTClientSessionConnectedEventGridSchema": { + "$ref": "./examples/event-grid-schema/clientsession_connected.json" + } + } + }, + "EventGridMQTTClientSessionDisconnectedEventData": { + "type": "object", + "description": "Event data for Microsoft.EventGrid.MQTTClientSessionDisconnected event.", + "allOf": [ + { + "$ref": "#/definitions/EventGridMQTTClientEventData" + } + ], + "properties": { + "clientSessionName": { + "type": "string", + "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." + }, + "sequenceNumber": { + "type": "integer", + "format": "int64", + "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." + }, + "disconnectionReason": { + "type": "string", + "description": "Reason for the disconnection of the MQTT client's session. The value could be one of the values in the disconnection reasons table.", + "enum": [ + "ClientAuthenticationError", + "ClientAuthorizationError", + "ClientError", + "ClientInitiatedDisconnect", + "ConnectionLost", + "IpForbidden", + "QuotaExceeded", + "ServerError", + "ServerInitiatedDisconnect", + "SessionOverflow", + "SessionTakenOver" + ], + "x-ms-enum": { + "name": "EventGridMqttClientDisconnectionReason", + "modelAsString": true, + "values": [ + { + "value": "ClientAuthenticationError", + "description": "The client got disconnected for any authentication reasons (for example, certificate expired, client got disabled, or client configuration changed)." + }, + { + "value": "ClientAuthorizationError", + "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)." + }, + { + "value": "ClientError", + "description": "The client sent a bad request or used one of the unsupported features that resulted in a connection termination by the service." + }, + { + "value": "ClientInitiatedDisconnect", + "description": "The client initiates a graceful disconnect through a DISCONNECT packet for MQTT or a close frame for MQTT over WebSocket." + }, + { + "value": "ConnectionLost", + "description": "The client-server connection is lost. (EXCHANGE ONLINE PROTECTION)." + }, + { + "value": "IpForbidden", + "description": "The client's IP address is blocked by IP filter or Private links configuration." + }, + { + "value": "QuotaExceeded", + "description": "The client exceeded one or more of the throttling limits that resulted in a connection termination by the service." + }, + { + "value": "ServerError", + "description": "The connection got terminated due to an unexpected server error." + }, + { + "value": "ServerInitiatedDisconnect", + "description": "The server initiates a graceful disconnect for any operational reason." + }, + { + "value": "SessionOverflow", + "description": "The client's queue for unacknowledged QoS1 messages reached its limit, which resulted in a connection termination by the server." + }, + { + "value": "SessionTakenOver", + "description": "The client reconnected with the same authentication name, which resulted in the termination of the previous connection." + } + ] + } + } + }, + "x-ms-examples": { + "EventGridMQTTClientSessionDisconnectedCloudEventsSchema": { + "$ref": "./examples/cloud-events-schema/clientsession_disconnected.json" + }, + "EventGridMQTTClientSessionDisconnectedEventGridSchema": { + "$ref": "./examples/event-grid-schema/clientsession_disconnected.json" + } + } + }, + "EventGridMQTTClientEventData": { + "type": "object", + "description": "Schema of the Data property of an EventGridEvent for MQTT Client state changes.", + "properties": { + "clientAuthenticationName": { + "type": "string", + "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." + }, + "clientName": { + "type": "string", + "description": "Name of the client resource in the Event Grid namespace." + }, + "namespaceName": { + "type": "string", + "description": "Name of the Event Grid namespace where the MQTT client was created or updated." + } + } + } + } +} \ No newline at end of file diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/client_created_or_updated.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/client_created_or_updated.json new file mode 100644 index 000000000000..b90c3434160d --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/client_created_or_updated.json @@ -0,0 +1,19 @@ +{ + "specversion": "1.0", + "id": "383d1562-c95f-4095-936c-688e72c6b2bb", + "time": "2023-07-29T01:14:35.8928724Z", + "type": "Microsoft.EventGrid.MQTTClientCreatedOrUpdated", + "source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1", + "data": { + "createdOn": "2023-07-29T01:14:34.2048108Z", + "updatedOn": "2023-07-29T01:14:34.2048108Z", + "namespaceName": "myns", + "clientName": "client1", + "clientAuthenticationName": "client1", + "state": "Enabled", + "attributes": { + "attribute1": "value1" + } + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/client_deleted.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/client_deleted.json new file mode 100644 index 000000000000..d6b652b750a8 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/client_deleted.json @@ -0,0 +1,13 @@ +{ + "specversion": "1.0", + "id": "2a93aaf9-66c2-4f8e-9ba3-8d899c10bf17", + "time": "2023-07-29T01:30:52.5620566Z", + "type": "Microsoft.EventGrid.MQTTClientDeleted", + "source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1", + "data": { + "namespaceName": "myns", + "clientName": "client1", + "clientAuthenticationName": "client1" + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/clientsession_connected.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/clientsession_connected.json new file mode 100644 index 000000000000..6878f0551101 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/clientsession_connected.json @@ -0,0 +1,14 @@ +{ + "specversion": "1.0", + "id": "5249c38a-a048-46dd-8f60-df34fcdab06c", + "time": "2023-07-29T01:23:49.6454046Z", + "type": "Microsoft.EventGrid.MQTTClientSessionConnected", + "source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1/sessions/session1", + "data": { + "namespaceName": "myns", + "clientAuthenticationName": "client1", + "clientSessionName": "session1", + "sequenceNumber": 1 + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/clientsession_disconnected.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/clientsession_disconnected.json new file mode 100644 index 000000000000..43b24bb935dd --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/cloud-events-schema/clientsession_disconnected.json @@ -0,0 +1,15 @@ +{ + "specversion": "1.0", + "id": "e30e5174-787d-4e19-8812-580148bfcf7b", + "time": "2023-07-29T01:27:40.2446871Z", + "type": "Microsoft.EventGrid.MQTTClientSessionDisconnected", + "source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1/sessions/session1", + "data": { + "namespaceName": "myns", + "clientAuthenticationName": "client1", + "clientSessionName": "session1", + "sequenceNumber": 1, + "disconnectionReason": "ClientInitiatedDisconnect" + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/client_created_or_updated.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/client_created_or_updated.json new file mode 100644 index 000000000000..8f2c7fc2af54 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/client_created_or_updated.json @@ -0,0 +1,20 @@ +{ + "id": "383d1562-c95f-4095-936c-688e72c6b2bb", + "eventTime": "2023-07-29T01:14:35.8928724Z", + "eventType": "Microsoft.EventGrid.MQTTClientCreatedOrUpdated", + "topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1", + "dataVersion": "1", + "metadataVersion": "1", + "data": { + "createdOn": "2023-07-29T01:14:34.2048108Z", + "updatedOn": "2023-07-29T01:14:34.2048108Z", + "namespaceName": "myns", + "clientName": "client1", + "clientAuthenticationName": "client1", + "state": "Enabled", + "attributes": { + "attribute1": "value1" + } + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/client_deleted.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/client_deleted.json new file mode 100644 index 000000000000..d29b8e3693a3 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/client_deleted.json @@ -0,0 +1,14 @@ +{ + "id": "2a93aaf9-66c2-4f8e-9ba3-8d899c10bf17", + "eventTime": "2023-07-29T01:30:52.5620566Z", + "eventType": "Microsoft.EventGrid.MQTTClientDeleted", + "topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1", + "dataVersion": "1", + "metadataVersion": "1", + "data": { + "clientName": "client1", + "clientAuthenticationName": "client1", + "namespaceName": "myns" + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/clientsession_connected.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/clientsession_connected.json new file mode 100644 index 000000000000..c0eb8f5dbcac --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/clientsession_connected.json @@ -0,0 +1,15 @@ +{ + "id": "5249c38a-a048-46dd-8f60-df34fcdab06c", + "eventTime": "2023-07-29T01:23:49.6454046Z", + "eventType": "Microsoft.EventGrid.MQTTClientSessionConnected", + "topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1/sessions/session1", + "dataVersion": "1", + "metadataVersion": "1", + "data": { + "namespaceName": "myns", + "clientAuthenticationName": "client1", + "clientSessionName": "session1", + "sequenceNumber": 1 + } +} diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/clientsession_disconnected.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/clientsession_disconnected.json new file mode 100644 index 000000000000..ae9c3b5c0b8d --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/examples/event-grid-schema/clientsession_disconnected.json @@ -0,0 +1,16 @@ +{ + "id": "e30e5174-787d-4e19-8812-580148bfcf7b", + "eventTime": "2023-07-29T01:27:40.2446871Z", + "eventType": "Microsoft.EventGrid.MQTTClientSessionDisconnected", + "topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myrg/providers/Microsoft.EventGrid/namespaces/myns", + "subject": "clients/client1/sessions/session1", + "dataVersion": "1", + "metadataVersion": "1", + "data": { + "namespaceName": "myns", + "clientAuthenticationName": "client1", + "clientSessionName": "session1", + "sequenceNumber": 1, + "disconnectionReason": "ClientInitiatedDisconnect" + } +} diff --git a/specification/eventgrid/data-plane/readme.md b/specification/eventgrid/data-plane/readme.md index bd96408a73ef..22e518fdd347 100644 --- a/specification/eventgrid/data-plane/readme.md +++ b/specification/eventgrid/data-plane/readme.md @@ -122,6 +122,7 @@ input-file: - Microsoft.EventHub/stable/2018-01-01/EventHub.json - Microsoft.Resources/stable/2018-01-01/Resources.json - Microsoft.EventGrid/stable/2018-01-01/EventGrid.json +- Microsoft.EventGrid/stable/2018-01-01/SystemEvents.json - Microsoft.DataBox/stable/2018-01-01/DataBox.json - Microsoft.Devices/stable/2018-01-01/IotHub.json - Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json @@ -152,6 +153,7 @@ input-file: - Microsoft.EventHub/stable/2018-01-01/EventHub.json - Microsoft.Resources/stable/2018-01-01/Resources.json - Microsoft.EventGrid/stable/2018-01-01/EventGrid.json +- Microsoft.EventGrid/stable/2018-01-01/SystemEvents.json - Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json - Microsoft.DataBox/stable/2018-01-01/DataBox.json - Microsoft.Devices/stable/2018-01-01/IotHub.json