fbpx
POSThttps://api.spotinst.io/aws/ec2/instanceTypeRecommendation?accountId={ACCOUNT_ID}

Get suggested instance types by required resources.

Note that request must include region, and at least one of the following values:

  • baselineInstanceType
  • requiredVCpu
  • requiredMemoryGib

URL Parameters

ParameterTypeDescription
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "requirements": {
    "region": "us-east-1",
    "baselineInstanceType": "m5.large",
    "requiredVCpu": {
      "minimum": 2,
      "maximum": 4
    },
    "requiredMemoryGib": {
      "minimum": 16,
      "maximum": 64
    }
  }
}
AttributeTypeDescription
requirements Object

Set required resources for query

requirements.region * String

Set valid AWS region

requirements.baselineInstanceType String

Set valid AWS instance type as baseline

requirements.requiredVCpu Object

Set required CPU resources by min / max

requirements.requiredVCpu.minimum Integer

requirements.requiredVCpu.maximum Integer

requirements.requiredMemoryGib Object

Set required Memory (in Gib) resources by min / max

requirements.requiredMemoryGib.minimum String

requirements.requiredMemoryGib.maximum String

Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "352efcf7-8ae9-495f-a822-680ef2928c5c",
    "url": "/aws/ec2/instanceTypeRecommendation",
    "method": "POST",
    "timestamp": "2019-05-01T08:19:54.525Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:instanceTypeRecommendation",
    "items": [
      {
        "instanceType": "m4.large"
      },
      {
        "instanceType": "m5.large"
      }
    ],
    "count": 2
  }
}