华为云计算 云知识 查询agent状态CheckAgent
查询agent状态CheckAgent

 

功能介绍

检查应用一致性Agent状态

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

POST /v3/{project_id}/agent/check

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

agent_status

Array of ProtectableAgentStatusResource objects

查询参数列表

表3 ProtectableAgentStatusResource

参数

是否必选

参数类型

描述

resource_id

String

待检查资源ID

resource_name

String

待检查资源name

resource_type

String

待检查的资源类型。当前支持的取值包含两个:OS::Nova::Server,该值代表保护的资源为 云服务器 ,OS::Ironic::BareMetalServer,该值代表保护的资源为 裸金属服务器

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

agent_status

Array of ProtectableAgentStatus objects

状态列表

表5 ProtectableAgentStatus

参数

参数类型

描述

code

Integer

agent无法连接的错误码

installed

Boolean

agent是否安装

is_old

Boolean

agent是否为老版本

message

String

agent无法连接的错误信息

resource_id

String

资源ID

version

String

agent版本号

请求示例

查询云服务器资源agent状态

POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/agent/check

{
  "agent_status" : [ {
    "resource_id" : "6c0e29fc-5eaa-4f76-af9e-cc79895f70d7",
    "resource_name" : "ecs-8f7b",
    "resource_type" : "OS::Nova::Server"
  } ]
}

响应示例

状态码: 200

OK

{
  "agent_status" : [ {
    "code" : null,
    "is_old" : null,
    "resource_id" : "6c0e29fc-5eaa-4f76-af9e-cc79895f70d7",
    "installed" : false,
    "version" : null,
    "message" : null
  } ]
}

状态码

状态码

描述

200

OK

错误码

请参见错误码

 

上一篇:批量移除实例BatchRemoveScalingInstances 下一篇:什么是智能边缘平台