From 2fecf946fac13f277b4cf948fe4318e1d7ff5b80 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Thu, 17 Jul 2025 12:24:17 -0700 Subject: [PATCH 01/35] Splitting RecommenderRP to individual package, initial commit Rename SpotPlacementScores.json to GenerateSpotPlacementScores.json Remove openapi-subtype: rpaas from readme.md Adding suppression for RecommenderRP Update suppressions file name from diagnostic.json to RecommenderRP.json Add required APIVersion to GetSpotPlacementScores.json [Monitor] Rename Ingestion TypeSpec directory (#35991) Signed-off-by: Paul Van Eck [DevTestLabs] Convert existing OpenAPI spec to TypeSpec spec (#35346) Stable Version 2025-07-15 for Microsoft.Quota (#35765) * Copy files from stable/2025-03-01 Copied the files in a separate commit. This allows reviewers to easily diff subsequent changes against the previous spec. * Update version to stable/2025-07-15 Updated the API version from stable/2025-03-01 to stable/2025-07-15. * Added tag for 2025-07-15 in readme file * creates a new stable version for the enforcement endpoints * Adds the enforcement examples * adds GroupQuotaUsages folder * Adds enforcement definitions * Modifies the api version in the enforcement examples * adds proper api version for usages example * changes the retry after type and fixes typos * changes another description * renames GroupQuotasEnforcementResponse to GroupQuotaEnforcementStatus * formats object * Changes GroupQuotaEnforcementResponse to GroupQuotaEnforcementStatus. reverts unneccessary change in 2023-06-01 preview * ran prettier on 2023-06-01-preview for prettier check violation * changes object definition in preview version as well * resolves retry after issue * reverts the preview file objects Adding api-version input into GetSpotPlacementScores.json Run prettier Use forward slash [spec-model] Add cache in ctor, to re-use objects for the same path (#36008) [Monitor Query Logs] Add Java customizations (#36007) * [Monitor Query Logs] Add Java customizations * format [EngSys] Remove unnecessary workflow_dispatch triggers (#36019) [dashboard] Remove properties order fix and fix location to be optional (#36017) * remove properties order fix and fix location to be optional * remove needless suppression fix the back compatible for csharp (#35965) --- .../Microsoft.Compute/RecommenderRP/readme.md | 108 ++++++++ .../stable/2025-06-05/RecommenderRP.json | 255 ++++++++++++++++++ .../examples/GenerateSpotPlacementScores.json | 85 ++++++ .../examples/GetSpotPlacementScores.json | 24 ++ .../Microsoft.Compute/suppressions.yaml | 3 + 5 files changed, 475 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md new file mode 100644 index 000000000000..c8287f4aa016 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md @@ -0,0 +1,108 @@ +# AzureComputeRecommenderClient + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for AzureComputeRecommenderClient. + +--- + +## Getting Started + +To build the SDK for AzureComputeRecommenderClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the AzureComputeRecommenderClient API. + +``` yaml !$(python) || !$(track2) +title: AzureComputeRecommenderManagementClient +``` + +``` yaml +description: Azure Compute Recommender Client +openapi-type: arm +tag: package-2025-06-05 + +suppressions: + - code: OperationsAPIImplementation + reason: The operations API is defined in a separate file. + from: RecommenderRP.json + - code: PathForResourceAction + reason: This is not a valid scenario for the diskInspection and spotPlacementRecommender API as API Path does not match ARM Lint check formatting, requesting to suppress due to approval from reviewer. + from: RecommenderRP.json + - code: PathForNestedResource + reason: This is not a valid scenario for the diskInspection and spotPlacementRecommender API as API Path does not match ARM Lint check formatting, requesting to suppress due to approval from reviewer. + from: RecommenderRP.json + - code: XmsPageableForListCalls + reason: False positive error as API Path does not match ARM Lint check formatting, requesting to suppress due to approval from reviewer. + from: RecommenderRP.json + - code: DefinitionsPropertiesNamesCamelCase + reason: The property name contains abbreviations and need to keep it as upper case. + from: RecommenderRP.json + - code: BodyTopLevelProperties + reason: The is the additional property bag to introduce new nonbreaking properties. + from: RecommenderRP.json + +``` + +### Tag: package-2025-06-05 + +These settings apply only when `--tag=package-package-2025-06-05` is specified on the command line + +``` yaml $(tag) == 'package-2025-06-05' +input-file: +- stable/2025-06-05/RecommenderRP.json +``` + +### Tag: package-2025-06-05-only + +These settings apply only when `--tag=package-package-2025-06-05-only` is specified on the command line + +``` yaml $(tag) == 'package-2025-06-05-only' +input-file: +- stable/2025-06-05/RecommenderRP.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-net + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-node + - repo: azure-sdk-for-ruby + - repo: azure-resource-manager-schemas + - repo: azure-powershell +``` + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Java + +See configuration in [readme.java.md](./readme.java.md) \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json new file mode 100644 index 000000000000..e018799fa076 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -0,0 +1,255 @@ +{ + "swagger": "2.0", + "info": { + "title": "ComputeRecommenderResourceProviderClient", + "description": "The Compute Recommender Resource Provider Client", + "version": "2025-06-05" + }, + "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}/providers/Microsoft.Compute/locations/{location}/placementScores/spot": { + "get": { + "tags": [ + "placementScores_spot" + ], + "operationId": "SpotPlacementScores_Get", + "description": "Gets Spot Placement Scores metadata.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ComputeDiagnosticBase" + } + }, + "default": { + "description": "Error response describing why the get call failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets the metadata of Spot Placement Scores.": { + "$ref": "./examples/GetSpotPlacementScores.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate": { + "post": { + "tags": [ + "spotPlacementScores" + ], + "operationId": "SpotPlacementScores_Post", + "description": "Generates placement scores for Spot VM skus.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "spotPlacementScoresInput", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SpotPlacementScoresInput" + }, + "description": "SpotPlacementScores object supplied in the body of the Post spot placement scores operation." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/SpotPlacementScoresResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Returns spot VM placement scores for given configurations.": { + "$ref": "./examples/GenerateSpotPlacementScores.json" + } + } + } + } + }, + "definitions": { + "ComputeDiagnosticBase": { + "description": "Contains metadata of a diagnostic type", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/DiagnosticProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "DiagnosticProperties": { + "description": "Contains additional properties of a diagnostic", + "type": "object", + "properties": { + "supportedResourceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Describes what are the supported resource types for a diagnostic." + } + } + }, + "SpotPlacementScoresInput": { + "type": "object", + "properties": { + "desiredLocations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The desired regions" + }, + "desiredSizes": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSize" + }, + "description": "The desired virtual machine SKU sizes." + }, + "desiredCount": { + "type": "integer", + "format": "int32", + "description": "Desired instance count per region/zone based on the scope." + }, + "availabilityZones": { + "type": "boolean", + "description": "Defines if the scope is zonal or regional." + } + }, + "description": "SpotPlacementScores API Input." + }, + "SpotPlacementScoresResponse": { + "type": "object", + "properties": { + "desiredLocations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The desired regions" + }, + "desiredSizes": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSize" + }, + "description": "The desired virtual machine SKU sizes." + }, + "desiredCount": { + "type": "integer", + "format": "int32", + "description": "Desired instance count per region/zone based on the scope." + }, + "availabilityZones": { + "type": "boolean", + "description": "Defines if the scope is zonal or regional." + }, + "placementScores": { + "type": "array", + "items": { + "$ref": "#/definitions/PlacementScore" + }, + "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." + } + }, + "description": "SpotPlacementScores API response." + }, + "ResourceSize": { + "type": "object", + "properties": { + "sku": { + "type": "string", + "description": "The resource's CRP virtual machine SKU size." + } + }, + "description": "SpotPlacementRecommender API response." + }, + "PlacementScore": { + "type": "object", + "properties": { + "sku": { + "type": "string", + "description": "The resource's CRP virtual machine SKU size." + }, + "region": { + "type": "string", + "description": "The region." + }, + "availabilityZone": { + "type": "string", + "description": "The availability zone." + }, + "score": { + "type": "string", + "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." + }, + "isQuotaAvailable": { + "type": "boolean", + "description": "Whether the desired quota is available." + } + }, + "description": "The spot placement score for sku/region/zone combination." + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json new file mode 100644 index 000000000000..a213cfca0954 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus", + "api-version": "2025-06-05", + "spotPlacementScoresInput": { + "desiredLocations": [ + "eastus", + "eastus2" + ], + "desiredSizes": [ + { + "sku": "Standard_D2_v2" + } + ], + "desiredCount": 1, + "availabilityZones": true + } + }, + "responses": { + "200": { + "body": { + "desiredLocations": [ + "eastus", + "eastus2" + ], + "desiredSizes": [ + { + "sku": "Standard_D2_v2" + } + ], + "desiredCount": 1, + "availabilityZones": true, + "placementScores": [ + { + "sku": "Standard_D2_v2", + "region": "eastus", + "availabilityZone": "1", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus", + "availabilityZone": "2", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus", + "availabilityZone": "3", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus2", + "availabilityZone": "1", + "score": "DataNotFoundOrStale", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus2", + "availabilityZone": "2", + "score": "High", + "isQuotaAvailable": true + }, + { + "sku": "Standard_D2_v2", + "region": "eastus2", + "availabilityZone": "3", + "score": "High", + "isQuotaAvailable": true + } + ] + }, + "headers": { + "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f", + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/placementScores/spot/generate?api-version=2025-06-05" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json new file mode 100644 index 000000000000..125661ce2c8a --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus", + "api-version": "2025-06-05" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/placementScores/spot?api-version=2025-06-05", + "name": "spotPlacementScores", + "type": "Microsoft.Compute/placementScores", + "properties": { + "supportedResourceTypes": [ + "Microsoft.Compute/virtualMachines" + ] + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml index ee80746fcc21..d3de1e50d6fe 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml @@ -4,3 +4,6 @@ - tool: TypeSpecRequirement path: DiagnosticRP/preview/2025-02-01-preview/**/*.json reason: CDRP service not yet ready to migrate to typespec +- tool: TypeSpecRequirement + path: RecommenderRP/stable/2025-06-05/**/*.json + reason: CRS service not yet ready to migrate to typespec From 816611c9be6b129b935aad0272efaf441b1486b2 Mon Sep 17 00:00:00 2001 From: melina5656 <140602263+melina5656@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:40:19 +0800 Subject: [PATCH 02/35] Tsp Migration --- .../RecommenderRP/ComputeDiagnosticBase.tsp | 61 ++++++ .../RecommenderRP/back-compatible.tsp | 8 + .../GenerateSpotPlacementScores.json | 87 +++++++++ .../2025-06-05/GetSpotPlacementScores.json | 26 +++ .../Microsoft.Compute/RecommenderRP/main.tsp | 44 +++++ .../RecommenderRP/models.tsp | 148 +++++++++++++++ .../stable/2025-06-05/RecommenderRP.json | 178 ++++++++++-------- .../examples/GenerateSpotPlacementScores.json | 62 +++--- .../examples/GetSpotPlacementScores.json | 18 +- .../RecommenderRP/tspconfig.yaml | 49 +++++ 10 files changed, 560 insertions(+), 121 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp new file mode 100644 index 000000000000..6f89f2b705ec --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp @@ -0,0 +1,61 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.Compute; +/** + * Contains metadata of a diagnostic type + */ +@singleton("spot") +@subscriptionResource +@parentResource(SubscriptionLocationResource) +model ComputeDiagnosticBase + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = ComputeDiagnosticBase, + KeyName = "placementScore", + SegmentName = "placementScores", + NamePattern = "" + >; +} + +@armResourceOperations +interface ComputeDiagnosticBases { + /** + * Gets Spot Placement Scores metadata. + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + @operationId("SpotPlacementScores_Get") + get is ArmResourceRead< + ComputeDiagnosticBase, + BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters + >; + + /** + * Generates placement scores for Spot VM skus. + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + @action("generate") + @operationId("SpotPlacementScores_Post") + post is ArmResourceActionSync< + ComputeDiagnosticBase, + SpotPlacementScoresInput, + ArmResponse, + BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters + >; +} + +@@doc(ComputeDiagnosticBase.name, ""); +@@doc(ComputeDiagnosticBase.properties, + "Contains additional properties of a diagnostic" +); +@@doc(ComputeDiagnosticBases.post::parameters.body, + "SpotPlacementScores object supplied in the body of the Post spot placement scores operation." +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp new file mode 100644 index 000000000000..a6230d0ffe65 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp @@ -0,0 +1,8 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.Compute; + +@@clientName(ComputeDiagnosticBases.post::parameters.body, + "spotPlacementScoresInput" +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json new file mode 100644 index 000000000000..b41be1530cce --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2025-06-05", + "location": "eastus", + "spotPlacementScoresInput": { + "availabilityZones": true, + "desiredCount": 1, + "desiredLocations": [ + "eastus", + "eastus2" + ], + "desiredSizes": [ + { + "sku": "Standard_D2_v2" + } + ] + }, + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "availabilityZones": true, + "desiredCount": 1, + "desiredLocations": [ + "eastus", + "eastus2" + ], + "desiredSizes": [ + { + "sku": "Standard_D2_v2" + } + ], + "placementScores": [ + { + "availabilityZone": "1", + "isQuotaAvailable": true, + "region": "eastus", + "score": "High", + "sku": "Standard_D2_v2" + }, + { + "availabilityZone": "2", + "isQuotaAvailable": true, + "region": "eastus", + "score": "High", + "sku": "Standard_D2_v2" + }, + { + "availabilityZone": "3", + "isQuotaAvailable": true, + "region": "eastus", + "score": "High", + "sku": "Standard_D2_v2" + }, + { + "availabilityZone": "1", + "isQuotaAvailable": true, + "region": "eastus2", + "score": "DataNotFoundOrStale", + "sku": "Standard_D2_v2" + }, + { + "availabilityZone": "2", + "isQuotaAvailable": true, + "region": "eastus2", + "score": "High", + "sku": "Standard_D2_v2" + }, + { + "availabilityZone": "3", + "isQuotaAvailable": true, + "region": "eastus2", + "score": "High", + "sku": "Standard_D2_v2" + } + ] + }, + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/placementScores/spot/generate?api-version=2025-06-05", + "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f" + } + } + }, + "operationId": "SpotPlacementScores_Post", + "title": "Returns spot VM placement scores for given configurations." +} \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json new file mode 100644 index 000000000000..1a7acd988231 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2025-06-05", + "location": "eastus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "spotPlacementScores", + "type": "Microsoft.Compute/placementScores", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/placementScores/spot?api-version=2025-06-05", + "properties": { + "supportedResourceTypes": [ + "Microsoft.Compute/virtualMachines" + ] + } + }, + "headers": { + "x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1" + } + } + }, + "operationId": "SpotPlacementScores_Get", + "title": "Gets the metadata of Spot Placement Scores." +} \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp new file mode 100644 index 000000000000..ef81da8fc78f --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -0,0 +1,44 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: true + * guessResourceKey: false + * Version: 0.10.14 + * Date: 2025-07-18T08:45:04.778Z + */ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./ComputeDiagnosticBase.tsp"; +import "./back-compatible.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +/** + * Azure Compute Recommender Client + */ +#suppress "@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" +@armProviderNamespace +@service(#{ title: "AzureComputeRecommenderManagementClient" }) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) +namespace Microsoft.Compute; + +/** + * The available API versions. + */ +enum Versions { + /** + * The 2025-06-05 API version. + */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2025_06_05: "2025-06-05", +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp new file mode 100644 index 000000000000..6661df1bf025 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp @@ -0,0 +1,148 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Microsoft.Compute; + +/** + * Contains additional properties of a diagnostic + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" +model DiagnosticProperties { + /** + * Describes what are the supported resource types for a diagnostic. + */ + supportedResourceTypes?: string[]; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ +model Resource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + */ + @visibility(Lifecycle.Read) + id?: Azure.Core.armResourceIdentifier; + + /** + * The name of the resource + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @visibility(Lifecycle.Read) + systemData?: SystemData; +} + +/** + * SpotPlacementScores API Input. + */ +model SpotPlacementScoresInput { + /** + * The desired regions + */ + desiredLocations?: string[]; + + /** + * The desired virtual machine SKU sizes. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + desiredSizes?: ResourceSize[]; + + /** + * Desired instance count per region/zone based on the scope. + */ + desiredCount?: int32; + + /** + * Defines if the scope is zonal or regional. + */ + availabilityZones?: boolean; +} + +/** + * SpotPlacementRecommender API response. + */ +model ResourceSize { + /** + * The resource's CRP virtual machine SKU size. + */ + sku?: string; +} + +/** + * SpotPlacementScores API response. + */ +model SpotPlacementScoresResponse { + /** + * The desired regions + */ + desiredLocations?: string[]; + + /** + * The desired virtual machine SKU sizes. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + desiredSizes?: ResourceSize[]; + + /** + * Desired instance count per region/zone based on the scope. + */ + desiredCount?: int32; + + /** + * Defines if the scope is zonal or regional. + */ + availabilityZones?: boolean; + + /** + * A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + */ + #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + placementScores?: PlacementScore[]; +} + +/** + * The spot placement score for sku/region/zone combination. + */ +model PlacementScore { + /** + * The resource's CRP virtual machine SKU size. + */ + sku?: string; + + /** + * The region. + */ + region?: string; + + /** + * The availability zone. + */ + availabilityZone?: string; + + /** + * A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. + */ + score?: string; + + /** + * Whether the desired quota is available. + */ + isQuotaAvailable?: boolean; +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index e018799fa076..7d7b8badf5fa 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -1,18 +1,23 @@ { "swagger": "2.0", "info": { - "title": "ComputeRecommenderResourceProviderClient", - "description": "The Compute Recommender Resource Provider Client", - "version": "2025-06-05" + "title": "AzureComputeRecommenderManagementClient", + "version": "2025-06-05", + "description": "Azure Compute Recommender Client", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] }, - "host": "management.azure.com", "schemes": [ "https" ], - "consumes": [ + "host": "management.azure.com", + "produces": [ "application/json" ], - "produces": [ + "consumes": [ "application/json" ], "security": [ @@ -25,44 +30,49 @@ "securityDefinitions": { "azure_auth": { "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, + "tags": [ + { + "name": "ComputeDiagnosticBases" + } + ], "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot": { "get": { + "operationId": "SpotPlacementScores_Get", "tags": [ - "placementScores_spot" + "ComputeDiagnosticBases" ], - "operationId": "SpotPlacementScores_Get", "description": "Gets Spot Placement Scores metadata.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" } ], "responses": { "200": { - "description": "Success", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ComputeDiagnosticBase" } }, "default": { - "description": "Error response describing why the get call failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -75,42 +85,42 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate": { "post": { + "operationId": "SpotPlacementScores_Post", "tags": [ - "spotPlacementScores" + "ComputeDiagnosticBases" ], - "operationId": "SpotPlacementScores_Post", "description": "Generates placement scores for Spot VM skus.", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" }, { "name": "spotPlacementScoresInput", "in": "body", + "description": "SpotPlacementScores object supplied in the body of the Post spot placement scores operation.", "required": true, "schema": { "$ref": "#/definitions/SpotPlacementScoresInput" - }, - "description": "SpotPlacementScores object supplied in the body of the Post spot placement scores operation." + } } ], "responses": { "200": { - "description": "Success", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SpotPlacementScoresResponse" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -124,48 +134,86 @@ }, "definitions": { "ComputeDiagnosticBase": { - "description": "Contains metadata of a diagnostic type", "type": "object", + "description": "Contains metadata of a diagnostic type", "properties": { "properties": { - "$ref": "#/definitions/DiagnosticProperties" + "$ref": "#/definitions/DiagnosticProperties", + "description": "Contains additional properties of a diagnostic" } }, "allOf": [ { - "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + "$ref": "../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "DiagnosticProperties": { - "description": "Contains additional properties of a diagnostic", "type": "object", + "description": "Contains additional properties of a diagnostic", "properties": { "supportedResourceTypes": { "type": "array", + "description": "Describes what are the supported resource types for a diagnostic.", "items": { "type": "string" - }, - "description": "Describes what are the supported resource types for a diagnostic." + } + } + } + }, + "PlacementScore": { + "type": "object", + "description": "The spot placement score for sku/region/zone combination.", + "properties": { + "sku": { + "type": "string", + "description": "The resource's CRP virtual machine SKU size." + }, + "region": { + "type": "string", + "description": "The region." + }, + "availabilityZone": { + "type": "string", + "description": "The availability zone." + }, + "score": { + "type": "string", + "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." + }, + "isQuotaAvailable": { + "type": "boolean", + "description": "Whether the desired quota is available." + } + } + }, + "ResourceSize": { + "type": "object", + "description": "SpotPlacementRecommender API response.", + "properties": { + "sku": { + "type": "string", + "description": "The resource's CRP virtual machine SKU size." } } }, "SpotPlacementScoresInput": { "type": "object", + "description": "SpotPlacementScores API Input.", "properties": { "desiredLocations": { "type": "array", + "description": "The desired regions", "items": { "type": "string" - }, - "description": "The desired regions" + } }, "desiredSizes": { "type": "array", + "description": "The desired virtual machine SKU sizes.", "items": { "$ref": "#/definitions/ResourceSize" - }, - "description": "The desired virtual machine SKU sizes." + } }, "desiredCount": { "type": "integer", @@ -176,25 +224,25 @@ "type": "boolean", "description": "Defines if the scope is zonal or regional." } - }, - "description": "SpotPlacementScores API Input." + } }, "SpotPlacementScoresResponse": { "type": "object", + "description": "SpotPlacementScores API response.", "properties": { "desiredLocations": { "type": "array", + "description": "The desired regions", "items": { "type": "string" - }, - "description": "The desired regions" + } }, "desiredSizes": { "type": "array", + "description": "The desired virtual machine SKU sizes.", "items": { "$ref": "#/definitions/ResourceSize" - }, - "description": "The desired virtual machine SKU sizes." + } }, "desiredCount": { "type": "integer", @@ -207,49 +255,13 @@ }, "placementScores": { "type": "array", + "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation.", "items": { "$ref": "#/definitions/PlacementScore" - }, - "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." - } - }, - "description": "SpotPlacementScores API response." - }, - "ResourceSize": { - "type": "object", - "properties": { - "sku": { - "type": "string", - "description": "The resource's CRP virtual machine SKU size." - } - }, - "description": "SpotPlacementRecommender API response." - }, - "PlacementScore": { - "type": "object", - "properties": { - "sku": { - "type": "string", - "description": "The resource's CRP virtual machine SKU size." - }, - "region": { - "type": "string", - "description": "The region." - }, - "availabilityZone": { - "type": "string", - "description": "The availability zone." - }, - "score": { - "type": "string", - "description": "A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation." - }, - "isQuotaAvailable": { - "type": "boolean", - "description": "Whether the desired quota is available." + } } - }, - "description": "The spot placement score for sku/region/zone combination." + } } - } + }, + "parameters": {} } diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json index a213cfca0954..b41be1530cce 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json @@ -1,9 +1,10 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "location": "eastus", "api-version": "2025-06-05", + "location": "eastus", "spotPlacementScoresInput": { + "availabilityZones": true, + "desiredCount": 1, "desiredLocations": [ "eastus", "eastus2" @@ -12,14 +13,15 @@ { "sku": "Standard_D2_v2" } - ], - "desiredCount": 1, - "availabilityZones": true - } + ] + }, + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { + "availabilityZones": true, + "desiredCount": 1, "desiredLocations": [ "eastus", "eastus2" @@ -29,57 +31,57 @@ "sku": "Standard_D2_v2" } ], - "desiredCount": 1, - "availabilityZones": true, "placementScores": [ { - "sku": "Standard_D2_v2", - "region": "eastus", "availabilityZone": "1", + "isQuotaAvailable": true, + "region": "eastus", "score": "High", - "isQuotaAvailable": true + "sku": "Standard_D2_v2" }, { - "sku": "Standard_D2_v2", - "region": "eastus", "availabilityZone": "2", + "isQuotaAvailable": true, + "region": "eastus", "score": "High", - "isQuotaAvailable": true + "sku": "Standard_D2_v2" }, { - "sku": "Standard_D2_v2", - "region": "eastus", "availabilityZone": "3", + "isQuotaAvailable": true, + "region": "eastus", "score": "High", - "isQuotaAvailable": true + "sku": "Standard_D2_v2" }, { - "sku": "Standard_D2_v2", - "region": "eastus2", "availabilityZone": "1", + "isQuotaAvailable": true, + "region": "eastus2", "score": "DataNotFoundOrStale", - "isQuotaAvailable": true + "sku": "Standard_D2_v2" }, { - "sku": "Standard_D2_v2", - "region": "eastus2", "availabilityZone": "2", + "isQuotaAvailable": true, + "region": "eastus2", "score": "High", - "isQuotaAvailable": true + "sku": "Standard_D2_v2" }, { - "sku": "Standard_D2_v2", - "region": "eastus2", "availabilityZone": "3", + "isQuotaAvailable": true, + "region": "eastus2", "score": "High", - "isQuotaAvailable": true + "sku": "Standard_D2_v2" } ] }, "headers": { - "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f", - "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/placementScores/spot/generate?api-version=2025-06-05" + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/placementScores/spot/generate?api-version=2025-06-05", + "x-ms-request-id": "57b891ab-1fb7-4f5a-b002-71eb6854961f" } } - } -} + }, + "operationId": "SpotPlacementScores_Post", + "title": "Returns spot VM placement scores for given configurations." +} \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json index 125661ce2c8a..1a7acd988231 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json @@ -1,24 +1,26 @@ { "parameters": { - "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2025-06-05", "location": "eastus", - "api-version": "2025-06-05" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { - "headers": { - "x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1" - }, "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/placementScores/spot?api-version=2025-06-05", "name": "spotPlacementScores", "type": "Microsoft.Compute/placementScores", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/placementScores/spot?api-version=2025-06-05", "properties": { "supportedResourceTypes": [ "Microsoft.Compute/virtualMachines" ] } + }, + "headers": { + "x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1" } } - } -} + }, + "operationId": "SpotPlacementScores_Get", + "title": "Gets the metadata of Spot Placement Scores." +} \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml new file mode 100644 index 000000000000..a102b2174689 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml @@ -0,0 +1,49 @@ +parameters: + "service-dir": + default: "sdk/widget" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + omit-unreachable-types: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "resource-manager" + output-file: "{version-status}/{version}/RecommenderRP.json" + examples-dir: "{project-root}/examples" + "@azure-tools/typespec-csharp": + flavor: azure + package-dir: "Azure.ResourceManager.Widget" + clear-output-folder: true + model-namespace: true + namespace: "{package-dir}" + "@azure-tools/typespec-python": + package-dir: "azure-mgmt-widget" + namespace: "azure.mgmt.widget" + generate-test: true + generate-sample: true + flavor: "azure" + "@azure-tools/typespec-java": + package-dir: "azure-resourcemanager-widget" + namespace: "com.azure.resourcemanager.widget" + service-name: "Widget" # human-readable service name, whitespace allowed + flavor: azure + "@azure-tools/typespec-ts": + package-dir: "arm-widget" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure/arm-widget" + "@azure-tools/typespec-go": + service-dir: "sdk/resourcemanager/widget" + package-dir: "armwidget" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}" + fix-const-stuttering: true + flavor: "azure" + generate-samples: true + generate-fakes: true + head-as-boolean: true + inject-spans: true +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager" From 42308eebbc5345507987484e7a012aca0f012800 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 18 Jul 2025 10:29:18 -0700 Subject: [PATCH 03/35] Removing -only tag and unneeded suppression --- .../Microsoft.Compute/RecommenderRP/readme.md | 9 --------- .../resource-manager/Microsoft.Compute/suppressions.yaml | 4 +--- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md index c8287f4aa016..69d1cbcc4c41 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md @@ -64,15 +64,6 @@ input-file: - stable/2025-06-05/RecommenderRP.json ``` -### Tag: package-2025-06-05-only - -These settings apply only when `--tag=package-package-2025-06-05-only` is specified on the command line - -``` yaml $(tag) == 'package-2025-06-05-only' -input-file: -- stable/2025-06-05/RecommenderRP.json -``` - --- # Code Generation diff --git a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml index d3de1e50d6fe..9667ba40fda3 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml @@ -4,6 +4,4 @@ - tool: TypeSpecRequirement path: DiagnosticRP/preview/2025-02-01-preview/**/*.json reason: CDRP service not yet ready to migrate to typespec -- tool: TypeSpecRequirement - path: RecommenderRP/stable/2025-06-05/**/*.json - reason: CRS service not yet ready to migrate to typespec + \ No newline at end of file From 78aed1aa389eba59f402c3557be74adeab3991bb Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 18 Jul 2025 11:24:56 -0700 Subject: [PATCH 04/35] Update types.json path --- .../stable/2025-06-05/RecommenderRP.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 7d7b8badf5fa..54512cfa93ae 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -53,13 +53,13 @@ "description": "Gets Spot Placement Scores metadata.", "parameters": [ { - "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" } ], "responses": { @@ -72,7 +72,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -92,13 +92,13 @@ "description": "Generates placement scores for Spot VM skus.", "parameters": [ { - "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" }, { "name": "spotPlacementScoresInput", @@ -120,7 +120,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -144,7 +144,7 @@ }, "allOf": [ { - "$ref": "../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, From c933176d20c73dc65321df327308de600609e975 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 18 Jul 2025 11:29:18 -0700 Subject: [PATCH 05/35] Run prettier on example files --- .../examples/2025-06-05/GenerateSpotPlacementScores.json | 2 +- .../examples/2025-06-05/GetSpotPlacementScores.json | 2 +- .../stable/2025-06-05/examples/GenerateSpotPlacementScores.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json index b41be1530cce..2a562f0b36ef 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GenerateSpotPlacementScores.json @@ -84,4 +84,4 @@ }, "operationId": "SpotPlacementScores_Post", "title": "Returns spot VM placement scores for given configurations." -} \ No newline at end of file +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json index 1a7acd988231..f5c61a673441 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/GetSpotPlacementScores.json @@ -23,4 +23,4 @@ }, "operationId": "SpotPlacementScores_Get", "title": "Gets the metadata of Spot Placement Scores." -} \ No newline at end of file +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json index b41be1530cce..2a562f0b36ef 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json @@ -84,4 +84,4 @@ }, "operationId": "SpotPlacementScores_Post", "title": "Returns spot VM placement scores for given configurations." -} \ No newline at end of file +} From 61b6c9ff5e57df7dfbc90349ebb28c32ff956ecd Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 18 Jul 2025 11:55:23 -0700 Subject: [PATCH 06/35] Run prettier --- .../stable/2025-06-05/examples/GetSpotPlacementScores.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json index 1a7acd988231..f5c61a673441 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/GetSpotPlacementScores.json @@ -23,4 +23,4 @@ }, "operationId": "SpotPlacementScores_Get", "title": "Gets the metadata of Spot Placement Scores." -} \ No newline at end of file +} From c0c4b1a5cb4b6b66c4246034b5d8aad095e3d916 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 18 Jul 2025 12:19:04 -0700 Subject: [PATCH 07/35] Revery noop change to Microsoft.Compute/suppressions.yaml --- .../compute/resource-manager/Microsoft.Compute/suppressions.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml index 9667ba40fda3..ee80746fcc21 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/suppressions.yaml @@ -4,4 +4,3 @@ - tool: TypeSpecRequirement path: DiagnosticRP/preview/2025-02-01-preview/**/*.json reason: CDRP service not yet ready to migrate to typespec - \ No newline at end of file From c66da6f916f60d520a921a366a48fd8ddfeb364e Mon Sep 17 00:00:00 2001 From: melina5656 <140602263+melina5656@users.noreply.github.com> Date: Mon, 21 Jul 2025 10:38:29 +0800 Subject: [PATCH 08/35] Modify tspconfig and title --- .../Microsoft.Compute/RecommenderRP/main.tsp | 4 ++-- .../stable/2025-06-05/RecommenderRP.json | 4 ++-- .../RecommenderRP/tspconfig.yaml | 23 ++++++++++--------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp index ef81da8fc78f..2bd4e6497a8d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -22,11 +22,11 @@ using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; /** - * Azure Compute Recommender Client + * The Compute Recommender Resource Provider Client */ #suppress "@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @armProviderNamespace -@service(#{ title: "AzureComputeRecommenderManagementClient" }) +@service(#{ title: "ComputeRecommenderResourceProviderClient" }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) namespace Microsoft.Compute; diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 54512cfa93ae..a0faf34bbd33 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -1,9 +1,9 @@ { "swagger": "2.0", "info": { - "title": "AzureComputeRecommenderManagementClient", + "title": "ComputeRecommenderResourceProviderClient", "version": "2025-06-05", - "description": "Azure Compute Recommender Client", + "description": "The Compute Recommender Resource Provider Client", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml index a102b2174689..b81afdccd20a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml @@ -1,6 +1,6 @@ parameters: "service-dir": - default: "sdk/widget" + default: "sdk/compute" emit: - "@azure-tools/typespec-autorest" options: @@ -11,32 +11,33 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/RecommenderRP.json" examples-dir: "{project-root}/examples" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-csharp": flavor: azure - package-dir: "Azure.ResourceManager.Widget" + package-dir: "Azure.ResourceManager.Compute" clear-output-folder: true model-namespace: true namespace: "{package-dir}" "@azure-tools/typespec-python": - package-dir: "azure-mgmt-widget" - namespace: "azure.mgmt.widget" + package-dir: "azure-mgmt-compute" + namespace: "azure.mgmt.compute" generate-test: true generate-sample: true flavor: "azure" "@azure-tools/typespec-java": - package-dir: "azure-resourcemanager-widget" - namespace: "com.azure.resourcemanager.widget" - service-name: "Widget" # human-readable service name, whitespace allowed + package-dir: "azure-resourcemanager-compute" + namespace: "com.azure.resourcemanager.compute" + service-name: "Compute" # human-readable service name, whitespace allowed flavor: azure "@azure-tools/typespec-ts": - package-dir: "arm-widget" + package-dir: "arm-compute" flavor: azure experimental-extensible-enums: true package-details: - name: "@azure/arm-widget" + name: "@azure/arm-compute" "@azure-tools/typespec-go": - service-dir: "sdk/resourcemanager/widget" - package-dir: "armwidget" + service-dir: "sdk/resourcemanager/compute" + package-dir: "armcompute" module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}" fix-const-stuttering: true flavor: "azure" From e6806ad8e4d27834c2b66dd2b868dcf95de8d899 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 20 Jul 2025 21:42:12 -0700 Subject: [PATCH 09/35] Remove Code generation section --- .../Microsoft.Compute/RecommenderRP/readme.md | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md index 69d1cbcc4c41..4bca560adfa8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md @@ -63,37 +63,3 @@ These settings apply only when `--tag=package-package-2025-06-05` is specified o input-file: - stable/2025-06-05/RecommenderRP.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-net - - repo: azure-sdk-for-python-track2 - - repo: azure-sdk-for-java - - repo: azure-sdk-for-go - - repo: azure-sdk-for-js - - repo: azure-sdk-for-node - - repo: azure-sdk-for-ruby - - repo: azure-resource-manager-schemas - - repo: azure-powershell -``` - -## Python - -See configuration in [readme.python.md](./readme.python.md) - -## Go - -See configuration in [readme.go.md](./readme.go.md) - -## Java - -See configuration in [readme.java.md](./readme.java.md) \ No newline at end of file From 1a16c117d954c79b1631caceb504cff3c1e0dd10 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 21 Jul 2025 12:56:56 +0800 Subject: [PATCH 10/35] Update tspconfig.yaml --- .../Microsoft.Compute/RecommenderRP/tspconfig.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml index b81afdccd20a..845bb1be080a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml @@ -25,8 +25,8 @@ options: generate-sample: true flavor: "azure" "@azure-tools/typespec-java": - package-dir: "azure-resourcemanager-compute" - namespace: "com.azure.resourcemanager.compute" + package-dir: "azure-resourcemanager-compute-generated" + namespace: "com.azure.resourcemanager.compute.generated" service-name: "Compute" # human-readable service name, whitespace allowed flavor: azure "@azure-tools/typespec-ts": From a08e32bdd241b2a451cb0411423cf0cfc6e533fc Mon Sep 17 00:00:00 2001 From: melina5656 <140602263+melina5656@users.noreply.github.com> Date: Mon, 21 Jul 2025 13:47:35 +0800 Subject: [PATCH 11/35] Remove unused models --- .../RecommenderRP/models.tsp | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp index 6661df1bf025..9db73130caf5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp @@ -20,35 +20,6 @@ model DiagnosticProperties { supportedResourceTypes?: string[]; } -/** - * Common fields that are returned in the response for all Azure Resource Manager resources - */ -model Resource { - /** - * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - */ - @visibility(Lifecycle.Read) - id?: Azure.Core.armResourceIdentifier; - - /** - * The name of the resource - */ - @visibility(Lifecycle.Read) - name?: string; - - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - */ - @visibility(Lifecycle.Read) - type?: string; - - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @visibility(Lifecycle.Read) - systemData?: SystemData; -} - /** * SpotPlacementScores API Input. */ From 6c589ebae91635fbc97a1a9918966872df9d4b8f Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 20 Jul 2025 23:39:25 -0700 Subject: [PATCH 12/35] Update tspconfig.yaml naming to computerecommender --- .../RecommenderRP/tspconfig.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml index b81afdccd20a..9910ecf98581 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml @@ -1,6 +1,6 @@ parameters: "service-dir": - default: "sdk/compute" + default: "sdk/computerecommender" emit: - "@azure-tools/typespec-autorest" options: @@ -14,30 +14,30 @@ options: arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-csharp": flavor: azure - package-dir: "Azure.ResourceManager.Compute" + package-dir: "Azure.ResourceManager.ComputeRecommender" clear-output-folder: true model-namespace: true namespace: "{package-dir}" "@azure-tools/typespec-python": - package-dir: "azure-mgmt-compute" - namespace: "azure.mgmt.compute" + package-dir: "azure-mgmt-computerecommender" + namespace: "azure.mgmt.computerecommender" generate-test: true generate-sample: true flavor: "azure" "@azure-tools/typespec-java": - package-dir: "azure-resourcemanager-compute" - namespace: "com.azure.resourcemanager.compute" - service-name: "Compute" # human-readable service name, whitespace allowed + package-dir: "azure-resourcemanager-computerecommender" + namespace: "com.azure.resourcemanager.computerecommender" + service-name: "Compute Recommender" # human-readable service name, whitespace allowed flavor: azure "@azure-tools/typespec-ts": - package-dir: "arm-compute" + package-dir: "arm-computerecommender" flavor: azure experimental-extensible-enums: true package-details: - name: "@azure/arm-compute" + name: "@azure/arm-computerecommender" "@azure-tools/typespec-go": - service-dir: "sdk/resourcemanager/compute" - package-dir: "armcompute" + service-dir: "sdk/resourcemanager/computerecommender" + package-dir: "armcomputerecommender" module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}" fix-const-stuttering: true flavor: "azure" From cfc05d2c5fb19c2c390920313d61a7a59742b5bc Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 21 Jul 2025 14:47:15 +0800 Subject: [PATCH 13/35] Update tspconfig.yaml --- .../Microsoft.Compute/RecommenderRP/tspconfig.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml index 185aa8416b54..5b97e4ba1071 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/tspconfig.yaml @@ -25,9 +25,9 @@ options: generate-sample: true flavor: "azure" "@azure-tools/typespec-java": - package-dir: "azure-resourcemanager-computerecommender-generated" - namespace: "com.azure.resourcemanager.computerecommender.generated" - service-name: "Compute Recommender" # human-readable service name, whitespace allowed + package-dir: "azure-resourcemanager-computerecommender" + namespace: "com.azure.resourcemanager.computerecommender" + service-name: "Compute Recommender" flavor: azure "@azure-tools/typespec-ts": package-dir: "arm-computerecommender" From d6fc73833a92f3024da3bfd44ee9362c3bedb2e2 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 22 Jul 2025 21:46:29 -0700 Subject: [PATCH 14/35] Revert change to readme.md --- .../Microsoft.Compute/RecommenderRP/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md index f2a2b348d905..e5e91955f0c4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md @@ -25,11 +25,11 @@ To see additional help and options, run: These are the global settings for the AzureComputeRecommenderClient API. ``` yaml !$(python) || !$(track2) -title: AzureComputeRecommenderManagementClient +title: ComputeRecommenderResourceProviderClient ``` ``` yaml -description: Azure Compute Recommender Client +description: The Compute Recommender Resource Provider Client openapi-type: arm tag: package-2025-06-05 From 72310cb113a40666ebf390e1e549ec727b9cf4dd Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 22 Jul 2025 22:20:14 -0700 Subject: [PATCH 15/35] Increment main.tsp common types version to v6, change RecommenderRP.json title and description --- .../resource-manager/Microsoft.Compute/RecommenderRP/main.tsp | 2 +- .../RecommenderRP/stable/2025-06-05/RecommenderRP.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp index 2bd4e6497a8d..9fcf6dbd18b7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -28,7 +28,7 @@ using TypeSpec.Versioning; @armProviderNamespace @service(#{ title: "ComputeRecommenderResourceProviderClient" }) @versioned(Versions) -@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v6) namespace Microsoft.Compute; /** diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index e352b49c5958..124ba3cf9fdd 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -1,9 +1,9 @@ { "swagger": "2.0", "info": { - "title": "AzureComputeRecommenderManagementClient", + "title": "ComputeRecommenderResourceProviderClient", "version": "2025-06-05", - "description": "Azure Compute Recommender Client", + "description": "The Compute Recommender Resource Provider Client", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" From aa541741ff58854cd8d6e328cfa5215f14d1311e Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 22 Jul 2025 22:25:11 -0700 Subject: [PATCH 16/35] Run tsv on files --- .../RecommenderRP/stable/2025-06-05/RecommenderRP.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 124ba3cf9fdd..63ff8fdda499 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -30,9 +30,9 @@ "securityDefinitions": { "azure_auth": { "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } From 3624032683c769e9423ada37b99536631e6c29b8 Mon Sep 17 00:00:00 2001 From: melina5656 <140602263+melina5656@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:27:25 +0800 Subject: [PATCH 17/35] add clientName --- .../Microsoft.Compute/RecommenderRP/back-compatible.tsp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp index a6230d0ffe65..01d437503850 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp @@ -6,3 +6,7 @@ using Microsoft.Compute; @@clientName(ComputeDiagnosticBases.post::parameters.body, "spotPlacementScoresInput" ); +@@clientName(SpotPlacementScoresResponse, + "SpotPlacementScoresResult", + "csharp" +); From 5d32435739270a9896b12400b9b46f1cf63c02ca Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Mon, 4 Aug 2025 00:07:59 -0700 Subject: [PATCH 18/35] Update specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp Co-authored-by: catalinaperalta <9859037+catalinaperalta@users.noreply.github.com> --- .../resource-manager/Microsoft.Compute/RecommenderRP/main.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp index 9fcf6dbd18b7..6abc157fbded 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -39,6 +39,6 @@ enum Versions { * The 2025-06-05 API version. */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) - @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_2) v2025_06_05: "2025-06-05", } From 0f3ca9c9962d15e56c0f637dd3bfe8c75fa52992 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Mon, 4 Aug 2025 00:19:58 -0700 Subject: [PATCH 19/35] Remove some suppressions, remove some redundant imports --- .../Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp | 1 - .../resource-manager/Microsoft.Compute/RecommenderRP/main.tsp | 2 -- .../resource-manager/Microsoft.Compute/RecommenderRP/models.tsp | 1 - 3 files changed, 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp index 6f89f2b705ec..f9619dc13298 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp @@ -31,7 +31,6 @@ interface ComputeDiagnosticBases { /** * Gets Spot Placement Scores metadata. */ - #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @operationId("SpotPlacementScores_Get") get is ArmResourceRead< ComputeDiagnosticBase, diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp index 6abc157fbded..acd328928e97 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -9,8 +9,6 @@ */ import "@typespec/rest"; import "@typespec/versioning"; -import "@azure-tools/typespec-azure-core"; -import "@azure-tools/typespec-azure-resource-manager"; import "./models.tsp"; import "./ComputeDiagnosticBase.tsp"; import "./back-compatible.tsp"; diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp index 9db73130caf5..a7df3b998100 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp @@ -12,7 +12,6 @@ namespace Microsoft.Compute; /** * Contains additional properties of a diagnostic */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model DiagnosticProperties { /** * Describes what are the supported resource types for a diagnostic. From 08bd8f58cc581db41d9f2a7ebae4ff8fa1a3b2ef Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 5 Aug 2025 09:45:47 -0700 Subject: [PATCH 20/35] Adding Operations_List to RecommenderRP.json and also adding Operations interface to main.tsp --- .../Microsoft.Compute/RecommenderRP/main.tsp | 2 + .../stable/2025-06-05/RecommenderRP.json | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp index acd328928e97..ac01c2250f12 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -29,6 +29,8 @@ using TypeSpec.Versioning; @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v6) namespace Microsoft.Compute; +interface Operations extends Azure.ResourceManager.Operations + /** * The available API versions. */ diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 63ff8fdda499..b36604ca25c5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -44,6 +44,45 @@ } ], "paths": { + "/providers/Microsoft.Compute/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Operations_List_MaximumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" + }, + "Operations_List_MinimumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot": { "get": { "operationId": "SpotPlacementScores_Get", From 425dac50af800af6cc477b91255d3981689425e4 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 5 Aug 2025 09:55:07 -0700 Subject: [PATCH 21/35] Remove examples from operations_list and also update references to type defs --- .../stable/2025-06-05/RecommenderRP.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index b36604ca25c5..bdb06645c54f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -53,31 +53,23 @@ "description": "List the operations for the provider", "parameters": [ { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/OperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../common-types/v1/common.json#/definitions/CloudError" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "Operations_List_MaximumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" - }, - "Operations_List_MinimumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } From dc638705009a2f557099a0cabc6aec2cd34fb762 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 5 Aug 2025 10:04:17 -0700 Subject: [PATCH 22/35] Adding computeRPCommonExamples/Operations_List_MaximumSet_Gen computeRPCommonExamples/Operations_List_MinimumSet_Gen examples --- .../stable/2025-06-05/RecommenderRP.json | 8 ++++++ .../Operations_List_MaximumSet_Gen.json | 25 +++++++++++++++++++ .../Operations_List_MinimumSet_Gen.json | 12 +++++++++ 3 files changed, 45 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index bdb06645c54f..625222fcaa94 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -70,6 +70,14 @@ } } }, + "x-ms-examples": { + "Operations_List_MaximumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" + }, + "Operations_List_MinimumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..f65e066b9d55 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2024-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "origin": "aaaaa", + "name": "aaaaaaaaaaaa", + "display": { + "operation": "aaaaaaaaaaaaaaaaaaaaaa", + "resource": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "description": "aaaaaaaaaaaaaaaaaaaaaa", + "provider": "aaaaaaaaaaaaaaaaaa" + } + } + ] + } + } + }, + "operationId": "Operations_List", + "title": "Operations_List_MaximumSet_Gen" +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..1dca480506dc --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2024-11-01" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "Operations_List", + "title": "Operations_List_MinimumSet_Gen" +} From dd10a7769a0ec63d12446ed1939a6cdf1b052bdc Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 5 Aug 2025 10:07:21 -0700 Subject: [PATCH 23/35] Update API version to 2025-06-05 --- .../computeRPCommonExamples/Operations_List_MaximumSet_Gen.json | 2 +- .../computeRPCommonExamples/Operations_List_MinimumSet_Gen.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json index f65e066b9d55..51091a8209bc 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2024-11-01" + "api-version": "2025-06-05" }, "responses": { "200": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json index 1dca480506dc..1d3b6ef65ed0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2024-11-01" + "api-version": "2025-06-05" }, "responses": { "200": { From fe2b3988b40b9c6281097a4271eeb761109ceefd Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 5 Aug 2025 10:12:11 -0700 Subject: [PATCH 24/35] Readd missing parenthesis --- .../resource-manager/Microsoft.Compute/RecommenderRP/main.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp index ac01c2250f12..c9233fec6c63 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/main.tsp @@ -29,7 +29,7 @@ using TypeSpec.Versioning; @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v6) namespace Microsoft.Compute; -interface Operations extends Azure.ResourceManager.Operations +interface Operations extends Azure.ResourceManager.Operations {} /** * The available API versions. From deaad00720aaeb7cc3599b3c04b998370ec700d3 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 00:12:59 -0700 Subject: [PATCH 25/35] Readding no-openapi suppression back to ComputeDiagnosticBase.tsp --- .../Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp index f9619dc13298..6f89f2b705ec 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp @@ -31,6 +31,7 @@ interface ComputeDiagnosticBases { /** * Gets Spot Placement Scores metadata. */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @operationId("SpotPlacementScores_Get") get is ArmResourceRead< ComputeDiagnosticBase, From 7781955778e336f5205013055aa1bb30440d2c8c Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 00:22:10 -0700 Subject: [PATCH 26/35] Readd provisioning state suppression in models.tsp --- .../resource-manager/Microsoft.Compute/RecommenderRP/models.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp index a7df3b998100..9db73130caf5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp @@ -12,6 +12,7 @@ namespace Microsoft.Compute; /** * Contains additional properties of a diagnostic */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model DiagnosticProperties { /** * Describes what are the supported resource types for a diagnostic. From b261898bfe91fd0a9721c69801e4ab2cfff10886 Mon Sep 17 00:00:00 2001 From: melina5656 <140602263+melina5656@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:27:05 +0800 Subject: [PATCH 27/35] Remove the operationId decorator and run the TSP compile command --- .../RecommenderRP/ComputeDiagnosticBase.tsp | 4 ---- .../RecommenderRP/back-compatible.tsp | 2 ++ .../stable/2025-06-05/RecommenderRP.json | 11 +++-------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp index 6f89f2b705ec..303e184d0d43 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/ComputeDiagnosticBase.tsp @@ -31,8 +31,6 @@ interface ComputeDiagnosticBases { /** * Gets Spot Placement Scores metadata. */ - #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - @operationId("SpotPlacementScores_Get") get is ArmResourceRead< ComputeDiagnosticBase, BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters @@ -41,9 +39,7 @@ interface ComputeDiagnosticBases { /** * Generates placement scores for Spot VM skus. */ - #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @action("generate") - @operationId("SpotPlacementScores_Post") post is ArmResourceActionSync< ComputeDiagnosticBase, SpotPlacementScoresInput, diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp index 01d437503850..29ac036329d3 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/back-compatible.tsp @@ -3,6 +3,8 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.Compute; +@@clientLocation(ComputeDiagnosticBases.get, "SpotPlacementScores"); +@@clientLocation(ComputeDiagnosticBases.post, "SpotPlacementScores"); @@clientName(ComputeDiagnosticBases.post::parameters.body, "spotPlacementScoresInput" ); diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 625222fcaa94..aac8d5b3e456 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -39,6 +39,9 @@ } }, "tags": [ + { + "name": "Operations" + }, { "name": "ComputeDiagnosticBases" } @@ -70,14 +73,6 @@ } } }, - "x-ms-examples": { - "Operations_List_MaximumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" - }, - "Operations_List_MinimumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } From a8ec7f5af5babb0934327b061d5ab28068c31a15 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 00:28:42 -0700 Subject: [PATCH 28/35] Update arm-resource-provisioning-state Fix me justification --- .../resource-manager/Microsoft.Compute/RecommenderRP/models.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp index 9db73130caf5..1b90d6e44fff 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp @@ -12,7 +12,7 @@ namespace Microsoft.Compute; /** * Contains additional properties of a diagnostic */ -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "This resource does not involve long-running operations and does not require provisioningState." model DiagnosticProperties { /** * Describes what are the supported resource types for a diagnostic. From 83dd21926948c416889a7c7e13e4dacd271822f1 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 00:32:59 -0700 Subject: [PATCH 29/35] Adding FIXME justifications for missing-x-ms-identifiers suppressions in models.tsp --- .../Microsoft.Compute/RecommenderRP/models.tsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp index 1b90d6e44fff..f3cd277511ee 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/models.tsp @@ -32,7 +32,7 @@ model SpotPlacementScoresInput { /** * The desired virtual machine SKU sizes. */ - #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "ResourceSize is a non-resource data structure representing SKU metadata; it is not individually addressable and does not require identifiers." desiredSizes?: ResourceSize[]; /** @@ -68,7 +68,7 @@ model SpotPlacementScoresResponse { /** * The desired virtual machine SKU sizes. */ - #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "ResourceSize is a non-resource data structure representing SKU metadata; it is not individually addressable and does not require identifiers." desiredSizes?: ResourceSize[]; /** @@ -84,7 +84,7 @@ model SpotPlacementScoresResponse { /** * A placement score indicating the likelihood of successfully allocating the specified Spot VM(s), as well as the expected lifetimes of the Spot VM(s) after allocation. */ - #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "PlacementScore is a non-resource data model used for telemetry and scoring; items are not uniquely addressable and do not require x-ms-identifiers." placementScores?: PlacementScore[]; } From 6f05e4e76d2f01bdde90829d7f5466e69d41eefe Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 01:37:10 -0700 Subject: [PATCH 30/35] Readd examples for operations_list --- .../RecommenderRP/stable/2025-06-05/RecommenderRP.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index aac8d5b3e456..7d14320207fe 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -73,6 +73,14 @@ } } }, + "x-ms-examples": { + "Operations_List_MaximumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" + }, + "Operations_List_MinimumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } From a3dc3569142d496ed2a49c1fca74998230ac9117 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 01:43:46 -0700 Subject: [PATCH 31/35] Run npm and npx on RecommenderRP.json --- .../RecommenderRP/stable/2025-06-05/RecommenderRP.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 7d14320207fe..aac8d5b3e456 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -73,14 +73,6 @@ } } }, - "x-ms-examples": { - "Operations_List_MaximumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" - }, - "Operations_List_MinimumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } From 11f053516d3bfe9c5dd216d3f88a3c8ba0ec90a6 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Wed, 6 Aug 2025 01:44:50 -0700 Subject: [PATCH 32/35] Revert "Run npm and npx on RecommenderRP.json" This reverts commit a3dc3569142d496ed2a49c1fca74998230ac9117. --- .../RecommenderRP/stable/2025-06-05/RecommenderRP.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index aac8d5b3e456..7d14320207fe 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -73,6 +73,14 @@ } } }, + "x-ms-examples": { + "Operations_List_MaximumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" + }, + "Operations_List_MinimumSet_Gen": { + "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" + } + }, "x-ms-pageable": { "nextLinkName": "nextLink" } From be9a4b4052c5cac62713dcf57e05621bb355d863 Mon Sep 17 00:00:00 2001 From: melina5656 <140602263+melina5656@users.noreply.github.com> Date: Thu, 7 Aug 2025 10:13:32 +0800 Subject: [PATCH 33/35] Modify the example file to the correct folder --- .../Operations_List_MaximumSet_Gen.json | 25 +++++++++++++++++++ .../Operations_List_MinimumSet_Gen.json | 12 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..51091a8209bc --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2025-06-05" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "origin": "aaaaa", + "name": "aaaaaaaaaaaa", + "display": { + "operation": "aaaaaaaaaaaaaaaaaaaaaa", + "resource": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "description": "aaaaaaaaaaaaaaaaaaaaaa", + "provider": "aaaaaaaaaaaaaaaaaa" + } + } + ] + } + } + }, + "operationId": "Operations_List", + "title": "Operations_List_MaximumSet_Gen" +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..1d3b6ef65ed0 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2025-06-05" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "Operations_List", + "title": "Operations_List_MinimumSet_Gen" +} From 332ee4b21ee31e12153a67733bb45168084fc60c Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Thu, 7 Aug 2025 00:27:31 -0700 Subject: [PATCH 34/35] Move Operations_List_MaximumSet_Gen.json and Operations_List_MinimumSet_Gen.json out of computeRPcommon --- .../RecommenderRP/stable/2025-06-05/RecommenderRP.json | 4 ++-- .../Operations_List_MaximumSet_Gen.json | 0 .../Operations_List_MinimumSet_Gen.json | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/{computeRPCommonExamples => }/Operations_List_MaximumSet_Gen.json (100%) rename specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/{computeRPCommonExamples => }/Operations_List_MinimumSet_Gen.json (100%) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json index 7d14320207fe..21d1e2039bac 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json @@ -75,10 +75,10 @@ }, "x-ms-examples": { "Operations_List_MaximumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json" + "$ref": "./examples/Operations_List_MaximumSet_Gen.json" }, "Operations_List_MinimumSet_Gen": { - "$ref": "./examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json" + "$ref": "./examples/Operations_List_MinimumSet_Gen.json" } }, "x-ms-pageable": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/Operations_List_MaximumSet_Gen.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json rename to specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/Operations_List_MaximumSet_Gen.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/Operations_List_MinimumSet_Gen.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json rename to specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/examples/Operations_List_MinimumSet_Gen.json From 6054f4e6ef4fa4aa47af214c5bfe91ddcb69ae1d Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Thu, 7 Aug 2025 09:50:44 -0700 Subject: [PATCH 35/35] Move Operations_List_MaximumSet_Gen.json and Operations_List_MinimumSet_Gen.json out of computeRPcommon --- .../Operations_List_MaximumSet_Gen.json | 0 .../Operations_List_MinimumSet_Gen.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/{computeRPCommonExamples => }/Operations_List_MaximumSet_Gen.json (100%) rename specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/{computeRPCommonExamples => }/Operations_List_MinimumSet_Gen.json (100%) diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/Operations_List_MaximumSet_Gen.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MaximumSet_Gen.json rename to specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/Operations_List_MaximumSet_Gen.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/Operations_List_MinimumSet_Gen.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/computeRPCommonExamples/Operations_List_MinimumSet_Gen.json rename to specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/examples/2025-06-05/Operations_List_MinimumSet_Gen.json