From a885ce35053619c00a068aa1b602b401fbae73dd Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Thu, 16 Jun 2022 17:54:36 -0700 Subject: [PATCH 1/7] Fixing endpoint url type and providing sdk client name for orderby. --- package-lock.json | 2 +- .../preview/2022-07-01-preview/deviceupdate.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 68c2d2792885..3d5df4dff7be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3580,4 +3580,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json index d88189e2457f..128781c6508d 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json @@ -1022,6 +1022,7 @@ "in": "query", "required": false, "type": "string", + "x-ms-client-name": "orderBy", "description": "Orders the set of groups returned. You can order by any combination of groupId, device count, created date, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount." }, { @@ -1237,6 +1238,7 @@ "in": "query", "required": false, "type": "string", + "x-ms-client-name": "orderBy", "description": "Orders the set of deployments returned. You can order by start date." } ], @@ -1670,6 +1672,7 @@ "in": "query", "required": false, "type": "string", + "x-ms-client-name": "orderBy", "description": "Orders the set of deployments returned. You can order by start date." } ], @@ -4332,7 +4335,7 @@ "name": "endpoint", "in": "path", "required": true, - "format": "uri", + "format": "url", "type": "string", "x-ms-skip-url-encoding": true, "description": "Account endpoint.", From c18520805631f5cb7536ec2243fe4a13459e9265 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:15:36 -0700 Subject: [PATCH 2/7] SDK review feedback plus removing two examples (I will re-add them shorty; removing to fix Linux filename casing issue). --- .../2022-07-01-preview/deviceupdate.json | 70 ++++++++++++------- ...leteDeploymentForDeviceClassSubgroup.json} | 0 ...eManagement_DeleteDeviceclassSubgroup.json | 12 ---- ...GetBestUpdatesForDeviceClassSubgroup.json} | 0 ...t_GetDeploymentForDeviceclassSubgroup.json | 42 ----------- ...iceManagement_GetDeviceClassSubgroup.json} | 0 ...nagement_GetUpdateComplianceForGroup.json} | 0 ...atesForDeviceClassSubgroupDeployment.json} | 0 8 files changed, 45 insertions(+), 79 deletions(-) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_DeleteDeviceclassSubgroupDeployment.json => DeviceManagement_DeleteDeploymentForDeviceClassSubgroup.json} (100%) delete mode 100644 specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceclassSubgroup.json rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_ListBestUpdatesForDeviceClassSubgroup.json => DeviceManagement_GetBestUpdatesForDeviceClassSubgroup.json} (100%) delete mode 100644 specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceclassSubgroup.json rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_GetDeviceClassSubgroupDetails.json => DeviceManagement_GetDeviceClassSubgroup.json} (100%) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_GetGroupUpdateCompliance.json => DeviceManagement_GetUpdateComplianceForGroup.json} (100%) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_ListDevicesForDeviceClassSubgroupDeployment.json => DeviceManagement_ListDeviceStatesForDeviceClassSubgroupDeployment.json} (100%) diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json index 128781c6508d..c89b224f89ee 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json @@ -715,7 +715,7 @@ "tags": [ "Device and deployment management" ], - "description": "Deletes a device class.", + "description": "Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the records from the system and to stop checking the compatibility of this device class with new updates. If a device is ever reconnected for this device class it will be re-created.", "operationId": "DeviceManagement_DeleteDeviceClass", "x-ms-examples": { "DeviceManagement_DeleteDeviceClass": { @@ -1091,7 +1091,7 @@ "tags": [ "Device and deployment management" ], - "description": "Deletes a device group.", + "description": "Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are retained for history purposes. Users can call this method to delete a group if they do not need to retain any of the history of the group and no longer need it. If a device is ever connected again for this group after the group was deleted it will be automatically re-created but there will be no history.", "operationId": "DeviceManagement_DeleteGroup", "x-ms-examples": { "DeviceManagement_DeleteGroup": { @@ -1128,10 +1128,10 @@ "Device and deployment management" ], "description": "Get device group update compliance information such as how many devices are on their latest update, how many need new updates, and how many are in progress on receiving a new update.", - "operationId": "DeviceManagement_GetGroupUpdateCompliance", + "operationId": "DeviceManagement_GetUpdateComplianceForGroup", "x-ms-examples": { - "DeviceManagement_GetGroupUpdateCompliance": { - "$ref": "./examples/DeviceManagement_GetGroupUpdateCompliance.json" + "DeviceManagement_GetUpdateComplianceForGroup": { + "$ref": "./examples/DeviceManagement_GetUpdateComplianceForGroup.json" } }, "parameters": [ @@ -1476,7 +1476,10 @@ } } }, - "x-ms-odata": "#/definitions/DeviceClassSubgroupFilter" + "x-ms-odata": "#/definitions/DeviceClassSubgroupFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } } }, "/deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}": { @@ -1485,10 +1488,10 @@ "Device and deployment management" ], "description": "Gets device class subgroup details.", - "operationId": "DeviceManagement_GetDeviceClassSubgroupDetails", + "operationId": "DeviceManagement_GetDeviceClassSubgroup", "x-ms-examples": { "DeviceManagement_GetGroupUpdateCompliance": { - "$ref": "./examples/DeviceManagement_GetDeviceClassSubgroupDetails.json" + "$ref": "./examples/DeviceManagement_GetDeviceClassSubgroup.json" } }, "parameters": [ @@ -1606,10 +1609,10 @@ "Device and deployment management" ], "description": "Get the best available update for a device class subgroup and a count of how many devices need this update.", - "operationId": "DeviceManagement_ListBestUpdatesForDeviceClassSubgroup", + "operationId": "DeviceManagement_GetBestUpdatesForDeviceClassSubgroup", "x-ms-examples": { "DeviceManagement_ListBestUpdatesForDeviceClassSubgroup": { - "$ref": "./examples/DeviceManagement_ListBestUpdatesForDeviceClassSubgroup.json" + "$ref": "./examples/DeviceManagement_GetBestUpdatesForDeviceClassSubgroup.json" } }, "parameters": [ @@ -1745,10 +1748,10 @@ "Deployment management" ], "description": "Deletes a device class subgroup deployment.", - "operationId": "DeviceManagement_DeleteDeviceClassSubgroupDeployment", + "operationId": "DeviceManagement_DeleteDeploymentForDeviceClassSubgroup", "x-ms-examples": { - "DeviceManagement_DeleteDeviceClassSubgroupDeployment": { - "$ref": "./examples/DeviceManagement_DeleteDeviceclassSubgroupDeployment.json" + "DeviceManagement_DeleteDeploymentForDeviceClassSubgroup": { + "$ref": "./examples/DeviceManagement_DeleteDeploymentForDeviceClassSubgroup.json" } }, "parameters": [ @@ -1922,10 +1925,10 @@ "Device and deployment management" ], "description": "Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices.", - "operationId": "DeviceManagement_ListDevicesForDeviceClassSubgroupDeployment", + "operationId": "DeviceManagement_ListDeviceStatesForDeviceClassSubgroupDeployment", "x-ms-examples": { - "DeviceManagement_ListDevicesForDeviceClassSubgroupDeployment": { - "$ref": "./examples/DeviceManagement_ListDevicesForDeviceClassSubgroupDeployment.json" + "DeviceManagement_ListDeviceStatesForDeviceClassSubgroupDeployment": { + "$ref": "./examples/DeviceManagement_ListDeviceStatesForDeviceClassSubgroupDeployment.json" } }, "parameters": [ @@ -2282,7 +2285,10 @@ } } }, - "x-ms-odata": "#/definitions/DeviceHealthFilter" + "x-ms-odata": "#/definitions/DeviceHealthFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } } } }, @@ -3231,6 +3237,20 @@ }, "description": "Device filter." }, + "DeviceClassSubgroupFilter": { + "type": "object", + "properties": { + "compatPropertyName": { + "type": "string", + "description": "The name of the compat property to use in the filter. E.g. compatProperties/manufacturer" + }, + "compatPropertyValue": { + "type": "string", + "description": "The value the compat property to use in the filter. E.g. Contoso" + } + }, + "description": "Device class subgroups filter. Filters device class subgroups based on device class compat property names and values" + }, "DevicesList": { "description": "The list of devices.", "type": "object", @@ -3430,15 +3450,15 @@ }, "createdDateTime": { "type": "string", - "description": "Date and time when the deviceclass subgroup was created." + "description": "Date and time when the device class subgroup was created." }, "deviceCount": { "type": "integer", - "description": "The number of devices in the deviceclass subgroup." + "description": "The number of devices in the device class subgroup." }, "deploymentId": { "type": "string", - "description": "The active deployment Id for the deviceclass subgroup." + "description": "The active deployment Id for the device class subgroup." } }, "required": [ @@ -3446,7 +3466,7 @@ "groupId", "createdDateTime" ], - "description": "Device class subgroup details." + "description": "Device class subgroup details. A device class subgroup is a subset of devices in a group that share the same device class id." }, "DeviceClassSubgroupsList": { "description": "The list of device class subgroups within a group.", @@ -3473,7 +3493,7 @@ "properties": { "deploymentId": { "type": "string", - "description": "The deployment identifier." + "description": "The caller-provided deployment identifier." }, "startDateTime": { "type": "string", @@ -3482,18 +3502,18 @@ }, "update": { "$ref": "#/definitions/UpdateInfo", - "description": "Update information." + "description": "Update information for the update in the deployment." }, "groupId": { "type": "string", - "description": "The group identity" + "description": "The group identity for the devices the deployment is intended to update." }, "deviceClassSubgroups": { "type": "array", "items": { "type": "string" }, - "description": "The device class subgroups for the deployment." + "description": "The device class subgroups the deployment is compatible with and subgroup deployments have been created for. This is not provided by the caller during CreateOrUpdateDeployment but is automatically determined by Device Update" }, "isCanceled": { "type": "boolean", diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceclassSubgroupDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeploymentForDeviceClassSubgroup.json similarity index 100% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceclassSubgroupDeployment.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeploymentForDeviceClassSubgroup.json diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceclassSubgroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceclassSubgroup.json deleted file mode 100644 index 7fa86d1552fa..000000000000 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceclassSubgroup.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "endpoint": "contoso.api.adu.microsoft.com", - "instanceId": "blue", - "groupId": "group1", - "deviceClassId": "deviceClassId", - "api-version": "2022-07-01-preview" - }, - "responses": { - "204": {} - } -} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListBestUpdatesForDeviceClassSubgroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetBestUpdatesForDeviceClassSubgroup.json similarity index 100% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListBestUpdatesForDeviceClassSubgroup.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetBestUpdatesForDeviceClassSubgroup.json diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceclassSubgroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceclassSubgroup.json deleted file mode 100644 index 7f015a12bb6e..000000000000 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceclassSubgroup.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "parameters": { - "endpoint": "contoso.api.adu.microsoft.com", - "instanceId": "blue", - "groupId": "TestGroup", - "deviceClassId": "deviceClassId", - "deploymentId": "deploymentId", - "api-version": "2022-07-01-preview" - }, - "responses": { - "200": { - "body": { - "deploymentId": "deploymentId", - "startDateTime": "2020-04-22T12:12:12.0000000+00:00", - "groupId": "TestGroup", - "update": { - "updateId": { - "provider": "provider", - "name": "name", - "version": "1.2.3.4" - } - }, - "rollbackPolicy": { - "update": { - "updateId": { - "provider": "provider", - "name": "name", - "version": "1.2.3.3" - } - }, - "failure": { - "devicesFailedPercentage": 50, - "devicesFailedCount": 100 - } - }, - "isCanceled": false, - "isRetried": false, - "isCloudInitiatedRollback": false - } - } - } -} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeviceClassSubgroupDetails.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeviceClassSubgroup.json similarity index 100% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeviceClassSubgroupDetails.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeviceClassSubgroup.json diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetGroupUpdateCompliance.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetUpdateComplianceForGroup.json similarity index 100% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetGroupUpdateCompliance.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetUpdateComplianceForGroup.json diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListDevicesForDeviceClassSubgroupDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListDeviceStatesForDeviceClassSubgroupDeployment.json similarity index 100% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListDevicesForDeviceClassSubgroupDeployment.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListDeviceStatesForDeviceClassSubgroupDeployment.json From 188d56f7443c18670ccf13b9b1d12836aa8437cb Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:20:13 -0700 Subject: [PATCH 3/7] Reverting package-lock.json change. --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 3d5df4dff7be..68c2d2792885 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3580,4 +3580,4 @@ "dev": true } } -} +} \ No newline at end of file From 1343c50cd64a137dcd631b5454bc79474459b44b Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:23:50 -0700 Subject: [PATCH 4/7] Re-adding the two examples --- ...eManagement_DeleteDeviceClassSubgroup.json | 12 ++++++ ...t_GetDeploymentForDeviceClassSubgroup.json | 42 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceClassSubgroup.json create mode 100644 specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceClassSubgroup.json diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceClassSubgroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceClassSubgroup.json new file mode 100644 index 000000000000..7fa86d1552fa --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_DeleteDeviceClassSubgroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "endpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "group1", + "deviceClassId": "deviceClassId", + "api-version": "2022-07-01-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceClassSubgroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceClassSubgroup.json new file mode 100644 index 000000000000..7f015a12bb6e --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetDeploymentForDeviceClassSubgroup.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "endpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "TestGroup", + "deviceClassId": "deviceClassId", + "deploymentId": "deploymentId", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "deploymentId": "deploymentId", + "startDateTime": "2020-04-22T12:12:12.0000000+00:00", + "groupId": "TestGroup", + "update": { + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + } + }, + "rollbackPolicy": { + "update": { + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.3" + } + }, + "failure": { + "devicesFailedPercentage": 50, + "devicesFailedCount": 100 + } + }, + "isCanceled": false, + "isRetried": false, + "isCloudInitiatedRollback": false + } + } + } +} From e20993af92b87b3853f6a442e1b1246d28f17ac7 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:31:08 -0700 Subject: [PATCH 5/7] Update sample file casing. --- .../preview/2022-07-01-preview/deviceupdate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json index c89b224f89ee..230075304b21 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json @@ -1708,7 +1708,7 @@ "operationId": "DeviceManagement_GetDeploymentForDeviceClassSubgroup", "x-ms-examples": { "DeviceManagement_GetDeploymentForDeviceClassSubgroup": { - "$ref": "./examples/DeviceManagement_GetDeploymentForDeviceclassSubgroup.json" + "$ref": "./examples/DeviceManagement_GetDeploymentForDeviceClassSubgroup.json" } }, "parameters": [ From 47e97a578550176da7fdd88da2e4df768549e078 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:37:30 -0700 Subject: [PATCH 6/7] Another filename case mismatch fix. --- .../preview/2022-07-01-preview/deviceupdate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json index 230075304b21..8cfad38db611 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json @@ -1531,7 +1531,7 @@ "operationId": "DeviceManagement_DeleteDeviceClassSubgroup", "x-ms-examples": { "DeviceManagement_DeleteDeviceClassSubgroup": { - "$ref": "./examples/DeviceManagement_DeleteDeviceclassSubgroup.json" + "$ref": "./examples/DeviceManagement_DeleteDeviceClassSubgroup.json" } }, "parameters": [ From ba91ceba613152c79371d562f24fa2828ea52ffb Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Thu, 23 Jun 2022 13:31:49 -0700 Subject: [PATCH 7/7] Incorporating SDK review feedback into our swagger. --- package-lock.json | 2 +- .../2022-07-01-preview/deviceupdate.json | 83 +++++++++++-------- ...=> DeviceManagement_GetLogCollection.json} | 6 +- ...ement_GetLogCollectionDetailedStatus.json} | 10 +-- ... DeviceManagement_ListLogCollections.json} | 4 +- ... DeviceManagement_StartLogCollection.json} | 10 +-- 6 files changed, 64 insertions(+), 51 deletions(-) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_GetLogCollectionOperation.json => DeviceManagement_GetLogCollection.json} (79%) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_GetLogCollectionOperationDetailedStatus.json => DeviceManagement_GetLogCollectionDetailedStatus.json} (81%) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_ListLogCollectionOperations.json => DeviceManagement_ListLogCollections.json} (86%) rename specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/{DeviceManagement_CollectLogs.json => DeviceManagement_StartLogCollection.json} (76%) diff --git a/package-lock.json b/package-lock.json index 68c2d2792885..3d5df4dff7be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3580,4 +3580,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json index 8cfad38db611..5d3f2cae2e5e 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/deviceupdate.json @@ -1185,7 +1185,7 @@ "in": "query", "required": false, "type": "string", - "description": "Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property." + "description": "Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property. This filter is deprecated and should not be used." }, { "$ref": "#/parameters/ApiVersionParameter" @@ -2086,11 +2086,11 @@ "tags": [ "Device and deployment management" ], - "operationId": "DeviceManagement_CollectLogs", - "description": "Start the device diagnostics log collection operation on specified devices.", + "operationId": "DeviceManagement_StartLogCollection", + "description": "Start the device diagnostics log collection on specified devices.", "x-ms-examples": { - "DeviceManagement_CollectLogs": { - "$ref": "./examples/DeviceManagement_CollectLogs.json" + "DeviceManagement_StartLogCollection": { + "$ref": "./examples/DeviceManagement_StartLogCollection.json" } }, "parameters": [ @@ -2098,26 +2098,26 @@ "$ref": "#/parameters/InstanceIdParameter" }, { - "$ref": "#/parameters/OperationIdParameter" + "$ref": "#/parameters/LogCollectionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "logCollectionRequest", + "name": "logCollection", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/LogCollectionOperation" + "$ref": "#/definitions/LogCollection" }, - "description": "The deployment properties." + "description": "The log collection properties." } ], "responses": { "201": { - "description": "Operation created.", + "description": "Log collection created.", "schema": { - "$ref": "#/definitions/LogCollectionOperation" + "$ref": "#/definitions/LogCollection" } }, "default": { @@ -2132,11 +2132,11 @@ "tags": [ "Device and deployment management" ], - "operationId": "DeviceManagement_GetLogCollectionOperation", - "description": "Get the device diagnostics log collection operation", + "operationId": "DeviceManagement_GetLogCollection", + "description": "Get the device diagnostics log collection", "x-ms-examples": { - "DeviceManagement_GetLogCollectionOperation": { - "$ref": "./examples/DeviceManagement_GetLogCollectionOperation.json" + "DeviceManagement_GetLogCollection": { + "$ref": "./examples/DeviceManagement_GetLogCollection.json" } }, "parameters": [ @@ -2144,7 +2144,7 @@ "$ref": "#/parameters/InstanceIdParameter" }, { - "$ref": "#/parameters/OperationIdParameter" + "$ref": "#/parameters/LogCollectionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -2154,7 +2154,7 @@ "200": { "description": "Operation resource", "schema": { - "$ref": "#/definitions/LogCollectionOperation" + "$ref": "#/definitions/LogCollection" } }, "default": { @@ -2171,11 +2171,11 @@ "tags": [ "Device and deployment management" ], - "operationId": "DeviceManagement_ListLogCollectionOperations", - "description": "Get all device diagnostics log collection operations", + "operationId": "DeviceManagement_ListLogCollections", + "description": "Get all device diagnostics log collections", "x-ms-examples": { - "DeviceManagement_ListLogCollectionOperations": { - "$ref": "./examples/DeviceManagement_ListLogCollectionOperations.json" + "DeviceManagement_ListLogCollections": { + "$ref": "./examples/DeviceManagement_ListLogCollections.json" } }, "parameters": [ @@ -2188,9 +2188,9 @@ ], "responses": { "200": { - "description": "List of all device diagnostics operations", + "description": "List of all log collections", "schema": { - "$ref": "#/definitions/LogCollectionOperationList" + "$ref": "#/definitions/LogCollectionList" } }, "default": { @@ -2210,11 +2210,11 @@ "tags": [ "Device and deployment management" ], - "operationId": "DeviceManagement_GetLogCollectionOperationDetailedStatus", - "description": "Get device diagnostics log collection operation with detailed status", + "operationId": "DeviceManagement_GetLogCollectionDetailedStatus", + "description": "Get log collection with detailed status", "x-ms-examples": { - "DeviceManagement_GetLogCollectionOperationDetailedStatus": { - "$ref": "./examples/DeviceManagement_GetLogCollectionOperationDetailedStatus.json" + "DeviceManagement_GetLogCollectionDetailedStatus": { + "$ref": "./examples/DeviceManagement_GetLogCollectionDetailedStatus.json" } }, "parameters": [ @@ -4061,12 +4061,13 @@ ], "description": "Device Update agent id" }, - "LogCollectionOperation": { + "LogCollection": { "type": "object", "properties": { "operationId": { "type": "string", - "description": "The diagnostics operation id." + "description": "The log collection id.", + "x-ms-client-name": "logCollectionId" }, "deviceList": { "type": "array", @@ -4106,7 +4107,8 @@ "properties": { "operationId": { "type": "string", - "description": "The device diagnostics operation id." + "description": "The device diagnostics operation id.", + "x-ms-client-name": "logCollectionId" }, "createdDateTime": { "type": "string", @@ -4134,15 +4136,15 @@ }, "description": "Device diagnostics operation detailed status" }, - "LogCollectionOperationList": { - "description": "The list of diagnostics operations with server paging support.", + "LogCollectionList": { + "description": "The list of log collections with server paging support.", "type": "object", "properties": { "value": { "description": "The collection of pageable items.", "type": "array", "items": { - "$ref": "#/definitions/LogCollectionOperation" + "$ref": "#/definitions/LogCollection" } }, "nextLink": { @@ -4154,8 +4156,8 @@ "value" ] }, - "LogCollectionOperationDetailedStatusList": { - "description": "The list of diagnostics operations with detailed status, with server paging support.", + "LogCollectionDetailedStatusList": { + "description": "The list of log collections with detailed status, with server paging support.", "type": "object", "properties": { "value": { @@ -4429,6 +4431,17 @@ "type": "string", "x-ms-parameter-location": "method" }, + "LogCollectionIdParameter": { + "name": "operationId", + "in": "path", + "description": "Log collection identifier.", + "minLength": 1, + "maxLength": 256, + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-client-name": "logCollectionId" + }, "DeviceIdParameter": { "name": "deviceId", "in": "path", diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionOperation.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollection.json similarity index 79% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionOperation.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollection.json index 5c5a7c2c5916..77647181aabe 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionOperation.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollection.json @@ -2,13 +2,13 @@ "parameters": { "endpoint": "contoso.api.adu.microsoft.com", "instanceId": "blue", - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "api-version": "2022-07-01-preview" }, "responses": { "200": { "body": { - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "deviceList": [ { "deviceId": "DeviceA" @@ -18,7 +18,7 @@ "moduleId": "ModuleB" } ], - "description": "Example diagnostics operation", + "description": "Log collection description", "createdDateTime": "2021-09-30T02:23:41.59Z", "lastActionDateTime": "2021-09-30T02:23:41.59Z", "status": "NotStarted" diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionOperationDetailedStatus.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionDetailedStatus.json similarity index 81% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionOperationDetailedStatus.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionDetailedStatus.json index 0dade7596e89..9315d05f38a7 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionOperationDetailedStatus.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_GetLogCollectionDetailedStatus.json @@ -2,13 +2,13 @@ "parameters": { "endpoint": "contoso.api.adu.microsoft.com", "instanceId": "blue", - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "api-version": "2022-07-01-preview" }, "responses": { "200": { "body": { - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "createdDateTime": "2021-09-30T02:23:41.59Z", "lastActionDateTime": "2021-09-30T02:23:41.59Z", "status": "NotStarted", @@ -18,7 +18,7 @@ "status": "NotStarted", "resultCode": "200", "extendedResultCode": "0", - "logLocation": "/storageAccount/deviceUpdateInstanceName/DeviceA/SampleOperationId" + "logLocation": "/storageAccount/deviceUpdateInstanceName/DeviceA/LogCollectionId" }, { "deviceId": "DeviceB", @@ -26,10 +26,10 @@ "status": "NotStarted", "resultCode": "200", "extendedResultCode": "0", - "logLocation": "/storageAccount/deviceUpdateInstanceName/DeviceB/ModuleB/SampleOperationId" + "logLocation": "/storageAccount/deviceUpdateInstanceName/DeviceB/ModuleB/LogCollectionId" } ], - "description": "operation description" + "description": "Log collection description" } } } diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListLogCollectionOperations.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListLogCollections.json similarity index 86% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListLogCollectionOperations.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListLogCollections.json index 7d9ef7f31e7d..0f2b5d99999e 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListLogCollectionOperations.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_ListLogCollections.json @@ -9,7 +9,7 @@ "body": { "value": [ { - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "deviceList": [ { "deviceId": "DeviceA" @@ -19,7 +19,7 @@ "moduleId": "ModuleB" } ], - "description": "Example diagnostics operation", + "description": "Log collection description", "createdDateTime": "2021-09-30T02:23:41.59Z", "lastActionDateTime": "2021-09-30T02:23:41.59Z", "status": "NotStarted" diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_CollectLogs.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_StartLogCollection.json similarity index 76% rename from specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_CollectLogs.json rename to specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_StartLogCollection.json index 7389293127c6..41b99ca8ccdc 100644 --- a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_CollectLogs.json +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2022-07-01-preview/examples/DeviceManagement_StartLogCollection.json @@ -2,9 +2,9 @@ "parameters": { "endpoint": "contoso.api.adu.microsoft.com", "instanceId": "blue", - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "api-version": "2022-07-01-preview", - "logCollectionRequest": { + "logCollection": { "deviceList": [ { "deviceId": "DeviceA" @@ -14,13 +14,13 @@ "moduleId": "ModuleB" } ], - "description": "Example diagnostics operation" + "description": "Log collection description" } }, "responses": { "201": { "body": { - "operationId": "SampleOperationId", + "operationId": "LogCollectionId", "deviceList": [ { "deviceId": "DeviceA" @@ -30,7 +30,7 @@ "moduleId": "ModuleB" } ], - "description": "Example diagnostics operation", + "description": "og collection description", "createdDateTime": "2021-09-30T02:23:41.59Z", "lastActionDateTime": "2021-09-30T02:23:41.59Z", "status": "NotStarted"