fbpx
DELETEhttps://api.spotinst.io/aws/ec2/managedInstance/{MI_ID}?accountId={ACCOUNT_ID}

Delete an existing Managed Instance.

URL Parameters

Parameter Type Description
ACCOUNT_ID * String

Your Spotinst accountId associated with your token

Example: act-123abc
MI_ID * String

Managed Instance id you want to delete

Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
 "deallocationConfig": {
   "shouldDeleteImages": true,
   "shouldDeleteNetworkInterfaces": false,
   "shouldDeleteVolumes": false,
   "shouldDeleteSnapshots": true
 },
 "amiBackup": {
   "shouldDeleteImages": true
 }
}
Attribute Type Description
deallocationConfig Object

deallocationConfig.shouldDeleteImages Boolean

Flag to remove persistent images

Default: false
deallocationConfig.shouldDeleteNetworkInterfaces Boolean

Flag to remove network interfaces

Default: true
deallocationConfig.shouldDeleteVolumes Boolean

Flag to remove persistent volumes

Default: false
deallocationConfig.shouldDeleteSnapshots Boolean

Flag to remove snapshots

Default: false
amiBackup Object

amiBackup.shouldDeleteImages Boolean

Mark if images collected during AMI Auto Backup should be deleted during instance deletion

Default: false
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "4a0d5084-0b41-4255-82e5-d64a8232d7cc",
    "url": "/aws/ec2/managedInstance/smi-111",
    "method": "DELETE",
    "time": "2019-06-28T15:52:45.772Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    }
  }
}