From 548044ff3b2e7828a16759d7c6785c84c351800e Mon Sep 17 00:00:00 2001 From: Kapil Agarwal Date: Mon, 8 Apr 2019 13:39:35 -0700 Subject: [PATCH 1/2] Added properties for Message Enrichments to Iot Hub Routing Properties description --- .../IotHub_CustomerInitiatedFailover.json | 178 +++++++++--------- .../examples/iothub_createOrUpdate.json | 14 +- .../examples/iothub_delete.json | 6 +- .../examples/iothub_get.json | 7 +- .../examples/iothub_listbyrg.json | 3 +- .../examples/iothub_listbysubscription.json | 3 +- .../examples/iothub_patch.json | 5 +- .../preview/2019-03-22-preview/iothub.json | 56 ++++-- 8 files changed, 156 insertions(+), 116 deletions(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/IotHub_CustomerInitiatedFailover.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/IotHub_CustomerInitiatedFailover.json index 17e1d9c61e4f..581d482aaf35 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/IotHub_CustomerInitiatedFailover.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/IotHub_CustomerInitiatedFailover.json @@ -1,92 +1,90 @@ { - "parameters": { - "iotHubName": "testHub", - "resourceGroupName": "myResourceGroup", - "api-version": "2019-03-22-preview", - "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", - "failoverInput": { - "failoverRegion": "EASTUS2EUAP" + "parameters": { + "iotHubName": "testHub", + "resourceGroupName": "myResourceGroup", + "api-version": "2019-03-22-preview", + "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0", + "failoverInput": { + "failoverRegion": "EASTUS2EUAP" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", + "name": "testHub", + "type": "Microsoft.Devices/IotHubs", + "location": "centraluseuap", + "tags": {}, + "etag": "AAAAAAFD6M4=", + "properties": { + "state": "Active", + "provisioningState": "Succeeded", + "ipFilterRules": [], + "hostName": "iot-dps-cit-hub-1.azure-devices.net", + "eventHubEndpoints": { + "events": { + "retentionTimeInDays": 1, + "partitionCount": 2, + "partitionIds": [ + "0", + "1" + ], + "path": "iot-dps-cit-hub-1", + "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" + } + }, + "routing": { + "endpoints": { + "serviceBusQueues": [], + "serviceBusTopics": [], + "eventHubs": [], + "storageContainers": [] + }, + "routes": [], + "fallbackRoute": { + "name": "$fallback", + "source": "DeviceMessages", + "condition": "true", + "endpointNames": [ + "events" + ], + "isEnabled": true + }, + "enrichments": [] + }, + "storageEndpoints": { + "$default": { + "sasTtlAsIso8601": "PT1H", + "connectionString": "", + "containerName": "" + } + }, + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "enableFileUploadNotifications": false, + "cloudToDevice": { + "maxDeliveryCount": 10, + "defaultTtlAsIso8601": "PT1H", + "feedback": { + "lockDurationAsIso8601": "PT1M", + "ttlAsIso8601": "PT1H", + "maxDeliveryCount": 10 + } + }, + "features": "None" + }, + "sku": { + "name": "S1", + "tier": "Standard", + "capacity": 1 + } + } + } } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub", - "name": "testHub", - "type": "Microsoft.Devices/IotHubs", - "location": "centraluseuap", - "tags": {}, - "etag": "AAAAAAFD6M4=", - "properties": { - "state": "Active", - "provisioningState": "Succeeded", - "ipFilterRules": [], - "hostName": "iot-dps-cit-hub-1.azure-devices.net", - "eventHubEndpoints": { - "events": { - "retentionTimeInDays": 1, - "partitionCount": 2, - "partitionIds": [ - "0", - "1" - ], - "path": "iot-dps-cit-hub-1", - "endpoint": "sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/" - } - }, - "routing": { - "endpoints": { - "serviceBusQueues": [], - "serviceBusTopics": [], - "eventHubs": [], - "storageContainers": [] - }, - "routes": [], - "fallbackRoute": { - "name": "$fallback", - "source": "DeviceMessages", - "condition": "true", - "endpointNames": [ - "events" - ], - "isEnabled": true - } - }, - "storageEndpoints": { - "$default": { - "sasTtlAsIso8601": "PT1H", - "connectionString": "", - "containerName": "" - } - }, - "messagingEndpoints": { - "fileNotifications": { - "lockDurationAsIso8601": "PT1M", - "ttlAsIso8601": "PT1H", - "maxDeliveryCount": 10 - } - }, - "enableFileUploadNotifications": false, - "cloudToDevice": { - "maxDeliveryCount": 10, - "defaultTtlAsIso8601": "PT1H", - "feedback": { - "lockDurationAsIso8601": "PT1M", - "ttlAsIso8601": "PT1H", - "maxDeliveryCount": 10 - } - }, - "features": "None" - }, - "sku": { - "name": "S1", - "tier": "Standard", - "capacity": 1 - } - } - } - } -} - - - +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_createOrUpdate.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_createOrUpdate.json index 285dacb8c12f..92f743f66143 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_createOrUpdate.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_createOrUpdate.json @@ -43,7 +43,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { @@ -120,7 +121,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { @@ -196,7 +198,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { @@ -232,7 +235,4 @@ } } } -} - - - +} \ No newline at end of file diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_delete.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_delete.json index 512f8fb86556..9a3716b73cd6 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_delete.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_delete.json @@ -46,7 +46,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { @@ -122,7 +123,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_get.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_get.json index 3fd39ff70fbc..935ac3120087 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_get.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_get.json @@ -46,7 +46,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { @@ -74,7 +75,9 @@ }, "features": "None", "deviceStreams": { - "streamingEndpoints": ["https://streams.azure-devices-int.net:9443"] + "streamingEndpoints": [ + "https://streams.azure-devices-int.net:9443" + ] } }, "sku": { diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbyrg.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbyrg.json index d68362d5bf87..76692d4c00d8 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbyrg.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbyrg.json @@ -49,7 +49,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbysubscription.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbysubscription.json index c2f15fb7883f..16ccad31242a 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbysubscription.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_listbysubscription.json @@ -48,7 +48,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_patch.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_patch.json index 2db8e7667545..8fad5cd0e6b4 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_patch.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/examples/iothub_patch.json @@ -20,7 +20,7 @@ "type": "Microsoft.Devices/IotHubs", "location": "centraluseuap", "tags": { - "foo" : "bar" + "foo": "bar" }, "etag": "AAAAAAFD6M4=", "properties": { @@ -56,7 +56,8 @@ "events" ], "isEnabled": true - } + }, + "enrichments": [] }, "storageEndpoints": { "$default": { diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json index 9fa7c6a1e46f..f08eb8d1a139 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json @@ -1745,15 +1745,15 @@ } }, "CertificateBodyDescription": { - "description": "The JSON-serialized X509 Certificate.", - "type": "object", - "properties": { - "certificate": { - "description": "base-64 representation of the X509 leaf certificate .cer file or just .pem file content.", - "type": "string" - } - } - }, + "description": "The JSON-serialized X509 Certificate.", + "type": "object", + "properties": { + "certificate": { + "description": "base-64 representation of the X509 leaf certificate .cer file or just .pem file content.", + "type": "string" + } + } + }, "CertificateDescription": { "description": "The X509 Certificate.", "type": "object", @@ -2265,6 +2265,13 @@ "fallbackRoute": { "description": "The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.", "$ref": "#/definitions/FallbackRouteProperties" + }, + "enrichments": { + "description": "The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. A maximum of 10 enrichments are allowed for paid hubs and a maximum of 2 enrichments are allowed for free hubs.", + "type": "array", + "items": { + "$ref": "#/definitions/EnrichmentProperties" + } } } }, @@ -2534,6 +2541,33 @@ "isEnabled" ] }, + "EnrichmentProperties": { + "description": "The properties of an enrichment that your IoT hub applies to messages to endpoints.", + "type": "object", + "properties": { + "key": { + "description": "The key for the enrichment property.", + "type": "string" + }, + "value": { + "description": "The value for the enrichment property.", + "type": "string" + }, + "endpointNames": { + "description": "The list of endpoints for which the enrichment property is applied to the message if the message satisfies the routing rules for those endpoints.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "key", + "value", + "endpointNames" + ] + }, "IotHubDescription": { "description": "The description of the IoT hub.", "type": "object", @@ -3199,11 +3233,11 @@ }, "properties": { "properties": { - "desired" : { + "desired": { "description": "Twin desired properties", "type": "object" }, - "reported" : { + "reported": { "description": "Twin desired properties", "type": "object" } From 0ca5f68c004077c0f24e001b2b881e26e8d62d5d Mon Sep 17 00:00:00 2001 From: Kapil Agarwal Date: Mon, 8 Apr 2019 15:52:53 -0700 Subject: [PATCH 2/2] Feedback --- .../preview/2019-03-22-preview/iothub.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json index f08eb8d1a139..b31457975163 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json @@ -2267,7 +2267,7 @@ "$ref": "#/definitions/FallbackRouteProperties" }, "enrichments": { - "description": "The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. A maximum of 10 enrichments are allowed for paid hubs and a maximum of 2 enrichments are allowed for free hubs.", + "description": "The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid", "type": "array", "items": { "$ref": "#/definitions/EnrichmentProperties" @@ -2542,11 +2542,11 @@ ] }, "EnrichmentProperties": { - "description": "The properties of an enrichment that your IoT hub applies to messages to endpoints.", + "description": "The properties of an enrichment that your IoT hub applies to messages delivered to endpoints.", "type": "object", "properties": { "key": { - "description": "The key for the enrichment property.", + "description": "The key or name for the enrichment property.", "type": "string" }, "value": { @@ -2554,7 +2554,7 @@ "type": "string" }, "endpointNames": { - "description": "The list of endpoints for which the enrichment property is applied to the message if the message satisfies the routing rules for those endpoints.", + "description": "The list of endpoints for which the enrichment is applied to the message.", "minItems": 1, "type": "array", "items": {