From 8c47305a05d0a555be1b788ddce4a3acf05b5fe3 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:43:56 -0700 Subject: [PATCH 01/31] New Readme Config File --- .../quantum/resource-manager/readme.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 specification/quantum/resource-manager/readme.md diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md new file mode 100644 index 000000000000..efac1ac44344 --- /dev/null +++ b/specification/quantum/resource-manager/readme.md @@ -0,0 +1,79 @@ +# quantum + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for quantum. + +## 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 quantum. + +```yaml +openapi-type: arm +tag: package-2019-11-04-preview +``` + +### Tag: package-2019-11-04-preview + +These settings apply only when `--tag=package-2019-11-04-preview` is specified on the command line. + +```yaml $(tag) == 'package-2019-11-04-preview' +input-file: + - Microsoft.Quantum/preview/2019-11-04-preview/quantum.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-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_quantum'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) From c1894913e84bec8448e72ab757ae6c13442d341f Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:43:57 -0700 Subject: [PATCH 02/31] New Go Language Readme Config File --- .../quantum/resource-manager/readme.go.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 specification/quantum/resource-manager/readme.go.md diff --git a/specification/quantum/resource-manager/readme.go.md b/specification/quantum/resource-manager/readme.go.md new file mode 100644 index 000000000000..084fbca58b64 --- /dev/null +++ b/specification/quantum/resource-manager/readme.go.md @@ -0,0 +1,19 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true +``` + +### Tag: package-2019-11-04-preview and go + +These settings apply only when `--tag=package-2019-11-04-preview --go` is specified on the command line. +Please also specify `--go-sdks-folder=`. + +```yaml $(tag) == 'package-2019-11-04-preview' && $(go) +namespace: Microsoft.Quantum +output-folder: $(go-sdks-folder)/quantum/Generated +``` From 11f24e12e1b7e7876a26d90c5ba1a8f7dafa9d91 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:43:58 -0700 Subject: [PATCH 03/31] New Typescript Language Readme Config File --- .../quantum/resource-manager/readme.typescript.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 specification/quantum/resource-manager/readme.typescript.md diff --git a/specification/quantum/resource-manager/readme.typescript.md b/specification/quantum/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..995a0be4829e --- /dev/null +++ b/specification/quantum/resource-manager/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: true + package-name: "quantum" + output-folder: "$(typescript-sdks-folder)/packages/quantum" + payload-flattening-threshold: 1 + generate-metadata: true +``` From 25bfde1f6737ecbf8bd3b479a178ea2eb1c0348e Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:43:59 -0700 Subject: [PATCH 04/31] New Python Language Readme Config File --- .../quantum/resource-manager/readme.python.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 specification/quantum/resource-manager/readme.python.md diff --git a/specification/quantum/resource-manager/readme.python.md b/specification/quantum/resource-manager/readme.python.md new file mode 100644 index 000000000000..1024661a26d4 --- /dev/null +++ b/specification/quantum/resource-manager/readme.python.md @@ -0,0 +1,21 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml $(python) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: Microsoft.Quantum + package-name: quantum + package-version: 2019-11-04-preview + clear-output-folder: true +``` + +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt/quantum +``` From b4dd02c611d85b26de838cb135c3edfe3ca12284 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:44:00 -0700 Subject: [PATCH 05/31] New C# Language Readme Config File --- .../quantum/resource-manager/readme.csharp.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specification/quantum/resource-manager/readme.csharp.md diff --git a/specification/quantum/resource-manager/readme.csharp.md b/specification/quantum/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..b7dd205ebd8e --- /dev/null +++ b/specification/quantum/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.Quantum + output-folder: $(csharp-sdks-folder)/quantum/management/Microsoft.Quantum/GeneratedProtocol +``` From 6aaff00aac32c2e8252187273e3391a02afc3998 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:44:00 -0700 Subject: [PATCH 06/31] New Ruby Language Readme Config File --- .../quantum/resource-manager/readme.ruby.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 specification/quantum/resource-manager/readme.ruby.md diff --git a/specification/quantum/resource-manager/readme.ruby.md b/specification/quantum/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..75e6147d4df2 --- /dev/null +++ b/specification/quantum/resource-manager/readme.ruby.md @@ -0,0 +1,19 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_mgmt_quantum +package-version: 2019-11-04-preview +azure-arm: true +``` + +### Tag: package-2019-11-04-preview and ruby + +These settings apply only when `--tag=package-2019-11-04-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2019-11-04-preview' && $(ruby) +namespace: Microsoft.Quantum +output-folder: $(ruby-sdks-folder)/quantum +``` From b9e72f998eaf1e71532248d89c298255d2d8b7e6 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:44:01 -0700 Subject: [PATCH 07/31] New Swagger Spec File --- .../preview/2019-11-04-preview/quantum.json | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json new file mode 100644 index 000000000000..412486ffac98 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -0,0 +1,132 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-11-04-preview", + "title": "quantum", + "description": "Description of the new service", + "x-ms-code-generation-settings": { + "name": "quantumClient" + } + }, + "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.Quantum/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 ea78b3f095debf4190072596c0cd378aa20f1500 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:44:02 -0700 Subject: [PATCH 08/31] New Swagger Example Spec File --- .../examples/OperationGroupGet.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json new file mode 100644 index 000000000000..0c1ee6f52e48 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sampleacct", + "resourceGroupName": "quantumClient", + "api-version": "2019-11-04-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "sampleProperty": "sampleProperty" + } + } + } +} From 4b650cb9a50413f8696225c435123a774adf92a1 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 18 Oct 2020 18:46:01 -0700 Subject: [PATCH 09/31] New Swagger for Azure Quantum RP --- .../examples/OperationGroupGet.json | 15 - .../examples/providerList.json | 29 + .../examples/quantumWorkspacesDelete.json | 38 ++ .../examples/quantumWorkspacesGet.json | 51 ++ .../examples/quantumWorkspacesList.json | 39 ++ .../examples/quantumWorkspacesPatch.json | 54 ++ .../examples/quantumWorkspacesPut.json | 105 +++ .../preview/2019-11-04-preview/quantum.json | 637 +++++++++++++++++- .../quantum/resource-manager/readme.go.md | 4 +- 9 files changed, 926 insertions(+), 46 deletions(-) delete mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json deleted file mode 100644 index 0c1ee6f52e48..000000000000 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/OperationGroupGet.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "accountName": "sampleacct", - "resourceGroupName": "quantumClient", - "api-version": "2019-11-04-preview", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "sampleProperty": "sampleProperty" - } - } - } -} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json new file mode 100644 index 000000000000..0349ad2e65d3 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "api-version": "2019-11-04-preview", + "locationName": "westus2" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "QIO", + "name": "Quantum Inspired Optimization", + "properties": { + "description": "Provide Quantum Inspired Optimization solvers", + "targets": [ + { + "name": "CPU annealer", + "id": "p1", + "description": "CPU annealer algorithm" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json new file mode 100644 index 000000000000..2352fc824e75 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "description": "Successful." + }, + "201": { + "body": { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Deleting", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + } + ], + "provisioningState": "ProviderDeleting", + "usable": "No", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json new file mode 100644 index 000000000000..2a30543b0f92 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "body": { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + }, + { + "providerId": "IonQ", + "provisioningState": "Succeeded", + "applicationName": "quantumworkspace1-i1", + "instanceUri": "https://i1.endpoint.com", + "providerSku": "Basic", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + }, + { + "providerId": "OneQBit", + "provisioningState": "Succeeded", + "applicationName": "quantumworkspace1-o1", + "instanceUri": "https://o1.endpoint.com", + "providerSku": "Basic", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json new file mode 100644 index 000000000000..55feda06a0ea --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + ] + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json new file mode 100644 index 000000000000..f939cc09057a --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "api-version": "2019-11-04-preview", + "QuantumWorkspace": { + "location": "West US", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded" + } + ], + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + }, + "responses": { + "200": { + "body": { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json new file mode 100644 index 000000000000..eee88f4d9892 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "api-version": "2019-11-04-preview", + "QuantumWorkspace": { + "location": "West US", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic" + }, + { + "providerId": "IonQ", + "providerSku": "Basic" + }, + { + "providerId": "OneQBit", + "providerSku": "Basic" + } + ], + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + }, + "responses": { + "200": { + "body": { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + }, + { + "providerId": "IonQ", + "provisioningState": "Succeeded", + "applicationName": "quantumworkspace1-i1", + "instanceUri": "https://i1.endpoint.com", + "providerSku": "Basic", + "resourceUsageId": "00000000-1111-2222-3333-444444444445" + }, + { + "providerId": "OneQBit", + "provisioningState": "Succeeded", + "applicationName": "quantumworkspace1-o1", + "instanceUri": "https://o1.endpoint.com", + "providerSku": "Basic", + "resourceUsageId": "00000000-1111-2222-3333-444444444446" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + }, + "201": { + "body": { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "provisioningState": "Launching" + }, + { + "providerId": "IonQ", + "provisioningState": "Launching", + "applicationName": "quantumworkspace1-i1", + "providerSku": "Basic" + }, + { + "providerId": "OneQBit", + "provisioningState": "Launching", + "applicationName": "quantumworkspace1-o1", + "providerSku": "Basic" + } + ], + "provisioningState": "ProviderLaunching", + "usable": "No" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + } + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 412486ffac98..630efc2c1451 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -1,20 +1,21 @@ { "swagger": "2.0", "info": { + "title": "Azure Quantum Management Client", "version": "2019-11-04-preview", - "title": "quantum", - "description": "Description of the new service", "x-ms-code-generation-settings": { - "name": "quantumClient" + "name": "QuantumManagementClient" } }, "host": "management.azure.com", - "schemes": ["https"], - "consumes": ["application/json"], - "produces": ["application/json"], + "schemes": [ + "https" + ], + "consumes": [ "application/json" ], + "produces": [ "application/json" ], "security": [ { - "azure_auth": ["user_impersonation"] + "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { @@ -22,34 +23,140 @@ "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", + "description": "Azure Active Directory OAuth2 Flow.", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/operations": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}": { "get": { - "tags": ["Tag1"], - "operationId": "OperationGroup_Get", + "description": "Returns the Workspace resource associated with the given name.", + "operationId": "Workspaces_Get", + "x-ms-examples": { + "QuantumWorkspacesGet": { + "$ref": "./examples/quantumWorkspacesGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Workspace details.", + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "description": "Creates or updates a workspace resource.", + "operationId": "Workspaces_CreateAndUpdate", "x-ms-examples": { - "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } + "QuantumWorkspacesGet": { + "$ref": "./examples/quantumWorkspacesPut.json" + } }, - "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "$ref": "#/parameters/SubscriptionIdParameter" }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "name": "QuantumWorkspace", + "description": "Workspace details.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + } + ], + "responses": { + "201": { + "description": "Workspace create/update request accepted.", + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + }, + "200": { + "description": "Successful.", + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Workspaces_Update", + "x-ms-examples": { + "QuantumWorkspacesGet": { + "$ref": "./examples/quantumWorkspacesPatch.json" + } + }, + "description": "Updates a Workspace resource.", + "parameters": [ { "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "name": "QuantumWorkspace", + "description": "Quantum workspace details.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } } ], "responses": { "200": { - "description": "Describe the result of a successful operation.", + "description": "Workspace updated successfully.", "schema": { - "$ref": "#/definitions/Result" + "$ref": "#/definitions/QuantumWorkspace" } }, "default": { @@ -59,19 +166,172 @@ } } } + }, + "delete": { + "description": "Deletes a Workspace resource.", + "operationId": "Workspaces_Delete", + "x-ms-examples": { + "QuantumWorkspacesGet": { + "$ref": "./examples/quantumWorkspacesDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Successful." + }, + "202": { + "description": "Workspace delete request accepted.", + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + }, + "204": { + "description": "No content.", + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true } - } - }, - "definitions": { - "Result": { - "description": "Sample result definition", - "properties": { - "sampleProperty": { - "type": "string", - "description": "Sample property of type string" + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/workspaces": { + "get": { + "operationId": "Workspaces_ListBySubscription", + "x-ms-examples": { + "QuantumWorkspacesGet": { + "$ref": "./examples/quantumWorkspacesList.json" + } + }, + "description": "Gets the list of Workspaces within a Subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Workspaces successfully returned.", + "schema": { + "$ref": "#/definitions/WorkspaceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces": { + "get": { + "operationId": "Workspaces_ListByResourceGroup", + "x-ms-examples": { + "QuantumWorkspacesGet": { + "$ref": "./examples/quantumWorkspacesList.json" + } + }, + "description": "Gets the list of Workspaces within a resource group.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Workspaces successfully returned.", + "schema": { + "$ref": "#/definitions/WorkspaceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/offerings": { + "get": { + "description": "Returns the list of all providers available for the given location.", + "operationId": "Offerings_List", + "x-ms-examples": { + "QuantumWorkspacesGet": { + "$ref": "./examples/providerList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Providers details.", + "schema": { + "$ref": "#/definitions/ProviderListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { "ErrorResponse": { "description": "Error response.", "properties": { @@ -103,6 +363,309 @@ "readOnly": true } } + }, + "WorkspaceListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/QuantumWorkspace" + }, + "description": "Result of a list Workspaces operation." + }, + "nextLink": { + "type": "string", + "description": "Link to the next set of results. Not empty if Value contains incomplete list of Namespaces." + } + }, + "description": "The response of a list Workspaces operation." + }, + "ProviderListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderDescription" + }, + "description": "Result of a list Providers operation." + }, + "nextLink": { + "type": "string", + "description": "Link to the next set of results. Not empty if Value contains incomplete list of Namespaces." + } + }, + "description": "The response of a list Providers operation." + }, + "QuantumWorkspace": { + "type": "object", + "description": "The resource proxy definition object for quantum workspace.", + "properties": { + "id": { + "type": "string", + "description": "Gets or sets the id for the resource.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Gets or sets the name of the resource definition.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Gets or sets the type of the resource definition.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "Gets or sets the resource location." + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Gets or sets the properties. Define quantum space's specific properties.", + "allOf": [ + { + "$ref": "#/definitions/WorkspaceResourceProperties" + } + ] + }, + "tags": { + "type": "object", + "description": "Gets or sets the tags." + } + }, + "x-ms-azure-resource": true + }, + "WorkspaceResourceProperties": { + "description": "Properties of a Workspace", + "properties": { + "providers": { + "type": "array", + "description": "Providers selected for a Workspace", + "items": { + "$ref": "#/definitions/Provider" + } + }, + "usable": { + "type": "string", + "enum": [ + "Yes", + "No", + "Partial" + ], + "x-ms-enum": { + "name": "UsableStatus", + "modelAsString": true + }, + "description": "Whether the current workspace is usable." + }, + "provisioningState": { + "type": "string", + "enum": [ + "Succeeded", + "ProviderLaunching", + "ProviderUpdating", + "ProviderDeleting", + "ProviderProvisioning", + "Deleted", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningStatus", + "modelAsString": true + }, + "description": "Provisioning status field" + }, + "storageAccount": { + "type": "string", + "description": "ARM Resource Id of the storage account associated with this workspace." + } + } + }, + "ProviderDescription": { + "type": "object", + "description": "Information about a Provider.", + "properties": { + "id": { + "type": "string", + "description": "Unique Provider's id." + }, + "name": { + "type": "string", + "description": "Provider's display name." + }, + "properties": { + "type": "object", + "description": "A list of Provider-specific properties.", + "allOf": [ + { + "$ref": "#/definitions/ProviderProperties" + } + ] + } + } + }, + "ProviderProperties": { + "type": "object", + "description": "Provider properties.", + "properties": { + "description": { + "type": "string", + "description": "Description about this Provider." + }, + "providerType": { + "type": "string", + "description": "Provider type." + }, + "company": { + "type": "string", + "description": "Company name." + }, + "defaultEndpoint": { + "type": "string", + "description": "Provider's default endpoint." + }, + "aad": { + "type": "object", + "description": "Azure Active Directory info.", + "properties": { + "applicationId": { + "type": "string", + "description": "Provider's application id." + }, + "tenantId": { + "type": "string", + "description": "Provider's tenant id." + } + } + }, + "managedApplication": { + "type": "object", + "description": "Provider's Managed-Application info", + "properties": { + "publisherId": { + "type": "string", + "description": "Provider's publisher id" + }, + "offerId": { + "type": "string", + "description": "Provider's offer id" + } + } + }, + "targets": { + "type": "array", + "description": "The list of targets available from this provider", + "items": { + "$ref": "#/definitions/TargetDescription" + } + }, + "skus": { + "type": "array", + "description": "The list of skus selected for this provider", + "items": { + "$ref": "#/definitions/SkuDescription" + } + } + } + }, + "TargetDescription": { + "type": "object", + "description": "Descript provider's target information to end customer.", + "properties": { + "id": { + "type": "string", + "description": "Unique target id" + }, + "name": { + "type": "string", + "description": "Display name of target" + }, + "description": { + "type": "string", + "description": "Description about this sku" + }, + "acceptedDataFormats": { + "type": "array", + "description": "List of data formats", + "items": { + "type": "string" + } + }, + "acceptedContentEncodings": { + "type": "array", + "description": "List of content encodings", + "items": { + "type": "string" + } + } + } + }, + "SkuDescription": { + "type": "object", + "description": "Descript provider's information to end customer.", + "properties": { + "id": { + "type": "string", + "description": "unique sku id" + }, + "name": { + "type": "string", + "description": "display name of sku" + }, + "description": { + "type": "string", + "description": "Description about this sku" + }, + "targets": { + "type": "array", + "description": "list of targets for the sku", + "items": { + "type": "string" + } + } + } + }, + "Provider": { + "type": "object", + "description": "Json representation of provider, used for json serialization and deserialization and save the meta information of provider.", + "properties": { + "providerId": { + "type": "string", + "description": "partner id field" + }, + "providerSku": { + "type": "string", + "description": "sku field" + }, + "instanceUri": { + "type": "string", + "description": "serviceUri field" + }, + "applicationName": { + "type": "string", + "description": "application name field" + }, + "provisioningState": { + "type": "string", + "enum": [ + "Succeeded", + "Launching", + "Updating", + "Deleting", + "Deleted", + "Failed" + ], + "x-ms-enum": { + "name": "Status", + "modelAsString": true + }, + "description": "Provisioning status field" + }, + "resourceUsageId": { + "type": "string", + "description": "Id to track resource usage for the provider." + } + } } }, "parameters": { @@ -111,14 +674,14 @@ "in": "path", "required": true, "type": "string", - "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + "description": "The Azure subscription ID." }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", + "LocationParameter": { + "name": "locationName", "in": "path", "required": true, "type": "string", - "description": "The name of the resource group.", + "description": "Location.", "x-ms-parameter-location": "method" }, "ApiVersionParameter": { @@ -126,7 +689,23 @@ "in": "query", "required": true, "type": "string", - "description": "The API version to be used with the HTTP request." + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "WorkspaceNameParameter": { + "name": "workspaceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the quantum workspace resource.", + "x-ms-parameter-location": "method" } } } diff --git a/specification/quantum/resource-manager/readme.go.md b/specification/quantum/resource-manager/readme.go.md index 084fbca58b64..06b5c08a481e 100644 --- a/specification/quantum/resource-manager/readme.go.md +++ b/specification/quantum/resource-manager/readme.go.md @@ -14,6 +14,6 @@ These settings apply only when `--tag=package-2019-11-04-preview --go` is specif Please also specify `--go-sdks-folder=`. ```yaml $(tag) == 'package-2019-11-04-preview' && $(go) -namespace: Microsoft.Quantum -output-folder: $(go-sdks-folder)/quantum/Generated +namespace: quantum +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2019-11-04-preview/$(namespace) ``` From 35c2de72a98cd3be9eddb8eae782d7de1574e61c Mon Sep 17 00:00:00 2001 From: Adele Bai Date: Wed, 27 May 2020 13:51:37 -0700 Subject: [PATCH 10/31] Adding MSI fields --- .../examples/quantumWorkspacesDelete.json | 3 +++ .../examples/quantumWorkspacesGet.json | 5 +++++ .../examples/quantumWorkspacesList.json | 5 +++++ .../examples/quantumWorkspacesPatch.json | 8 ++++++++ .../examples/quantumWorkspacesPut.json | 10 ++++++++++ .../preview/2019-11-04-preview/quantum.json | 18 ++++++++++++++++++ 6 files changed, 49 insertions(+) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json index 2352fc824e75..d786a627bbf1 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -31,6 +31,9 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "None" } } } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json index 2a30543b0f92..c7ec79e73bf4 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json @@ -44,6 +44,11 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" } } } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json index 55feda06a0ea..ddfd24341488 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json @@ -30,6 +30,11 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" } } ] diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json index f939cc09057a..99620011be72 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json @@ -21,6 +21,9 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned" } } }, @@ -47,6 +50,11 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" } } } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json index eee88f4d9892..b8d96f0356ad 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json @@ -64,6 +64,11 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" } } }, @@ -98,6 +103,11 @@ "tags": { "department": "MightyMight", "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" } } } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 630efc2c1451..339b5bd0fd43 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -431,6 +431,24 @@ "tags": { "type": "object", "description": "Gets or sets the tags." + }, + "identity": { + "type": "object", + "description": "Managed Identity information", + "properties": { + "type": { + "type": "string", + "description": "Type of identity. Supported: SystemAssigned or None (case insensitive)" + }, + "principalId": { + "type": "string", + "description": "objectId of the managed identity," + }, + "tenantId": { + "type": "string", + "description": "tenantId where the managed identity lives." + } + } } }, "x-ms-azure-resource": true From f3069c0ee0ff44eb9219fd1486a6787be0a96746 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 13 Dec 2020 21:21:40 -0700 Subject: [PATCH 11/31] Incorporating ARM feedback (#1) --- .../examples/providerList.json | 60 +++- .../examples/quantumWorkspacesDelete.json | 5 +- .../preview/2019-11-04-preview/quantum.json | 256 ++++++++++++++---- 3 files changed, 272 insertions(+), 49 deletions(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json index 0349ad2e65d3..366cafeb2b2d 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json @@ -19,6 +19,64 @@ "id": "p1", "description": "CPU annealer algorithm" } + ], + "skus": [ + { + "name": "Standard", + "id": "Standard", + "description": "Provider CPU and FPGA QIO based solver.", + "targets": [ + "p1" + ], + "quotaDimensions": [ + { + "id": "quota1", + "scope": "Workspace" + } + ], + "pricingDetails": [ + { + "id": "price", + "value": "200 dollars" + }, + { + "id": "rate", + "value": "10 hours/month" + } + ] + } + ], + "quotaDimensions": [ + { + "id": "job-count", + "scope": "Workspace", + "period": "Monthly", + "quota": 30, + "name": "Job count", + "description": "The number of jobs you may submit per month", + "unit": "job", + "unitPlural": "jobs" + }, + { + "id": "job-hour", + "scope": "Subscription", + "period": "Monthly", + "quota": 1000, + "name": "Job hours", + "description": "The number of hours of solver time you may use per month", + "unit": "hour", + "unitPlural": "hours" + } + ], + "pricingDimensions": [ + { + "id": "price", + "name": "Pricing" + }, + { + "id": "rate", + "name": "Minimum monthly rate" + } ] } } @@ -26,4 +84,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json index d786a627bbf1..ca9f6f535e27 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -9,7 +9,7 @@ "200": { "description": "Successful." }, - "201": { + "202": { "body": { "name": "quantumworkspace1", "properties": { @@ -36,6 +36,7 @@ "type": "None" } } - } + }, + "204": {} } } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 339b5bd0fd43..401d959efb0b 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -70,7 +70,7 @@ }, "put": { "description": "Creates or updates a workspace resource.", - "operationId": "Workspaces_CreateAndUpdate", + "operationId": "Workspaces_CreateOrUpdate", "x-ms-examples": { "QuantumWorkspacesGet": { "$ref": "./examples/quantumWorkspacesPut.json" @@ -200,10 +200,7 @@ } }, "204": { - "description": "No content.", - "schema": { - "$ref": "#/definitions/QuantumWorkspace" - } + "description": "No content." }, "default": { "description": "Error response describing why the operation failed.", @@ -329,6 +326,35 @@ "nextLinkName": "nextLink" } } + }, + "/providers/Microsoft.Quantum/operations": { + "get": { + "description": "Returns list of operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation details.", + "schema": { + "$ref": "#/definitions/operationsList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -402,35 +428,31 @@ "properties": { "id": { "type": "string", - "description": "Gets or sets the id for the resource.", + "description": "The unique id for this workspace.", "readOnly": true }, "name": { "type": "string", - "description": "Gets or sets the name of the resource definition.", + "description": "The name of this workspace.", "readOnly": true }, "type": { "type": "string", - "description": "Gets or sets the type of the resource definition.", + "description": "The type of this workspace.", "readOnly": true }, "location": { "type": "string", - "description": "Gets or sets the resource location." + "description": "The location (region) of this workspace." }, "properties": { "x-ms-client-flatten": true, "description": "Gets or sets the properties. Define quantum space's specific properties.", - "allOf": [ - { - "$ref": "#/definitions/WorkspaceResourceProperties" - } - ] + "$ref": "#/definitions/WorkspaceResourceProperties" }, "tags": { "type": "object", - "description": "Gets or sets the tags." + "description": "The tags associated with this workspace." }, "identity": { "type": "object", @@ -458,7 +480,7 @@ "properties": { "providers": { "type": "array", - "description": "Providers selected for a Workspace", + "description": "List of Providers selected for this Workspace", "items": { "$ref": "#/definitions/Provider" } @@ -474,7 +496,7 @@ "name": "UsableStatus", "modelAsString": true }, - "description": "Whether the current workspace is usable." + "description": "Whether the current workspace is ready to accept Jobs." }, "provisioningState": { "type": "string", @@ -493,6 +515,10 @@ }, "description": "Provisioning status field" }, + "resourceUsageId": { + "type": "string", + "description": "Unique id to track resource usage." + }, "storageAccount": { "type": "string", "description": "ARM Resource Id of the storage account associated with this workspace." @@ -501,11 +527,11 @@ }, "ProviderDescription": { "type": "object", - "description": "Information about a Provider.", + "description": "Information about a Provider. A Provider is an entity that offers Targets to run Azure Quantum Jobs.", "properties": { "id": { "type": "string", - "description": "Unique Provider's id." + "description": "Unique provider's id." }, "name": { "type": "string", @@ -513,12 +539,8 @@ }, "properties": { "type": "object", - "description": "A list of Provider-specific properties.", - "allOf": [ - { - "$ref": "#/definitions/ProviderProperties" - } - ] + "description": "A list of provider-specific properties.", + "$ref": "#/definitions/ProviderProperties" } } }, @@ -528,7 +550,7 @@ "properties": { "description": { "type": "string", - "description": "Description about this Provider." + "description": "A description about this provider." }, "providerType": { "type": "string", @@ -562,56 +584,70 @@ "properties": { "publisherId": { "type": "string", - "description": "Provider's publisher id" + "description": "Provider's publisher id." }, "offerId": { "type": "string", - "description": "Provider's offer id" + "description": "Provider's offer id." } } }, "targets": { "type": "array", - "description": "The list of targets available from this provider", + "description": "The list of targets available from this provider.", "items": { "$ref": "#/definitions/TargetDescription" } }, "skus": { "type": "array", - "description": "The list of skus selected for this provider", + "description": "The list of skus available from this provider.", "items": { "$ref": "#/definitions/SkuDescription" } + }, + "quotaDimensions": { + "type": "array", + "description": "The list of quota dimensions from the provider.", + "items": { + "$ref": "#/definitions/QuotaDimension" + } + }, + "pricingDimensions": { + "type": "array", + "description": "The list of pricing dimensions from the provider.", + "items": { + "$ref": "#/definitions/PricingDimension" + } } } }, "TargetDescription": { "type": "object", - "description": "Descript provider's target information to end customer.", + "description": "Information about a Target. A target is the component that can process a specific type of Job.", "properties": { "id": { "type": "string", - "description": "Unique target id" + "description": "Unique target id." }, "name": { "type": "string", - "description": "Display name of target" + "description": "Display name of this target." }, "description": { "type": "string", - "description": "Description about this sku" + "description": "A description about this target." }, "acceptedDataFormats": { "type": "array", - "description": "List of data formats", + "description": "List of data formats accepted by this target.", "items": { "type": "string" } }, "acceptedContentEncodings": { "type": "array", - "description": "List of content encodings", + "description": "List of content encodings accepted by this target.", "items": { "type": "string" } @@ -620,48 +656,128 @@ }, "SkuDescription": { "type": "object", - "description": "Descript provider's information to end customer.", + "description": "Information about a specific sku.", "properties": { "id": { "type": "string", - "description": "unique sku id" + "description": "Unique sku id." }, "name": { "type": "string", - "description": "display name of sku" + "description": "Display name of this sku." }, "description": { "type": "string", - "description": "Description about this sku" + "description": "Description about this sku." }, "targets": { "type": "array", - "description": "list of targets for the sku", + "description": "The list of targets available for this sku.", "items": { "type": "string" } + }, + "quotaDimensions": { + "type": "array", + "description": "The list of quota dimensions for this sku.", + "items": { + "$ref": "#/definitions/QuotaDimension" + } + }, + "pricingDetails": { + "type": "array", + "description": "The list of pricing details for the sku.", + "items": { + "$ref": "#/definitions/PricingDetail" + } + } + } + }, + "QuotaDimension": { + "type": "object", + "description": "Information about a specific quota dimension.", + "properties": { + "id": { + "type": "string", + "description": "Unique id of this dimension." + }, + "scope": { + "type": "string", + "description": "The scope of this quota dimension." + }, + "period": { + "type": "string", + "description": "The reset period of this quota dimension." + }, + "quota": { + "type": "number", + "description": "The max limit of this dimension." + }, + "name": { + "type": "string", + "description": "The display name of this quota dimension." + }, + "description": { + "type": "string", + "description": "A description about this quota dimension." + }, + "unit": { + "type": "string", + "description": "The standard unit of measurement used for this quota dimension." + }, + "unitPlural": { + "type": "string", + "description": "The standard unit of measurement used for this quota dimension in plural form." + } + } + }, + "PricingDetail": { + "type": "object", + "description": "Detailed pricing information for an sku.", + "properties": { + "id": { + "type": "string", + "description": "Unique id for this pricing information." + }, + "value": { + "type": "string", + "description": "The unit cost of this sku." + } + } + }, + "PricingDimension": { + "type": "object", + "description": "Information about pricing dimension.", + "properties": { + "id": { + "type": "string", + "description": "Unique id of this pricing dimension." + }, + "name": { + "type": "string", + "description": "The display name of this pricing dimension." } } }, "Provider": { "type": "object", - "description": "Json representation of provider, used for json serialization and deserialization and save the meta information of provider.", + "description": "Information about a Provider. A Provider is an entity that offers Targets to run Azure Quantum Jobs.", "properties": { "providerId": { "type": "string", - "description": "partner id field" + "description": "Unique id of this provider." }, "providerSku": { "type": "string", - "description": "sku field" + "description": "The sku associated with pricing information for this provider." }, "instanceUri": { "type": "string", - "description": "serviceUri field" + "description": "A Uri identifying the specific instance of this provider." }, "applicationName": { "type": "string", - "description": "application name field" + "description": "The provider's marketplace application display name." }, "provisioningState": { "type": "string", @@ -684,6 +800,54 @@ "description": "Id to track resource usage for the provider." } } + }, + "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 d6b69b0b2b0f83c3ccd6867e7078caa7d6367072 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Thu, 17 Dec 2020 15:30:41 -0800 Subject: [PATCH 12/31] Picking up changes from RPSaaS. --- .../examples/quantumWorkspacesDelete.json | 2 +- .../preview/2019-11-04-preview/quantum.json | 29 +++++++++++++++---- .../quantum/resource-manager/readme.md | 1 + 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json index ca9f6f535e27..1dfae9fdcb4d 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -36,7 +36,7 @@ "type": "None" } } - }, + }, "204": {} } } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 401d959efb0b..70a53e16a68e 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -11,11 +11,17 @@ "schemes": [ "https" ], - "consumes": [ "application/json" ], - "produces": [ "application/json" ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "security": [ { - "azure_auth": [ "user_impersonation" ] + "azure_auth": [ + "user_impersonation" + ] } ], "securityDefinitions": { @@ -119,7 +125,10 @@ } } }, - "x-ms-long-running-operation": true + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } }, "patch": { "operationId": "Workspaces_Update", @@ -200,7 +209,7 @@ } }, "204": { - "description": "No content." + "description": "No content - The job was successfully cancelled." }, "default": { "description": "Error response describing why the operation failed.", @@ -808,6 +817,10 @@ "type": "string", "description": "Name of the operation" }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, "display": { "type": "object", "description": "Properties of the operation", @@ -834,6 +847,7 @@ }, "operationsList": { "description": "Lists the operations available.", + "type": "object", "properties": { "nextLink": { "description": "Url to follow for getting next page of operations.", @@ -841,13 +855,16 @@ }, "value": { "description": "Array of operations", + "uniqueItems": false, "type": "array", "items": { "$ref": "#/definitions/operation" } } }, - "required": [ "value" ] + "required": [ + "value" + ] } }, "parameters": { diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md index efac1ac44344..4ec86bef27cb 100644 --- a/specification/quantum/resource-manager/readme.md +++ b/specification/quantum/resource-manager/readme.md @@ -26,6 +26,7 @@ These are the global settings for the quantum. ```yaml openapi-type: arm +openapi-subtype: rpaas tag: package-2019-11-04-preview ``` From ce09f14017b67e999b80f97f528055acff9b9df8 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sat, 19 Dec 2020 16:31:48 -0800 Subject: [PATCH 13/31] -ruby --- .../quantum/resource-manager/readme.md | 7 ------- .../quantum/resource-manager/readme.ruby.md | 19 ------------------- 2 files changed, 26 deletions(-) delete mode 100644 specification/quantum/resource-manager/readme.ruby.md diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md index 4ec86bef27cb..505c491141dc 100644 --- a/specification/quantum/resource-manager/readme.md +++ b/specification/quantum/resource-manager/readme.md @@ -54,9 +54,6 @@ swagger-to-sdk: - repo: azure-sdk-for-java - repo: azure-sdk-for-go - repo: azure-sdk-for-js - - repo: azure-sdk-for-ruby - after_scripts: - - bundle install && rake arm:regen_all_profiles['azure_mgmt_quantum'] ``` ## Go @@ -67,10 +64,6 @@ See configuration in [readme.go.md](./readme.go.md) See configuration in [readme.python.md](./readme.python.md) -## Ruby - -See configuration in [readme.ruby.md](./readme.ruby.md) - ## TypeScript See configuration in [readme.typescript.md](./readme.typescript.md) diff --git a/specification/quantum/resource-manager/readme.ruby.md b/specification/quantum/resource-manager/readme.ruby.md deleted file mode 100644 index 75e6147d4df2..000000000000 --- a/specification/quantum/resource-manager/readme.ruby.md +++ /dev/null @@ -1,19 +0,0 @@ -## Ruby - -These settings apply only when `--ruby` is specified on the command line. - -```yaml -package-name: azure_mgmt_quantum -package-version: 2019-11-04-preview -azure-arm: true -``` - -### Tag: package-2019-11-04-preview and ruby - -These settings apply only when `--tag=package-2019-11-04-preview --ruby` is specified on the command line. -Please also specify `--ruby-sdks-folder=`. - -```yaml $(tag) == 'package-2019-11-04-preview' && $(ruby) -namespace: Microsoft.Quantum -output-folder: $(ruby-sdks-folder)/quantum -``` From 48cdc2e97cb40eaae326e5bbc61ce1cb0c0bb3e8 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sat, 19 Dec 2020 16:33:35 -0800 Subject: [PATCH 14/31] go --- specification/quantum/resource-manager/readme.go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/quantum/resource-manager/readme.go.md b/specification/quantum/resource-manager/readme.go.md index 06b5c08a481e..af98cf12b7aa 100644 --- a/specification/quantum/resource-manager/readme.go.md +++ b/specification/quantum/resource-manager/readme.go.md @@ -5,6 +5,7 @@ These settings apply only when `--go` is specified on the command line. ```yaml $(go) go: license-header: MICROSOFT_APACHE_NO_VERSION + namespace: quantum clear-output-folder: true ``` @@ -14,6 +15,5 @@ These settings apply only when `--tag=package-2019-11-04-preview --go` is specif Please also specify `--go-sdks-folder=`. ```yaml $(tag) == 'package-2019-11-04-preview' && $(go) -namespace: quantum -output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2019-11-04-preview/$(namespace) +output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2019-11-04-preview/$(namespace) ``` From e944abbd3a722400763c16b9649801702fae321f Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 20 Dec 2020 11:06:11 -0800 Subject: [PATCH 15/31] clean up readme config --- .../quantum/resource-manager/readme.csharp.md | 6 +++--- .../quantum/resource-manager/readme.python.md | 16 +++++++++++----- .../resource-manager/readme.typescript.md | 8 ++++++-- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/specification/quantum/resource-manager/readme.csharp.md b/specification/quantum/resource-manager/readme.csharp.md index b7dd205ebd8e..d6de9dc93897 100644 --- a/specification/quantum/resource-manager/readme.csharp.md +++ b/specification/quantum/resource-manager/readme.csharp.md @@ -9,7 +9,7 @@ csharp: license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 1 clear-output-folder: true - client-side-validation: false - namespace: Microsoft.Quantum - output-folder: $(csharp-sdks-folder)/quantum/management/Microsoft.Quantum/GeneratedProtocol + client-side-validation: true + namespace: Microsoft.Azure.Management.Quantum + output-folder: $(csharp-sdks-folder)/quantum/Microsoft.Azure.Management.Quantum/src/Generated ``` diff --git a/specification/quantum/resource-manager/readme.python.md b/specification/quantum/resource-manager/readme.python.md index 1024661a26d4..8764251969bf 100644 --- a/specification/quantum/resource-manager/readme.python.md +++ b/specification/quantum/resource-manager/readme.python.md @@ -4,18 +4,24 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. ```yaml $(python) +python-mode: create python: azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 - namespace: Microsoft.Quantum - package-name: quantum - package-version: 2019-11-04-preview + namespace: azure.mgmt.quantum + package-name: azure-mgmt-quantum clear-output-folder: true ``` -```yaml $(python) +``` yaml $(python) && $(python-mode) == 'update' python: no-namespace-folders: true - output-folder: $(python-sdks-folder)/azure-mgmt/quantum + output-folder: $(python-sdks-folder)/quantum/azure-mgmt-quantum/azure/mgmt/quantum +``` + +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/quantum/azure-mgmt-quantum ``` diff --git a/specification/quantum/resource-manager/readme.typescript.md b/specification/quantum/resource-manager/readme.typescript.md index 995a0be4829e..eacb05cfe947 100644 --- a/specification/quantum/resource-manager/readme.typescript.md +++ b/specification/quantum/resource-manager/readme.typescript.md @@ -6,8 +6,12 @@ Please also specify `--typescript-sdks-folder= Date: Sun, 20 Dec 2020 11:07:00 -0800 Subject: [PATCH 16/31] -java --- specification/quantum/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md index 505c491141dc..c459bdc0d825 100644 --- a/specification/quantum/resource-manager/readme.md +++ b/specification/quantum/resource-manager/readme.md @@ -51,7 +51,6 @@ 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-go - repo: azure-sdk-for-js ``` From 8f72a92b3fce57b5823d50b952dd11261e98f214 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Mon, 21 Dec 2020 10:47:38 -0800 Subject: [PATCH 17/31] preview path --- specification/quantum/resource-manager/readme.go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/quantum/resource-manager/readme.go.md b/specification/quantum/resource-manager/readme.go.md index af98cf12b7aa..23eea7fa2ec8 100644 --- a/specification/quantum/resource-manager/readme.go.md +++ b/specification/quantum/resource-manager/readme.go.md @@ -15,5 +15,5 @@ These settings apply only when `--tag=package-2019-11-04-preview --go` is specif Please also specify `--go-sdks-folder=`. ```yaml $(tag) == 'package-2019-11-04-preview' && $(go) -output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2019-11-04-preview/$(namespace) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2019-11-04-preview/$(namespace) ``` From 9a9bc15acd3ab1e948355d7d769891f70428c506 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Mon, 21 Dec 2020 11:34:54 -0800 Subject: [PATCH 18/31] python version --- specification/quantum/resource-manager/readme.python.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/quantum/resource-manager/readme.python.md b/specification/quantum/resource-manager/readme.python.md index 8764251969bf..7fd49b19ae9c 100644 --- a/specification/quantum/resource-manager/readme.python.md +++ b/specification/quantum/resource-manager/readme.python.md @@ -12,6 +12,7 @@ python: namespace: azure.mgmt.quantum package-name: azure-mgmt-quantum clear-output-folder: true + package-version: 0.14.2012 ``` ``` yaml $(python) && $(python-mode) == 'update' From 2a0a373a1d33a2d41f7150fb5c0daeff841b5c70 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Tue, 22 Dec 2020 22:17:35 -0800 Subject: [PATCH 19/31] incorporate feedback --- .../examples/quantumWorkspacesDelete.json | 2 +- .../examples/quantumWorkspacesGet.json | 2 +- .../quantumWorkspacesListResourceGroup.json | 43 +++++++++++++++++++ .../quantumWorkspacesListSubscription.json | 42 ++++++++++++++++++ .../examples/quantumWorkspacesPatch.json | 2 +- .../examples/quantumWorkspacesPut.json | 2 +- .../preview/2019-11-04-preview/quantum.json | 29 +++++++------ 7 files changed, 105 insertions(+), 17 deletions(-) create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json index 1dfae9fdcb4d..477fe3c196be 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -2,7 +2,7 @@ "parameters": { "workspaceName": "quantumworkspace1", "resourceGroupName": "quantumResourcegroup", - "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "subscriptionId": "00000000-1111-2222-3333-444444444444", "api-version": "2019-11-04-preview" }, "responses": { diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json index c7ec79e73bf4..ec3ad76e9ca8 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json @@ -2,7 +2,7 @@ "parameters": { "workspaceName": "quantumworkspace1", "resourceGroupName": "quantumResourcegroup", - "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "subscriptionId": "00000000-1111-2222-3333-444444444444", "api-version": "2019-11-04-preview" }, "responses": { diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json new file mode 100644 index 000000000000..b14994a111b1 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" + } + } + ] + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json new file mode 100644 index 000000000000..54de00d935c9 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "quantumworkspace1", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "department": "MightyMight", + "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" + } + } + ] + } + } + } +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json index 99620011be72..7b9457aa6e66 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json @@ -2,7 +2,7 @@ "parameters": { "workspaceName": "quantumworkspace1", "resourceGroupName": "quantumResourcegroup", - "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "subscriptionId": "00000000-1111-2222-3333-444444444444", "api-version": "2019-11-04-preview", "QuantumWorkspace": { "location": "West US", diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json index b8d96f0356ad..bd3aba8c6d50 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json @@ -2,7 +2,7 @@ "parameters": { "workspaceName": "quantumworkspace1", "resourceGroupName": "quantumResourcegroup", - "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", + "subscriptionId": "00000000-1111-2222-3333-444444444444", "api-version": "2019-11-04-preview", "QuantumWorkspace": { "location": "West US", diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 70a53e16a68e..11be48fb73cf 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -78,7 +78,7 @@ "description": "Creates or updates a workspace resource.", "operationId": "Workspaces_CreateOrUpdate", "x-ms-examples": { - "QuantumWorkspacesGet": { + "QuantumWorkspacesPut": { "$ref": "./examples/quantumWorkspacesPut.json" } }, @@ -133,7 +133,7 @@ "patch": { "operationId": "Workspaces_Update", "x-ms-examples": { - "QuantumWorkspacesGet": { + "QuantumWorkspacesUpdate": { "$ref": "./examples/quantumWorkspacesPatch.json" } }, @@ -180,7 +180,7 @@ "description": "Deletes a Workspace resource.", "operationId": "Workspaces_Delete", "x-ms-examples": { - "QuantumWorkspacesGet": { + "QuantumWorkspacesDelete": { "$ref": "./examples/quantumWorkspacesDelete.json" } }, @@ -225,8 +225,8 @@ "get": { "operationId": "Workspaces_ListBySubscription", "x-ms-examples": { - "QuantumWorkspacesGet": { - "$ref": "./examples/quantumWorkspacesList.json" + "QuantumWorkspacesListBySubscription": { + "$ref": "./examples/quantumWorkspacesListSubscription.json" } }, "description": "Gets the list of Workspaces within a Subscription.", @@ -261,8 +261,8 @@ "get": { "operationId": "Workspaces_ListByResourceGroup", "x-ms-examples": { - "QuantumWorkspacesGet": { - "$ref": "./examples/quantumWorkspacesList.json" + "QuantumWorkspacesListByResourceGroup": { + "$ref": "./examples/quantumWorkspacesListResourceGroup.json" } }, "description": "Gets the list of Workspaces within a resource group.", @@ -301,7 +301,7 @@ "description": "Returns the list of all providers available for the given location.", "operationId": "Offerings_List", "x-ms-examples": { - "QuantumWorkspacesGet": { + "ProviderList": { "$ref": "./examples/providerList.json" } }, @@ -410,7 +410,7 @@ }, "nextLink": { "type": "string", - "description": "Link to the next set of results. Not empty if Value contains incomplete list of Namespaces." + "description": "Link to the next set of results. Not empty if Value contains incomplete list of Workspaces." } }, "description": "The response of a list Workspaces operation." @@ -426,7 +426,7 @@ }, "nextLink": { "type": "string", - "description": "Link to the next set of results. Not empty if Value contains incomplete list of Namespaces." + "description": "Link to the next set of results. Not empty if Value contains incomplete list of Providers." } }, "description": "The response of a list Providers operation." @@ -505,7 +505,8 @@ "name": "UsableStatus", "modelAsString": true }, - "description": "Whether the current workspace is ready to accept Jobs." + "description": "Whether the current workspace is ready to accept Jobs.", + "readOnly": true }, "provisioningState": { "type": "string", @@ -522,11 +523,13 @@ "name": "ProvisioningStatus", "modelAsString": true }, - "description": "Provisioning status field" + "description": "Provisioning status field", + "readOnly": true }, "resourceUsageId": { "type": "string", - "description": "Unique id to track resource usage." + "description": "Unique id to track resource usage.", + "readOnly": true }, "storageAccount": { "type": "string", From 0de2c709780cd16d3b6b84ef1b1097a7ef99a454 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Tue, 22 Dec 2020 22:37:46 -0800 Subject: [PATCH 20/31] read-only --- .../preview/2019-11-04-preview/quantum.json | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 11be48fb73cf..9c1d7ab451c2 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -547,7 +547,8 @@ }, "name": { "type": "string", - "description": "Provider's display name." + "description": "Provider's display name.", + "readOnly": true }, "properties": { "type": "object", @@ -562,19 +563,23 @@ "properties": { "description": { "type": "string", - "description": "A description about this provider." + "description": "A description about this provider.", + "readOnly": true }, "providerType": { "type": "string", - "description": "Provider type." + "description": "Provider type.", + "readOnly": true }, "company": { "type": "string", - "description": "Company name." + "description": "Company name.", + "readOnly": true }, "defaultEndpoint": { "type": "string", - "description": "Provider's default endpoint." + "description": "Provider's default endpoint.", + "readOnly": true }, "aad": { "type": "object", @@ -582,11 +587,13 @@ "properties": { "applicationId": { "type": "string", - "description": "Provider's application id." + "description": "Provider's application id.", + "readOnly": true }, "tenantId": { "type": "string", - "description": "Provider's tenant id." + "description": "Provider's tenant id.", + "readOnly": true } } }, @@ -596,11 +603,13 @@ "properties": { "publisherId": { "type": "string", - "description": "Provider's publisher id." + "description": "Provider's publisher id.", + "readOnly": true }, "offerId": { "type": "string", - "description": "Provider's offer id." + "description": "Provider's offer id.", + "readOnly": true } } }, From 7269aa8104376de95c66f35275a6e2a90cc84c78 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Tue, 22 Dec 2020 22:38:25 -0800 Subject: [PATCH 21/31] ids --- .../examples/quantumWorkspacesDelete.json | 2 + .../examples/quantumWorkspacesGet.json | 2 + .../examples/quantumWorkspacesList.json | 44 ------------------- .../quantumWorkspacesListResourceGroup.json | 4 +- .../quantumWorkspacesListSubscription.json | 4 +- .../examples/quantumWorkspacesPatch.json | 2 + .../examples/quantumWorkspacesPut.json | 2 + 7 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json index 477fe3c196be..56047beed0f1 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -11,7 +11,9 @@ }, "202": { "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", "properties": { "providers": [ { diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json index ec3ad76e9ca8..ddc6be2f00fe 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json @@ -8,7 +8,9 @@ "responses": { "200": { "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", "properties": { "providers": [ { diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json deleted file mode 100644 index ddfd24341488..000000000000 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesList.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "parameters": { - "workspaceName": "quantumworkspace1", - "resourceGroupName": "quantumResourcegroup", - "subscriptionId": "1C4B2828-7D49-494F-933D-061373BE28C2", - "api-version": "2019-11-04-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "quantumworkspace1", - "properties": { - "providers": [ - { - "providerId": "Honeywell", - "providerSku": "Basic", - "applicationName": "quantumworkspace1-h1", - "instanceUri": "https://h1.endpoint.com", - "provisioningState": "Succeeded", - "resourceUsageId": "00000000-1111-2222-3333-444444444444" - } - ], - "provisioningState": "Succeeded", - "usable": "Yes", - "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" - }, - "location": "West US", - "tags": { - "department": "MightyMight", - "company": "Contoso" - }, - "identity": { - "type": "SystemAssigned", - "principalId": "00000000-1111-2222-3333-444444444444", - "tenantId": "00000000-1111-2222-3333-444444444444" - } - } - ] - } - } - } -} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json index b14994a111b1..4bb64a9c8adb 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json @@ -9,7 +9,9 @@ "body": { "value": [ { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", "properties": { "providers": [ { @@ -40,4 +42,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json index 54de00d935c9..74ff70f28213 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json @@ -8,7 +8,9 @@ "body": { "value": [ { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", "properties": { "providers": [ { @@ -39,4 +41,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json index 7b9457aa6e66..98f841d2cad8 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json @@ -30,7 +30,9 @@ "responses": { "200": { "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", "properties": { "providers": [ { diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json index bd3aba8c6d50..6fc178554abc 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json @@ -28,7 +28,9 @@ "responses": { "200": { "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", "properties": { "providers": [ { From a555cf2042980028d2b1996b03f2fdc8ffa03ebd Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Tue, 22 Dec 2020 22:43:05 -0800 Subject: [PATCH 22/31] prettier --- .../examples/quantumWorkspacesListResourceGroup.json | 2 +- .../examples/quantumWorkspacesListSubscription.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json index 4bb64a9c8adb..ac297ba5f758 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json @@ -42,4 +42,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json index 74ff70f28213..f11d508df81e 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json @@ -41,4 +41,4 @@ } } } -} \ No newline at end of file +} From fca97b926dbe128bd767aa4a003b4129a29cf6dc Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Fri, 8 Jan 2021 10:25:21 -0800 Subject: [PATCH 23/31] removing patch --- .../examples/quantumWorkspacesPatch.json | 64 ------------------- .../preview/2019-11-04-preview/quantum.json | 46 ------------- 2 files changed, 110 deletions(-) delete mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json deleted file mode 100644 index 98f841d2cad8..000000000000 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "parameters": { - "workspaceName": "quantumworkspace1", - "resourceGroupName": "quantumResourcegroup", - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "api-version": "2019-11-04-preview", - "QuantumWorkspace": { - "location": "West US", - "properties": { - "providers": [ - { - "providerId": "Honeywell", - "providerSku": "Basic", - "applicationName": "quantumworkspace1-h1", - "instanceUri": "https://h1.endpoint.com", - "provisioningState": "Succeeded" - } - ], - "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" - }, - "tags": { - "department": "MightyMight", - "company": "Contoso" - }, - "identity": { - "type": "SystemAssigned" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", - "name": "quantumworkspace1", - "type": "Microsoft.Quantum/Workspaces", - "properties": { - "providers": [ - { - "providerId": "Honeywell", - "providerSku": "Basic", - "applicationName": "quantumworkspace1-h1", - "instanceUri": "https://h1.endpoint.com", - "provisioningState": "Succeeded", - "resourceUsageId": "00000000-1111-2222-3333-444444444444" - } - ], - "provisioningState": "Succeeded", - "usable": "Yes", - "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" - }, - "location": "West US", - "tags": { - "department": "MightyMight", - "company": "Contoso" - }, - "identity": { - "type": "SystemAssigned", - "principalId": "00000000-1111-2222-3333-444444444444", - "tenantId": "00000000-1111-2222-3333-444444444444" - } - } - } - } -} diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 9c1d7ab451c2..2470a793423a 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -130,52 +130,6 @@ "final-state-via": "azure-async-operation" } }, - "patch": { - "operationId": "Workspaces_Update", - "x-ms-examples": { - "QuantumWorkspacesUpdate": { - "$ref": "./examples/quantumWorkspacesPatch.json" - } - }, - "description": "Updates a Workspace resource.", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkspaceNameParameter" - }, - { - "name": "QuantumWorkspace", - "description": "Quantum workspace details.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/QuantumWorkspace" - } - } - ], - "responses": { - "200": { - "description": "Workspace updated successfully.", - "schema": { - "$ref": "#/definitions/QuantumWorkspace" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, "delete": { "description": "Deletes a Workspace resource.", "operationId": "Workspaces_Delete", From 16ff0ffe207a53ae3dec3db8966edfa08e4a537b Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Mon, 11 Jan 2021 14:14:04 -0800 Subject: [PATCH 24/31] addressing feedback --- .../{providerList.json => offeringsList.json} | 0 .../examples/quantumWorkspacesDelete.json | 29 +--- .../preview/2019-11-04-preview/quantum.json | 124 ++++++------------ 3 files changed, 40 insertions(+), 113 deletions(-) rename specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/{providerList.json => offeringsList.json} (100%) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.json similarity index 100% rename from specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/providerList.json rename to specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json index 56047beed0f1..f06603a06880 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -10,34 +10,7 @@ "description": "Successful." }, "202": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", - "name": "quantumworkspace1", - "type": "Microsoft.Quantum/Workspaces", - "properties": { - "providers": [ - { - "providerId": "Honeywell", - "providerSku": "Basic", - "applicationName": "quantumworkspace1-h1", - "instanceUri": "https://h1.endpoint.com", - "provisioningState": "Deleting", - "resourceUsageId": "00000000-1111-2222-3333-444444444444" - } - ], - "provisioningState": "ProviderDeleting", - "usable": "No", - "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" - }, - "location": "West US", - "tags": { - "department": "MightyMight", - "company": "Contoso" - }, - "identity": { - "type": "None" - } - } + "description": "Workspace delete request accepted." }, "204": {} } diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 2470a793423a..39388ad3dca5 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -69,7 +69,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } } @@ -121,7 +121,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, @@ -157,18 +157,15 @@ "description": "Successful." }, "202": { - "description": "Workspace delete request accepted.", - "schema": { - "$ref": "#/definitions/QuantumWorkspace" - } + "description": "Workspace delete request accepted." }, "204": { - "description": "No content - The job was successfully cancelled." + "description": "No content - The workspace doesn't exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, @@ -202,7 +199,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, @@ -241,7 +238,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, @@ -252,11 +249,11 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/offerings": { "get": { - "description": "Returns the list of all providers available for the given location.", + "description": "Returns the list of all provider offerings available for the given location.", "operationId": "Offerings_List", "x-ms-examples": { - "ProviderList": { - "$ref": "./examples/providerList.json" + "OfferingsList": { + "$ref": "./examples/offeringsList.json" } }, "parameters": [ @@ -272,15 +269,15 @@ ], "responses": { "200": { - "description": "Providers details.", + "description": "Offerings details.", "schema": { - "$ref": "#/definitions/ProviderListResult" + "$ref": "#/definitions/OfferingsListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, @@ -309,7 +306,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, @@ -321,38 +318,6 @@ } }, "definitions": { - "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 - } - } - }, "WorkspaceListResult": { "properties": { "value": { @@ -369,7 +334,7 @@ }, "description": "The response of a list Workspaces operation." }, - "ProviderListResult": { + "OfferingsListResult": { "properties": { "value": { "type": "array", @@ -389,25 +354,6 @@ "type": "object", "description": "The resource proxy definition object for quantum workspace.", "properties": { - "id": { - "type": "string", - "description": "The unique id for this workspace.", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of this workspace.", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of this workspace.", - "readOnly": true - }, - "location": { - "type": "string", - "description": "The location (region) of this workspace." - }, "properties": { "x-ms-client-flatten": true, "description": "Gets or sets the properties. Define quantum space's specific properties.", @@ -419,24 +365,38 @@ }, "identity": { "type": "object", - "description": "Managed Identity information", + "description": "Managed Identity information.", "properties": { - "type": { - "type": "string", - "description": "Type of identity. Supported: SystemAssigned or None (case insensitive)" - }, "principalId": { + "readOnly": true, "type": "string", - "description": "objectId of the managed identity," + "description": "The principal ID of resource identity." }, "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { "type": "string", - "description": "tenantId where the managed identity lives." + "description": "The identity type.", + "enum": [ + "SystemAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": true + } } } } }, - "x-ms-azure-resource": true + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" + } + ] }, "WorkspaceResourceProperties": { "description": "Properties of a Workspace", @@ -470,7 +430,6 @@ "ProviderUpdating", "ProviderDeleting", "ProviderProvisioning", - "Deleted", "Failed" ], "x-ms-enum": { @@ -480,11 +439,6 @@ "description": "Provisioning status field", "readOnly": true }, - "resourceUsageId": { - "type": "string", - "description": "Unique id to track resource usage.", - "readOnly": true - }, "storageAccount": { "type": "string", "description": "ARM Resource Id of the storage account associated with this workspace." @@ -493,7 +447,7 @@ }, "ProviderDescription": { "type": "object", - "description": "Information about a Provider. A Provider is an entity that offers Targets to run Azure Quantum Jobs.", + "description": "Information about an offering. A provider offering is an entity that offers Targets to run Azure Quantum Jobs.", "properties": { "id": { "type": "string", @@ -873,4 +827,4 @@ "x-ms-parameter-location": "method" } } -} +} \ No newline at end of file From 90c55118bec29e25027b747c679cb34da7d898e4 Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Mon, 11 Jan 2021 14:25:10 -0800 Subject: [PATCH 25/31] prettier fix --- .../Microsoft.Quantum/preview/2019-11-04-preview/quantum.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 39388ad3dca5..23ec64620278 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -827,4 +827,4 @@ "x-ms-parameter-location": "method" } } -} \ No newline at end of file +} From 48fbef79b1df6646e3770ee5a96ebea044aaf7b3 Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Mon, 11 Jan 2021 15:05:28 -0800 Subject: [PATCH 26/31] removing tags - coming from TrackedResource --- .../Microsoft.Quantum/preview/2019-11-04-preview/quantum.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 23ec64620278..d09da939bcbc 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -359,10 +359,6 @@ "description": "Gets or sets the properties. Define quantum space's specific properties.", "$ref": "#/definitions/WorkspaceResourceProperties" }, - "tags": { - "type": "object", - "description": "The tags associated with this workspace." - }, "identity": { "type": "object", "description": "Managed Identity information.", From d5dc61c7c4ce475fa049b4aaa8423f7717044f70 Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Mon, 11 Jan 2021 16:02:43 -0800 Subject: [PATCH 27/31] un-referencing trackedresource --- .../preview/2019-11-04-preview/quantum.json | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index d09da939bcbc..7bc03fabd5a2 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -354,11 +354,34 @@ "type": "object", "description": "The resource proxy definition object for quantum workspace.", "properties": { + "id": { + "type": "string", + "description": "The unique id for this workspace.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of this workspace.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The type of this workspace.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "The location (region) of this workspace." + }, "properties": { "x-ms-client-flatten": true, "description": "Gets or sets the properties. Define quantum space's specific properties.", "$ref": "#/definitions/WorkspaceResourceProperties" }, + "tags": { + "type": "object", + "description": "The tags associated with this workspace." + }, "identity": { "type": "object", "description": "Managed Identity information.", @@ -388,11 +411,7 @@ } } }, - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" - } - ] + "x-ms-azure-resource": true }, "WorkspaceResourceProperties": { "description": "Properties of a Workspace", From a33b38705be4384cf2f423f2f40ba22cfcd23e39 Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Wed, 13 Jan 2021 12:01:30 -0800 Subject: [PATCH 28/31] adding patch, referring to the common-type tracked resource --- .../examples/quantumWorkspacesPatch.json | 64 ++++++++++++++ .../preview/2019-11-04-preview/quantum.json | 87 ++++++++++++++----- 2 files changed, 127 insertions(+), 24 deletions(-) create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json new file mode 100644 index 000000000000..e5c20f1c77de --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview", + "workspaceTags": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/quantumResourcegroup/providers/Microsoft.Quantum/Workspaces/quantumworkspace1", + "name": "quantumworkspace1", + "type": "Microsoft.Quantum/Workspaces", + "properties": { + "providers": [ + { + "providerId": "Honeywell", + "providerSku": "Basic", + "applicationName": "quantumworkspace1-h1", + "instanceUri": "https://h1.endpoint.com", + "provisioningState": "Succeeded", + "resourceUsageId": "00000000-1111-2222-3333-444444444444" + }, + { + "providerId": "IonQ", + "provisioningState": "Succeeded", + "applicationName": "quantumworkspace1-i1", + "instanceUri": "https://i1.endpoint.com", + "providerSku": "Basic", + "resourceUsageId": "00000000-1111-2222-3333-444444444445" + }, + { + "providerId": "OneQBit", + "provisioningState": "Succeeded", + "applicationName": "quantumworkspace1-o1", + "instanceUri": "https://o1.endpoint.com", + "providerSku": "Basic", + "resourceUsageId": "00000000-1111-2222-3333-444444444446" + } + ], + "provisioningState": "Succeeded", + "usable": "Yes", + "storageAccount": "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + }, + "location": "West US", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" + } + } + } + } +} \ No newline at end of file diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 7bc03fabd5a2..3a31ed79e1d4 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -130,6 +130,52 @@ "final-state-via": "azure-async-operation" } }, + "patch": { + "description": "Updates an existing workspace's tags.", + "operationId": "Workspaces_UpdateTags", + "x-ms-examples": { + "QuantumWorkspacesPatchTags": { + "$ref": "./examples/quantumWorkspacesPatch.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "name": "workspaceTags", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TagsObject" + }, + "description": "Parameters supplied to update tags." + } + ], + "responses": { + "200": { + "description": "Successful.", + "schema": { + "$ref": "#/definitions/QuantumWorkspace" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, "delete": { "description": "Deletes a Workspace resource.", "operationId": "Workspaces_Delete", @@ -354,34 +400,11 @@ "type": "object", "description": "The resource proxy definition object for quantum workspace.", "properties": { - "id": { - "type": "string", - "description": "The unique id for this workspace.", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of this workspace.", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of this workspace.", - "readOnly": true - }, - "location": { - "type": "string", - "description": "The location (region) of this workspace." - }, "properties": { "x-ms-client-flatten": true, "description": "Gets or sets the properties. Define quantum space's specific properties.", "$ref": "#/definitions/WorkspaceResourceProperties" }, - "tags": { - "type": "object", - "description": "The tags associated with this workspace." - }, "identity": { "type": "object", "description": "Managed Identity information.", @@ -411,7 +434,23 @@ } } }, - "x-ms-azure-resource": true + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" + } + ] + }, + "TagsObject": { + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "description": "Tags object for patch operations." }, "WorkspaceResourceProperties": { "description": "Properties of a Workspace", From 7c86b611a74c6c80bcb1fb0e1fc4b30fa64ab3c4 Mon Sep 17 00:00:00 2001 From: Mahmut Burak Senol Date: Wed, 13 Jan 2021 12:09:46 -0800 Subject: [PATCH 29/31] prettier fix --- .../2019-11-04-preview/examples/quantumWorkspacesPatch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json index e5c20f1c77de..84dd147aaae1 100644 --- a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json @@ -61,4 +61,4 @@ } } } -} \ No newline at end of file +} From 8d17c75ba38526a51f2182a60c3cb6f5d7178730 Mon Sep 17 00:00:00 2001 From: masenol <54191670+masenol@users.noreply.github.com> Date: Fri, 15 Jan 2021 11:33:09 -0800 Subject: [PATCH 30/31] Adds suppression to readme --- specification/quantum/resource-manager/readme.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md index c459bdc0d825..0ed141055153 100644 --- a/specification/quantum/resource-manager/readme.md +++ b/specification/quantum/resource-manager/readme.md @@ -24,7 +24,7 @@ For other options on installation see [Installing AutoRest](https://aka.ms/autor These are the global settings for the quantum. -```yaml +``` yaml openapi-type: arm openapi-subtype: rpaas tag: package-2019-11-04-preview @@ -34,7 +34,7 @@ tag: package-2019-11-04-preview These settings apply only when `--tag=package-2019-11-04-preview` is specified on the command line. -```yaml $(tag) == 'package-2019-11-04-preview' +``` yaml $(tag) == 'package-2019-11-04-preview' input-file: - Microsoft.Quantum/preview/2019-11-04-preview/quantum.json ``` @@ -48,7 +48,7 @@ input-file: This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. -```yaml $(swagger-to-sdk) +``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-python - repo: azure-sdk-for-go @@ -70,3 +70,13 @@ See configuration in [readme.typescript.md](./readme.typescript.md) ## CSharp See configuration in [readme.csharp.md](./readme.csharp.md) + +## Suppression + +``` yaml +directive: + - suppress: EnumInsteadOfBoolean + where: $.definitions.operation.properties.isDataAction + from: quantum.json + reason: 'This property is really a boolean, there are no plans to have more than two values in the future.' +``` From a9a9e271c13500aa54fdbb1bcb656eb61d82d38b Mon Sep 17 00:00:00 2001 From: masenol <54191670+masenol@users.noreply.github.com> Date: Fri, 15 Jan 2021 11:35:41 -0800 Subject: [PATCH 31/31] Adds suppression to readme --- specification/quantum/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md index 0ed141055153..83f7e70b3fda 100644 --- a/specification/quantum/resource-manager/readme.md +++ b/specification/quantum/resource-manager/readme.md @@ -79,4 +79,8 @@ directive: where: $.definitions.operation.properties.isDataAction from: quantum.json reason: 'This property is really a boolean, there are no plans to have more than two values in the future.' + - suppress: AvoidNestedProperties + where: $.definitions.ProviderDescription.properties.properties + from: quantum.json + reason: We don't have end customers making direct API calls and this is a breaking change for our existing clients. ```