{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-spot-placement-scores-response-schema.json",
  "title": "SpotPlacementScoresResponse",
  "description": "SpotPlacementScores API response.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-spotplacementscores-api-openapi.yml#/components/schemas/SpotPlacementScoresResponse",
  "type": "object",
  "properties": {
    "desiredLocations": {
      "type": "array",
      "description": "The desired regions",
      "items": {
        "type": "string"
      }
    },
    "desiredSizes": {
      "type": "array",
      "description": "The desired virtual machine SKU sizes.",
      "items": {
        "$ref": "#/$defs/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": "#/$defs/PlacementScore"
      }
    }
  },
  "$defs": {
    "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."
        }
      }
    },
    "ResourceSize": {
      "type": "object",
      "description": "SpotPlacementRecommender API response.",
      "properties": {
        "sku": {
          "type": "string",
          "description": "The resource's CRP virtual machine SKU size."
        }
      }
    }
  }
}