POSThttps://api.spotinst.io/aws/ec2/instance/{INSTANCE_ID}/lock?ttlInMinutes={TTL}&accountId={ACCOUNT_ID}
Set termination protection for specific instance.
URL Parameters
Parameter | Type | Description |
---|---|---|
INSTANCE_ID * | String | The instance ID you want to protect Example: i-123456 |
TTL | String | Specify a TTL (in minutes) for this lock, meaning, for how long the protection will be valid for. Example: 23 |
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
{ "request": { "id": "3213e42e-455e-4901-a185-cc3eb65fac5f", "url": "/aws/ec2/instance/i-123456/lock", "method": "POST", "time": "2016-02-10T15:49:11.911Z" }, "response": { "status": { "code": 200, "message": "OK" } } }