diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/quotaList.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/quotaList.json new file mode 100644 index 00000000000..4959efb267a --- /dev/null +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/examples/quotaList.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "resourceGroupName": "quantumResourcegroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "quantumworkspace1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "dimension": "free_combined_job_hours", + "scope": "Subscription", + "providerId": "Microsoft", + "utilization": 0.001756120333333333, + "holds": 0.016666666666666666, + "limit": 15.0, + "period": "Monthly" + }, + { + "dimension": "free_fpga_job_hours", + "scope": "Workspace", + "providerId": "Microsoft", + "utilization": 0.0, + "holds": 0.0, + "limit": 0.25, + "period": "Monthly" + }, + { + "dimension": "free_combined_job_hours", + "scope": "Workspace", + "providerId": "Microsoft", + "utilization": 0.0017561203333333335, + "holds": 0.0, + "limit": 1.0, + "period": "Monthly" + }, + { + "dimension": "concurrent_cpu_jobs", + "scope": "Workspace", + "providerId": "Microsoft", + "utilization": 0.0, + "holds": 0.0, + "limit": 10.0, + "period": "None" + }, + { + "dimension": "concurrent_fpga_jobs", + "scope": "Workspace", + "providerId": "Microsoft", + "utilization": 0.0, + "holds": 0.0, + "limit": 1.0, + "period": "None" + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json index 8485cd7a543..2c0143b4a30 100644 --- a/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json +++ b/specification/quantum/data-plane/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json @@ -257,6 +257,45 @@ } } } + }, + "/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/quotas": { + "get": { + "operationId": "Quotas_List", + "description": "List quotas for the given workspace.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/workspaceNameParameter" + } + ], + "x-ms-examples": { + "Get a list of quotas for a particular quantum workspace.": { + "$ref": "./examples/quotaList.json" + } + }, + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QuotaList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/restError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -496,6 +535,73 @@ } } }, + "QuotaList": { + "description": "List of quotas.", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Quota" + } + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link to the next page of results." + } + } + }, + "Quota": { + "description": "Quota information.", + "type": "object", + "properties": { + "dimension": { + "type": "string", + "description": "The name of the dimension associated with the quota." + }, + "scope": { + "type": "string", + "description": "The scope at which the quota is applied.", + "enum": [ + "Workspace", + "Subscription" + ], + "x-ms-enum": { + "name": "DimensionScope", + "modelAsString": true + } + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the provider." + }, + "utilization": { + "type": "number", + "description": "The amount of the usage that has been applied for the current period." + }, + "holds": { + "type": "number", + "description": "The amount of the usage that has been reserved but not applied for the current period." + }, + "limit": { + "type": "number", + "description": "The maximum amount of usage allowed for the current period." + }, + "period": { + "type": "string", + "description": "The time period in which the quota's underlying meter is accumulated. Based on calendar year. 'None' is used for concurrent quotas.", + "enum": [ + "None", + "Monthly" + ], + "x-ms-enum": { + "name": "MeterPeriod", + "modelAsString": true + } + } + } + }, "restError": { "type": "object", "description": "Error information returned by the API",