Get VM Scheduling Group Execution Status

POST/zstack/v1/get/vmSchedulingRules/conflict/state

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "uuids": [
      "c6bb1e89239235f8b49bb10bc5d484cc"
    ]
  },
  "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 POST -d '{"params":{"uuids":["c6bb1e89239235f8b49bb10bc5d484cc"]}}' http://localhost:8080/zstack/v1/get/vmSchedulingRules/conflict/state

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidsListbody (contained in the params structure)VM scheduling group UUID 4.6.0
systemTags (optional)ListbodySystem tags 4.6.0
userTags (optional)ListbodyUser tags 4.6.0

API Response

Response Example

{
  "ruleMapState": {
    "2951e237b86630ac84d8eeb382513260": "Normal"
  }
}
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
ruleMapStateMapFor details, see ruleMapState4.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

ruleMapState

NameTypeDescriptionStarting Version
ConflictVmSchedulingRuleExecuteStateConflict4.6.0
NormalVmSchedulingRuleExecuteStateNormal4.6.0
InvalidVmSchedulingRuleExecuteStateInvalid4.6.0

SDK Examples

Java SDK

GetVmSchedulingRulesExecuteStateAction action = new GetVmSchedulingRulesExecuteStateAction();
action.uuids = asList("c6bb1e89239235f8b49bb10bc5d484cc");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmSchedulingRulesExecuteStateAction.Result res = action.call();

Python SDK

GetVmSchedulingRulesExecuteStateAction action = GetVmSchedulingRulesExecuteStateAction()
action.uuids = [c6bb1e89239235f8b49bb10bc5d484cc]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmSchedulingRulesExecuteStateAction.Result res = action.call()