Domain name for API request: cvm.tencentcloudapi.com.
This API is used to query spot instances that are available for purchase.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common parameter. The value used for this API: DescribeSpotTypeConfig. |
Version | Yes | String | Common parameter. The value used for this API: 2017-03-12. |
Region | No | String | Common parameter. This parameter is not required for this API. |
Parameter Name | Type | Description |
---|---|---|
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to query information of availability zones in the Guangzhou region. To return its Chinese name of the availability zone, you need to pass the parameter Language=zh-CN
.
GET https://cvm.tencentcloudapi.com/?Action=DescribeSpotTypeConfig
&Language=zh-CN
&<Common request parameters>
{
"Response": {
"TotalCount": 4,
"ZoneSet": [
{
"ZoneState": "UNAVAILABLE",
"ZoneId": "100001",
"Zone": "ap-guangzhou-1",
"ZoneName": "Guangzhou Zone 1"
},
{
"ZoneState": "AVAILABLE",
"ZoneId": "100002",
"Zone": "ap-guangzhou-2",
"ZoneName": "Guangzhou Zone 2",
},
{
"ZoneState": "AVAILABLE",
"ZoneId": "100003",
"Zone": "ap-guangzhou-3",
"ZoneName": "Guangzhou Zone 3",
},
{
"ZoneState": "AVAILABLE",
"ZoneId": "100004",
"Zone": "ap-guangzhou-4",
"ZoneName": "Guangzhou Zone 4"
}
],
"RequestId": "62DDFFC6-FDB5-44F7-20A6-59152E3D129A"
}
}
This example shows you how to query the list of spot instances that are available for purchase.
GET https://cvm.tencentcloudapi.com/?Action=DescribeSpotTypeConfig
&instanceTypeList.1=S1.SMALL1
&<Common request parameters>
{
"Response": {
"SpotTypeConfigSet": [
{
"gid": 6,
"zone": "ap-guangzhou-2",
"zone_id": 100002,
"instance_type": "S1.SMALL1",
"instance_family": "S1",
"cpu": 1,
"mem": 1,
"quota": 100,
"capacity_allot": 6,
"price_cur": 0.11,
"cvmQuota": 94
}
],
"RequestId": "6ef60bec-0242-43af-bb20-270359fb54a7"
}
}
This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
本页内容是否解决了您的问题?