Querying the Repossession Status of a Spot Instance
Last updated: 2019-10-28 10:59:36PDF
Spot instances may be repossessed by Tencent Cloud due to price or inventory reasons. To enable users to perform custom operations before the instance repossession, we provide an API for obtaining repossession status information through an internal metadata mechanism.
Instance metadata refers to data relevant to an instance. It can be used for configuring or managing an operating instance. You can access and obtain instance metadata inside an instance. For more information, see Viewing Instance Metadata.
Obtaining Repossession Status Information of a Spot Instance by Using Metadata
To obtain the repossession status information of a spot instance, you can access the metadata by using the cURL tool or an HTTP GET request.
- The following returned information indicates the repossession time of the spot instance.
- If the error code 404 is returned, the instance is not a spot instance or repossession has not been triggered.
For more information, see Viewing Instance Metadata.