DescribeInstances

Last updated: 2020-02-18 19:10:16

1. API Description

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

This API is used to query all eligible instances in the current region under the current account.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: es.ap-shanghai-fsi.tencentcloudapi.com

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: DescribeInstances
Version Yes String Common parameter. The value used for this API: 2018-04-16
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
Zone No String AZ of the cluster instance. If this is not passed in, all AZs are used by default
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: 0
Limit No Integer Number of entries per page. Default value: 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
    TagList.N No Array of TagInfo
    IpList.N No Array of String

    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 request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying ES cluster instances

    This example shows you how to query eligible ES cluster instances according to the given criteria and return their details.

    Input Example

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

    Output Example

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

    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

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError Internal error.
    InvalidParameter Invalid parameter.