From 65e364019a63dcd8f27621738d4ae03bbb138849 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Sun, 17 Jan 2021 19:28:50 -0700 Subject: [PATCH] [Hub Generated] Review request for Microsoft.Quantum to add version preview/2019-11-04-preview (#11266) * New Readme Config File * New Go Language Readme Config File * New Typescript Language Readme Config File * New Python Language Readme Config File * New C# Language Readme Config File * New Ruby Language Readme Config File * New Swagger Spec File * New Swagger Example Spec File * New Swagger for Azure Quantum RP * Adding MSI fields * Incorporating ARM feedback (#1) * Picking up changes from RPSaaS. * -ruby * go * clean up readme config * -java * preview path * python version * incorporate feedback * read-only * ids * prettier * removing patch * addressing feedback * prettier fix * removing tags - coming from TrackedResource * un-referencing trackedresource * adding patch, referring to the common-type tracked resource * prettier fix * Adds suppression to readme * Adds suppression to readme Co-authored-by: Adele Bai Co-authored-by: Mahmut Burak Senol Co-authored-by: masenol <54191670+masenol@users.noreply.github.com> --- .../examples/offeringsList.json | 87 ++ .../examples/quantumWorkspacesDelete.json | 17 + .../examples/quantumWorkspacesGet.json | 58 ++ .../quantumWorkspacesListResourceGroup.json | 45 + .../quantumWorkspacesListSubscription.json | 44 + .../examples/quantumWorkspacesPatch.json | 64 ++ .../examples/quantumWorkspacesPut.json | 117 +++ .../preview/2019-11-04-preview/quantum.json | 884 ++++++++++++++++++ .../quantum/resource-manager/readme.csharp.md | 15 + .../quantum/resource-manager/readme.go.md | 19 + .../quantum/resource-manager/readme.md | 86 ++ .../quantum/resource-manager/readme.python.md | 28 + .../resource-manager/readme.typescript.md | 17 + 13 files changed, 1481 insertions(+) create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.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/quantumWorkspacesListResourceGroup.json create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.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 create mode 100644 specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json create mode 100644 specification/quantum/resource-manager/readme.csharp.md create mode 100644 specification/quantum/resource-manager/readme.go.md create mode 100644 specification/quantum/resource-manager/readme.md create mode 100644 specification/quantum/resource-manager/readme.python.md create mode 100644 specification/quantum/resource-manager/readme.typescript.md diff --git a/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.json new file mode 100644 index 000000000000..366cafeb2b2d --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.json @@ -0,0 +1,87 @@ +{ + "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" + } + ], + "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" + } + ] + } + } + ] + } + } + } +} 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..f06603a06880 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesDelete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "description": "Successful." + }, + "202": { + "description": "Workspace delete request accepted." + }, + "204": {} + } +} 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..ddc6be2f00fe --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "workspaceName": "quantumworkspace1", + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview" + }, + "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-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" + }, + "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 new file mode 100644 index 000000000000..ac297ba5f758 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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/examples/quantumWorkspacesListSubscription.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json new file mode 100644 index 000000000000..f11d508df81e --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2019-11-04-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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/examples/quantumWorkspacesPatch.json b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json new file mode 100644 index 000000000000..84dd147aaae1 --- /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" + } + } + } + } +} 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..6fc178554abc --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json @@ -0,0 +1,117 @@ +{ + "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" + }, + { + "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": { + "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": { + "department": "MightyMight", + "company": "Contoso" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "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" + }, + "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 new file mode 100644 index 000000000000..3a31ed79e1d4 --- /dev/null +++ b/specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -0,0 +1,884 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Quantum Management Client", + "version": "2019-11-04-preview", + "x-ms-code-generation-settings": { + "name": "QuantumManagementClient" + } + }, + "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/workspaces/{workspaceName}": { + "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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "description": "Creates or updates a workspace resource.", + "operationId": "Workspaces_CreateOrUpdate", + "x-ms-examples": { + "QuantumWorkspacesPut": { + "$ref": "./examples/quantumWorkspacesPut.json" + } + }, + "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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "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", + "x-ms-examples": { + "QuantumWorkspacesDelete": { + "$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." + }, + "204": { + "description": "No content - The workspace doesn't exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/workspaces": { + "get": { + "operationId": "Workspaces_ListBySubscription", + "x-ms-examples": { + "QuantumWorkspacesListBySubscription": { + "$ref": "./examples/quantumWorkspacesListSubscription.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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces": { + "get": { + "operationId": "Workspaces_ListByResourceGroup", + "x-ms-examples": { + "QuantumWorkspacesListByResourceGroup": { + "$ref": "./examples/quantumWorkspacesListResourceGroup.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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/offerings": { + "get": { + "description": "Returns the list of all provider offerings available for the given location.", + "operationId": "Offerings_List", + "x-ms-examples": { + "OfferingsList": { + "$ref": "./examples/offeringsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Offerings details.", + "schema": { + "$ref": "#/definitions/OfferingsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "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 Workspaces." + } + }, + "description": "The response of a list Workspaces operation." + }, + "OfferingsListResult": { + "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 Providers." + } + }, + "description": "The response of a list Providers operation." + }, + "QuantumWorkspace": { + "type": "object", + "description": "The resource proxy definition object for quantum workspace.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Gets or sets the properties. Define quantum space's specific properties.", + "$ref": "#/definitions/WorkspaceResourceProperties" + }, + "identity": { + "type": "object", + "description": "Managed Identity information.", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": 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", + "properties": { + "providers": { + "type": "array", + "description": "List of Providers selected for this 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 ready to accept Jobs.", + "readOnly": true + }, + "provisioningState": { + "type": "string", + "enum": [ + "Succeeded", + "ProviderLaunching", + "ProviderUpdating", + "ProviderDeleting", + "ProviderProvisioning", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningStatus", + "modelAsString": true + }, + "description": "Provisioning status field", + "readOnly": true + }, + "storageAccount": { + "type": "string", + "description": "ARM Resource Id of the storage account associated with this workspace." + } + } + }, + "ProviderDescription": { + "type": "object", + "description": "Information about an offering. A provider offering is an entity that offers Targets to run Azure Quantum Jobs.", + "properties": { + "id": { + "type": "string", + "description": "Unique provider's id." + }, + "name": { + "type": "string", + "description": "Provider's display name.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A list of provider-specific properties.", + "$ref": "#/definitions/ProviderProperties" + } + } + }, + "ProviderProperties": { + "type": "object", + "description": "Provider properties.", + "properties": { + "description": { + "type": "string", + "description": "A description about this provider.", + "readOnly": true + }, + "providerType": { + "type": "string", + "description": "Provider type.", + "readOnly": true + }, + "company": { + "type": "string", + "description": "Company name.", + "readOnly": true + }, + "defaultEndpoint": { + "type": "string", + "description": "Provider's default endpoint.", + "readOnly": true + }, + "aad": { + "type": "object", + "description": "Azure Active Directory info.", + "properties": { + "applicationId": { + "type": "string", + "description": "Provider's application id.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "Provider's tenant id.", + "readOnly": true + } + } + }, + "managedApplication": { + "type": "object", + "description": "Provider's Managed-Application info", + "properties": { + "publisherId": { + "type": "string", + "description": "Provider's publisher id.", + "readOnly": true + }, + "offerId": { + "type": "string", + "description": "Provider's offer id.", + "readOnly": true + } + } + }, + "targets": { + "type": "array", + "description": "The list of targets available from this provider.", + "items": { + "$ref": "#/definitions/TargetDescription" + } + }, + "skus": { + "type": "array", + "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": "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." + }, + "name": { + "type": "string", + "description": "Display name of this target." + }, + "description": { + "type": "string", + "description": "A description about this target." + }, + "acceptedDataFormats": { + "type": "array", + "description": "List of data formats accepted by this target.", + "items": { + "type": "string" + } + }, + "acceptedContentEncodings": { + "type": "array", + "description": "List of content encodings accepted by this target.", + "items": { + "type": "string" + } + } + } + }, + "SkuDescription": { + "type": "object", + "description": "Information about a specific sku.", + "properties": { + "id": { + "type": "string", + "description": "Unique sku id." + }, + "name": { + "type": "string", + "description": "Display name of this sku." + }, + "description": { + "type": "string", + "description": "Description about this sku." + }, + "targets": { + "type": "array", + "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": "Information about a Provider. A Provider is an entity that offers Targets to run Azure Quantum Jobs.", + "properties": { + "providerId": { + "type": "string", + "description": "Unique id of this provider." + }, + "providerSku": { + "type": "string", + "description": "The sku associated with pricing information for this provider." + }, + "instanceUri": { + "type": "string", + "description": "A Uri identifying the specific instance of this provider." + }, + "applicationName": { + "type": "string", + "description": "The provider's marketplace application display name." + }, + "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." + } + } + }, + "operation": { + "description": "Operation provided by provider", + "properties": { + "name": { + "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", + "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.", + "type": "object", + "properties": { + "nextLink": { + "description": "Url to follow for getting next page of operations.", + "type": "string" + }, + "value": { + "description": "Array of operations", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/operation" + } + } + }, + "required": [ + "value" + ] + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "LocationParameter": { + "name": "locationName", + "in": "path", + "required": true, + "type": "string", + "description": "Location.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "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.csharp.md b/specification/quantum/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..d6de9dc93897 --- /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: 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.go.md b/specification/quantum/resource-manager/readme.go.md new file mode 100644 index 000000000000..23eea7fa2ec8 --- /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 + namespace: quantum + 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) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2019-11-04-preview/$(namespace) +``` diff --git a/specification/quantum/resource-manager/readme.md b/specification/quantum/resource-manager/readme.md new file mode 100644 index 000000000000..83f7e70b3fda --- /dev/null +++ b/specification/quantum/resource-manager/readme.md @@ -0,0 +1,86 @@ +# 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 +openapi-subtype: rpaas +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-go + - repo: azure-sdk-for-js +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## 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.' + - 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. +``` diff --git a/specification/quantum/resource-manager/readme.python.md b/specification/quantum/resource-manager/readme.python.md new file mode 100644 index 000000000000..7fd49b19ae9c --- /dev/null +++ b/specification/quantum/resource-manager/readme.python.md @@ -0,0 +1,28 @@ +## Python + +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: azure.mgmt.quantum + package-name: azure-mgmt-quantum + clear-output-folder: true + package-version: 0.14.2012 +``` + +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + 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 new file mode 100644 index 000000000000..eacb05cfe947 --- /dev/null +++ b/specification/quantum/resource-manager/readme.typescript.md @@ -0,0 +1,17 @@ +## 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 + license-header: MICROSOFT_MIT_NO_VERSION + package-name: "@azure/arm-quantum" + output-folder: "$(typescript-sdks-folder)/sdk/quantum/arm-quantum" + payload-flattening-threshold: 1 + generate-metadata: true + generate-license-txt: true + generate-package-json: false + generate-readme-md: false +```