重连控制台代理

PUT/zstack/v1/consoles/agents

Headers

Authorization: OAuth the-session-uuid

Body

{
  "reconnectConsoleProxyAgent": {
    "agentUuids": [
      "ce9f63639c6947fc9de43014a9c42af6",
      "5cf200f8fa6640278ab3751a9e40a122",
      "896f44bd3a2544e3b49a30dbe41303da"
    ]
  },
  "systemTags": [],
  "userTags": []
}

上述示例中systemTagsuserTags字段可以省略。列出是为了表示body中可以包含这两个字段。

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"reconnectConsoleProxyAgent":{"agentUuids":["9a00b78598253e68914541e6760ddeaa","c18fbd323fbd3902961e4105ec9364d0","96efd32908dd3f71bef8c0f414dbf828"]}}' \
http://localhost:8080/zstack/v1/consoles/agents

参数列表

名字类型位置描述可选值起始版本
agentUuids (可选)Listbody(包含在params结构中)控制台代理Agent的UUID 0.6
systemTags (可选)Listbody系统标签 0.6
userTags (可选)Listbody用户标签 0.6

API返回

返回示例

{
  "inventory": {
    "976e8d54d42841da85eb697f3e8534b6": true,
    "ac4b5e3b69e5499eba381082199b5d42": true
  }
}
名字类型描述起始版本
inventoryMap控制台代理Agent清单0.6
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error0.6

error

名字类型描述起始版本
codeString错误码号,错误的全局唯一标识,例如SYS.1000, HOST.10010.6
descriptionString错误的概要描述0.6
detailsString错误的详细信息0.6
elaborationString保留字段,默认为null0.6
opaqueLinkedHashMap保留字段,默认为null0.6
causeErrorCode根错误,引发当前错误的源错误,若无原错误,该字段为null0.6

SDK示例

Java SDK

ReconnectConsoleProxyAgentAction action = new ReconnectConsoleProxyAgentAction();
action.agentUuids = asList("9b1d2cae4e75418ba8ca00a7f8d61eee","b3c9068b99664b65851bc29e39c3e336","89ea316d7f114203bb352d22b1f878e2");
action.sessionId = "607aa9478e0f452ab3fe43f0bb44771f";
ReconnectConsoleProxyAgentAction.Result res = action.call();

Python SDK

ReconnectConsoleProxyAgentAction action = ReconnectConsoleProxyAgentAction()
action.agentUuids = [6b5d95576b444661a23454913abce886, 64326c502c4042b196d9602737733d64, 1cc5a9dbb4284fbe850e387788b365ec]
action.sessionId = "dc7db7612de24cb7a3d91d1d08b03162"
ReconnectConsoleProxyAgentAction.Result res = action.call()