-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Adding new 2025-06-05 stable version to Diagnostic RP for Spot Placement Scores APIs #34340
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
Changes from 5 commits
b9d0d59
bdc8cbe
d9cac72
9b2d327
2c676de
3b3bb32
a6e4e86
4a0d313
f12f7c0
3cfc4e5
ff7a733
ed0b31e
9c4450b
6faaf09
942d47d
3b2225a
36389f5
df2f624
ebdc439
4da3160
22458de
fcc43c0
14055af
7528892
c0fc5ab
7e7909d
df4848b
1e421b0
ac2b55c
6de83c3
0fee86d
6eb2d4f
c004693
3456eb9
bbb4bb0
9b19c5b
d8c2f92
4c258de
f493f33
c49524f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,307 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "ComputeDiagnosticResourceProviderClient", | ||
| "description": "The Compute Diagnostic Resource Provider Client", | ||
| "version": "2025-06-01" | ||
| }, | ||
| "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." | ||
| } | ||
| } | ||
| }, | ||
| "ErrorResponse": { | ||
|
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.
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. Removed |
||
| "type": "object", | ||
| "properties": { | ||
| "error": { | ||
| "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorDetail" | ||
| } | ||
| }, | ||
| "description": "An error response from the Compute Diagnostic Resource Provider service." | ||
| }, | ||
| "ErrorDetail": { | ||
|
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.
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. Removed |
||
| "type": "object", | ||
| "properties": { | ||
| "code": { | ||
| "type": "string", | ||
| "description": "The error code." | ||
| }, | ||
| "target": { | ||
| "type": "string", | ||
| "description": "The target of the particular error." | ||
| }, | ||
| "message": { | ||
| "type": "string", | ||
| "description": "User friendly error message." | ||
| }, | ||
| "details": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorDetail" | ||
| }, | ||
| "description": "The Api error details" | ||
| }, | ||
| "innerError": { | ||
| "$ref": "#/definitions/InnerError", | ||
| "description": "The Api inner error" | ||
| } | ||
| }, | ||
| "description": "Error Detail message." | ||
| }, | ||
| "InnerError": { | ||
|
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.
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. Removed |
||
| "type": "object", | ||
| "properties": { | ||
| "exceptiontype": { | ||
| "type": "string", | ||
| "description": "The exception type." | ||
| }, | ||
| "errordetail": { | ||
| "type": "string", | ||
| "description": "The internal error message or exception dump." | ||
| } | ||
| }, | ||
| "description": "Inner error details." | ||
| }, | ||
| "SpotPlacementScoresInput": { | ||
| "type": "object", | ||
| "properties": { | ||
| "desiredLocations": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "description": "The desired regions" | ||
| }, | ||
| "desiredSizes": { | ||
|
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.
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. This API has already been rolled out to Prod as part of several preview versions and is being called by several external customers. This PR is just adding a new stable API version to the existing API without any changes to the API request or response entity models
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. @Elina-L - In future, when adding a new API version please follow this process to make your PR:
Note, the above was implied by the item you checked: Also, if your APIs are unchanged new the new API version from an API version that was previously signed off by ARM, you should indicate that in a comment with a pointer to the PR that was signed off. These steps will save a lot of your and the reviewer's time. |
||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/ResourceSize" | ||
| }, | ||
| "description": "The desired resource SKUs." | ||
|
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.
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. Updated description |
||
| }, | ||
| "desiredCount": { | ||
| "type": "integer", | ||
| "format": "int32", | ||
| "description": "Desired instance count per region/zone based on the scope." | ||
| }, | ||
| "availabilityZones": { | ||
|
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.
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. This API has already been rolled out to Prod as part of several preview versions and is being called by several external customers. This PR is just adding a new stable API version to the existing API without any changes to the API request or response entity models |
||
| "type": "boolean", | ||
| "description": "Defines if the scope is zonal or regional." | ||
| } | ||
| }, | ||
| "description": "SpotPlacementScores API Input." | ||
| }, | ||
| "SpotPlacementScoresResponse": { | ||
| "type": "object", | ||
| "properties": { | ||
| "desiredLocations": { | ||
|
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. Do these four properties (desired*, availabilityZones) just reflect the same values that were passed in the request, or are they set by the API? If they are set by the API, how do they differ from the input values? If they are just reflecting the input values, I'm not sure it makes sense to have them here in the response.
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. This API has already been rolled out to Prod as part of several preview versions and is being called by several external customers. This PR is just adding a new stable API version to the existing API without any changes to the API request or response entity models |
||
| "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": { | ||
|
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.
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. Same as above |
||
| "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": { | ||
|
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.
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. There is no difference between region and location |
||
| "type": "string", | ||
| "description": "The region." | ||
| }, | ||
| "availabilityZone": { | ||
|
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.
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. If it's set to regional availability, the availabilityZone property is not displayed. Example: |
||
| "type": "string", | ||
| "description": "The availability region." | ||
|
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.
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. Updated |
||
| }, | ||
| "score": { | ||
| "type": "string", | ||
| "description": "The placement score." | ||
|
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.
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. Updated |
||
| }, | ||
| "isQuotaAvailable": { | ||
|
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.
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. Same as above - adding new API version to an already existing API that has been rolled out in private versions |
||
| "type": "boolean", | ||
| "description": "Whether the desired quota is available." | ||
| } | ||
| }, | ||
| "description": "The spot placement score for sku/region/zone combination." | ||
| } | ||
| } | ||
| } | ||
| 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-01", | ||
| "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-01" | ||
|
Elina-L marked this conversation as resolved.
Outdated
|
||
| } | ||
| } | ||
| } | ||
| } | ||
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.
This is a singleton instance of resourceType locations/placementScores. Was that intentional? If so, it's normally suggested to use the name "default" instead of "spot". You will also need to add a collection GET path for the locations/placementScores type (will just return a list with one item in it).
If something else is intended, this API may need to be changed.
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.
Same as above - adding new API version to an already existing API that has been rolled out in private versions
There is an internal placementScores/general API which will also be exposed via ARM in future versions