Update Log Server Configuration

PUT/zstack/v1/log/configurations

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateLogConfiguration": {
    "configId": 1.0
  },
  "systemTags": [],
  "userTags": []
}

The systemTags and userTags fields in the above example are optional. They are listed to indicate 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 '{"updateLogConfiguration":{"configId":1.0}}' http://localhost:8080/zstack/v1/log/configurations

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
configIdlongbody (contained in the updateLogConfiguration structure)Configuration ID 3.10.0
name (optional)Stringbody (contained in the updateLogConfiguration structure)Resource name 3.10.0
description (optional)Stringbody (contained in the updateLogConfiguration structure)Detailed description of the resource 3.10.0
systemTags (optional)ListbodySystem tags 3.10.0
userTags (optional)ListbodyUser tags 3.10.0

API Response

Response Example

{
  "inventory": {
    "id": 0.0,
    "labelKey": "log4j2-848dd6e5712e4227ae40447753871ba8",
    "labelValue": "{\n\"appenderType\": \"Syslog\",\n\"configuration\": {\n\"hostname\": \"192.168.0.11\",\n\"port\": \"514\",\n\"protocol\": \"UDP\",\n\"facility\": \"LOCAL5\"\n}\n}"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error3.10.0
inventoryVmNicInventorySee inventory3.10.0

error

NameTypeDescriptionStarting Version
codeStringError code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10013.10.0
descriptionStringBrief description of the error3.10.0
detailsStringDetailed error information3.10.0
elaborationStringReserved field. Defaults to null3.10.0
opaqueLinkedHashMapReserved field. Defaults to null3.10.0
causeErrorCodeRoot error. The source error that caused this error. Null if no root cause exists3.10.0

inventory

NameTypeDescriptionStarting Version
idlong 3.10.0
labelKeyString 3.10.0
labelValueString 3.10.0
resourceUuidStringResource UUID3.10.0
createDateTimestampCreation time3.10.0
lastOpDateTimestampLast modification time3.10.0

SDK Examples

Java SDK

UpdateLogConfigurationAction action = new UpdateLogConfigurationAction();
action.configId = 1.0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateLogConfigurationAction.Result res = action.call();

Python SDK

UpdateLogConfigurationAction action = UpdateLogConfigurationAction()
action.configId = 1.0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateLogConfigurationAction.Result res = action.call()