tke — Kubernetes Engine
tke · 2018-05-25

DescribeExistedInstances

POST

Query one or more existing node and determine whether they can be added to a cluster.

Wire call

Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /tke/DescribeExistedInstances path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.

curl
curl -sS https://tke.api3.convergecloud.com/ \
  -H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/tke/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Host: tke.api3.convergecloud.com' \
  -H 'X-TC-Action: DescribeExistedInstances' \
  -H 'X-TC-Version: 2018-05-25' \
  -H 'X-TC-Timestamp: <unix-seconds>' \
  -H 'X-TC-Region: luzon' \
  -d '{"Offset":0,"Limit":20}'

Request parameters

FieldTypeRequiredDescription
ClusterIdstring—Cluster ID. Enter the `ClusterId` field returned when you call the DescribeClusters API (Only VPC ID obtained through `ClusterId` need filtering conditions. When comparing statuses, the nodes on all clusters in this region will be used for comparison. You cannot specify `InstanceIds` and `ClusterId` at the same time.)
InstanceIdsstring[]—Query by one or more instance ID(s). Instance ID format: ins-xxxxxxxx. (Refer to section ID.N of the API overview for this parameter's specific format.) Up to 100 instances are allowed for each request. You cannot specify InstanceIds and Filters at the same time.
FiltersFilter[]—Filter condition. For fields and other information, see the DescribeInstances API. If a ClusterId has been set, then the cluster's VPC ID will be attached as a query field. In this situation, if a "vpc-id" is specified in Filter, then the specified VPC ID must be consistent with the cluster's VPC ID.
VagueIpAddressstring—Filter by instance IP (Supports both private and public IPs)
VagueInstanceNamestring—Filter by instance name
Offsetinteger—Offset. Default value: 0. For more information on Offset, see the relevant section in the API Introduction.
Limitinteger—Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit, see the relevant section in the API Introduction.
IpAddressesstring[]—Filter by multiple instance IPs

Response

Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.

FieldTypeDescription
ExistedInstanceSetExistedInstance[]Array of existing instance information.
TotalCountintegerNumber of instances that match the filter condition(s).
RequestIdstringThe unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
Success
{
  "Response": {
    "ExistedInstanceSet": …,
    "TotalCount": …,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/tke.
Request bodyvalid JSONPOST tke.api3.convergecloud.com · DescribeExistedInstances
Read-only. Creates nothing.
Recorded example response
{
  "Response": {
    "RequestId": "3fcc2ee1-804e-a5d9-b81c-7926c0ab3808",
    "Error": {
      "Code": "InternalError",
      "Message": "[Type 9000] request to backend error, msg is Bad Gateway"
    }
  }
}