用于查询指定健康检查任务的当前状态及结果。通过传入任务 ID 和检查类型,可获取任务的执行进度(如 Pending、Executing、Completed 或 Failed)、开始/结束时间、发现的问题列表(Issues)等信息。若请求时设置 verbose=true,还将返回每个检查项(checkpoint)的详细分析结果(CheckDetails),包括检查项名称、描述、结果及失败原因,便于精准定位问题。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /api/v2/sanitychecks/{CheckType}/{TaskId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| CheckType |
string |
否 |
检查项类型。取值: SSH:用于触发实例 SSH 健康检查 枚举值:
|
SSH |
| TaskId |
string |
否 |
健康检查任务 ID |
917479ff-c869-49ea-908e-ae85bd987bc0 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Verbose |
boolean |
否 |
用于控制是否输出健康检查细节 |
true |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
44FB0869-AA85-599D-A09D-C42F7467618A |
| TaskId |
string |
健康检查任务 ID。 |
917479ff-c869-49ea-908e-ae85bd987bc0 |
| InstanceId |
string |
DSW 实例 ID |
dsw-730xxxxxxxxxx |
| CheckType |
string |
检查项类型。取值: SSH:用于触发实例 SSH 健康检查 |
SSH |
| Status |
string |
健康检查任务状态 |
Executing |
| StartTime |
string |
任务开始时间(如有) |
2020-11-08T15:00:00Z |
| EndTime |
string |
任务结束时间(如有) |
2020-11-08T15:00:00Z |
| Issues |
array |
检查出存在的问题。 如果没有检查出问题,则返回空数组。 |
|
|
string |
检查出存在的健康问题 |
sshd has not been installed" |
|
| CheckDetails |
array<object> |
健康检查任务的分析结果。 |
|
|
object |
健康检查任务的分析结果。 |
||
| Name |
string |
检查项的名称 |
secureGroupCheck |
| Description |
string |
检查项的详细描述 |
Check whether the security group allows traffic on port 22 |
| Result |
string |
检查结果 |
passed |
| Reason |
string |
检查项未通过的原因 |
Port 22 is blocked by the security group |
示例
正常返回示例
JSON格式
{
"requestId": "44FB0869-AA85-599D-A09D-C42F7467618A",
"TaskId": "917479ff-c869-49ea-908e-ae85bd987bc0",
"InstanceId": "dsw-730xxxxxxxxxx",
"CheckType": "SSH",
"Status": "Executing",
"StartTime": "2020-11-08T15:00:00Z",
"EndTime": "2020-11-08T15:00:00Z",
"Issues": [
"sshd has not been installed\""
],
"CheckDetails": [
{
"Name": "secureGroupCheck",
"Description": "Check whether the security group allows traffic on port 22",
"Result": "passed",
"Reason": "Port 22 is blocked by the security group"
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。