-
Notifications
You must be signed in to change notification settings - Fork 5.9k
SpotPlacementScore restructuring to RecommenderRP subdirectory - init… #36075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Elina-L
merged 17 commits into
Azure:main
from
Elina-L:wenxliu/Part1SplitSpotPlacementScoreAPIIntoRecommenderRP
Jul 23, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
951848a
SpotPlacementScore restructuring to RecommenderRP subdirectory - init…
Elina-L e27e489
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L 0d26ffd
Adding readme.md in RecommenderRP, default tag is 2025-02-01-preview
Elina-L cceb1db
Update RecommenderRP.json to only have the latest versions of SpotPla…
Elina-L a8b20c5
Adding missing required property
Elina-L 191d993
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L 2b66bfc
Change API version to 2025-06-05, remove all suppressions
Elina-L d2290bd
Merge branch 'wenxliu/Part1SplitSpotPlacementScoreAPIIntoRecommenderR…
Elina-L dc3ba2b
Clean up unused class definitions, use latest v6 types.json file
Elina-L 28a1f31
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L faa74d6
Adding partial suppressions back
Elina-L 8b9e982
Add back OperationsAPIImplementation suppression and add paths in whe…
Elina-L 1918529
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L d6b9f54
Update suppressions yaml for 2025-06-05 version
Elina-L e2d2d4e
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L af08905
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L 94b3750
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
mikeharder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
specification/compute/resource-manager/Microsoft.Compute/RecommenderRP/readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # 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 | ||
| where: $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate"] | ||
| - code: PathForNestedResource | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a where clause to indicate which property you are suppressing? Add more entries if there're multiple instances.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added where clause |
||
| 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 | ||
| where: $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot"] | ||
| ``` | ||
|
|
||
| ### 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 | ||
| ``` | ||
255 changes: 255 additions & 0 deletions
255
...ute/resource-manager/Microsoft.Compute/RecommenderRP/stable/2025-06-05/RecommenderRP.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,255 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "AzureComputeRecommenderManagementClient", | ||
| "description": "Azure Compute Recommender 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/v6/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/LocationParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../../common-types/resource-management/v6/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/v6/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/v6/types.json#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/LocationParameter" | ||
| }, | ||
| { | ||
| "$ref": "../../../../../../common-types/resource-management/v6/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/v6/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/v6/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 resource SKUs." | ||
| }, | ||
| "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 resource SKUs." | ||
| }, | ||
| "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": "The spot placement scores." | ||
| } | ||
| }, | ||
| "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 region." | ||
| }, | ||
| "score": { | ||
| "type": "string", | ||
| "description": "The placement score." | ||
| }, | ||
| "isQuotaAvailable": { | ||
| "type": "boolean", | ||
| "description": "Whether the desired quota is available." | ||
| } | ||
| }, | ||
| "description": "The spot placement score for sku/region/zone combination." | ||
| } | ||
| } | ||
| } |
85 changes: 85 additions & 0 deletions
85
...crosoft.Compute/RecommenderRP/stable/2025-06-05/examples/GenerateSpotPlacementScores.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/placementScores/spot/generate?api-version=2025-06-05" | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a where clause to indicate which property you are suppressing? Add more entries if there're multiple instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added where clause