DescribeSpotTypeConfig

Last updated: 2020-10-16 18:38:33

1. API Description

Domain name for API request: cvm.tencentcloudapi.com.

This API is used to query spot instances that are available for purchase.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the Chinese name of an availability zone

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.

Input Example

GET https://cvm.tencentcloudapi.com/?Action=DescribeSpotTypeConfig
&Language=zh-CN
&<Common request parameters>

Output Example

{
    "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"
    }
}

Example2 Querying the list of spot instance offering

This example shows you how to query the list of spot instances that are available for purchase.

Input Example

GET https://cvm.tencentcloudapi.com/?Action=DescribeSpotTypeConfig
&instanceTypeList.1=S1.SMALL1
&<Common request parameters>

Output Example

{
  "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"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help