You can permanently lock a specific instance in your Spot account by calling the Lock Instances API without specifying a time-to-live (TTL) parameter. When the ttlInMinutes value is omitted, the lock persists indefinitely. This option is not available in the Spot Console UI, which supports only time-limited locks.
-
Use the Lock Instances API endpoint:
Refer to the full documentation for the endpoint here:
Lock Instances API documentation -
Request an indefinite lock:
Exclude thettlInMinutesparameter in your request. This ensures the instance remains locked without a duration limit.Example URL without
ttlInMinutes:https://api.spotinst.io/aws/ec2/instance/{INSTANCE_ID}/lock?accountId={ACCOUNT_ID}Example using a time-limited lock (optional comparison):
https://api.spotinst.io/aws/ec2/instance/{INSTANCE_ID}/lock?ttlInMinutes={TTL}&accountId={ACCOUNT_ID} -
Execute the API request:
Send the request using your preferred REST client or automation script with appropriate authentication headers and account details.
Outcome
The targeted instance is locked indefinitely, preventing automatic termination or replacement until the lock is manually removed.
Related Articles
Get Scan Status Using the API 10Number of Views Manually launch an instance using a specific launch specification or virtual node group 3Number of Views Does autohealing work on locked AWS instances? 6Number of Views API and Terraform allow enabling incompatible instance types with VNG image 17Number of Views Auto-healing behavior for locked instances 19Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago