Azure Virtual Machines Spot Placement Scores API

The SpotPlacementScores API from Azure Virtual Machines — 2 operation(s) for spotplacementscores.

GitHub OpenAPI

Operations 2

GET /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot Spot placement scores get #
POST /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate Spot placement scores post #

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-virtual-machines:microsoft-azure-virtual-machines-spotplacementscores-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-virtual-machines-spotplacementscores-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ComputeRecommenderResourceProviderClient Spot Placement…
  version: '2025-06-05'
  description: The Compute Recommender Resource Provider Client
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: SpotPlacementScores
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot:
    get:
      operationId: SpotPlacementScores_Get
      tags:
      - SpotPlacementScores
      description: Gets Spot Placement Scores metadata.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/LocationParameter'
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpotPlacementScoresBase'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Spot placement scores get
      x-summary-source: derived
  /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate:
    post:
      operationId: SpotPlacementScores_Post
      tags:
      - SpotPlacementScores
      description: Generates placement scores for Spot VM skus.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/LocationParameter'
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpotPlacementScoresResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpotPlacementScoresInput'
        description: SpotPlacementScores object supplied in the body of the Post spot placement scores operation.
        required: true
      summary: Spot placement scores post
      x-summary-source: derived
components:
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription. The value must be an UUID.
      required: true
      schema:
        type: string
        format: uuid
    LocationParameter:
      name: location
      in: path
      description: The name of the Azure region.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        minLength: 1
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
  schemas:
    PlacementScore:
      type: object
      description: The placement score for a virtual machine SKU, region, and availability 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 virtual machines.
        isQuotaAvailable:
          type: boolean
          description: Whether the desired quota is available.
    SpotPlacementScoresInput:
      type: object
      description: SpotPlacementScores API Input.
      properties:
        desiredLocations:
          type: array
          description: The desired regions. If not set, the location from the request URI is used as the desired location. Each location in this list must be a valid Azure region.
          items:
            type: string
        desiredSizes:
          type: array
          description: The desired virtual machine SKU sizes.
          items:
            $ref: '#/components/schemas/ResourceSize'
        desiredCount:
          type: integer
          format: int32
          description: Desired instance count per region/zone based on the scope. If not set, defaults to 1.
        availabilityZones:
          type: boolean
          description: Defines if the scope is zonal or regional.
    PlacementScoresProperties:
      type: object
      description: Contains additional properties of a placement scores resource.
      properties:
        supportedResourceTypes:
          type: array
          description: Describes the supported resource types for placement scoring.
          items:
            type: string
    ProxyResource:
      type: object
      title: Proxy Resource
      description: The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
      allOf:
      - $ref: '#/components/schemas/Resource'
    ErrorResponse:
      type: object
      title: Error response
      description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: The error object.
    ResourceSize:
      type: object
      description: SpotPlacementRecommender API response.
      properties:
        sku:
          type: string
          description: The resource's CRP virtual machine SKU size.
    SpotPlacementScoresBase:
      type: object
      description: Contains metadata of the Spot Placement Scores resource.
      properties:
        properties:
          $ref: '#/components/schemas/PlacementScoresProperties'
          description: Contains additional properties of a placement scores resource.
      allOf:
      - $ref: '#/components/schemas/ProxyResource'
    SpotPlacementScoresResponse:
      type: object
      description: SpotPlacementScores API response.
      properties:
        desiredLocations:
          type: array
          description: The desired regions
          items:
            type: string
        desiredSizes:
          type: array
          description: The desired virtual machine SKU sizes.
          items:
            $ref: '#/components/schemas/ResourceSize'
        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
          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: '#/components/schemas/PlacementScore'
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.