Query Host Scheduling Policy Group

GET/zstack/v1/query/host/schedulingRule/group

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/host/schedulingRule/group?q=uuid=dfa2eb73ea3e3fd48371d91dc19a53b6

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "8236e15b68f9391b84c6375033b50b68",
      "name": "test",
      "description": "description",
      "zoneUuid": "54a86b72e1ec3a22b7525996031aabfc"
    }
  ]
}
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
uuidStringUUID of the resource. Uniquely identifies the resource4.6.0
nameStringResource name4.6.0
descriptionStringDetailed description of the resource4.6.0
zoneUuidStringData Center UUID4.6.0
clusterUuidStringCluster UUID4.6.0
createDateTimestampCreation time4.6.0
lastOpDateTimestampLast modification time4.6.0

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

QueryHostSchedulingRuleGroupAction action = new QueryHostSchedulingRuleGroupAction();
action.conditions = asList("uuid=a1ded772a30a3e0a99abffef4eeb17dc");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHostSchedulingRuleGroupAction.Result res = action.call();

Python SDK

QueryHostSchedulingRuleGroupAction action = QueryHostSchedulingRuleGroupAction()
action.conditions = ["uuid=45cfff84ae4637678b5b2f52b9f6e88d"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHostSchedulingRuleGroupAction.Result res = action.call()