diff --git a/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json b/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json index 5463f64bbd3e..ca447f11a224 100644 --- a/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json +++ b/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json @@ -26,6 +26,24 @@ ], "properties": {} }, + "IotHubDeviceConnectedEventData": { + "description": "Event data for Microsoft.Devices.DeviceConnected event.", + "allOf": [ + { + "$ref": "#/definitions/DeviceConnectionStateEventProperties" + } + ], + "properties": {} + }, + "IotHubDeviceDisconnectedEventData": { + "description": "Event data for Microsoft.Devices.DeviceDisconnected event.", + "allOf": [ + { + "$ref": "#/definitions/DeviceConnectionStateEventProperties" + } + ], + "properties": {} + }, "DeviceLifeCycleEventProperties": { "type": "object", "description": "Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted).", @@ -38,23 +56,37 @@ "type": "string", "description": "Name of the IoT Hub where the device was created or deleted." }, - "opType": { + "twin": { + "description": "Information about the device twin, which is the cloud representation of application device metadata.", + "$ref" : "#/definitions/DeviceTwinInfo" + } + } + }, + "DeviceConnectionStateEventProperties": { + "type": "object", + "description": "Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected).", + "properties": { + "deviceId": { "type": "string", - "description": "The event type specified for this operation by the IoT Hub." + "description": "The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '." }, - "operationTimestamp": { + "moduleId": { "type": "string", - "description": "The ISO8601 timestamp of the operation." + "description": "The unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '." }, - "twin": { - "description": "Information about the device twin, which is the cloud represenation of application device metadata.", - "$ref" : "#/definitions/DeviceTwinInfo" + "hubName": { + "type": "string", + "description": "Name of the IoT Hub where the device was created or deleted." + }, + "deviceConnectionStateEventInfo": { + "description": "Information about the device connection state event.", + "$ref" : "#/definitions/DeviceConnectionStateEventInfo" } } }, "DeviceTwinInfo": { "type": "object", - "description": "Information about the device twin, which is the cloud represenation of application device metadata.", + "description": "Information about the device twin, which is the cloud representation of application device metadata.", "properties": { "authenticationType": { "type": "string", @@ -148,6 +180,16 @@ "x-ms-client-name" : "$lastUpdated" } } + }, + "DeviceConnectionStateEventInfo" : { + "type": "object", + "description": "Information about the device connection state event.", + "properties": { + "sequenceNumber": { + "type": "string", + "description": "Sequence number is string representation of a hexadecimal number. string compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are converting the string to hex, then the number is a 256 bit number." + } + } } } } \ No newline at end of file