tencent cloud

All product documents
Cloud Virtual Machine
DocumentationCloud Virtual MachineOperation GuideInstancesQuerying the Repossession Status of a Spot Instance
Querying the Repossession Status of a Spot Instance
Last updated: 2024-01-08 09:32:02
Querying the Repossession Status of a Spot Instance
Last updated: 2024-01-08 09:32:02
Spot instances may be repossessed by Tencent Cloud due to price or inventory reasons. To enable users to perform custom operations before instance repossession, we provide an API for obtaining information about repossession status via an internal metadata mechanism.

Metadata

Instance metadata refers to data relevant to an instance. It can be used for configuring or managing a running instance. You can log in to the instance to access and obtain instance metadata. For more information, see Querying Instance Metadata.

Querying the Termination Information of a Spot Instance using Metadata

Run the following command using the cURL tool. You can also send an HTTP GET request.
curl metadata.tencentyun.com/latest/meta-data/spot/termination-time
If the instance has been terminated, the termination time of the spot instance is returned, as shown below.
Note: The termination time refers to the OS time of the spot instance when it’s terminated (in UTC+8).
2018-08-18 12:05:33
If the error code 404 is returned, the instance is not a spot instance or it’s not terminated.
For more information, see Querying Instance Metadata.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon