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

URL Parameters

Parameter Type Description
GROUP_ID * String

The Elastigroup ID you want to suspend

Example: sig-12345
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc

Available Body Attributes


Attribute Type Description
suspensions * Array

A list of processes to suspend

suspensions.name * String

The name of the process that will be suspended. Valid values are: AUTO_SCALE, AUTO_HEALING, OUT_OF_STRATEGY, PREVENTIVE_REPLACEMENT, REVERT_PREFERRED

suspensions.ttlInMinutes Integer

This is the TTL, time to live, of the suspension in minutes. The default value is null, which denotes that the suspension is indefinite until specifically deleted

process * Array

List of processes: 'AUTO_SCALE', 'AUTO_HEALING', 'OUT_OF_STRATEGY', 'PREVENTIVE_REPLACEMENT', 'REVERT_PREFERRED'

Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
   "suspensions" : [
     {"name" : "AUTO_SCALE"},
     {"name" : "OUT_OF_STRATEGY","ttlInMinutes" : 20},
     {"name" : "PREVENTIVE_REPLACEMENT","ttlInMinutes" : 120},
     {"name" : "REVERT_PREFERRED"}
	],
    "processes" : [
      "AUTO_SCALE",
      "AUTO_HEALING",
      "OUT_OF_STRATEGY",
      "PREVENTIVE_REPLACEMENT",
      "REVERT_PREFERRED"
    ]
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "0bb5db74-2457-4a34-b8f3-174e6bf5578e",
    "url": "/aws/ec2/group/sig-12345/suspension",
    "method": "POST",
    "timestamp": "2016-06-19T08:41:57.516Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:suspension",
    "items": [
      {
        "groupId": "sig-12345",
        "processes" : [
	"AUTO_SCALE",
            "OUT_OF_STRATEGY",
            "PREVENTIVE_REPLACEMENT",
            "REVERT_PREFERRED"
],
"suspensions": [
{
"name" : "AUTO_SCALE",
"expiresAt" : null
},  
{
"name" : "OUT_OF_STRATEGY",
"expiresAt" : "2018-10-03T07:23:24.000+0000"
},
{
"name" :  "PREVENTIVE_REPLACEMENT",
"expiresAt" : "2018-10-03T09:03:24.000+0000"
},
{
"name" : "REVERT_PREFERRED",
"expiresAt" : null
 }
]

      }
    ],
    "count": 4
  }
}