fbpx
GEThttps://api.spotinst.io/aws/ec2/instance/{INSTANCE_ID}?accountId={ACCOUNT_ID}

Get the current instance status Possible status values: Active and Terminating

URL Parameters

Parameter Type Description
INSTANCE_ID * String

The instance ID you want to query

Example: i-123456
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "3213e42e-455e-4901-a185-cc3eb65fac5f",
    "url": "/aws/ec2/instance/i-123456",
    "method": "GET",
    "timestamp": "2016-12-18T14:06:04.866Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:instance",
    "items": [
      {
        "instanceId": "i-123456789",
        "lifeCycleState": "ACTIVE"
      }
    ],
    "count": 1
  }
}