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

The simulate instance interruption API is used for simulating a spot interruption in AWS, so that customers can verify specific applicative behaviors in case an interruption takes place. Once the interruption api is called, instances posted in the API body will be terminated in AWS, thus mocking a spot interruption.

Important: You need to specify which instances you would like to terminate within the call’s body field.

Body Attributes


Attribute Type Description
instancesToInterrupt * String

A list of group's instance ids to interrupt

Example: ["i-123456","i-9876543"]
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "instancesToInterrupt": ["i-123456","i-9876543"]
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "3213f42e-455e-4801-a185-cd3eb65fac5f",
    "url": "/aws/ec2/instance/interruption?accountId=act-9876654",
    "method": "POST",
    "time": "2018-10-10T15:49:11.911Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    }
  }
}