Update Global Settings

PUT/zstack/v1/global-configurations/{category}/{name}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateGlobalConfig": {
    "value": "90"
  },
  "systemTags": [],
  "userTags": []
}

In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateGlobalConfig":{"value":"90"}}' \
http://localhost:8080/zstack/v1/global-configurations/quota/scheduler.num/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
categoryStringurlCategory 0.6
nameStringurlResource name 0.6
value (Optional)Stringbody (Included in the updateGlobalConfig structure)Value 0.6
systemTags (Optional)ListbodySystem tags 0.6
userTags (Optional)ListbodyUser tags 0.6

API Response

Response Example

{
  "inventory": {
    "name": "scheduler.num",
    "category": "quota",
    "description": "default quota for scheduler.num",
    "defaultValue": "80",
    "value": "90"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details0.6
inventoryGlobalConfigInventorySee inventory for details0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. If no root error exists, this field is null0.6

inventory

NameTypeDescriptionStarting Version
nameStringResource name0.6
categoryString 0.6
descriptionStringThe detailed description of the resource0.6
defaultValueString 0.6
valueString 0.6

SDK Examples

Java SDK

UpdateGlobalConfigAction action = new UpdateGlobalConfigAction();
action.category = "quota";
action.name = "scheduler.num";
action.value = "90";
action.sessionId = "84a1a9ed2d54449db13e01f7d6face7e";
UpdateGlobalConfigAction.Result res = action.call();

Python SDK

UpdateGlobalConfigAction action = UpdateGlobalConfigAction()
action.category = "quota"
action.name = "scheduler.num"
action.value = "90"
action.sessionId = "b077cfa8599a4ff1ac4fd7ba67b20a82"
UpdateGlobalConfigAction.Result res = action.call()