From 5ef0784f3f72d861c0e52a4dd8bc3f19599ac50c Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Wed, 9 Nov 2022 12:53:03 -0800 Subject: [PATCH 1/7] Adding new API versions --- .../examples/iothub_createOrUpdate.json | 9 ++++++--- .../2022-11-01-preview/examples/iothub_delete.json | 6 ++++-- .../preview/2022-11-01-preview/examples/iothub_get.json | 3 ++- .../2022-11-01-preview/examples/iothub_listbyrg.json | 3 ++- .../examples/iothub_listbysubscription.json | 3 ++- .../preview/2022-11-01-preview/iothub.json | 4 ++++ 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_createOrUpdate.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_createOrUpdate.json index fe3727a5197a..ea5a5b48fafb 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_createOrUpdate.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_createOrUpdate.json @@ -79,7 +79,8 @@ "enableDataResidency": true, "rootCertificate": { "enableRootCertificateV2": true - } + }, + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", @@ -188,7 +189,8 @@ "rootCertificate": { "enableRootCertificateV2": true, "lastUpdatedTimeUtc": "2022-04-08T11:16:49.0748958-07:00" - } + }, + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", @@ -300,7 +302,8 @@ "rootCertificate": { "enableRootCertificateV2": true, "lastUpdatedTimeUtc": "2022-04-08T11:16:49.0748958-07:00" - } + }, + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_delete.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_delete.json index ab78657360b0..b3f323f5e582 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_delete.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_delete.json @@ -102,7 +102,8 @@ "maxDeliveryCount": 10 } }, - "features": "None" + "features": "None", + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", @@ -211,7 +212,8 @@ "maxDeliveryCount": 10 } }, - "features": "None" + "features": "None", + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_get.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_get.json index 893a6ec8a42a..63cb21c5cec4 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_get.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_get.json @@ -115,7 +115,8 @@ "role": "secondary" } ], - "minTlsVersion": "1.2" + "minTlsVersion": "1.2", + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbyrg.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbyrg.json index 7b60b8896e6d..5810833db4ee 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbyrg.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbyrg.json @@ -102,7 +102,8 @@ "maxDeliveryCount": 10 } }, - "features": "None" + "features": "None", + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbysubscription.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbysubscription.json index 762ca870b022..b4aaa49c0588 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbysubscription.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_listbysubscription.json @@ -101,7 +101,8 @@ "maxDeliveryCount": 10 } }, - "features": "None" + "features": "None", + "allowDataPlanePreviewFeatures": true }, "sku": { "name": "S1", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json index d848a20a6826..3d0bdcbdd96a 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json @@ -2454,6 +2454,10 @@ }, "rootCertificate": { "$ref": "#/definitions/RootCertificateProperties" + }, + "allowDataPlanePreviewFeatures": { + "description": "When this property is set to true, the hub receives all data plane preview features at all times.", + "type": "boolean" } } }, From f58cf99d680b4d359d62afa547cfe9823969a3a3 Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Thu, 10 Nov 2022 05:53:37 -0800 Subject: [PATCH 2/7] Fixing the swagger validation errors --- .../preview/2022-11-01-preview/examples/iothub_stats.json | 2 +- .../preview/2022-11-01-preview/iothub.json | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_stats.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_stats.json index 1a7bcb918e7e..637e15e8690c 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_stats.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/iothub_stats.json @@ -2,7 +2,7 @@ "parameters": { "resourceName": "testHub", "resourceGroupName": "myResourceGroup", - "api-version": "2018-04-01", + "api-version": "2022-11-01-preview", "subscriptionId": "91d12660-3dec-467a-be2a-213b5544ddc0" }, "responses": { diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json index 3d0bdcbdd96a..9b7648fee653 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json @@ -1735,6 +1735,12 @@ "description": "Long running manual failover operation for the IoT hub completed" }, "202": { + "headers": { + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + } + }, "description": "Manual failover initiated" }, "default": { From af6e103cf34a4772f0c211045dd78bfc56d3c85f Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Thu, 10 Nov 2022 06:30:14 -0800 Subject: [PATCH 3/7] Fixing the validation errors --- .../2022-11-01-preview/examples/IotHub_ManualFailover.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json index b9715c58eb30..e04e6e57990a 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json @@ -10,6 +10,10 @@ }, "responses": { "200": {}, - "202": {} + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/operationResults/b3NfaWhfYmJhZmM4OWItNzQ3My00OWExLTg0NWUtNzQ3NWU2ODBkNDA3?api-version=2022-11-01-preview&operationSource=os_ih&asyncinfo" + } + } } } From c7514112bc89eba1cc729166ee6f3a51a03b6480 Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Fri, 11 Nov 2022 12:23:41 -0800 Subject: [PATCH 4/7] fix it --- specification/iothub/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/iothub/resource-manager/readme.md b/specification/iothub/resource-manager/readme.md index e7f284a9fba5..18d6e0a2f21b 100644 --- a/specification/iothub/resource-manager/readme.md +++ b/specification/iothub/resource-manager/readme.md @@ -331,4 +331,8 @@ directive: where: $.definitions.FallbackRouteProperties.properties.source from: iothub.json reason: Ensure non-breaking change. + - suppress: LroLocationHeader + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover"].post + from: iothub.json + reason: False Negative ``` From 2e831e7c8d48b58ac3e91f448a081d461448aa94 Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Fri, 11 Nov 2022 12:38:07 -0800 Subject: [PATCH 5/7] fix it --- specification/iothub/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iothub/resource-manager/readme.md b/specification/iothub/resource-manager/readme.md index 18d6e0a2f21b..1a5c7573faf5 100644 --- a/specification/iothub/resource-manager/readme.md +++ b/specification/iothub/resource-manager/readme.md @@ -332,7 +332,7 @@ directive: from: iothub.json reason: Ensure non-breaking change. - suppress: LroLocationHeader - where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover"].post + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover"].post.responses.202.headers from: iothub.json reason: False Negative ``` From 6cffed7d053dd50a1404c2f80dc3ca5a0d7bb59a Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Mon, 14 Nov 2022 14:10:58 -0800 Subject: [PATCH 6/7] adding location header --- .../Microsoft.Devices/preview/2022-11-01-preview/iothub.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json index 9b7648fee653..b6079c95fd5d 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json @@ -1736,7 +1736,7 @@ }, "202": { "headers": { - "Azure-AsyncOperation": { + "location": { "description": "URL to query for status of the operation.", "type": "string" } From c59d3e13fc132d49393f5160d91a802ea42c3e88 Mon Sep 17 00:00:00 2001 From: Vikramaditya Battina Date: Mon, 14 Nov 2022 14:28:04 -0800 Subject: [PATCH 7/7] fix it --- .../2022-11-01-preview/examples/IotHub_ManualFailover.json | 3 ++- .../Microsoft.Devices/preview/2022-11-01-preview/iothub.json | 4 ++++ specification/iothub/resource-manager/readme.md | 4 ---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json index e04e6e57990a..a4f32aa20eaa 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/examples/IotHub_ManualFailover.json @@ -12,7 +12,8 @@ "200": {}, "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/operationResults/b3NfaWhfYmJhZmM4OWItNzQ3My00OWExLTg0NWUtNzQ3NWU2ODBkNDA3?api-version=2022-11-01-preview&operationSource=os_ih&asyncinfo" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/operationResults/b3NfaWhfYmJhZmM4OWItNzQ3My00OWExLTg0NWUtNzQ3NWU2ODBkNDA3?api-version=2022-11-01-preview&operationSource=os_ih&asyncinfo", + "Location": "https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/operationResults/b3NfaWhfYmJhZmM4OWItNzQ3My00OWExLTg0NWUtNzQ3NWU2ODBkNDA3?api-version=2022-11-01-preview&operationSource=os_ih" } } } diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json index b6079c95fd5d..cc6c1c85c5ac 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2022-11-01-preview/iothub.json @@ -1739,6 +1739,10 @@ "location": { "description": "URL to query for status of the operation.", "type": "string" + }, + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" } }, "description": "Manual failover initiated" diff --git a/specification/iothub/resource-manager/readme.md b/specification/iothub/resource-manager/readme.md index 1a5c7573faf5..e7f284a9fba5 100644 --- a/specification/iothub/resource-manager/readme.md +++ b/specification/iothub/resource-manager/readme.md @@ -331,8 +331,4 @@ directive: where: $.definitions.FallbackRouteProperties.properties.source from: iothub.json reason: Ensure non-breaking change. - - suppress: LroLocationHeader - where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover"].post.responses.202.headers - from: iothub.json - reason: False Negative ```