查询集群实例
最近更新时间: 2026-09-17 00:04:02
1. 接口描述
接口请求域名: tsf.api3.fincloud.tencent.cn。
查询集群实例
默认接口请求频率限制:20次/秒。
接口更新时间:2025-08-26 12:47:54。
接口既验签名又鉴权。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。
| 参数名称 | 必选 | 允许NULL | 类型 | 描述 |
|---|---|---|---|---|
| Action | 是 | 否 | String | 公共参数,本接口取值:DescribeClusterInstances |
| Version | 是 | 否 | String | 公共参数,本接口取值:2018-03-26 |
| Region | 是 | 否 | String | 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表 |
| SearchWord | 否 | 否 | String | 搜索字段 示例值: |
| ClusterId | 是 | 否 | String | 集群ID 示例值: |
| OrderBy | 否 | 否 | String | 排序字段 示例值: |
| OrderType | 否 | 否 | Int64 | 排序类型 示例值: |
| Offset | 否 | 否 | Int64 | 偏移量 示例值: |
| Limit | 否 | 否 | Int64 | 分页个数 示例值: |
| OnlyEKS | 否 | 否 | Bool | 是否只查询EKS超级节点(容器集群) 示例值: |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Result | TsfPageInstance | 集群机器实例分页信息 示例值:查看 |
| RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。
| 错误码 | 描述 |
|---|---|
| InternalError.ContainergroupKuberneteConnectError | 连接TKE服务失败。 |
| InvalidParameter.ParamError | 参数错误。 |
| ResourceNotFound.ClusterNotExist | 无法获取命名空间所属集群。 |
| FailedOperation.InstanceUpdateFailed | 机器实例更新失败。 |
| UnauthorizedOperation.NoPrivilege | 用户无权限访问该接口。。 |
| FailedOperation.GroupQueryFaild | 部署组查询失败。 |
| FailedOperation.InstanceQueryFailed | 查询机器实例部分失败。 |
| FailedOperation.TsfPrivilegeError | TSF权限模块异常,请联系系统管理员。。 |
| InternalError.CamRoleRequestError | TSF云API调用申请角色临时凭证调用请求失败。 |
| InternalError.CloudApiProxyError | TSF云API请求调用失败。 |
| InternalError.InstanceCommonError | TSF节点管理通用错误信息。 |
| InternalError.UnhandledException | [%s]模块未处理异常。。 |
| ResourceNotFound.MicroserviceOffline | 目标微服务已离线[%s]。。 |
| UnauthorizedOperation.CamGeneralError | 访问 CAM 系统出错,%s。 |
| UnauthorizedOperation.NoLicense | 缺少License。。 |
| InternalError.ClusterNotExistOrPrivilegeError | 无法找到部署组,或相应集群/命名空间/应用的权限不足。 |
| FailedOperation.UnhandledException | 模块未处理异常。 |
| FailedOperation.CloudApiProxyError | TSF云API请求调用失败。 |
| FailedOperation.ContainergroupKuberneteConnectError | 连接 kube-api-sever 失败。 |
| FailedOperation.ContainergroupKubernetesConnectError | 调用 kube-api-server 失败。 |
5. 示例
示例1 查询集群机器列表
输入示例
POST / HTTP/1.1
Host: tsf.api3.<no value>
Content-Type: application/json
X-TC-Action: DescribeClusterInstances
<公共请求参数>
{
"Limit": "20",
"ClusterId": "cluster-xxxxxxx",
"Offset": "0"
}
输出示例
{
"Response": {
"RequestId": "a92e58d4-b415-4069-910e-c84e60233019",
"Result": {
"TotalCount": 2,
"Content": [
{
"InstanceId": "ins-xxxxxxx",
"InstanceName": "consumer",
"LanIp": "172.16.0.7",
"WanIp": "193.112.32.241",
"NamespaceId": "cluster-xxxxxxx",
"UpdateTime": null,
"InstanceDesc": null,
"ClusterId": null,
"ClusterName": null,
"InstanceStatus": null,
"InstanceAvailableStatus": "Abnormal",
"ServiceInstanceStatus": "Stopped",
"ServiceSidecarStatus": "UnSupported",
"OperationState": 6,
"CountInTsf": null,
"GroupId": "",
"GroupName": null,
"ApplicationId": null,
"ApplicationName": null,
"InstanceCreatedTime": null,
"InstanceExpiredTime": null,
"InstanceChargeType": null,
"InstanceTotalCpu": null,
"InstanceTotalMem": null,
"InstanceUsedCpu": null,
"InstanceUsedMem": null,
"InstanceLimitCpu": null,
"InstanceLimitMem": null,
"InstancePkgVersion": "",
"ClusterType": null,
"InstanceZoneId": null,
"RestrictState": null,
"InstanceImportMode": "R",
"ApplicationType": null
},
{
"InstanceId": "ins-xxxxxxx",
"InstanceName": "provider",
"LanIp": "172.16.0.3",
"WanIp": "106.52.118.194",
"NamespaceId": "cluster-xxxxxxx",
"UpdateTime": null,
"InstanceDesc": null,
"ClusterId": null,
"ClusterName": null,
"InstanceStatus": null,
"InstanceAvailableStatus": "Abnormal",
"ServiceInstanceStatus": "Stopped",
"ServiceSidecarStatus": "UnSupported",
"OperationState": 6,
"CountInTsf": null,
"GroupId": "",
"GroupName": null,
"ApplicationId": null,
"ApplicationName": null,
"InstanceCreatedTime": null,
"InstanceExpiredTime": null,
"InstanceChargeType": null,
"InstanceTotalCpu": null,
"InstanceTotalMem": null,
"InstanceUsedCpu": null,
"InstanceUsedMem": null,
"InstanceLimitCpu": null,
"InstanceLimitMem": null,
"InstancePkgVersion": "",
"ClusterType": null,
"InstanceZoneId": null,
"RestrictState": null,
"InstanceImportMode": "R",
"ApplicationType": null
}
]
}
}
}