Update Console Proxy Agent

PUT/zstack/v1/consoles/agents/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateConsoleProxyAgent": {
    "consoleProxyOverriddenIp": "127.0.0.1"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding example, the systemTags and userTags fields are optional. They are listed here to show that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateConsoleProxyAgent":{"consoleProxyOverriddenIp":"127.0.0.1"}}' \
http://localhost:8080/zstack/v1/consoles/agents/f616460f24cd330180db4188c3a905b6/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID. Uniquely identifies the resource. 2.3
consoleProxyOverriddenIpStringbody (enclosed in the updateConsoleProxyAgent structure)New console proxy IP 2.3
systemTags (Optional)ListbodySystem tags 2.3
userTags (Optional)ListbodyUser tags 2.3

API Response

Response Example

{
  "inventory": {}
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error2.3
inventoryConsoleProxyAgentInventoryFor details, see inventory2.3

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001.0.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null.0.6
opaqueLinkedHashMapReserved field. Default is null.0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists.0.6

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID. Uniquely identifies the resource.0.6
descriptionStringDetailed description of the resource0.6
managementIpStringManagement node IP0.6
typeStringType0.6
statusStringStatus (Connected, Disconnected)0.6
stateStringState (Enabled, Disabled)0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6

SDK Examples

Java SDK

UpdateConsoleProxyAgentAction action = new UpdateConsoleProxyAgentAction();
action.uuid = "f616460f24cd330180db4188c3a905b6";
action.consoleProxyOverriddenIp = "127.0.0.1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateConsoleProxyAgentAction.Result res = action.call();

Python SDK

UpdateConsoleProxyAgentAction action = UpdateConsoleProxyAgentAction()
action.uuid = "f616460f24cd330180db4188c3a905b6"
action.consoleProxyOverriddenIp = "127.0.0.1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateConsoleProxyAgentAction.Result res = action.call()