diff --git a/custom-words.txt b/custom-words.txt index 5f5245123059..b5a301b2cad8 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -505,10 +505,15 @@ deserializer deserializing destinationshares deterministically +deviceclasses devicecredentials devicegroups +deviceids deviceprovisioningservices +devicestates +devicetags devicetemplates +deviceupdate Devops devops devspaces @@ -824,6 +829,8 @@ innererror inotify Inotify Inprogress +installable +installableupdates integrationaccount Intelli intervaled @@ -1911,6 +1918,7 @@ Untracked unvalidated unwrapkey updatecertificate +updatecompliance updatehostname updatepolicy updateprivateendpointconnection diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/deviceupdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/deviceupdate.json new file mode 100644 index 000000000000..46bea026053c --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/deviceupdate.json @@ -0,0 +1,2638 @@ +{ + "swagger": "2.0", + "info": { + "title": "DeviceUpdateClient", + "description": "Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.", + "version": "2020-09-01" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{accountEndpoint}", + "useSchemePrefix": true, + "parameters": [ + { + "$ref": "#/parameters/AccountEndpointParameter" + } + ] + }, + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/deviceupdate/{instanceId}/v2/updates": { + "post": { + "tags": [ + "Update management" + ], + "operationId": "Updates_ImportUpdate", + "x-ms-examples": { + "Updates_ImportUpdate": { + "$ref": "./examples/Updates_ImportUpdate.json" + } + }, + "description": "Import new update version.", + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/ImportActionParameter" + }, + { + "name": "updateToImport", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImportUpdateInput" + }, + "description": "The update to be imported." + } + ], + "responses": { + "202": { + "description": "Accepted update import request; background operation location to track status is specified in Operation-Location response header.", + "headers": { + "Location": { + "type": "string", + "description": "Url to retrieve the import operation status." + }, + "Operation-Location": { + "type": "string", + "description": "Url to retrieve the import operation status." + } + } + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period and there is also a limit on how many concurrent import and delete background operations can be executed.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/providers/{provider}/names/{name}/versions/{version}": { + "get": { + "tags": [ + "Update management" + ], + "description": "Get a specific update version.", + "operationId": "Updates_GetUpdate", + "x-ms-examples": { + "Updates_GetUpdate": { + "$ref": "./examples/Updates_GetUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/UpdateProviderParameter" + }, + { + "$ref": "#/parameters/UpdateNameParameter" + }, + { + "$ref": "#/parameters/UpdateVersionParameter" + }, + { + "$ref": "#/parameters/IfNoneMatchParameter" + } + ], + "responses": { + "200": { + "description": "The requested update version.", + "schema": { + "$ref": "#/definitions/Update" + } + }, + "304": { + "description": "Not modified." + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + } + }, + "delete": { + "tags": [ + "Update management" + ], + "description": "Delete a specific update version.", + "operationId": "Updates_DeleteUpdate", + "x-ms-examples": { + "Updates_DeleteUpdate": { + "$ref": "./examples/Updates_DeleteUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/UpdateProviderParameter" + }, + { + "$ref": "#/parameters/UpdateNameParameter" + }, + { + "$ref": "#/parameters/UpdateVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted update deletion request; background operation location to track status is specified in Operation-Location response header.", + "headers": { + "Location": { + "type": "string", + "description": "Url to retrieve the operation status" + }, + "Operation-Location": { + "type": "string", + "description": "Url to retrieve the operation status" + } + } + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period and there is also a limit on how many concurrent import and delete background operations can be executed.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/providers": { + "get": { + "tags": [ + "Update management" + ], + "description": "Get a list of all update providers that have been imported to Device Update for IoT Hub.", + "operationId": "Updates_GetProviders", + "x-ms-examples": { + "Updates_GetProviders": { + "$ref": "./examples/Updates_GetProviders.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + } + ], + "responses": { + "200": { + "description": "All imported update providers, or empty list if there is none.", + "schema": { + "$ref": "#/definitions/PageableListOfStrings" + } + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/providers/{provider}/names": { + "get": { + "tags": [ + "Update management" + ], + "description": "Get a list of all update names that match the specified provider.", + "operationId": "Updates_GetNames", + "x-ms-examples": { + "Updates_GetNames": { + "$ref": "./examples/Updates_GetNames.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/UpdateProviderParameter" + } + ], + "responses": { + "200": { + "description": "All update names that match the specified provider, or empty list if there is none.", + "schema": { + "$ref": "#/definitions/PageableListOfStrings" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/providers/{provider}/names/{name}/versions": { + "get": { + "tags": [ + "Update management" + ], + "description": "Get a list of all update versions that match the specified provider and name.", + "operationId": "Updates_GetVersions", + "x-ms-examples": { + "Updates_GetVersions": { + "$ref": "./examples/Updates_GetVersions.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/UpdateProviderParameter" + }, + { + "$ref": "#/parameters/UpdateNameParameter" + } + ], + "responses": { + "200": { + "description": "All update versions that match the specified provider and name, or empty list if there is none.", + "schema": { + "$ref": "#/definitions/PageableListOfStrings" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/providers/{provider}/names/{name}/versions/{version}/files": { + "get": { + "tags": [ + "Update management" + ], + "description": "Get a list of all update file identifiers for the specified version.", + "operationId": "Updates_GetFiles", + "x-ms-examples": { + "Updates_GetFiles": { + "$ref": "./examples/Updates_GetFiles.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/UpdateProviderParameter" + }, + { + "$ref": "#/parameters/UpdateNameParameter" + }, + { + "$ref": "#/parameters/UpdateVersionParameter" + } + ], + "responses": { + "200": { + "description": "All update file identifiers for the specified version.", + "schema": { + "$ref": "#/definitions/PageableListOfStrings" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}": { + "get": { + "tags": [ + "Update management" + ], + "description": "Get a specific update file from the version.", + "operationId": "Updates_GetFile", + "x-ms-examples": { + "Updates_GetFile": { + "$ref": "./examples/Updates_GetFile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/UpdateProviderParameter" + }, + { + "$ref": "#/parameters/UpdateNameParameter" + }, + { + "$ref": "#/parameters/UpdateVersionParameter" + }, + { + "$ref": "#/parameters/FileIdParameter" + }, + { + "$ref": "#/parameters/IfNoneMatchParameter" + } + ], + "responses": { + "200": { + "description": "The requested file entity.", + "schema": { + "$ref": "#/definitions/File" + } + }, + "304": { + "description": "Not modified." + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/operations": { + "get": { + "tags": [ + "Update management" + ], + "operationId": "Updates_GetOperations", + "description": "Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete operations are not returned by this API version.", + "x-ms-examples": { + "Updates_GetOperations": { + "$ref": "./examples/Updates_GetOperations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Restricts the set of operations returned. Only one specific filter is supported: \"status eq 'NotStarted' or status eq 'Running'\"" + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n." + } + ], + "responses": { + "200": { + "description": "Operation details.", + "schema": { + "$ref": "#/definitions/PageableListOfOperations" + } + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + }, + "x-ms-odata": "#/definitions/OperationFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/updates/operations/{operationId}": { + "get": { + "tags": [ + "Update management" + ], + "operationId": "Updates_GetOperation", + "description": "Retrieve operation status.", + "x-ms-examples": { + "Updates_GetOperation": { + "$ref": "./examples/Updates_GetOperation.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/OperationIdParameter" + }, + { + "$ref": "#/parameters/IfNoneMatchParameter" + } + ], + "responses": { + "200": { + "description": "Operation status.", + "headers": { + "Retry-After": { + "type": "string", + "description": "Number of seconds to wait before checking the operation status again." + } + }, + "schema": { + "$ref": "#/definitions/Operation" + } + }, + "304": { + "description": "Not modified." + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests; there is a rate limit on how many operations can be executed within a time period.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deviceclasses": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a list of all device classes (unique combinations of device manufacturer and model) for all devices connected to Device Update for IoT Hub.", + "operationId": "Devices_GetAllDeviceClasses", + "x-ms-examples": { + "Devices_GetAllDeviceClasses": { + "$ref": "./examples/Devices_GetAllDeviceClasses.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + } + ], + "responses": { + "200": { + "description": "All device classes.", + "schema": { + "$ref": "#/definitions/PageableListOfDeviceClasses" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deviceclasses/{deviceClassId}": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets the properties of a device class.", + "operationId": "Devices_GetDeviceClass", + "x-ms-examples": { + "Devices_GetDeviceClass": { + "$ref": "./examples/Devices_GetDeviceClass.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeviceClassIdParameter" + } + ], + "responses": { + "200": { + "description": "The device class properties.", + "schema": { + "$ref": "#/definitions/DeviceClass" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deviceclasses/{deviceClassId}/deviceids": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a list of device identifiers in a device class.", + "operationId": "Devices_GetDeviceClassDeviceIds", + "x-ms-examples": { + "Devices_GetDeviceClassDeviceIds": { + "$ref": "./examples/Devices_GetDeviceClassDeviceIds.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeviceClassIdParameter" + } + ], + "responses": { + "200": { + "description": "All device identifiers in the specified device class.", + "schema": { + "$ref": "#/definitions/PageableListOfStrings" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deviceclasses/{deviceClassId}/installableupdates": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a list of installable updates for a device class.", + "operationId": "Devices_GetDeviceClassInstallableUpdates", + "x-ms-examples": { + "Devices_GetDeviceClassInstallableUpdates": { + "$ref": "./examples/Devices_GetDeviceClassInstallableUpdates.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeviceClassIdParameter" + } + ], + "responses": { + "200": { + "description": "The installable update identifiers. Returns empty list in case of no installable updates", + "schema": { + "$ref": "#/definitions/PageableListOfUpdateIds" + } + }, + "404": { + "description": "Not found. Only returned when the deviceClassId does not exist", + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/devices": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a list of devices connected to Device Update for IoT Hub.", + "operationId": "Devices_GetAllDevices", + "x-ms-examples": { + "Devices_GetAllDevices": { + "$ref": "./examples/Devices_GetAllDevices.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Restricts the set of devices returned. You can only filter on device GroupId." + } + ], + "responses": { + "200": { + "description": "All devices connected to Device Update for IoT Hub.", + "schema": { + "$ref": "#/definitions/PageableListOfDevices" + } + } + }, + "x-ms-odata": "#/definitions/DeviceFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/devices/{deviceId}": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub.", + "operationId": "Devices_GetDevice", + "x-ms-examples": { + "Devices_GetDevice": { + "$ref": "./examples/Devices_GetDevice.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeviceIdParameter" + } + ], + "responses": { + "200": { + "description": "The device properties and latest deployment status.", + "schema": { + "$ref": "#/definitions/Device" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/updatecompliance": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress receiving new updates.", + "operationId": "Devices_GetUpdateCompliance", + "x-ms-examples": { + "Devices_GetUpdateCompliance": { + "$ref": "./examples/Devices_GetUpdateCompliance.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The count of devices that have the latest update, have updates available, or are in progress receiving new updates.", + "schema": { + "$ref": "#/definitions/UpdateCompliance" + } + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/devicetags": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a list of available group device tags for all devices connected to Device Update for IoT Hub.", + "operationId": "Devices_GetAllDeviceTags", + "x-ms-examples": { + "Devices_GetAllDeviceTags": { + "$ref": "./examples/Devices_GetAllDeviceTags.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + } + ], + "responses": { + "200": { + "description": "Available group device tags for all devices connected to Device Update for IoT Hub.", + "schema": { + "$ref": "#/definitions/PageableListOfDeviceTags" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/devicetags/{tagName}": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a count of how many devices have a device tag.", + "operationId": "Devices_GetDeviceTag", + "x-ms-examples": { + "Devices_GetDeviceTag": { + "$ref": "./examples/Devices_GetDeviceTag.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/TagNameParameter" + } + ], + "responses": { + "200": { + "description": "The count of devices with this device tag.", + "schema": { + "$ref": "#/definitions/DeviceTag" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/groups": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets a list of all device groups.", + "operationId": "Devices_GetAllGroups", + "x-ms-examples": { + "Devices_GetAllGroups": { + "$ref": "./examples/Devices_GetAllGroups.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The device groups.", + "schema": { + "$ref": "#/definitions/PageableListOfGroups" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/groups/{groupId}": { + "get": { + "tags": [ + "Device management" + ], + "description": "Gets the properties of a group.", + "operationId": "Devices_GetGroup", + "x-ms-examples": { + "Devices_GetGroup": { + "$ref": "./examples/Devices_GetGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/GroupIdParameter" + } + ], + "responses": { + "200": { + "description": "The group properties.", + "schema": { + "$ref": "#/definitions/Group" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + }, + "put": { + "tags": [ + "Device management" + ], + "description": "Create or update a device group.", + "operationId": "Devices_CreateOrUpdateGroup", + "x-ms-examples": { + "Devices_CreateOrUpdateGroup": { + "$ref": "./examples/Devices_CreateOrUpdateGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "group", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Group" + }, + "description": "The group properties." + } + ], + "responses": { + "200": { + "description": "The group properties.", + "schema": { + "$ref": "#/definitions/Group" + } + }, + "400": { + "description": "GroupId in query parameter and request body don't match.", + "x-ms-error-response": true + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + }, + "delete": { + "tags": [ + "Device management" + ], + "description": "Deletes a device group.", + "operationId": "Devices_DeleteGroup", + "x-ms-examples": { + "Devices_DeleteGroup": { + "$ref": "./examples/Devices_DeleteGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/GroupIdParameter" + } + ], + "responses": { + "200": { + "description": "Success." + }, + "204": { + "description": "Not found." + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/groups/{groupId}/updateCompliance": { + "get": { + "tags": [ + "Device management" + ], + "description": "Get 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": "Devices_GetGroupUpdateCompliance", + "x-ms-examples": { + "Devices_GetGroupUpdateCompliance": { + "$ref": "./examples/Devices_GetGroupUpdateCompliance.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/GroupIdParameter" + } + ], + "responses": { + "200": { + "description": "The group update compliance information.", + "schema": { + "$ref": "#/definitions/UpdateCompliance" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/groups/{groupId}/bestUpdates": { + "get": { + "tags": [ + "Device management" + ], + "description": "Get the best available updates for a group and a count of how many devices need each update.", + "operationId": "Devices_GetGroupBestUpdates", + "x-ms-examples": { + "Devices_GetGroupBestUpdates": { + "$ref": "./examples/Devices_GetGroupBestUpdates.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property." + } + ], + "responses": { + "200": { + "description": "The best available updates for a group and a count of how many devices need each update.", + "schema": { + "$ref": "#/definitions/PageableListOfUpdatableDevices" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + }, + "x-ms-odata": "#/definitions/GroupBestUpdatesFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deployments": { + "get": { + "tags": [ + "Deployment management" + ], + "description": "Gets a list of deployments.", + "operationId": "Deployments_GetAllDeployments", + "x-ms-examples": { + "Deployments_GetAllDeployments": { + "$ref": "./examples/Deployments_GetAllDeployments.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Restricts the set of deployments returned. You can filter on update Provider, Name and Version property." + } + ], + "responses": { + "200": { + "description": "The deployments.", + "schema": { + "$ref": "#/definitions/PageableListOfDeployments" + } + } + }, + "x-ms-odata": "#/definitions/DeploymentFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deployments/{deploymentId}": { + "get": { + "tags": [ + "Deployment management" + ], + "description": "Gets the properties of a deployment.", + "operationId": "Deployments_GetDeployment", + "x-ms-examples": { + "Deployments_GetDeployment": { + "$ref": "./examples/Deployments_GetDeployment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + } + ], + "responses": { + "200": { + "description": "The deployment properties.", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + }, + "put": { + "tags": [ + "Deployment management" + ], + "description": "Creates or updates a deployment.", + "operationId": "Deployments_CreateOrUpdateDeployment", + "x-ms-examples": { + "Deployments_CreateOrUpdateDeployment": { + "$ref": "./examples/Deployments_CreateOrUpdateDeployment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + }, + { + "name": "deployment", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + }, + "description": "The deployment properties." + } + ], + "responses": { + "200": { + "description": "The deployment properties.", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + }, + "delete": { + "tags": [ + "Deployment management" + ], + "description": "Deletes a deployment.", + "operationId": "Deployments_DeleteDeployment", + "x-ms-examples": { + "Deployments_DeleteDeployment": { + "$ref": "./examples/Deployments_DeleteDeployment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + } + ], + "responses": { + "200": { + "description": "Success." + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deployments/{deploymentId}/status": { + "get": { + "tags": [ + "Deployment management" + ], + "description": "Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, completed, or failed.", + "operationId": "Deployments_GetDeploymentStatus", + "x-ms-examples": { + "Deployments_GetDeploymentStatus": { + "$ref": "./examples/Deployments_GetDeploymentStatus.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + } + ], + "responses": { + "200": { + "description": "The status of the deployment.", + "schema": { + "$ref": "#/definitions/DeploymentStatus" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deployments/{deploymentId}/devicestates": { + "get": { + "tags": [ + "Deployment management" + ], + "description": "Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices.", + "operationId": "Deployments_GetDeploymentDevices", + "x-ms-examples": { + "Deployments_GetDeploymentDevices": { + "$ref": "./examples/Deployments_GetDeploymentDevices.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "Restricts the set of deployment device states returned. You can filter on deviceId and/or deviceState." + } + ], + "responses": { + "200": { + "description": "The devices in the deployment along with their states.", + "schema": { + "$ref": "#/definitions/PageableListOfDeploymentDeviceStates" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + }, + "x-ms-odata": "#/definitions/DeploymentDeviceStatesFilter", + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "x-ms-paths": { + "/deviceupdate/{instanceId}/v2/management/deployments/{deploymentId}?action=cancel": { + "post": { + "tags": [ + "Deployment management" + ], + "description": "Cancels a deployment.", + "operationId": "Deployments_CancelDeployment", + "x-ms-examples": { + "Deployments_CancelOrRetryDeployment": { + "$ref": "./examples/Deployments_CancelDeployment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + }, + { + "$ref": "#/parameters/DeploymentCancelActionQueryParameter" + } + ], + "responses": { + "200": { + "description": "The deployment properties.", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + }, + "/deviceupdate/{instanceId}/v2/management/deployments/{deploymentId}?action=retry": { + "post": { + "tags": [ + "Deployment management" + ], + "description": "Retries a deployment with failed devices.", + "operationId": "Deployments_RetryDeployment", + "x-ms-examples": { + "Deployments_CancelOrRetryDeployment": { + "$ref": "./examples/Deployments_RetryDeployment.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/InstanceIdParameter" + }, + { + "$ref": "#/parameters/DeploymentIdParameter" + }, + { + "$ref": "#/parameters/DeploymentRetryActionQueryParameter" + } + ], + "responses": { + "200": { + "description": "The deployment properties.", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "404": { + "description": "Not found.", + "x-ms-error-response": true + } + } + } + } + }, + "definitions": { + "ArrayOfStrings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of strings." + }, + "PageableListOfStrings": { + "description": "The list of strings with server paging support.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "type": "string" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "ImportUpdateInput": { + "type": "object", + "properties": { + "importManifest": { + "$ref": "#/definitions/ImportManifestMetadata", + "description": "Import manifest metadata like source URL, file size/hashes, etc." + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/FileImportMetadata" + }, + "minItems": 1, + "description": "One or more update file properties like filename and source URL." + } + }, + "required": [ + "importManifest", + "files" + ], + "description": "Import update input metadata." + }, + "ImportManifestMetadata": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Azure Blob location from which the import manifest can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours." + }, + "sizeInBytes": { + "type": "integer", + "description": "File size in number of bytes.", + "format": "int64" + }, + "hashes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A JSON object containing the hash(es) of the file. At least SHA256 hash is required. This object can be thought of as a set of key-value pairs where the key is the hash algorithm, and the value is the hash of the file calculated using that algorithm." + } + }, + "required": [ + "url", + "sizeInBytes", + "hashes" + ], + "description": "Metadata describing the import manifest, a document which describes the files and other metadata about an update version." + }, + "FileImportMetadata": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "Update file name as specified inside import manifest." + }, + "url": { + "type": "string", + "description": "Azure Blob location from which the update file can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours." + } + }, + "required": [ + "filename", + "url" + ], + "description": "Metadata describing an update file." + }, + "Update": { + "type": "object", + "properties": { + "updateId": { + "$ref": "#/definitions/UpdateId", + "description": "Update identity." + }, + "updateType": { + "type": "string", + "description": "Update type." + }, + "installedCriteria": { + "type": "string", + "description": "String interpreted by Device Update client to determine if the update is installed on the device." + }, + "compatibility": { + "type": "array", + "items": { + "$ref": "#/definitions/Compatibility" + }, + "minItems": 1, + "description": "List of update compatibility information." + }, + "manifestVersion": { + "type": "string", + "description": "Schema version of manifest used to import the update." + }, + "importedDateTime": { + "type": "string", + "description": "Date and time in UTC when the update was imported.", + "format": "date-time" + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time in UTC when the update was created." + }, + "etag": { + "type": "string", + "description": "Update ETag." + } + }, + "required": [ + "updateId", + "updateType", + "installedCriteria", + "compatibility", + "manifestVersion", + "importedDateTime", + "createdDateTime" + ], + "description": "Update metadata." + }, + "UpdateId": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Update provider." + }, + "name": { + "type": "string", + "description": "Update name." + }, + "version": { + "type": "string", + "description": "Update version." + } + }, + "required": [ + "provider", + "name", + "version" + ], + "description": "Update identifier." + }, + "PageableListOfUpdateIds": { + "description": "The list of update identities.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/UpdateId" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "Compatibility": { + "type": "object", + "properties": { + "deviceManufacturer": { + "type": "string", + "description": "The manufacturer of device the update is compatible with." + }, + "deviceModel": { + "type": "string", + "description": "The model of device the update is compatible with." + } + }, + "required": [ + "deviceManufacturer", + "deviceModel" + ], + "description": "Update compatibility information." + }, + "File": { + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "File identity, generated by server at import time." + }, + "fileName": { + "type": "string", + "description": "File name." + }, + "sizeInBytes": { + "type": "integer", + "description": "File size in number of bytes.", + "format": "int64" + }, + "hashes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Mapping of hashing algorithm to base64 encoded hash values." + }, + "mimeType": { + "type": "string", + "description": "File MIME type." + }, + "etag": { + "type": "string", + "description": "File ETag." + } + }, + "required": [ + "fileId", + "fileName", + "sizeInBytes", + "hashes" + ], + "description": "Update file metadata." + }, + "Operation": { + "type": "object", + "properties": { + "operationId": { + "type": "string", + "description": "Operation Id." + }, + "status": { + "$ref": "#/definitions/OperationStatus", + "description": "Operation status." + }, + "updateId": { + "$ref": "#/definitions/UpdateId", + "description": "The identity of update being imported or deleted. For import, this property will only be populated after import manifest is processed successfully." + }, + "resourceLocation": { + "type": "string", + "description": "Location of the imported update when operation is successful." + }, + "error": { + "$ref": "#/definitions/Error", + "description": "Operation error encountered, if any." + }, + "traceId": { + "type": "string", + "description": "Operation correlation identity that can used by Microsoft Support for troubleshooting." + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time in UTC when the operation status was last updated." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time in UTC when the operation was created." + }, + "etag": { + "type": "string", + "description": "Operation ETag." + } + }, + "required": [ + "operationId", + "status", + "lastActionDateTime", + "createdDateTime" + ], + "description": "Operation metadata." + }, + "OperationStatus": { + "type": "string", + "enum": [ + "Undefined", + "NotStarted", + "Running", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "OperationStatus", + "modelAsString": true, + "values": [ + { + "value": "Undefined", + "name": "Undefined", + "description": "Undefined operation status." + }, + { + "value": "NotStarted", + "name": "NotStarted", + "description": "Background operation created but not started yet." + }, + { + "value": "Running", + "name": "Running", + "description": "Background operation is currently running." + }, + { + "value": "Succeeded", + "name": "Succeeded", + "description": "Background operation finished with success." + }, + { + "value": "Failed", + "name": "Failed", + "description": "Background operation finished with failure." + } + ] + }, + "description": "Operation status." + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Server defined error code." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/Error" + }, + "description": "An array of errors that led to the reported error." + }, + "innererror": { + "$ref": "#/definitions/InnerError", + "description": "An object containing more specific information than the current object about the error." + }, + "occurredDateTime": { + "type": "string", + "description": "Date and time in UTC when the error occurred.", + "format": "date-time" + } + }, + "required": [ + "code", + "message" + ], + "description": "Error details." + }, + "InnerError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "A more specific error code than what was provided by the containing error." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "errorDetail": { + "type": "string", + "description": "The internal error or exception message." + }, + "innerError": { + "$ref": "#/definitions/InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code" + ], + "description": "An object containing more specific information than the current object about the error." + }, + "PageableListOfOperations": { + "description": "The list of operations with server paging support.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "DeviceClass": { + "type": "object", + "properties": { + "deviceClassId": { + "type": "string", + "description": "The device class identifier." + }, + "manufacturer": { + "type": "string", + "description": "Device manufacturer" + }, + "model": { + "type": "string", + "description": "Device model." + }, + "bestCompatibleUpdateId": { + "$ref": "#/definitions/UpdateId", + "x-nullable": true, + "description": "Update identity." + } + }, + "required": [ + "deviceClassId", + "manufacturer", + "model", + "bestCompatibleUpdateId" + ], + "description": "Device class metadata." + }, + "PageableListOfDeviceClasses": { + "description": "The list of device classes.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceClass" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "Device": { + "type": "object", + "properties": { + "deviceId": { + "type": "string", + "description": "Device identity." + }, + "deviceClassId": { + "type": "string", + "description": "Device class identity." + }, + "manufacturer": { + "type": "string", + "description": "Device manufacturer." + }, + "model": { + "type": "string", + "description": "Device model." + }, + "groupId": { + "type": "string", + "description": "Device group identity." + }, + "lastAttemptedUpdateId": { + "$ref": "#/definitions/UpdateId", + "x-nullable": true, + "description": "Update identity." + }, + "deploymentStatus": { + "$ref": "#/definitions/DeviceDeploymentState", + "description": "State of the device in its last deployment." + }, + "installedUpdateId": { + "$ref": "#/definitions/UpdateId", + "x-nullable": true, + "description": "Update identity." + }, + "onLatestUpdate": { + "type": "boolean", + "description": "Boolean flag indicating whether the latest update is installed on the device" + }, + "lastDeploymentId": { + "type": "string", + "description": "The deployment identifier for the last deployment to the device" + } + }, + "required": [ + "deviceId", + "deviceClassId", + "manufacturer", + "model", + "onLatestUpdate" + ], + "description": "Device metadata." + }, + "DeviceDeploymentState": { + "type": "string", + "enum": [ + "Succeeded", + "InProgress", + "Failed", + "Canceled", + "Incompatible" + ], + "x-ms-enum": { + "name": "DeviceDeploymentState", + "modelAsString": true, + "values": [ + { + "value": "Succeeded", + "name": "Succeeded", + "description": "Deployment has completed with success." + }, + { + "value": "InProgress", + "name": "InProgress", + "description": "Deployment is in progress." + }, + { + "value": "Failed", + "name": "Failed", + "description": "Deployment has completed with failure." + }, + { + "value": "Canceled", + "name": "Canceled", + "description": "Deployment was canceled." + }, + { + "value": "Incompatible", + "name": "Incompatible", + "description": "Deployment is not compatible with the device." + } + ] + }, + "description": "Deployment state." + }, + "DeviceFilter": { + "type": "object", + "properties": { + "groupId": { + "type": "string", + "description": "Device group identifier." + } + }, + "description": "Operation status filter." + }, + "PageableListOfDevices": { + "description": "The list of devices.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/Device" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "UpdateCompliance": { + "type": "object", + "properties": { + "totalDeviceCount": { + "type": "integer", + "description": "Total number of devices." + }, + "onLatestUpdateDeviceCount": { + "type": "integer", + "description": "Number of devices on the latest update." + }, + "newUpdatesAvailableDeviceCount": { + "type": "integer", + "description": "Number of devices with a newer update available." + }, + "updatesInProgressDeviceCount": { + "type": "integer", + "description": "Number of devices with update in-progress." + } + }, + "required": [ + "totalDeviceCount", + "onLatestUpdateDeviceCount", + "newUpdatesAvailableDeviceCount", + "updatesInProgressDeviceCount" + ], + "description": "Update compliance information." + }, + "UpdatableDevices": { + "type": "object", + "properties": { + "updateId": { + "$ref": "#/definitions/UpdateId", + "description": "Update identity." + }, + "deviceCount": { + "type": "integer", + "description": "Total number of devices for which the update is applicable." + } + }, + "required": [ + "updateId", + "deviceCount" + ], + "description": "Update identifier and the number of devices for which the update is applicable." + }, + "PageableListOfUpdatableDevices": { + "description": "The list of updatable devices.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/UpdatableDevices" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "DeviceTag": { + "type": "object", + "properties": { + "tagName": { + "type": "string", + "description": "Tag name." + }, + "deviceCount": { + "type": "integer", + "description": "Number of devices with this tag." + } + }, + "required": [ + "tagName", + "deviceCount" + ], + "description": "Device tag properties." + }, + "PageableListOfDeviceTags": { + "description": "The list of device tags.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceTag" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "Group": { + "type": "object", + "properties": { + "groupId": { + "type": "string", + "description": "Group identity." + }, + "groupType": { + "$ref": "#/definitions/GroupType", + "description": "Group type." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "IoT Hub tags." + }, + "createdDateTime": { + "type": "string", + "description": "Date and time when the update was created." + }, + "deviceCount": { + "type": "integer", + "description": "The number of devices in the group." + } + }, + "required": [ + "groupId", + "groupType", + "tags", + "createdDateTime" + ], + "description": "Group details." + }, + "GroupType": { + "type": "string", + "enum": [ + "IoTHubTag" + ], + "x-ms-enum": { + "name": "GroupType", + "modelAsString": true, + "values": [ + { + "value": "IoTHubTag", + "name": "IoTHubTag", + "description": "IoT Hub tag based group." + } + ] + }, + "description": "Supported group types." + }, + "PageableListOfGroups": { + "description": "The list of groups.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/Group" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "Deployment": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Gets or sets the deployment identifier." + }, + "deploymentType": { + "$ref": "#/definitions/DeploymentType", + "description": "Gets or sets the deployment type." + }, + "deviceClassId": { + "type": "string", + "description": "Gets or sets the device class identifier." + }, + "startDateTime": { + "type": "string", + "description": "Gets or sets the Deployment start datetime.", + "format": "date-time" + }, + "deviceGroupType": { + "$ref": "#/definitions/DeviceGroupType", + "description": "Gets or sets the device group type." + }, + "deviceGroupDefinition": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the device group definition." + }, + "updateId": { + "$ref": "#/definitions/UpdateId", + "description": "Update identity." + }, + "isCanceled": { + "type": "boolean", + "description": "Boolean flag indicating whether the deployment was canceled." + }, + "isRetried": { + "type": "boolean", + "description": "Boolean flag indicating whether the deployment has been retried." + }, + "isCompleted": { + "type": "boolean", + "description": "Boolean flag indicating whether the deployment was completed." + } + }, + "required": [ + "deploymentId", + "deploymentType", + "startDateTime", + "deviceGroupType", + "deviceGroupDefinition", + "updateId" + ], + "description": "Deployment metadata." + }, + "DeploymentType": { + "type": "string", + "enum": [ + "Complete", + "Download", + "Install" + ], + "x-ms-enum": { + "name": "DeploymentType", + "modelAsString": true, + "values": [ + { + "value": "Complete", + "name": "Complete", + "description": "A complete deployment including download, install, and apply actions." + }, + { + "value": "Download", + "name": "Download", + "description": "A download-only deployment that does not include any install or apply actions. Not currently supported." + }, + { + "value": "Install", + "name": "Install", + "description": "An install-only rollout that does not include any download actions, only install and complete. Not currently supported." + } + ] + }, + "description": "Supported deployment types." + }, + "DeviceGroupType": { + "type": "string", + "enum": [ + "All", + "Devices", + "DeviceGroupDefinitions" + ], + "x-ms-enum": { + "name": "DeviceGroupType", + "modelAsString": true, + "values": [ + { + "value": "All", + "name": "All", + "description": "The deployment should be sent to all devices in the device class." + }, + { + "value": "Devices", + "name": "Devices", + "description": "The deployment should be sent to the list of devices in the device group definition." + }, + { + "value": "DeviceGroupDefinitions", + "name": "DeviceGroupDefinitions", + "description": "The deployment should be sent to the list of devices returned by the union of all the device group definition queries." + } + ] + }, + "description": "Supported deployment group types." + }, + "PageableListOfDeployments": { + "description": "The list of deployments.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/Deployment" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "DeploymentStatus": { + "type": "object", + "properties": { + "deploymentState": { + "$ref": "#/definitions/DeploymentState", + "description": "Gets or sets the state of the deployment." + }, + "totalDevices": { + "type": "integer", + "description": "Gets or sets the total number of devices in the deployment.", + "format": "int32" + }, + "devicesIncompatibleCount": { + "type": "integer", + "description": "Gets or sets the number of incompatible devices in the deployment.", + "format": "int32" + }, + "devicesInProgressCount": { + "type": "integer", + "description": "Gets or sets the number of devices that are currently in deployment.", + "format": "int32" + }, + "devicesCompletedFailedCount": { + "type": "integer", + "description": "Gets or sets the number of devices that have completed deployment with a failure.", + "format": "int32" + }, + "devicesCompletedSucceededCount": { + "type": "integer", + "description": "Gets or sets the number of devices which have successfully completed deployment.", + "format": "int32" + }, + "devicesCanceledCount": { + "type": "integer", + "description": "Gets or sets the number of devices which have had their deployment canceled.", + "format": "int32" + } + }, + "required": [ + "deploymentState" + ], + "description": "Deployment status metadata." + }, + "DeploymentState": { + "type": "string", + "enum": [ + "Active", + "Superseded", + "Canceled" + ], + "x-ms-enum": { + "name": "DeploymentState", + "modelAsString": true, + "values": [ + { + "value": "Active", + "name": "Active", + "description": "The deployment can be sent to devices targeted in the deployment." + }, + { + "value": "Superseded", + "name": "Superseded", + "description": "A newer deployment with the same targeting exists and no devices will receive this deployment." + }, + { + "value": "Canceled", + "name": "Canceled", + "description": "The deployment has been canceled and no devices will receive it." + } + ] + }, + "description": "Deployment state." + }, + "DeploymentDeviceState": { + "type": "object", + "properties": { + "deviceId": { + "type": "string", + "description": "Device identity." + }, + "retryCount": { + "type": "integer", + "description": "The number of times this deployment has been retried on this device.", + "format": "int32" + }, + "movedOnToNewDeployment": { + "type": "boolean", + "description": "Boolean flag indicating whether this device is in a newer deployment and can no longer retry this deployment." + }, + "deviceState": { + "$ref": "#/definitions/DeviceDeploymentState", + "description": "Deployment device state." + } + }, + "required": [ + "deviceId", + "retryCount", + "movedOnToNewDeployment", + "deviceState" + ], + "description": "Deployment device status." + }, + "PageableListOfDeploymentDeviceStates": { + "description": "The list of deployment device states.", + "type": "object", + "properties": { + "value": { + "description": "The collection of pageable items.", + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentDeviceState" + } + }, + "nextLink": { + "description": "The link to the next page of items.", + "type": "string" + } + } + }, + "OperationFilterStatus": { + "type": "string", + "enum": [ + "Running", + "NotStarted" + ], + "x-ms-enum": { + "name": "OperationFilterStatus", + "modelAsString": true + }, + "description": "Operation status filter." + }, + "OperationFilter": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/OperationFilterStatus", + "description": "Operation status filter." + } + }, + "description": "Operation status filter." + }, + "DeploymentFilter": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Update provider." + }, + "name": { + "type": "string", + "description": "Update name." + }, + "version": { + "type": "string", + "description": "Update version." + } + }, + "description": "Deployment filter." + }, + "GroupBestUpdatesFilter": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Update provider." + }, + "name": { + "type": "string", + "description": "Update name." + }, + "version": { + "type": "string", + "description": "Update version." + } + }, + "description": "Group best updates filter." + }, + "DeploymentDeviceStatesFilter": { + "type": "object", + "properties": { + "deviceId": { + "type": "string", + "description": "Device Identifier." + }, + "deviceState": { + "$ref": "#/definitions/DeviceState", + "description": "The deployment device state." + } + }, + "description": "Deployment device state filter." + }, + "DeviceState": { + "type": "string", + "description": "The deployment device state.", + "enum": [ + "NotStarted", + "Incompatible", + "AlreadyInDeployment", + "Canceled", + "InProgress", + "Failed", + "Succeeded" + ], + "x-ms-enum": { + "name": "DeviceState", + "modelAsString": true, + "values": [ + { + "value": "NotStarted", + "name": "NotStarted", + "description": "Not started (or uninitialized)" + }, + { + "value": "Incompatible", + "name": "Incompatible", + "description": "Deployment incompatible for this device." + }, + { + "value": "AlreadyInDeployment", + "name": "AlreadyInDeployment", + "description": "Another Deployment is underway for this device." + }, + { + "value": "Canceled", + "name": "Canceled", + "description": "Deployment has been canceled for this device." + }, + { + "value": "InProgress", + "name": "InProgress", + "description": "Deployment underway." + }, + { + "value": "Failed", + "name": "Failed", + "description": "Deployment failed." + }, + { + "value": "Succeeded", + "name": "Succeeded", + "description": "Deployment completed successfully." + } + ] + } + } + }, + "parameters": { + "AccountEndpointParameter": { + "name": "accountEndpoint", + "in": "path", + "required": true, + "type": "string", + "x-ms-skip-url-encoding": true, + "description": "Account endpoint.", + "x-ms-parameter-location": "client", + "x-ms-parameter-grouping": { + "name": "account-options" + } + }, + "InstanceIdParameter": { + "name": "instanceId", + "in": "path", + "required": true, + "type": "string", + "x-ms-skip-url-encoding": true, + "description": "Account instance identifier.", + "x-ms-parameter-location": "client", + "x-ms-parameter-grouping": { + "name": "account-options" + } + }, + "UpdateProviderParameter": { + "name": "provider", + "in": "path", + "required": true, + "type": "string", + "description": "Update provider.", + "x-ms-parameter-location": "method" + }, + "UpdateNameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "Update name.", + "x-ms-parameter-location": "method" + }, + "UpdateVersionParameter": { + "name": "version", + "in": "path", + "required": true, + "type": "string", + "description": "Update version.", + "x-ms-parameter-location": "method" + }, + "FileIdParameter": { + "name": "fileId", + "in": "path", + "required": true, + "type": "string", + "description": "File identifier.", + "x-ms-parameter-location": "method" + }, + "IfNoneMatchParameter": { + "name": "If-None-Match", + "in": "header", + "required": false, + "description": "Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value.", + "type": "string", + "x-ms-parameter-grouping": { + "name": "access-condition" + }, + "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "description": "Operation identifier.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ImportActionParameter": { + "name": "action", + "in": "query", + "required": true, + "description": "Import update action.", + "type": "string", + "enum": [ + "import" + ], + "x-ms-enum": { + "name": "ImportAction", + "values": [ + { + "value": "import", + "name": "import", + "description": "Import action." + } + ] + }, + "x-ms-parameter-location": "method" + }, + "DeviceIdParameter": { + "name": "deviceId", + "in": "path", + "description": "Device identifier in Azure IOT Hub.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DeviceClassIdParameter": { + "name": "deviceClassId", + "in": "path", + "description": "Device class identifier.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "TagNameParameter": { + "name": "tagName", + "in": "path", + "description": "Tag name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "GroupIdParameter": { + "name": "groupId", + "in": "path", + "description": "Group identifier.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DeploymentIdParameter": { + "name": "deploymentId", + "in": "path", + "description": "Deployment identifier.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DeploymentCancelActionQueryParameter": { + "name": "action", + "in": "query", + "required": true, + "description": "Cancel deployment action.", + "type": "string", + "enum": [ + "cancel" + ], + "x-ms-enum": { + "name": "DeploymentCancelAction", + "values": [ + { + "value": "cancel", + "name": "cancel", + "description": "Cancel action." + } + ] + }, + "x-ms-parameter-location": "method" + }, + "DeploymentRetryActionQueryParameter": { + "name": "action", + "in": "query", + "required": true, + "description": "Retry deployment action.", + "type": "string", + "enum": [ + "retry" + ], + "x-ms-enum": { + "name": "DeploymentRetryAction", + "values": [ + { + "value": "retry", + "name": "retry", + "description": "Retry action." + } + ] + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_CancelDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_CancelDeployment.json new file mode 100644 index 000000000000..c64c62b69e6b --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_CancelDeployment.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId", + "action": "cancel" + }, + "responses": { + "200": { + "body": { + "deploymentId": "deploymentId", + "deploymentType": "Complete", + "deviceClassId": "31ee8c56559847429fbe86e3e87f99b6", + "startDateTime": "2020-04-22T12:12:12.0000000+00:00", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device1", + "device2" + ], + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + }, + "isCanceled": true, + "isCompleted": false, + "isRetried": false + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_CreateOrUpdateDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_CreateOrUpdateDeployment.json new file mode 100644 index 000000000000..0a607151d923 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_CreateOrUpdateDeployment.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId", + "deployment": { + "deploymentId": "deploymentId", + "deploymentType": "Complete", + "deviceClassId": "31ee8c56559847429fbe86e3e87f99b6", + "startDateTime": "2020-04-22T12:12:12.0000000+00:00", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device1", + "device2" + ], + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + } + } + }, + "responses": { + "200": { + "body": { + "deploymentId": "deploymentId", + "deploymentType": "Complete", + "deviceClassId": "31ee8c56559847429fbe86e3e87f99b6", + "startDateTime": "2020-04-22T12:12:12.0000000+00:00", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device1", + "device2" + ], + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + } + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_DeleteDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_DeleteDeployment.json new file mode 100644 index 000000000000..189190b4d17e --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_DeleteDeployment.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId" + }, + "responses": { + "200": {}, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetAllDeployments.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetAllDeployments.json new file mode 100644 index 000000000000..ea56cdebcb48 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetAllDeployments.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "deploymentId": "deploymentId1", + "deploymentType": "Complete", + "deviceClassId": "31ee8c56559847429fbe86e3e87f99b6", + "startDateTime": "2020-07-01T12:13:14Z", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device1", + "device2" + ], + "updateId": { + "provider": "provider1", + "name": "name1", + "version": "1.0.0.0" + }, + "isCanceled": false, + "isCompleted": false + }, + { + "deploymentId": "deploymentId2", + "deploymentType": "Complete", + "deviceClassId": "c1aa6c254f5b473bab024eebf01e6f3b", + "startDateTime": "2020-08-01T12:13:14Z", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device10", + "device20" + ], + "updateId": { + "provider": "provider2", + "name": "name2", + "version": "2.0.0.0" + }, + "isCanceled": false, + "isCompleted": false + } + ] + } + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeployment.json new file mode 100644 index 000000000000..039e2bc42cf1 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeployment.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId" + }, + "responses": { + "200": { + "body": { + "deploymentId": "deploymentId", + "deploymentType": "Complete", + "deviceClassId": "31ee8c56559847429fbe86e3e87f99b6", + "startDateTime": "2020-04-22T12:12:12.0000000+00:00", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device1", + "device2" + ], + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + }, + "isCanceled": false, + "isRetried": false, + "isCompleted": false + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeploymentDevices.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeploymentDevices.json new file mode 100644 index 000000000000..c8a8abb969e0 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeploymentDevices.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId", + "deviceState": "Succeeded" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "deviceId": "deviceId1", + "retryCount": 1, + "movedOnToNewDeployment": false, + "deviceState": "Succeeded" + }, + { + "deviceId": "deviceId2", + "retryCount": 1, + "movedOnToNewDeployment": false, + "deviceState": "Succeeded" + } + ] + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeploymentStatus.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeploymentStatus.json new file mode 100644 index 000000000000..2970fda26f01 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_GetDeploymentStatus.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId" + }, + "responses": { + "200": { + "body": { + "deploymentState": "Active", + "totalDevices": 1, + "devicesIncompatibleCount": 0, + "devicesInProgressCount": 0, + "devicesCompletedFailedCount": 0, + "devicesCompletedSucceededCount": 1, + "devicesCanceledCount": 0 + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_RetryDeployment.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_RetryDeployment.json new file mode 100644 index 000000000000..20f138a80512 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Deployments_RetryDeployment.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deploymentId": "deploymentId", + "action": "retry" + }, + "responses": { + "200": { + "body": { + "deploymentId": "deploymentId", + "deploymentType": "Complete", + "deviceClassId": "31ee8c56559847429fbe86e3e87f99b6", + "startDateTime": "2020-04-22T12:12:12.0000000+00:00", + "deviceGroupType": "Devices", + "deviceGroupDefinition": [ + "device1", + "device2" + ], + "updateId": { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + }, + "isCanceled": false, + "isCompleted": false, + "isRetried": true + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_CreateOrUpdateGroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_CreateOrUpdateGroup.json new file mode 100644 index 000000000000..9453cb9ad167 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_CreateOrUpdateGroup.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "group1", + "group": { + "groupId": "MyGroup", + "groupType": "IoTHubTag", + "tags": [ + "MyAduGroup" + ], + "createdDateTime": "2020-07-01T12:13:14.0000000Z" + } + }, + "responses": { + "200": { + "body": { + "groupId": "MyGroup", + "groupType": "IoTHubTag", + "tags": [ + "MyAduGroup" + ], + "createdDateTime": "2020-07-01T12:13:14.0000000Z" + } + }, + "400": {}, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_DeleteGroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_DeleteGroup.json new file mode 100644 index 000000000000..a03c834d4e8d --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_DeleteGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "group1" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDeviceClasses.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDeviceClasses.json new file mode 100644 index 000000000000..b3388e50adf0 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDeviceClasses.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "deviceClassId": "deviceClassId1", + "manufacturer": "manufacturer1", + "model": "model1", + "bestCompatibleUpdateId": { + "provider": "provider1", + "name": "name1", + "version": "1.0.0.0" + } + }, + { + "deviceClassId": "deviceClassId2", + "manufacturer": "manufacturer2", + "model": "model2", + "bestCompatibleUpdateId": { + "provider": "provider2", + "name": "name2", + "version": "2.0.0.0" + } + } + ] + } + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDeviceTags.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDeviceTags.json new file mode 100644 index 000000000000..c43c2e8c4d3d --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDeviceTags.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "tagName": "group1", + "deviceCount": 100 + }, + { + "tagName": "group2", + "deviceCount": 200 + } + ] + } + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDevices.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDevices.json new file mode 100644 index 000000000000..a19b5a6aeb57 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllDevices.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "deviceId": "device1", + "deviceClassId": "deviceClass1", + "manufacturer": "manufacturer1", + "model": "model1", + "lastAttemptedUpdateId": { + "provider": "provider1", + "name": "name1", + "version": "2.0.0.0" + }, + "deploymentStatus": "Failed", + "installedUpdateId": { + "provider": "provider1", + "name": "name1", + "version": "1.0.0.0" + }, + "onLatestUpdate": false, + "lastDeploymentId": "myDeployment123" + }, + { + "deviceId": "device2", + "deviceClassId": "deviceClass2", + "manufacturer": "manufacturer2", + "model": "model2", + "lastAttemptedUpdateId": { + "provider": "provider2", + "name": "name2", + "version": "1.0.0.0" + }, + "deploymentStatus": "Succeeded", + "installedUpdateId": { + "provider": "provider2", + "name": "name2", + "version": "1.0.0.0" + }, + "onLatestUpdate": true, + "lastDeploymentId": "myDeployment234" + } + ] + } + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllGroups.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllGroups.json new file mode 100644 index 000000000000..bca9df416f6a --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetAllGroups.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "groupId": "MyGroup1", + "groupType": "IoTHubTag", + "tags": [ + "MyGroup1" + ], + "createdDateTime": "2020-07-01T12:13:14.0000000Z", + "deviceCount": 100 + }, + { + "groupId": "MyGroup2", + "groupType": "IoTHubTag", + "tags": [ + "MyGroup2" + ], + "createdDateTime": "2020-08-01T12:13:14.0000000Z", + "deviceCount": 200 + } + ] + } + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDevice.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDevice.json new file mode 100644 index 000000000000..14f7b915b606 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDevice.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deviceId": "deviceId" + }, + "responses": { + "200": { + "body": { + "deviceId": "device1", + "deviceClassId": "deviceClass1", + "manufacturer": "manufacturer1", + "model": "model1", + "lastAttemptedUpdateId": { + "provider": "provider1", + "name": "name1", + "version": "2.0.0.0" + }, + "deploymentStatus": "Failed", + "installedUpdateId": { + "provider": "provider1", + "name": "name1", + "version": "1.0.0.0" + }, + "onLatestUpdate": false + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClass.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClass.json new file mode 100644 index 000000000000..7bfa27110e25 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClass.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deviceClassId": "deviceClassId" + }, + "responses": { + "200": { + "body": { + "deviceClassId": "deviceClassId", + "manufacturer": "manufacturer", + "model": "model", + "bestCompatibleUpdateId": { + "provider": "provider", + "name": "name", + "version": "1.0.0.0" + } + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClassDeviceIds.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClassDeviceIds.json new file mode 100644 index 000000000000..66db1c2ff2bf --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClassDeviceIds.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deviceClassId": "deviceClassId" + }, + "responses": { + "200": { + "body": { + "value": [ + "deviceId1", + "deviceId2" + ] + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClassInstallableUpdates.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClassInstallableUpdates.json new file mode 100644 index 000000000000..4aa40ad6e049 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceClassInstallableUpdates.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "deviceClassId": "deviceClassId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "provider": "provider", + "name": "name", + "version": "1.2.3.4" + }, + { + "provider": "provider2", + "name": "name2", + "version": "2.3.4.5" + } + ] + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceTag.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceTag.json new file mode 100644 index 000000000000..4611305cbdae --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetDeviceTag.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "tagName": "group1" + }, + "responses": { + "200": { + "body": { + "tagName": "group1", + "deviceCount": 100 + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroup.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroup.json new file mode 100644 index 000000000000..ea22752a0356 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroup.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "group1" + }, + "responses": { + "200": { + "body": { + "groupId": "MyGroup", + "groupType": "IoTHubTag", + "tags": [ + "MyAduGroup" + ], + "createdDateTime": "2020-07-01T12:13:14.0000000Z", + "deviceCount": 149 + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroupBestUpdates.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroupBestUpdates.json new file mode 100644 index 000000000000..f8b2c525902d --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroupBestUpdates.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "group1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "updateId": { + "provider": "provider1", + "name": "name1", + "version": "1.0.0.0" + }, + "deviceCount": 100 + }, + { + "updateId": { + "provider": "provider2", + "name": "name2", + "version": "2.0.0.0" + }, + "deviceCount": 200 + } + ] + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroupUpdateCompliance.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroupUpdateCompliance.json new file mode 100644 index 000000000000..9ff3c6cc255e --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetGroupUpdateCompliance.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "groupId": "group1" + }, + "responses": { + "200": { + "body": { + "totalDeviceCount": 302204, + "onLatestUpdateDeviceCount": 256873, + "newUpdatesAvailableDeviceCount": 36265, + "updatesInProgressDeviceCount": 9066 + } + }, + "404": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetUpdateCompliance.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetUpdateCompliance.json new file mode 100644 index 000000000000..dc79e55ce049 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Devices_GetUpdateCompliance.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "totalDeviceCount": 302204, + "onLatestUpdateDeviceCount": 256873, + "newUpdatesAvailableDeviceCount": 36265, + "updatesInProgressDeviceCount": 9066 + } + } + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_DeleteUpdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_DeleteUpdate.json new file mode 100644 index 000000000000..958fb0425b4a --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_DeleteUpdate.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "provider": "microsoft", + "name": "adu", + "version": "1.0.0.0" + }, + "responses": { + "202": { + "headers": { + "Location": "/deviceupdate/instanceId/v2/operations/e4491c54-916f-443d-9094-bcca546ace2f", + "Operation-Location": "/deviceupdate/instanceId/v2/operations/e4491c54-916f-443d-9094-bcca546ace2f" + } + }, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetFile.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetFile.json new file mode 100644 index 000000000000..6b1686c9f1cd --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetFile.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "provider": "microsoft", + "name": "adu", + "version": "1.0.0.0", + "fileId": "abc123" + }, + "responses": { + "200": { + "body": { + "fileId": "abc123", + "fileName": "1v5uww1q.my2", + "sizeInBytes": 1862311, + "hashes": { + "sha256": "OVokcktf61lQXs17MzJCsM98lk48H1Wu1hy7Sp6lLfI=" + }, + "mimeType": "application/BuildAsync-s4jwikgq.44h", + "etag": "\"26bd8eba-4bb2-4960-a357-ca4d60b5fb4b\"" + } + }, + "304": {}, + "404": {}, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetFiles.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetFiles.json new file mode 100644 index 000000000000..22ad97acc5a1 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetFiles.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "provider": "microsoft", + "name": "adu", + "version": "1.0.0.0" + }, + "responses": { + "200": { + "body": { + "value": [ + "abc123", + "def456" + ] + } + }, + "404": {}, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetNames.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetNames.json new file mode 100644 index 000000000000..927acceeb4d7 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetNames.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "provider": "microsoft" + }, + "responses": { + "200": { + "body": { + "value": [ + "adu" + ] + } + }, + "404": {}, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetOperation.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetOperation.json new file mode 100644 index 000000000000..b9477690a4b1 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetOperation.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "operationId": "e4491c54-916f-443d-9094-bcca546ace2f" + }, + "responses": { + "200": { + "body": { + "operationId": "e4491c54-916f-443d-9094-bcca546ace2f", + "status": "Succeeded", + "resourceLocation": "/v2/updates/providers/microsoft/names/adu/versions/1.0.0.0", + "traceId": "2b881ef9deaf5d45b0a716ca5b4145ec", + "createdDateTime": "2020-04-22T21:00:53.2548897+00:00", + "lastActionDateTime": "2020-04-22T21:01:43.9401420+00:00", + "etag": "\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\"" + } + }, + "304": {}, + "404": {}, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetOperations.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetOperations.json new file mode 100644 index 000000000000..04ff0bbce71b --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetOperations.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "operationId": "e4491c54-916f-443d-9094-bcca546ace2f", + "status": "Succeeded", + "resourceLocation": "/v2/updates/providers/microsoft/names/adu/versions/1.0.0.0", + "traceId": "2b881ef9deaf5d45b0a716ca5b4145ec", + "createdDateTime": "2020-04-22T21:00:53.2548897+00:00", + "lastActionDateTime": "2020-04-22T21:01:43.9401420+00:00", + "etag": "\"a0f7b6f2-3f6c-4eb6-8a59-2f5411c23888\"" + } + ] + } + }, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetProviders.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetProviders.json new file mode 100644 index 000000000000..8973a655db7b --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetProviders.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue" + }, + "responses": { + "200": { + "body": { + "value": [ + "microsoft" + ] + } + }, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetUpdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetUpdate.json new file mode 100644 index 000000000000..516362aa6d91 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "provider": "microsoft", + "name": "adu", + "version": "1.0.0.0" + }, + "responses": { + "200": { + "body": { + "updateId": { + "provider": "microsoft", + "name": "adu", + "version": "1.0.0.0" + }, + "updateType": "image", + "installedCriteria": "SwVer=5", + "compatibility": [ + { + "deviceManufacturer": "Microsoft", + "deviceModel": "Toaster" + } + ], + "manifestVersion": "0.1", + "importedDateTime": "2020-04-22T21:01:43.8408797+00:00", + "createdDateTime": "2019-09-12T00:00:00.0000000+00:00", + "etag": "\"3fed3378-0c67-47d2-b796-296962c66cbb\"" + } + }, + "304": {}, + "404": {}, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetVersions.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetVersions.json new file mode 100644 index 000000000000..ec77d6f690a8 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_GetVersions.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "provider": "microsoft", + "name": "adu" + }, + "responses": { + "200": { + "body": { + "value": [ + "1.0.0.0", + "1.0.0.1" + ] + } + }, + "404": {}, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_ImportUpdate.json b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_ImportUpdate.json new file mode 100644 index 000000000000..41fc0c7c59c8 --- /dev/null +++ b/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/examples/Updates_ImportUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountEndpoint": "contoso.api.adu.microsoft.com", + "instanceId": "blue", + "action": "import", + "updateToImport": { + "importManifest": { + "url": "http://test.blob.core.windows.net/test/uploadimportMan.json", + "sizeInBytes": 816, + "hashes": { + "sha256": "O19LyyncPe1AGstOdkcmozLV8pSbBdqrE18HdYVohRc=" + } + }, + "files": [ + { + "filename": "file1.bin", + "url": "http://test.blob.core.windows.net/test/upload1v5uww1q" + }, + { + "filename": "file2.bin", + "url": "http://test.blob.core.windows.net/test/uploadkrmn5yw0" + }, + { + "filename": "file3.bin", + "url": "http://test.blob.core.windows.net/test/uploaddq52ky5m" + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Location": "/deviceupdate/instanceId/v2/updates/operations/e4491c54-916f-443d-9094-bcca546ace2f", + "Operation-Location": "/deviceupdate/instanceId/v2/updates/operations/e4491c54-916f-443d-9094-bcca546ace2f" + } + }, + "429": {} + } +} diff --git a/specification/deviceupdate/data-plane/readme.csharp.md b/specification/deviceupdate/data-plane/readme.csharp.md new file mode 100644 index 000000000000..4c4a616635ff --- /dev/null +++ b/specification/deviceupdate/data-plane/readme.csharp.md @@ -0,0 +1,16 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: false + public-clients: true + license-header: MICROSOFT_MIT_SMALL_NO_CODEGEN + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Azure.Iot.DeviceUpdate + output-folder: $(csharp-sdks-folder)/deviceupdate/Azure.Iot.DeviceUpdate/src/Generated +``` diff --git a/specification/deviceupdate/data-plane/readme.md b/specification/deviceupdate/data-plane/readme.md new file mode 100644 index 000000000000..501f3300fd99 --- /dev/null +++ b/specification/deviceupdate/data-plane/readme.md @@ -0,0 +1,93 @@ +# DeviceUpdate + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Device Update for IoT Hub. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the deviceupdate. + +```yaml +openapi-type: data-plane +tag: package-2020-09-01 +``` + +### Tag: package-2020-09-01 + +These settings apply only when `--tag=package-2020-09-01` is specified on the command line. + +```yaml $(tag) == 'package-2020-09-01' +input-file: + - Microsoft.DeviceUpdate/preview/2020-09-01/deviceupdate.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-js + after_scripts: + - bundle install && rake arm:regen_all_profiles['deviceupdate'] +``` + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## Multi-API/Profile support for AutoRest v3 generators + +AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. + +This block is updated by an automatic script. Edits may be lost! + +``` yaml $(tag) == 'all-api-versions' /* autogenerated */ +# include the azure profile definitions from the standard location +require: $(this-folder)/../../../profiles/readme.md + +# all the input files across all versions +input-file: + - $(this-folder)/Microsoft.DeviceUpdate/preview/2020-09-01/deviceupdate.json + +``` + +If there are files that should not be in the `all-api-versions` set, +uncomment the `exclude-file` section below and add the file paths. + +``` yaml $(tag) == 'all-api-versions' +#exclude-file: +# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json +``` diff --git a/specification/deviceupdate/data-plane/readme.python.md b/specification/deviceupdate/data-plane/readme.python.md new file mode 100644 index 000000000000..497faa2f4b74 --- /dev/null +++ b/specification/deviceupdate/data-plane/readme.python.md @@ -0,0 +1,17 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml + azure-arm: false + license-header: MICROSOFT_MIT_SMALL_NO_CODEGEN + namespace: azure.deviceupdate + package-name: azure-deviceupdate + package-version: 2020-09-01-preview + clear-output-folder: true + add-credentials: true + credential-scopes: 6ee392c4-d339-4083-b04d-6b7947c6cf78/.default + no-namespace-folders: true + output-folder: $(python-sdks-folder)/sdk/deviceupdate/azure-deviceupdate/azure/deviceupdate +``` diff --git a/specification/deviceupdate/data-plane/readme.typescript.md b/specification/deviceupdate/data-plane/readme.typescript.md new file mode 100644 index 000000000000..958aab5247f1 --- /dev/null +++ b/specification/deviceupdate/data-plane/readme.typescript.md @@ -0,0 +1,13 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: false + package-name: "@azure/device-update" + output-folder: "$(typescript-sdks-folder)/sdk/deviceupdate/device-update" + payload-flattening-threshold: 1 + generate-metadata: true +```