Update VM Scheduling Group

PUT/zstack/v1/vmSchedulingRuleGroup/{uuid}/update

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateVmSchedulingRuleGroup": {
    "name": "test",
    "description": "test desc"
  },
  "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 '{"updateVmSchedulingRuleGroup":{"name":"test","description":"test desc"}}' http://localhost:8080/zstack/v1/vmSchedulingRuleGroup/0e8a74e4ff8d3da9bff07f0cc7d58f91/update

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlUUID of the resource. Uniquely identifies the resource 4.6.0
name (optional)Stringbody (contained in the updateVmSchedulingRuleGroup structure)Resource name 4.6.0
description (optional)Stringbody (contained in the updateVmSchedulingRuleGroup structure)Detailed description of the resource 4.6.0
systemTags (optional)ListbodySystem tags 4.6.0
userTags (optional)ListbodyUser tags 4.6.0

API Response

Response Example

{
  "inventory": {
    "uuid": "75840459a5f83afebc36e605a3189289",
    "name": "test",
    "description": "test desc",
    "appliance": "CUSTOMER",
    "zoneUuid": "261246b65f253787b06a29c6c266543c"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.6.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.6.0
inventoryAffinityGroupInventoryFor details, see inventory4.6.0

error

NameTypeDescriptionStarting Version
codeStringError code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10014.6.0
descriptionStringBrief description of the error4.6.0
detailsStringDetailed information about the error4.6.0
elaborationStringReserved field. Default is null4.6.0
opaqueLinkedHashMapReserved field. Default is null4.6.0
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists4.6.0

inventory

NameTypeDescriptionStarting Version
uuidStringUUID of the resource. Uniquely identifies the resource4.6.0
nameStringResource name4.6.0
descriptionStringDetailed description of the resource4.6.0
applianceString 4.6.0
zoneUuidStringData Center UUID4.6.0
createDateTimestampCreation time4.6.0
lastOpDateTimestampLast modification time4.6.0

SDK Examples

Java SDK

UpdateVmSchedulingRuleGroupAction action = new UpdateVmSchedulingRuleGroupAction();
action.uuid = "0e8a74e4ff8d3da9bff07f0cc7d58f91";
action.name = "test";
action.description = "test desc";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateVmSchedulingRuleGroupAction.Result res = action.call();

Python SDK

UpdateVmSchedulingRuleGroupAction action = UpdateVmSchedulingRuleGroupAction()
action.uuid = "0e8a74e4ff8d3da9bff07f0cc7d58f91"
action.name = "test"
action.description = "test desc"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateVmSchedulingRuleGroupAction.Result res = action.call()