Query VM Scheduling Policy

GET/zstack/v1/query/vm/schedulingRule

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/query/vm/schedulingRule?q=uuid=2964e2f366e73491b858ca2da4052624

Queryable Fields

Run the CLI tool, enter QueryVmSchedulingRule and press Tab to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "rule": "rule",
      "mode": "mode",
      "uuid": "ef5e45f916b03e7cae291e3134c3eaa1",
      "name": "test",
      "description": "description"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.7.0
inventoriesListFor details, see inventories4.7.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.7.0

inventories

NameTypeDescriptionStarting Version
ruleStringRule4.6.0
modeStringExecution mode4.6.0
uuidStringUUID of the resource. Uniquely identifies the resource4.6.0
nameStringResource name4.6.0
descriptionStringDetailed description of the resource4.6.0
policyString 4.6.0
versionString 4.6.0
typeString 4.6.0
applianceString 4.6.0
zoneUuidStringData Center UUID4.6.0
stateString 4.6.0
createDateTimestampCreation time4.6.0
lastOpDateTimestampLast modification time4.6.0
usagesListFor details, see usages4.6.0

usages

NameTypeDescriptionStarting Version
uuidStringUUID of the resource. Uniquely identifies the resource2.2
affinityGroupUuidString 2.2
resourceUuidString 2.2
resourceTypeString 2.2
createDateTimestampCreation time2.2
lastOpDateTimestampLast modification time2.2

error

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

SDK Examples

Java SDK

QueryVmSchedulingRuleAction action = new QueryVmSchedulingRuleAction();
action.conditions = asList("uuid=8a051adee823307e82d355b6385b589d");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVmSchedulingRuleAction.Result res = action.call();

Python SDK

QueryVmSchedulingRuleAction action = QueryVmSchedulingRuleAction()
action.conditions = ["uuid=39b75b6de9113e4f9915a024ebd2f05c"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVmSchedulingRuleAction.Result res = action.call()