From 5d7bed0384a6ce1012f2634c1b02cf496f6d08f1 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:22:28 -0800 Subject: [PATCH 01/14] Update readme.md --- .../deviceupdate/resource-manager/readme.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/specification/deviceupdate/resource-manager/readme.md b/specification/deviceupdate/resource-manager/readme.md index 727c3b3512f9..49be17c855c0 100644 --- a/specification/deviceupdate/resource-manager/readme.md +++ b/specification/deviceupdate/resource-manager/readme.md @@ -39,6 +39,16 @@ input-file: - Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json ``` +## Suppression + +``` yaml +directive: + - suppress: ENUM_CASE_MISMATCH + where: $.definitions.Identity.properties.type + from: deviceupdate.json + reason: Managed Identity type can be case in-sensitive +``` + --- # Code Generation @@ -53,6 +63,8 @@ swagger-to-sdk: - repo: azure-sdk-for-net - repo: azure-sdk-for-python - repo: azure-sdk-for-go + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_deviceupdate'] ``` ## CSharp From 2bef56137f682178fb0d7548025d9cd2e2b84bf8 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:29:48 -0800 Subject: [PATCH 02/14] Update deviceupdate.json --- .../2020-03-01-preview/deviceupdate.json | 57 +++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index 04999b9af720..d7aa1ea895fe 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -280,7 +280,7 @@ } }, "patch": { - "description": "Updates account's tags.", + "description": "Updates account's patchable properties", "operationId": "Accounts_Update", "parameters": [ { @@ -296,12 +296,12 @@ "$ref": "#/parameters/AccountNameParameter" }, { - "name": "tagUpdatePayload", - "description": "Updated tags.", + "name": "accountUpdatePayload", + "description": "Updated Account.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/TagUpdate" + "$ref": "#/definitions/AccountUpdate" } } ], @@ -624,6 +624,10 @@ "readOnly": true } } + }, + "identity": { + "$ref": "#/definitions/Identity", + "description": "The type of identity used for the resource." } } }, @@ -711,6 +715,33 @@ } } }, + "Identity": { + "description": "Identity for the resource.", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "enum": [ + "SystemAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + }, + "type": "string", + "description": "The identity type." + } + } + }, "IotHubSettings": { "type": "object", "description": "Device Update account integration with IoT Hub settings.", @@ -779,6 +810,24 @@ } } }, + "AccountUpdate": { + "description": "Request payload used to update and existing Accounts.", + "properties": { + "identity": { + "$ref": "#/definitions/Identity", + "description": "The type of identity used for the resource." + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + } + }, + "allOf": [ + { + "$ref": "#/definitions/TagUpdate" + } + ] + }, "TagUpdate": { "description": "Request payload used to update an existing resource's tags.", "type": "object", From 366f8cc6971c7b1a978769e978840f3f5fba03ae Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:31:01 -0800 Subject: [PATCH 03/14] Update Accounts_Create.json --- .../examples/Accounts/Accounts_Create.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json index c9e471734628..fecb568fe58f 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -6,7 +6,11 @@ "api-version": "2020-03-01-preview", "Account": { "location": "West US 2", - "properties": {} + "identity": { + "type": "SystemAssigned" + }, + "properties": { + } } }, "responses": { @@ -16,7 +20,13 @@ "location": "westus2", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", "type": "Microsoft.DeviceUpdate/accounts", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, "properties": { + "provisioningState": "Accepted", "hostName": "contoso.api.adu.microsoft.com" } } From da4058eb8b995c3fe9436bee05a5c983f7ef01aa Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:31:20 -0800 Subject: [PATCH 04/14] Update Accounts_Get.json --- .../2020-03-01-preview/examples/Accounts/Accounts_Get.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json index 82b63ec4f16f..4300bc6ef27c 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json @@ -13,6 +13,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", "type": "Microsoft.DeviceUpdate/accounts", "properties": { + "provisioningState": "Succeeded", "hostName": "contoso.api.adu.microsoft.com" } } From 5792e244addacad8a42e5018aafc2d5ce59fd4b3 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:31:46 -0800 Subject: [PATCH 05/14] Update Accounts_List.json --- .../2020-03-01-preview/examples/Accounts/Accounts_List.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json index 119700a176e7..dc2ccf525818 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json @@ -15,6 +15,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", "type": "Microsoft.DeviceUpdate/accounts", "properties": { + "provisioningState": "Succeeded", "hostName": "contoso.api.adu.microsoft.com" } } From 4a1fb26efb8d52f5d2460e8df967d80c6c383929 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:32:03 -0800 Subject: [PATCH 06/14] Update Accounts_Update.json --- .../2020-03-01-preview/examples/Accounts/Accounts_Update.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json index b2fa12930cab..917c1de425ad 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json @@ -4,7 +4,7 @@ "resourceGroupName": "test-rg", "accountName": "contoso", "api-version": "2020-03-01-preview", - "tagUpdatePayload": { + "accountUpdatePayload": { "tags": { "tagKey": "tagValue" } @@ -18,6 +18,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", "type": "Microsoft.DeviceUpdate/accounts", "properties": { + "provisioningState": "Succeeded", "hostName": "contoso.api.adu.microsoft.com" }, "tags": { From bf8bc550754a31775a5ab6ee5435f674f46285c1 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:34:49 -0800 Subject: [PATCH 07/14] Update Instances_Create.json --- .../examples/Instances/Instances_Create.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json index d7e05de91f8f..32f7fe111527 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json @@ -10,7 +10,6 @@ "properties": { "iotHubs": [ { - "name": "blue-contoso-hub", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub", "ioTHubConnectionString": "string", "eventHubConnectionString": "string" @@ -27,10 +26,10 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", "type": "Microsoft.DeviceUpdate/accounts/instances", "properties": { + "provisioningState": "Accepted", "accountName": "contoso", "iotHubs": [ { - "name": "blue-contoso-hub", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ] From bf7f8f89ed5b84edcd4a14bd7e43702d2dc31027 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:35:11 -0800 Subject: [PATCH 08/14] Update Instances_Get.json --- .../2020-03-01-preview/examples/Instances/Instances_Get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json index 5c5197e6e06b..1f354395ae9e 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json @@ -14,10 +14,10 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", "type": "Microsoft.DeviceUpdate/accounts/instances", "properties": { + "provisioningState": "Succeeded", "accountName": "contoso", "iotHubs": [ { - "name": "blue-contoso-hub", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ] From aa2960e1f52b08751e7b717cff34a71bdfca0e03 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:35:32 -0800 Subject: [PATCH 09/14] Update Instances_ListByAccount.json --- .../examples/Instances/Instances_ListByAccount.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json index 68ee16b56023..eac2d6134f84 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json @@ -16,10 +16,10 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", "type": "Microsoft.DeviceUpdate/accounts/instances", "properties": { + "provisioningState": "Succeeded", "accountName": "contoso", "iotHubs": [ { - "name": "blue-contoso-hub", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ] @@ -31,10 +31,10 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/red", "type": "Microsoft.DeviceUpdate/accounts/instances", "properties": { + "provisioningState": "Succeeded", "accountName": "contoso", "iotHubs": [ { - "name": "red-contoso-hub", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/red-contoso-hub" } ] From 9ce553d4708ee12387cae6381846d49b35f387f7 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:36:00 -0800 Subject: [PATCH 10/14] Update Instances_Update.json --- .../2020-03-01-preview/examples/Instances/Instances_Update.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json index a25a82c35692..a431fd26a2db 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json @@ -22,7 +22,6 @@ "accountName": "contoso", "iotHubs": [ { - "name": "blue-contoso-hub", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" } ] From aa41ce2aec2a01da6e1603f7125ab1cd50d28545 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:50:10 -0800 Subject: [PATCH 11/14] Update Accounts_Create.json From 2fe853dea7b49ce204ecae577d6af80bb096adf3 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:55:47 -0800 Subject: [PATCH 12/14] Update Accounts_Create.json --- .../2020-03-01-preview/examples/Accounts/Accounts_Create.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json index fecb568fe58f..df2274572722 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -33,3 +33,4 @@ } } } + From e81bdd8e9e95e5b3bf84ba06c0a0e6bcc535e406 Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 19:56:00 -0800 Subject: [PATCH 13/14] Update Accounts_Create.json --- .../2020-03-01-preview/examples/Accounts/Accounts_Create.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json index df2274572722..fecb568fe58f 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -33,4 +33,3 @@ } } } - From a4cd271cf325149779063faee62f34eb08da244e Mon Sep 17 00:00:00 2001 From: Edgars Sedols Date: Tue, 9 Feb 2021 20:02:32 -0800 Subject: [PATCH 14/14] Update Accounts_Create.json --- .../2020-03-01-preview/examples/Accounts/Accounts_Create.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json index fecb568fe58f..62fbb3e309fc 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -9,8 +9,7 @@ "identity": { "type": "SystemAssigned" }, - "properties": { - } + "properties": {} } }, "responses": {