From 14da169c29008817a67d5f95170a81ffe2308896 Mon Sep 17 00:00:00 2001 From: Jingyi Zhu Date: Wed, 18 Dec 2024 17:01:36 -0800 Subject: [PATCH 1/3] merge change from 2024-10-01-preview --- .../examples/PTUQuota/getAvailable.json | 16 ++ .../examples/PTUQuota/list.json | 30 +++ .../preview/2024-10-01-preview/mfe.json | 179 ++++++++++++++++++ 3 files changed, 225 insertions(+) create mode 100644 specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json create mode 100644 specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json new file mode 100644 index 000000000000..342bc3bbef8d --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2024-10-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "total": 1 + } + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json new file mode 100644 index 000000000000..c357e8ff1af1 --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2024-10-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" + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json index 288ea0f9b800..88ca9b0ce76f 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json @@ -9,6 +9,90 @@ "https" ], "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/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/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/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/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": [ @@ -14220,6 +14304,28 @@ "x-ms-discriminator-value": "Auto", "additionalProperties": false }, + "AvailableQuota": { + "type": "object", + "properties": { + "properties": { + "description": "Available quota properties", + "$ref": "#/definitions/AvailableQuotaProperties", + "x-nullable": true + } + }, + "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", @@ -23486,6 +23592,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", @@ -26841,6 +26978,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": [ From 2f74d050328a5ce45e438b41cc4218693a73ebc9 Mon Sep 17 00:00:00 2001 From: Jingyi Zhu Date: Mon, 6 Jan 2025 10:24:12 -0800 Subject: [PATCH 2/3] add bugfix changes and new list api --- .../examples/PTUQuota/getAvailable.json | 1 + .../examples/PTUQuota/list.json | 1 + .../examples/PTUQuota/listAvailable.json | 23 +++++ .../preview/2024-10-01-preview/mfe.json | 85 ++++++++++++++++++- 4 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/listAvailable.json diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json index 342bc3bbef8d..9c783cd76ec6 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/getAvailable.json @@ -1,6 +1,7 @@ { "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", + "location": "location", "api-version": "2024-10-01-preview" }, "responses": { diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json index c357e8ff1af1..a579ddc67189 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/list.json @@ -1,6 +1,7 @@ { "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", + "location": "location", "api-version": "2024-10-01-preview", "$skipToken": "string" }, diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/listAvailable.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/listAvailable.json new file mode 100644 index 000000000000..004b0e2b77a0 --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/examples/PTUQuota/listAvailable.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "location": "location", + "api-version": "2024-10-01-preview", + "$skipToken": "string" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "total": 1 + } + } + ], + "nextLink": "string" + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json index 88ca9b0ce76f..81552c4e230a 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-10-01-preview/mfe.json @@ -9,7 +9,58 @@ "https" ], "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/availableQuota/default": { + "/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" + }, + { + "in": "path", + "name": "location", + "required": true, + "type": "string" + }, + { + "$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" @@ -23,6 +74,12 @@ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, + { + "in": "path", + "name": "location", + "required": true, + "type": "string" + }, { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } @@ -48,7 +105,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/quotaAndUsage": { + "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotaAndUsage": { "get": { "tags": [ "Quota" @@ -62,6 +119,12 @@ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, + { + "in": "path", + "name": "location", + "required": true, + "type": "string" + }, { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, @@ -14315,6 +14378,24 @@ }, "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": { From 17e70cf0b822c839aaf17e0e72eec9b229c97701 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Tue, 7 Jan 2025 14:45:17 -0800 Subject: [PATCH 3/3] 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. --- .github/workflows/spelling.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/spelling.yaml diff --git a/.github/workflows/spelling.yaml b/.github/workflows/spelling.yaml new file mode 100644 index 000000000000..8b3f38289f62 --- /dev/null +++ b/.github/workflows/spelling.yaml @@ -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