DescribeInstances

Last updated: 2019-09-09 21:30:37

PDF

1. API Description

API domain name: es.tencentcloudapi.com.

This API queries all instances eligible in the specified region for the specified user account.

Default API request rate limit: 20 requests/sec.

Note: This API supports financial regions. As financial regions and non-financial regions are isolated, if a financial region, such as ap-shanghai-fsi, is assigned to the common parameter Region, we recommend you include that financial region in your domain name , such as es.ap-shanghai-fsi.tencentcloudapi.com.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The name of this API: DescribeInstances
Version Yes String Common parameter. The version of this API: 2018-04-16
Region Yes String Common parameter. For more information, see the list of regions supported by the product.
Zone No String Availability Zone of the cluster instance. If no value is specified for this parameter, all Availability Zones are assigned.
InstanceIds.N No Array of String List of cluster instance IDs
InstanceNames.N No Array of String List of cluster instance names
Offset No Integer Pagination start value; default value is 0
Limit No Integer Number of entries per page; default value is 20
OrderByKey No Integer Sort by field
  • 1: Instance ID
  • 2: Instance name
  • 3: AZ
  • 4: Creation time
  • If orderKey is not passed in, sort by creation time in descending order
    OrderByType No Integer Sorting order
  • 0: Ascending
  • 1: Descending
  • If orderByKey is passed in but orderByType is not, ascending order is used by default

    3. Output Parameters

    Parameter name Type Description
    TotalCount Integer Number of returned instances
    InstanceList Array of InstanceInfo List of instance details
    RequestId String The unique ID of a request, which is required for each troubleshooting case.

    4. Examples

    Example 1. Querying ES Cluster Instances

    Query the eligible ES cluster instances according to the given criteria and return their details

    Input Sample Code

    https://es.tencentcloudapi.com/?Action=DescribeInstances
    &<Common request parameter>

    Output Sample Code

    {
      "Response": {
        "TotalCount": 2,
        "InstanceList": [
          {
            "InstanceId": "es-sample",
            "InstanceName": "es-sample",
            "InstanceType": 2,
            "Region": "ap-guangzhou",
            "Zone": "ap-guangzhou-2",
            "AppId": 0,
            "Uin": "xxxxxxxx",
            "VpcUid": "vpc-sample",
            "SubnetUid": "subnet-sample",
            "Status": 1,
            "ChargeType": "PREPAID",
            "ChargePeriod": 1,
            "RenewFlag": "RENEW_FLAG_DEFAULT",
            "NodeType": "ES.S1.SMALL2",
            "NodeNum": 2,
            "CpuNum": 1,
            "MemSize": 2,
            "DiskType": "",
            "DiskSize": 100,
            "EsDomain": "es-sample.tencentelasticsearch.com",
            "EsVip": "0.0.0.0",
            "EsPort": 9200,
            "KibanaUrl": "https://es-sample.kibana.tencentelasticsearch.com:5601",
            "EsVersion": "5.6.4",
            "EsConfig": "{}",
            "EsAcl": {
              "WhiteIpList": [],
              "BlackIpList": []
            },
            "CreateTime": "2018-07-27 17:28:04",
            "UpdateTime": "2018-07-30 10:22:29",
            "Deadline": "2018-08-27 17:28:04"
          },
          {
            "InstanceId": "es-sample2",
            "InstanceName": "es-sample2",
            "InstanceType": 2,
            "Region": "ap-guangzhou",
            "Zone": "ap-guangzhou-4",
            "AppId": 0,
            "Uin": "xxxxxx",
            "VpcUid": "vpc-sample",
            "SubnetUid": "subnet-sample",
            "Status": 1,
            "ChargeType": "PREPAID",
            "ChargePeriod": 1,
            "RenewFlag": "RENEW_FLAG_DEFAULT",
            "NodeType": "ES.S1.MEDIUM4",
            "NodeNum": 2,
            "CpuNum": 2,
            "MemSize": 4,
            "DiskType": "",
            "DiskSize": 100,
            "EsDomain": "es-sample.tencentelasticsearch.com",
            "EsVip": "0.0.0.0",
            "EsPort": 9200,
            "KibanaUrl": "https://es-sample.kibana.tencentelasticsearch.com:5601",
            "EsVersion": "5.6.4",
            "EsConfig": "{}",
            "EsAcl": {
              "WhiteIpList": [],
              "BlackIpList": []
            },
            "CreateTime": "2018-07-26 17:47:47",
            "UpdateTime": "2018-07-26 18:16:50",
            "Deadline": "2018-08-26 17:47:47"
          }
        ],
        "RequestId": "5d5a201f-0a3d-485f-a82f-3c73ccca348a"
      }
    }

    5. Developer Resources

    API Explorer

    This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

    SDK

    TencentCloud API 3.0 integrates software development toolkits (SDKs) that support various programming languages to make it easier for you to call the APIs.

    TCCLI

    6. Error Codes

    The following error codes are API business logic-related. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError Internal error.
    InvalidParameter Incorrect parameter.