tencent cloud

文档反馈

DescribeSpotTypeConfig

最后更新时间: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.

联系我们

联系我们,为您的业务提供专属服务。

技术支持

如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

7x24 电话支持