Skip to content

Commit

Permalink
Add quota apis to MFE 20250101-preview (#31885)
Browse files Browse the repository at this point in the history
* Add quota apis

* add location in swagger

* add list available quota

* add AvailableQuotaArmPaginatedResult

* add location param

* location param in examples

* replace with location parameters

* Removes azure-resource-manager-schemas from SDK automation. It can be re-added without reverting this commit. (#30893) (#31918)

This change produces an extra warning but no obvious new errors.

---------

Co-authored-by: Daniel Jurek <[email protected]>
  • Loading branch information
jingyizhu99 and danieljurek authored Jan 10, 2025
1 parent 3e7af1e commit 518e524
Show file tree
Hide file tree
Showing 5 changed files with 349 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/spelling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: SpellCheck

on: pull_request

jobs:
spellcheck:
name: SpellCheck
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Run spelling check
run: |
./eng/common/scripts/check-spelling-in-changed-files.ps1 `
-CSpellConfigPath 'cSpell.json' `
-SourceCommittish HEAD `
-TargetCommittish HEAD^ `
-ExitWithError
if ($LASTEXITCODE) {
Write-Host "Spelling errors found in changed files. See https://aka.ms/ci-fix#spell-check"
exit $LASTEXITCODE
}
shell: pwsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"location": "location",
"api-version": "2025-01-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"total": 1
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"location": "location",
"api-version": "2025-01-01-preview",
"$skipToken": "string"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"modelCollection": "string",
"quota": 1,
"usageDetails": [
{
"resourceGroup": "string",
"workspaceName": "string",
"deploymentName": "string",
"usage": 1,
"collectionQuotaUsage": 1
}
]
}
],
"nextLink": "string"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"location": "location",
"api-version": "2025-01-01-preview",
"$skipToken": "string"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"properties": {
"total": 1
}
}
],
"nextLink": "string"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,144 @@
"https"
],
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota": {
"get": {
"tags": [
"Quota"
],
"summary": "List available MaaS PTU quota.",
"operationId": "PTUQuota_ListAvailable",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/LocationParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "machineLearningServices.json#/parameters/PaginationParameter"
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/AvailableQuotaArmPaginatedResult"
}
}
},
"x-ms-examples": {
"List available MaaS PTU quota.": {
"$ref": "./examples/PTUQuota/listAvailable.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota/default": {
"get": {
"tags": [
"Quota"
],
"summary": "Get available MaaS PTU quota.",
"operationId": "PTUQuota_GetAvailable",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/LocationParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/AvailableQuota"
}
}
},
"x-ms-examples": {
"Get available MaaS PTU quota.": {
"$ref": "./examples/PTUQuota/getAvailable.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotaAndUsage": {
"get": {
"tags": [
"Quota"
],
"summary": "List MaaS PTU usage and quota.",
"operationId": "PTUQuota_List",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/LocationParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "machineLearningServices.json#/parameters/PaginationParameter"
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/UsageAndQuotaDetailsArmPaginatedResult"
}
}
},
"x-ms-examples": {
"List MaaS PTU usage and quota.": {
"$ref": "./examples/PTUQuota/list.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes": {
"get": {
"tags": [
Expand Down Expand Up @@ -14220,6 +14358,46 @@
"x-ms-discriminator-value": "Auto",
"additionalProperties": false
},
"AvailableQuota": {
"type": "object",
"properties": {
"properties": {
"description": "Available quota properties",
"$ref": "#/definitions/AvailableQuotaProperties",
"x-nullable": true
}
},
"additionalProperties": false
},
"AvailableQuotaArmPaginatedResult": {
"description": "A paginated list of AvailableQuota entities.",
"type": "object",
"properties": {
"nextLink": {
"description": "The link to the next page of AvailableQuota objects. If null, there are no additional pages.",
"type": "string"
},
"value": {
"description": "An array of objects of type AvailableQuota.",
"type": "array",
"items": {
"$ref": "#/definitions/AvailableQuota"
}
}
},
"additionalProperties": false
},
"AvailableQuotaProperties": {
"type": "object",
"properties": {
"total": {
"format": "int64",
"description": "The number of available quota",
"type": "integer"
}
},
"additionalProperties": false
},
"AzureBlobDatastore": {
"description": "Azure Blob datastore configuration.",
"type": "object",
Expand Down Expand Up @@ -23486,6 +23664,37 @@
"x-ms-discriminator-value": "OutputPath",
"additionalProperties": false
},
"PTUDeploymentUsage": {
"type": "object",
"properties": {
"collectionQuotaUsage": {
"format": "int64",
"description": "Usage number from the collection level quota",
"type": "integer"
},
"deploymentName": {
"description": "Deployment name",
"type": "string",
"x-nullable": true
},
"resourceGroup": {
"description": "Resource group name",
"type": "string",
"x-nullable": true
},
"usage": {
"format": "int64",
"description": "Usage number from subscription level quota",
"type": "integer"
},
"workspaceName": {
"description": "Workspace name",
"type": "string",
"x-nullable": true
}
},
"additionalProperties": false
},
"PartialBatchDeployment": {
"description": "Mutable batch inference settings per deployment.",
"type": "object",
Expand Down Expand Up @@ -26841,6 +27050,48 @@
"x-ms-discriminator-value": "uri_folder",
"additionalProperties": false
},
"UsageAndQuotaDetails": {
"type": "object",
"properties": {
"modelCollection": {
"description": "Model collection name",
"type": "string",
"x-nullable": true
},
"quota": {
"format": "int64",
"description": "The total number of quota",
"type": "integer"
},
"usageDetails": {
"description": "Usage details for each deployment",
"type": "array",
"items": {
"$ref": "#/definitions/PTUDeploymentUsage"
},
"x-nullable": true
}
},
"additionalProperties": false
},
"UsageAndQuotaDetailsArmPaginatedResult": {
"description": "A paginated list of UsageAndQuotaDetails entities.",
"type": "object",
"properties": {
"nextLink": {
"description": "The link to the next page of UsageAndQuotaDetails objects. If null, there are no additional pages.",
"type": "string"
},
"value": {
"description": "An array of objects of type UsageAndQuotaDetails.",
"type": "array",
"items": {
"$ref": "#/definitions/UsageAndQuotaDetails"
}
}
},
"additionalProperties": false
},
"UseStl": {
"description": "Configure STL Decomposition of the time-series target column.",
"enum": [
Expand Down

0 comments on commit 518e524

Please sign in to comment.