Skip to content
Merged
Show file tree
Hide file tree
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 Jul 21, 2025
e27e489
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L Jul 21, 2025
0d26ffd
Adding readme.md in RecommenderRP, default tag is 2025-02-01-preview
Elina-L Jul 21, 2025
cceb1db
Update RecommenderRP.json to only have the latest versions of SpotPla…
Elina-L Jul 21, 2025
a8b20c5
Adding missing required property
Elina-L Jul 21, 2025
191d993
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L Jul 21, 2025
2b66bfc
Change API version to 2025-06-05, remove all suppressions
Elina-L Jul 21, 2025
d2290bd
Merge branch 'wenxliu/Part1SplitSpotPlacementScoreAPIIntoRecommenderR…
Elina-L Jul 21, 2025
dc3ba2b
Clean up unused class definitions, use latest v6 types.json file
Elina-L Jul 21, 2025
28a1f31
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L Jul 21, 2025
faa74d6
Adding partial suppressions back
Elina-L Jul 21, 2025
8b9e982
Add back OperationsAPIImplementation suppression and add paths in whe…
Elina-L Jul 21, 2025
1918529
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L Jul 21, 2025
d6b9f54
Update suppressions yaml for 2025-06-05 version
Elina-L Jul 21, 2025
e2d2d4e
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L Jul 22, 2025
af08905
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
Elina-L Jul 22, 2025
94b3750
Merge branch 'main' into wenxliu/Part1SplitSpotPlacementScoreAPIIntoR…
mikeharder Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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/generate"]
- code: PathForNestedResource

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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
```
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."
}
}
}
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"
}
}
}
}
Loading
Loading