From 59a31ebfc93022fa9fd819669ac6164f7ffde0dc Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:52 -0800 Subject: [PATCH 01/20] New Readme Config File --- .../deviceupdate/resource-manager/readme.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.md diff --git a/specification/deviceupdate/resource-manager/readme.md b/specification/deviceupdate/resource-manager/readme.md new file mode 100644 index 000000000000..615700e43dcf --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.md @@ -0,0 +1,83 @@ +# deviceupdate + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for deviceupdate. + +## 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: arm +tag: package-2020-03-01 +``` + +### Tag: package-2020-03-01 + +These settings apply only when `--tag=package-2020-03-01` is specified on the command line. + +```yaml $(tag) == 'package-2020-03-01' +input-file: + - Microsoft.DeviceUpdate/preview/2020-03-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-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-resource-manager-schemas + after_scripts: + - node sdkauto_afterscript.js deviceupdate/resource-manager + - repo: azure-cli-extensions +``` +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## 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) + +## AzureResourceSchema + +See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) From 6b37bfc013059b478e1b6628500601ab2ef6e720 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:52 -0800 Subject: [PATCH 02/20] New Go Language Readme Config File --- .../resource-manager/readme.go.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.go.md diff --git a/specification/deviceupdate/resource-manager/readme.go.md b/specification/deviceupdate/resource-manager/readme.go.md new file mode 100644 index 000000000000..41bf7f43d8d9 --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: deviceupdate + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2020-03-01-preview +``` + +### Tag: package-2020-03-01-preview and go + +These settings apply only when `--tag=package-2020-03-01-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +```yaml $(tag) == 'package-2020-03-01-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-03-01/$(namespace) +``` From 7cbfe90098fd0b1e20a421269fa500391aba377c Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:52 -0800 Subject: [PATCH 03/20] New Azure AZ Readme Config File --- .../resource-manager/readme.az.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.az.md diff --git a/specification/deviceupdate/resource-manager/readme.az.md b/specification/deviceupdate/resource-manager/readme.az.md new file mode 100644 index 000000000000..01d8dfd47169 --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.az.md @@ -0,0 +1,28 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: deviceupdate + namespace: azure.mgmt.deviceupdate + package-name: azure-mgmt-deviceupdate +az-output-folder: $(azure-cli-extension-folder)/src/deviceupdate +python-sdk-output-folder: "$(az-output-folder)/azext_deviceupdate/vendored_sdks/deviceupdate" +# add additinal configuration here specific for Azure CLI +# refer to the faq.md for more details +``` + + + +This is for command modules that already in azure cli main repo. +``` yaml $(az) && $(target-mode) == 'core' +az: + extensions: deviceupdate + namespace: azure.mgmt.deviceupdate + package-name: azure-mgmt-deviceupdate +az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/deviceupdate +python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/deviceupdate" +``` \ No newline at end of file From 341311c26179b2e5e7b43a3c4b5e72cc5618b8b7 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:53 -0800 Subject: [PATCH 04/20] New Azure CLI Readme Config File --- specification/deviceupdate/resource-manager/readme.cli.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 specification/deviceupdate/resource-manager/readme.cli.md diff --git a/specification/deviceupdate/resource-manager/readme.cli.md b/specification/deviceupdate/resource-manager/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file From c3c7654177f76bae1b70a45f1dd0741e77d7c9ce Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:53 -0800 Subject: [PATCH 05/20] New Typescript Language Readme Config File --- .../resource-manager/readme.typescript.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.typescript.md diff --git a/specification/deviceupdate/resource-manager/readme.typescript.md b/specification/deviceupdate/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..aad280e2bdae --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-deviceupdate" + output-folder: "$(typescript-sdks-folder)/sdk/deviceupdate/arm-deviceupdate" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +``` From b2ab29fac1e39c0d71d9af78f806ef41855abd9e Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:53 -0800 Subject: [PATCH 06/20] New Python Language Readme Config File --- .../resource-manager/readme.python.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.python.md diff --git a/specification/deviceupdate/resource-manager/readme.python.md b/specification/deviceupdate/resource-manager/readme.python.md new file mode 100644 index 000000000000..82110c00b38f --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.python.md @@ -0,0 +1,41 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) && !$(track2) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + package-name: azure-mgmt-deviceupdate + no-namespace-folders: true + package-version: 1.0.0b1 +``` + +``` yaml $(python-mode) == 'update' && !$(track2) +python: + output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate +``` +``` yaml $(python-mode) == 'create' && !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate +``` + +``` yaml $(python) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-deviceupdate +no-namespace-folders: true +``` + +``` yaml $(python-mode) == 'update' +no-namespace-folders: true +output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate +``` + +``` yaml $(python-mode) == 'create' && $(track2) +package-version: 1.0.0b1 +basic-setup-py: true +output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate +``` From cf7e10d1e9adb40dd50284c988386241a047855d Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:54 -0800 Subject: [PATCH 07/20] New C# Language Readme Config File --- .../resource-manager/readme.csharp.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.csharp.md diff --git a/specification/deviceupdate/resource-manager/readme.csharp.md b/specification/deviceupdate/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..d1ae048f81e9 --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.DeviceUpdate + output-folder: $(csharp-sdks-folder)/deviceupdate/management/Microsoft.DeviceUpdate/GeneratedProtocol +``` From e3d48d3620fc03299cc9c52319c3e853c14d47d0 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:54 -0800 Subject: [PATCH 08/20] New AzureResourceSchema Readme Config File --- .../readme.azureresourceschema.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/readme.azureresourceschema.md diff --git a/specification/deviceupdate/resource-manager/readme.azureresourceschema.md b/specification/deviceupdate/resource-manager/readme.azureresourceschema.md new file mode 100644 index 000000000000..267a1a84492f --- /dev/null +++ b/specification/deviceupdate/resource-manager/readme.azureresourceschema.md @@ -0,0 +1,23 @@ +## AzureResourceSchema + +These settings apply only when `--azureresourceschema` is specified on the command line. + +### AzureResourceSchema multi-api + +``` yaml $(azureresourceschema) && $(multiapi) +batch: + - tag: schema-deviceupdate-2020-03-01 + +``` + +Please also specify `--azureresourceschema-folder=`. + +### Tag: schema-deviceupdate-2020-03-01 and azureresourceschema + +``` yaml $(tag) == 'schema-deviceupdate-2020-03-01' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json +``` From 77c438e16596289558461bf26be3de9dfb0b4442 Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:54 -0800 Subject: [PATCH 09/20] New Swagger Spec File --- .../preview/2020-03-01/deviceupdate.json | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json new file mode 100644 index 000000000000..6fdcc06e7100 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json @@ -0,0 +1,132 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-03-01", + "title": "deviceupdate", + "description": "Description of the new service", + "x-ms-code-generation-settings": { + "name": "deviceupdateClient" + } + }, + "host": "management.azure.com", + "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": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/operations": { + "get": { + "tags": ["Tag1"], + "operationId": "OperationGroup_Get", + "x-ms-examples": { + "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } + }, + "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Describe the result of a successful operation.", + "schema": { + "$ref": "#/definitions/Result" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Result": { + "description": "Sample result definition", + "properties": { + "sampleProperty": { + "type": "string", + "description": "Sample property of type string" + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to be used with the HTTP request." + } + } +} From d12907ffaedf5d8a0a7d628f239b1909367f0fcb Mon Sep 17 00:00:00 2001 From: David Pokluda <46501915+dpokluda@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:06:55 -0800 Subject: [PATCH 10/20] New Swagger Example Spec File --- .../2020-03-01/examples/OperationGroupGet.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json new file mode 100644 index 000000000000..6f9727fb5c0b --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sampleacct", + "resourceGroupName": "deviceupdateClient", + "api-version": "2020-03-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "sampleProperty": "sampleProperty" + } + } + } +} From f8e99f6bf9f26d489c766473284aeaf0d5ca0f2b Mon Sep 17 00:00:00 2001 From: David Pokluda Date: Mon, 1 Mar 2021 14:09:44 -0800 Subject: [PATCH 11/20] Release of Device Update for IoT Hub control plane specification. --- .../2020-03-01-preview/deviceupdate.json | 943 ++++++++++++++++++ .../examples/Accounts/Accounts_Create.json | 35 + .../examples/Accounts/Accounts_Delete.json | 12 + .../examples/Accounts/Accounts_Get.json | 22 + .../examples/Accounts/Accounts_List.json | 26 + .../examples/Accounts/Accounts_Update.json | 30 + .../examples/Instances/Instances_Create.json | 40 + .../examples/Instances/Instances_Delete.json | 13 + .../examples/Instances/Instances_Get.json | 28 + .../Instances/Instances_ListByAccount.json | 47 + .../examples/Instances/Instances_Update.json | 35 + .../preview/2020-03-01/deviceupdate.json | 132 --- .../examples/OperationGroupGet.json | 15 - .../resource-manager/readme.az.md | 28 - .../readme.azureresourceschema.md | 23 - .../resource-manager/readme.cli.md | 1 - .../resource-manager/readme.csharp.md | 4 +- .../resource-manager/readme.go.md | 15 +- .../deviceupdate/resource-manager/readme.md | 51 +- .../resource-manager/readme.python.md | 47 +- .../resource-manager/readme.typescript.md | 14 - 21 files changed, 1273 insertions(+), 288 deletions(-) create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json create mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json delete mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json delete mode 100644 specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json delete mode 100644 specification/deviceupdate/resource-manager/readme.az.md delete mode 100644 specification/deviceupdate/resource-manager/readme.azureresourceschema.md delete mode 100644 specification/deviceupdate/resource-manager/readme.cli.md delete mode 100644 specification/deviceupdate/resource-manager/readme.typescript.md diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json new file mode 100644 index 000000000000..cc76d5cd485a --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -0,0 +1,943 @@ +{ + "swagger": "2.0", + "info": { + "title": "DeviceUpdate", + "description": "Microsoft Device Update resource provider.", + "version": "2020-03-01-preview" + }, + "host": "management.azure.com", + "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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/accounts": { + "get": { + "description": "Returns list of Accounts.", + "operationId": "Accounts_ListBySubscription", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "List of Accounts.", + "schema": { + "$ref": "#/definitions/AccountList" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get list of Accounts": { + "$ref": "./examples/Accounts/Accounts_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances": { + "get": { + "description": "Returns instances for the given account name.", + "operationId": "Instances_ListBySubscription", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + } + ], + "responses": { + "200": { + "description": "List of Instances.", + "schema": { + "$ref": "#/definitions/InstanceList" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get list of Instances by Account": { + "$ref": "./examples/Instances/Instances_ListByAccount.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts": { + "get": { + "description": "Returns list of Accounts.", + "operationId": "Accounts_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "List of Accounts.", + "schema": { + "$ref": "#/definitions/AccountList" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of Accounts": { + "$ref": "./examples/Accounts/Accounts_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}": { + "get": { + "description": "Returns account details for the given account name.", + "operationId": "Accounts_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + } + ], + "responses": { + "200": { + "description": "Account details.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets Account details": { + "$ref": "./examples/Accounts/Accounts_Get.json" + } + } + }, + "put": { + "description": "Creates or updates Account.", + "operationId": "Accounts_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "name": "Account", + "description": "Account details.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Account" + } + } + ], + "responses": { + "201": { + "description": "Async operation to create or update Account was created.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Creates or updates Account": { + "$ref": "./examples/Accounts/Accounts_Create.json" + } + } + }, + "delete": { + "description": "Deletes account.", + "operationId": "Accounts_Delete", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + } + ], + "responses": { + "202": { + "description": "Async operation to delete Account was created." + }, + "204": { + "description": "Account has been already deleted." + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deletes an account": { + "$ref": "./examples/Accounts/Accounts_Delete.json" + } + } + }, + "patch": { + "description": "Updates account's patchable properties", + "operationId": "Accounts_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "name": "accountUpdatePayload", + "description": "Updated Account.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AccountUpdate" + } + } + ], + "responses": { + "200": { + "description": "Account updated successfully.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "201": { + "description": "Creates or Updates the VirtualMachines resource.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Updates Account": { + "$ref": "./examples/Accounts/Accounts_Update.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances": { + "get": { + "description": "Returns instances for the given account name.", + "operationId": "Instances_ListByAccount", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + } + ], + "responses": { + "200": { + "description": "List of Instances.", + "schema": { + "$ref": "#/definitions/InstanceList" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of Instances by Account": { + "$ref": "./examples/Instances/Instances_ListByAccount.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}": { + "get": { + "description": "Returns instances for the given account and instance name.", + "operationId": "Instances_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "$ref": "#/parameters/InstanceNameParameter" + } + ], + "responses": { + "200": { + "description": "Instance details.", + "schema": { + "$ref": "#/definitions/Instance" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets list of Accounts": { + "$ref": "./examples/Instances/Instances_Get.json" + } + } + }, + "put": { + "description": "Creates or updates instance.", + "operationId": "Instances_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "$ref": "#/parameters/InstanceNameParameter" + }, + { + "name": "Instance", + "description": "Instance details.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Instance" + } + } + ], + "responses": { + "201": { + "description": "Async operation to create or update Instance was created.", + "schema": { + "$ref": "#/definitions/Instance" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Creates or updates Instance": { + "$ref": "./examples/Instances/Instances_Create.json" + } + } + }, + "delete": { + "description": "Deletes instance.", + "operationId": "Instances_Delete", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "$ref": "#/parameters/InstanceNameParameter" + } + ], + "responses": { + "202": { + "description": "Async operation to delete Instance was created." + }, + "204": { + "description": "Instance has been already deleted." + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deletes instance": { + "$ref": "./examples/Instances/Instances_Delete.json" + } + } + }, + "patch": { + "description": "Updates instance's tags.", + "operationId": "Instances_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/AccountNameParameter" + }, + { + "$ref": "#/parameters/InstanceNameParameter" + }, + { + "name": "tagUpdatePayload", + "description": "Updated tags.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TagUpdate" + } + } + ], + "responses": { + "200": { + "description": "Instance updated successfully.", + "schema": { + "$ref": "#/definitions/Instance" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Updates Instance": { + "$ref": "./examples/Instances/Instances_Update.json" + } + } + } + }, + "/providers/Microsoft.DeviceUpdate/operations": { + "get": { + "description": "Returns list of operations for Microsoft.DeviceUpdate resource provider.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation details.", + "schema": { + "$ref": "#/definitions/OperationsList" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Account": { + "description": "Device Update account details.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "description": "Device Update account properties.", + "x-ms-client-flatten": true, + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state.", + "type": "string", + "enum": [ + "Succeeded", + "Deleted", + "Failed", + "Canceled", + "Accepted", + "Creating" + ], + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "hostName": { + "description": "API host name.", + "type": "string", + "readOnly": true + } + } + }, + "identity": { + "$ref": "#/definitions/Identity", + "description": "The type of identity used for the resource." + } + } + }, + "AccountList": { + "description": "List of Accounts.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of Accounts list.", + "type": "string" + }, + "value": { + "description": "List of Accounts.", + "type": "array", + "items": { + "$ref": "#/definitions/Account" + } + } + } + }, + "Instance": { + "description": "Device Update instance details.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "description": "Device Update instance properties.", + "x-ms-client-flatten": true, + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state.", + "type": "string", + "enum": [ + "Succeeded", + "Deleted", + "Failed", + "Canceled", + "Accepted", + "Creating" + ], + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "accountName": { + "description": "Parent Device Update Account name which Instance belongs to.", + "type": "string", + "readOnly": true + }, + "iotHubs": { + "description": "List of IoT Hubs associated with the account.", + "type": "array", + "items": { + "$ref": "#/definitions/IotHubSettings" + } + } + } + } + }, + "required": [ + "properties" + ] + }, + "InstanceList": { + "description": "List of Instances.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of Instances list.", + "type": "string" + }, + "value": { + "description": "List of Instances.", + "type": "array", + "items": { + "$ref": "#/definitions/Instance" + } + } + } + }, + "Identity": { + "description": "Identity for the resource.", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "enum": [ + "SystemAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + }, + "type": "string", + "description": "The identity type." + } + } + }, + "IotHubSettings": { + "type": "object", + "description": "Device Update account integration with IoT Hub settings.", + "properties": { + "resourceId": { + "description": "IoTHub resource ID", + "type": "string", + "minLength": 108, + "maxLength": 244 + }, + "ioTHubConnectionString": { + "description": "IoTHub connection string.", + "x-ms-secret": true, + "type": "string" + }, + "eventHubConnectionString": { + "description": "EventHub connection string.", + "x-ms-secret": true, + "type": "string" + } + }, + "required": [ + "resourceId" + ] + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request.", + "properties": { + "code": { + "description": "The error status code.", + "type": "string" + }, + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + } + } + } + }, + "AccountUpdate": { + "description": "Request payload used to update and existing Accounts.", + "properties": { + "identity": { + "$ref": "#/definitions/Identity", + "description": "The type of identity used for the resource." + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + } + }, + "allOf": [ + { + "$ref": "#/definitions/TagUpdate" + } + ] + }, + "TagUpdate": { + "description": "Request payload used to update an existing resource's tags.", + "type": "object", + "properties": { + "tags": { + "type": "object", + "description": "List of key value pairs that describe the resource. This will overwrite the existing tags.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Operation": { + "description": "Operation provided by provider.", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation." + }, + "display": { + "type": "object", + "description": "Properties of the operation.", + "properties": { + "provider": { + "type": "string", + "description": "Provider name." + }, + "resource": { + "type": "string", + "description": "Resource name." + }, + "operation": { + "type": "string", + "description": "Operation name." + }, + "description": { + "type": "string", + "description": "Description of the operation." + } + } + } + } + }, + "OperationsList": { + "description": "Lists the operations available.", + "properties": { + "nextLink": { + "description": "Url to follow for getting next page of operations.", + "type": "string" + }, + "value": { + "description": "Array of operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + }, + "required": [ + "value" + ] + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "ADU schema API version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name.", + "x-ms-parameter-location": "method" + }, + "AccountNameParameter": { + "name": "accountName", + "in": "path", + "required": true, + "type": "string", + "description": "Account name.", + "x-ms-parameter-location": "method", + "pattern": "^[A-Za-z][A-Za-z0-9]+$", + "minLength": 3, + "maxLength": 24 + }, + "InstanceNameParameter": { + "name": "instanceName", + "in": "path", + "required": true, + "type": "string", + "description": "Instance name.", + "x-ms-parameter-location": "method", + "pattern": "^[A-Za-z][A-Za-z0-9]+$", + "minLength": 3, + "maxLength": 36 + } + } +} \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json new file mode 100644 index 000000000000..fecb568fe58f --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "api-version": "2020-03-01-preview", + "Account": { + "location": "West US 2", + "identity": { + "type": "SystemAssigned" + }, + "properties": { + } + } + }, + "responses": { + "201": { + "body": { + "name": "contoso", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", + "type": "Microsoft.DeviceUpdate/accounts", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "properties": { + "provisioningState": "Accepted", + "hostName": "contoso.api.adu.microsoft.com" + } + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json new file mode 100644 index 000000000000..6b43c35d1e1c --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "api-version": "2020-03-01-preview" + }, + "responses": { + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json new file mode 100644 index 000000000000..4300bc6ef27c --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Get.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "name": "contoso", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", + "type": "Microsoft.DeviceUpdate/accounts", + "properties": { + "provisioningState": "Succeeded", + "hostName": "contoso.api.adu.microsoft.com" + } + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json new file mode 100644 index 000000000000..dc2ccf525818 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_List.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "contoso", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", + "type": "Microsoft.DeviceUpdate/accounts", + "properties": { + "provisioningState": "Succeeded", + "hostName": "contoso.api.adu.microsoft.com" + } + } + ] + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json new file mode 100644 index 000000000000..917c1de425ad --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Update.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "api-version": "2020-03-01-preview", + "accountUpdatePayload": { + "tags": { + "tagKey": "tagValue" + } + } + }, + "responses": { + "200": { + "body": { + "name": "contoso", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", + "type": "Microsoft.DeviceUpdate/accounts", + "properties": { + "provisioningState": "Succeeded", + "hostName": "contoso.api.adu.microsoft.com" + }, + "tags": { + "tagKey": "tagValue" + } + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json new file mode 100644 index 000000000000..32f7fe111527 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Create.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "instanceName": "blue", + "api-version": "2020-03-01-preview", + "Instance": { + "location": "West US 2", + "properties": { + "iotHubs": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub", + "ioTHubConnectionString": "string", + "eventHubConnectionString": "string" + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "name": "blue", + "location": "West US 2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", + "type": "Microsoft.DeviceUpdate/accounts/instances", + "properties": { + "provisioningState": "Accepted", + "accountName": "contoso", + "iotHubs": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" + } + ] + } + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json new file mode 100644 index 000000000000..b88295af7d29 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "instanceName": "blue", + "api-version": "2020-03-01-preview" + }, + "responses": { + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json new file mode 100644 index 000000000000..1f354395ae9e --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "instanceName": "blue", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "name": "blue", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", + "type": "Microsoft.DeviceUpdate/accounts/instances", + "properties": { + "provisioningState": "Succeeded", + "accountName": "contoso", + "iotHubs": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" + } + ] + } + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json new file mode 100644 index 000000000000..eac2d6134f84 --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_ListByAccount.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "blue", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", + "type": "Microsoft.DeviceUpdate/accounts/instances", + "properties": { + "provisioningState": "Succeeded", + "accountName": "contoso", + "iotHubs": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" + } + ] + } + }, + { + "name": "red", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/red", + "type": "Microsoft.DeviceUpdate/accounts/instances", + "properties": { + "provisioningState": "Succeeded", + "accountName": "contoso", + "iotHubs": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/red-contoso-hub" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json new file mode 100644 index 000000000000..a431fd26a2db --- /dev/null +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "test-rg", + "accountName": "contoso", + "instanceName": "blue", + "api-version": "2020-03-01-preview", + "tagUpdatePayload": { + "tags": { + "tagKey": "tagValue" + } + } + }, + "responses": { + "200": { + "body": { + "name": "blue", + "location": "westus2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue", + "type": "Microsoft.DeviceUpdate/accounts/instances", + "properties": { + "accountName": "contoso", + "iotHubs": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub" + } + ] + }, + "tags": { + "tagKey": "tagValue" + } + } + } + } +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json deleted file mode 100644 index 6fdcc06e7100..000000000000 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2020-03-01", - "title": "deviceupdate", - "description": "Description of the new service", - "x-ms-code-generation-settings": { - "name": "deviceupdateClient" - } - }, - "host": "management.azure.com", - "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": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/operations": { - "get": { - "tags": ["Tag1"], - "operationId": "OperationGroup_Get", - "x-ms-examples": { - "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } - }, - "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "Describe the result of a successful operation.", - "schema": { - "$ref": "#/definitions/Result" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "Result": { - "description": "Sample result definition", - "properties": { - "sampleProperty": { - "type": "string", - "description": "Sample property of type string" - } - } - }, - "ErrorResponse": { - "description": "Error response.", - "properties": { - "error": { - "$ref": "#/definitions/ErrorDefinition", - "description": "The error details." - } - } - }, - "ErrorDefinition": { - "description": "Error definition.", - "properties": { - "code": { - "description": "Service specific error code which serves as the substatus for the HTTP error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "Description of the error.", - "type": "string", - "readOnly": true - }, - "details": { - "description": "Internal error details.", - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDefinition" - }, - "readOnly": true - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to be used with the HTTP request." - } - } -} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json deleted file mode 100644 index 6f9727fb5c0b..000000000000 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01/examples/OperationGroupGet.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "accountName": "sampleacct", - "resourceGroupName": "deviceupdateClient", - "api-version": "2020-03-01", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "sampleProperty": "sampleProperty" - } - } - } -} diff --git a/specification/deviceupdate/resource-manager/readme.az.md b/specification/deviceupdate/resource-manager/readme.az.md deleted file mode 100644 index 01d8dfd47169..000000000000 --- a/specification/deviceupdate/resource-manager/readme.az.md +++ /dev/null @@ -1,28 +0,0 @@ -## AZ - -These settings apply only when `--az` is specified on the command line. - -For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. - -``` yaml $(az) && $(target-mode) != 'core' -az: - extensions: deviceupdate - namespace: azure.mgmt.deviceupdate - package-name: azure-mgmt-deviceupdate -az-output-folder: $(azure-cli-extension-folder)/src/deviceupdate -python-sdk-output-folder: "$(az-output-folder)/azext_deviceupdate/vendored_sdks/deviceupdate" -# add additinal configuration here specific for Azure CLI -# refer to the faq.md for more details -``` - - - -This is for command modules that already in azure cli main repo. -``` yaml $(az) && $(target-mode) == 'core' -az: - extensions: deviceupdate - namespace: azure.mgmt.deviceupdate - package-name: azure-mgmt-deviceupdate -az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/deviceupdate -python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/deviceupdate" -``` \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/readme.azureresourceschema.md b/specification/deviceupdate/resource-manager/readme.azureresourceschema.md deleted file mode 100644 index 267a1a84492f..000000000000 --- a/specification/deviceupdate/resource-manager/readme.azureresourceschema.md +++ /dev/null @@ -1,23 +0,0 @@ -## AzureResourceSchema - -These settings apply only when `--azureresourceschema` is specified on the command line. - -### AzureResourceSchema multi-api - -``` yaml $(azureresourceschema) && $(multiapi) -batch: - - tag: schema-deviceupdate-2020-03-01 - -``` - -Please also specify `--azureresourceschema-folder=`. - -### Tag: schema-deviceupdate-2020-03-01 and azureresourceschema - -``` yaml $(tag) == 'schema-deviceupdate-2020-03-01' && $(azureresourceschema) -output-folder: $(azureresourceschema-folder)/schemas - -# all the input files in this apiVersion -input-file: - - Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json -``` diff --git a/specification/deviceupdate/resource-manager/readme.cli.md b/specification/deviceupdate/resource-manager/readme.cli.md deleted file mode 100644 index c6cf6ad37ea4..000000000000 --- a/specification/deviceupdate/resource-manager/readme.cli.md +++ /dev/null @@ -1 +0,0 @@ -## CLI Common Settings for all the command line tools \ No newline at end of file diff --git a/specification/deviceupdate/resource-manager/readme.csharp.md b/specification/deviceupdate/resource-manager/readme.csharp.md index d1ae048f81e9..0b4ca02cffc9 100644 --- a/specification/deviceupdate/resource-manager/readme.csharp.md +++ b/specification/deviceupdate/resource-manager/readme.csharp.md @@ -10,6 +10,6 @@ csharp: payload-flattening-threshold: 1 clear-output-folder: true client-side-validation: false - namespace: Microsoft.DeviceUpdate - output-folder: $(csharp-sdks-folder)/deviceupdate/management/Microsoft.DeviceUpdate/GeneratedProtocol + namespace: Azure.ResourceManager.DeviceUpdate + output-folder: $(csharp-sdks-folder)/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated ``` diff --git a/specification/deviceupdate/resource-manager/readme.go.md b/specification/deviceupdate/resource-manager/readme.go.md index 41bf7f43d8d9..1547d831f5a2 100644 --- a/specification/deviceupdate/resource-manager/readme.go.md +++ b/specification/deviceupdate/resource-manager/readme.go.md @@ -4,23 +4,16 @@ These settings apply only when `--go` is specified on the command line. ```yaml $(go) go: - license-header: MICROSOFT_APACHE_NO_VERSION - namespace: deviceupdate + license-header: MICROSOFT_MIT_NO_VERSION clear-output-folder: true ``` -### Go multi-api - -``` yaml $(go) && $(multiapi) -batch: - - tag: package-2020-03-01-preview -``` - ### Tag: package-2020-03-01-preview and go These settings apply only when `--tag=package-2020-03-01-preview --go` is specified on the command line. -Please also specify `--go-sdk-folder=`. +Please also specify `--go-sdks-folder=`. ```yaml $(tag) == 'package-2020-03-01-preview' && $(go) -output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-03-01/$(namespace) +namespace: deviceupdate +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-03-01-preview/$(namespace) ``` diff --git a/specification/deviceupdate/resource-manager/readme.md b/specification/deviceupdate/resource-manager/readme.md index 615700e43dcf..49be17c855c0 100644 --- a/specification/deviceupdate/resource-manager/readme.md +++ b/specification/deviceupdate/resource-manager/readme.md @@ -1,4 +1,4 @@ -# deviceupdate +# Device Update > see https://aka.ms/autorest @@ -26,16 +26,27 @@ These are the global settings for the deviceupdate. ```yaml openapi-type: arm -tag: package-2020-03-01 +openapi-subtype: rpaas +tag: package-2020-03-01-preview ``` -### Tag: package-2020-03-01 +### Tag: package-2020-03-01-preview -These settings apply only when `--tag=package-2020-03-01` is specified on the command line. +These settings apply only when `--tag=package-2020-03-01-preview` is specified on the command line. -```yaml $(tag) == 'package-2020-03-01' +```yaml $(tag) == 'package-2020-03-01-preview' input-file: - - Microsoft.DeviceUpdate/preview/2020-03-01/deviceupdate.json + - Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +``` + +## Suppression + +``` yaml +directive: + - suppress: ENUM_CASE_MISMATCH + where: $.definitions.Identity.properties.type + from: deviceupdate.json + reason: Managed Identity type can be case in-sensitive ``` --- @@ -49,35 +60,21 @@ This is not used by Autorest itself. ```yaml $(swagger-to-sdk) swagger-to-sdk: - - repo: azure-sdk-for-python-track2 - - repo: azure-sdk-for-java + - repo: azure-sdk-for-net + - repo: azure-sdk-for-python - repo: azure-sdk-for-go - - repo: azure-sdk-for-js - - repo: azure-resource-manager-schemas after_scripts: - - node sdkauto_afterscript.js deviceupdate/resource-manager - - repo: azure-cli-extensions + - bundle install && rake arm:regen_all_profiles['azure_mgmt_deviceupdate'] ``` -## Az - -See configuration in [readme.az.md](./readme.az.md) -## Go +## CSharp -See configuration in [readme.go.md](./readme.go.md) +See configuration in [readme.csharp.md](./readme.csharp.md) ## 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) - -## AzureResourceSchema +## Go -See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) +See configuration in [readme.go.md](./readme.go.md) diff --git a/specification/deviceupdate/resource-manager/readme.python.md b/specification/deviceupdate/resource-manager/readme.python.md index 82110c00b38f..13b9a0f53a57 100644 --- a/specification/deviceupdate/resource-manager/readme.python.md +++ b/specification/deviceupdate/resource-manager/readme.python.md @@ -3,39 +3,16 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(python) && !$(track2) -python: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - package-name: azure-mgmt-deviceupdate - no-namespace-folders: true - package-version: 1.0.0b1 -``` - -``` yaml $(python-mode) == 'update' && !$(track2) -python: - output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate -``` -``` yaml $(python-mode) == 'create' && !$(track2) -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate -``` - -``` yaml $(python) && $(track2) -azure-arm: true -license-header: MICROSOFT_MIT_NO_VERSION -package-name: azure-mgmt-deviceupdate -no-namespace-folders: true -``` - -``` yaml $(python-mode) == 'update' -no-namespace-folders: true -output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate -``` - -``` yaml $(python-mode) == 'create' && $(track2) -package-version: 1.0.0b1 -basic-setup-py: true -output-folder: $(python-sdks-folder)/deviceupdate/azure-mgmt-deviceupdate +```yaml + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.deviceupdate + package-name: azure_mgmt_deviceupdate + package-version: 2020-03-01-preview + clear-output-folder: true + add-credentials: true + credential-scopes: 9347d57b-9e24-4142-b4a3-20576bf22aa3/.default + no-namespace-folders: true + output-folder: $(python-sdks-folder)/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate ``` diff --git a/specification/deviceupdate/resource-manager/readme.typescript.md b/specification/deviceupdate/resource-manager/readme.typescript.md deleted file mode 100644 index aad280e2bdae..000000000000 --- a/specification/deviceupdate/resource-manager/readme.typescript.md +++ /dev/null @@ -1,14 +0,0 @@ -## TypeScript - -These settings apply only when `--typescript` is specified on the command line. -Please also specify `--typescript-sdks-folder=`. - -``` yaml $(typescript) -typescript: - azure-arm: true - package-name: "@azure/arm-deviceupdate" - output-folder: "$(typescript-sdks-folder)/sdk/deviceupdate/arm-deviceupdate" - payload-flattening-threshold: 1 - clear-output-folder: true - generate-metadata: true -``` From 09bd32a6ba8b733f3fd6596127a5a80a9b05aff9 Mon Sep 17 00:00:00 2001 From: David Pokluda Date: Mon, 1 Mar 2021 14:16:42 -0800 Subject: [PATCH 12/20] Fixing prettier issues. --- .../preview/2020-03-01-preview/deviceupdate.json | 2 +- .../2020-03-01-preview/examples/Accounts/Accounts_Create.json | 3 +-- .../2020-03-01-preview/examples/Accounts/Accounts_Delete.json | 2 +- .../examples/Instances/Instances_Delete.json | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index cc76d5cd485a..e8ab98183856 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -940,4 +940,4 @@ "maxLength": 36 } } -} \ No newline at end of file +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json index fecb568fe58f..62fbb3e309fc 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -9,8 +9,7 @@ "identity": { "type": "SystemAssigned" }, - "properties": { - } + "properties": {} } }, "responses": { diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json index 6b43c35d1e1c..2c3890f3add0 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json @@ -9,4 +9,4 @@ "202": {}, "204": {} } -} \ No newline at end of file +} diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json index b88295af7d29..0a67202a899e 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json @@ -10,4 +10,4 @@ "202": {}, "204": {} } -} \ No newline at end of file +} From d96a50a0986191434be336559c71fda75475498e Mon Sep 17 00:00:00 2001 From: David Pokluda Date: Mon, 1 Mar 2021 15:53:14 -0800 Subject: [PATCH 13/20] Updating control plane swagger --- .../2020-03-01-preview/deviceupdate.json | 55 +++---------------- .../examples/Accounts/Accounts_Create.json | 8 --- 2 files changed, 8 insertions(+), 55 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index e8ab98183856..d3165c007162 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -312,12 +312,6 @@ "$ref": "#/definitions/Account" } }, - "201": { - "description": "Creates or Updates the VirtualMachines resource.", - "schema": { - "$ref": "#/definitions/Account" - } - }, "default": { "description": "Error response describing the reason for operation failure.", "schema": { @@ -634,10 +628,6 @@ "readOnly": true } } - }, - "identity": { - "$ref": "#/definitions/Identity", - "description": "The type of identity used for the resource." } } }, @@ -725,33 +715,6 @@ } } }, - "Identity": { - "description": "Identity for the resource.", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "enum": [ - "SystemAssigned", - "None" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - }, - "type": "string", - "description": "The identity type." - } - } - }, "IotHubSettings": { "type": "object", "description": "Device Update account integration with IoT Hub settings.", @@ -781,12 +744,14 @@ "description": "Error response indicates that the service is not able to process the incoming request.", "properties": { "code": { - "description": "The error status code.", - "type": "string" + "description": "Error status code.", + "type": "string", + "readOnly": true }, "error": { "$ref": "#/definitions/ErrorDefinition", - "description": "The error details." + "description": "Error details.", + "readOnly": true } } }, @@ -794,17 +759,17 @@ "description": "Error definition.", "properties": { "code": { - "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "description": "Error status code.", "type": "string", "readOnly": true }, "message": { - "description": "Description of the error.", + "description": "Error message.", "type": "string", "readOnly": true }, "details": { - "description": "Internal error details.", + "description": "Error details.", "type": "array", "items": { "$ref": "#/definitions/ErrorDefinition" @@ -815,10 +780,6 @@ "AccountUpdate": { "description": "Request payload used to update and existing Accounts.", "properties": { - "identity": { - "$ref": "#/definitions/Identity", - "description": "The type of identity used for the resource." - }, "location": { "type": "string", "description": "The geo-location where the resource lives" diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json index 62fbb3e309fc..8e8f0b68712d 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Create.json @@ -6,9 +6,6 @@ "api-version": "2020-03-01-preview", "Account": { "location": "West US 2", - "identity": { - "type": "SystemAssigned" - }, "properties": {} } }, @@ -19,11 +16,6 @@ "location": "westus2", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso", "type": "Microsoft.DeviceUpdate/accounts", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, "properties": { "provisioningState": "Accepted", "hostName": "contoso.api.adu.microsoft.com" From eec6b9cf727cc1f85193bf135a7e3234ac28a185 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Mon, 1 Mar 2021 18:37:48 -0800 Subject: [PATCH 14/20] Update deviceupdate.json --- .../2020-03-01-preview/deviceupdate.json | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index d3165c007162..0208ae81a769 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -573,7 +573,7 @@ "200": { "description": "Operation details.", "schema": { - "$ref": "#/definitions/OperationsList" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/OperationListResult" } }, "default": { @@ -803,56 +803,6 @@ } } } - }, - "Operation": { - "description": "Operation provided by provider.", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation." - }, - "display": { - "type": "object", - "description": "Properties of the operation.", - "properties": { - "provider": { - "type": "string", - "description": "Provider name." - }, - "resource": { - "type": "string", - "description": "Resource name." - }, - "operation": { - "type": "string", - "description": "Operation name." - }, - "description": { - "type": "string", - "description": "Description of the operation." - } - } - } - } - }, - "OperationsList": { - "description": "Lists the operations available.", - "properties": { - "nextLink": { - "description": "Url to follow for getting next page of operations.", - "type": "string" - }, - "value": { - "description": "Array of operations.", - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - } - } - }, - "required": [ - "value" - ] } }, "parameters": { From 76e9489b19eddfe11861c71d4dfa74ee4bca39c2 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Mon, 1 Mar 2021 18:46:03 -0800 Subject: [PATCH 15/20] Update deviceupdate.json --- .../2020-03-01-preview/deviceupdate.json | 58 ++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index 0208ae81a769..5de2bd3877f5 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -260,6 +260,9 @@ } ], "responses": { + "200": { + "description": "Async operation to delete Account was created." + }, "202": { "description": "Async operation to delete Account was created." }, @@ -491,6 +494,9 @@ } ], "responses": { + "200": { + "description": "Async operation to delete Instance was created." + }, "202": { "description": "Async operation to delete Instance was created." }, @@ -573,7 +579,7 @@ "200": { "description": "Operation details.", "schema": { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/OperationListResult" + "$ref": "#/definitions/OperationsList" } }, "default": { @@ -803,6 +809,56 @@ } } } + }, + "Operation": { + "description": "Operation provided by provider.", + "properties": { + "name": { + "type": "string", + "description": "Name of the operation." + }, + "display": { + "type": "object", + "description": "Properties of the operation.", + "properties": { + "provider": { + "type": "string", + "description": "Provider name." + }, + "resource": { + "type": "string", + "description": "Resource name." + }, + "operation": { + "type": "string", + "description": "Operation name." + }, + "description": { + "type": "string", + "description": "Description of the operation." + } + } + } + } + }, + "OperationsList": { + "description": "Lists the operations available.", + "properties": { + "nextLink": { + "description": "Url to follow for getting next page of operations.", + "type": "string" + }, + "value": { + "description": "Array of operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + }, + "required": [ + "value" + ] } }, "parameters": { From 71560b8c55e72459baa5a663a2e771b667cc0309 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Mon, 1 Mar 2021 18:50:09 -0800 Subject: [PATCH 16/20] Update deviceupdate.json --- .../2020-03-01-preview/deviceupdate.json | 52 +------------------ 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index 5de2bd3877f5..7e34b8f348d0 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -579,7 +579,7 @@ "200": { "description": "Operation details.", "schema": { - "$ref": "#/definitions/OperationsList" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/OperationListResult" } }, "default": { @@ -810,56 +810,6 @@ } } }, - "Operation": { - "description": "Operation provided by provider.", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation." - }, - "display": { - "type": "object", - "description": "Properties of the operation.", - "properties": { - "provider": { - "type": "string", - "description": "Provider name." - }, - "resource": { - "type": "string", - "description": "Resource name." - }, - "operation": { - "type": "string", - "description": "Operation name." - }, - "description": { - "type": "string", - "description": "Description of the operation." - } - } - } - } - }, - "OperationsList": { - "description": "Lists the operations available.", - "properties": { - "nextLink": { - "description": "Url to follow for getting next page of operations.", - "type": "string" - }, - "value": { - "description": "Array of operations.", - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - } - } - }, - "required": [ - "value" - ] - } }, "parameters": { "SubscriptionIdParameter": { From 19e8c1e8bf1df54d4344e75aabc4724f58e01793 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Mon, 1 Mar 2021 18:50:33 -0800 Subject: [PATCH 17/20] Update deviceupdate.json --- .../preview/2020-03-01-preview/deviceupdate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json index 7e34b8f348d0..0e3c6a46d44c 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json @@ -809,7 +809,7 @@ } } } - }, + } }, "parameters": { "SubscriptionIdParameter": { From 08a86254299ec07944c2f4d229eabcc2d0bbfe96 Mon Sep 17 00:00:00 2001 From: ArcturusZhang Date: Tue, 2 Mar 2021 11:06:59 +0800 Subject: [PATCH 18/20] add the multiapi section --- specification/deviceupdate/resource-manager/readme.go.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/deviceupdate/resource-manager/readme.go.md b/specification/deviceupdate/resource-manager/readme.go.md index 1547d831f5a2..1cd6ddaed47b 100644 --- a/specification/deviceupdate/resource-manager/readme.go.md +++ b/specification/deviceupdate/resource-manager/readme.go.md @@ -8,6 +8,13 @@ go: clear-output-folder: true ``` +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2020-03-01-preview +``` + ### Tag: package-2020-03-01-preview and go These settings apply only when `--tag=package-2020-03-01-preview --go` is specified on the command line. From 5830badf7cd4971d12ab518ee50bb84b6ac76208 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Mon, 1 Mar 2021 19:07:12 -0800 Subject: [PATCH 19/20] Update Accounts_Delete.json --- .../2020-03-01-preview/examples/Accounts/Accounts_Delete.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json index 2c3890f3add0..9137be15f91c 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Accounts/Accounts_Delete.json @@ -6,6 +6,7 @@ "api-version": "2020-03-01-preview" }, "responses": { + "200": {}, "202": {}, "204": {} } From 75b37e6eb43ae571bf730ca26ad68d0f8f8f38ba Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Mon, 1 Mar 2021 19:08:16 -0800 Subject: [PATCH 20/20] Update Instances_Delete.json --- .../2020-03-01-preview/examples/Instances/Instances_Delete.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json index 0a67202a899e..a9bf7145faad 100644 --- a/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json +++ b/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2020-03-01-preview/examples/Instances/Instances_Delete.json @@ -7,6 +7,7 @@ "api-version": "2020-03-01-preview" }, "responses": { + "200": {}, "202": {}, "204": {} }