Query VM Scheduling Policy Group
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/query/vm/schedulingRule/group?q=uuid=f0e0262e8a003001a13d0f61ea51baf1Queryable Fields
Run the CLI tool, enter QueryVmSchedulingRuleGroup and press Tab to view all queryable fields and cross-table queryable resource names.
API Response
Response Example
{
"inventories": [
{
"uuid": "11ff7ecb7d2b3f129f28e7f48982ca18",
"name": "test",
"description": "description",
"appliance": "appliance",
"zoneUuid": "9839f67b087f37a19360c24e83b1b7a2"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.7.0 | |
| inventories | List | For details, see inventories | 4.7.0 |
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 4.7.0 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the resource. Uniquely identifies the resource | 4.6.0 |
| name | String | Resource name | 4.6.0 |
| description | String | Detailed description of the resource | 4.6.0 |
| appliance | String | 4.6.0 | |
| zoneUuid | String | Data Center UUID | 4.6.0 |
| createDate | Timestamp | Creation time | 4.6.0 |
| lastOpDate | Timestamp | Last modification time | 4.6.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed information about the error | 0.6 |
| elaboration | String | Reserved field. Default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. Default is null | 0.6 |
| cause | ErrorCode | Root error. The source error that caused the current error. This field is null if no root error exists | 0.6 |
SDK Examples
Java SDK
QueryVmSchedulingRuleGroupAction action = new QueryVmSchedulingRuleGroupAction();
action.conditions = asList("uuid=3415c61c47643a9989f81aabcf1945db");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVmSchedulingRuleGroupAction.Result res = action.call();Python SDK
QueryVmSchedulingRuleGroupAction action = QueryVmSchedulingRuleGroupAction()
action.conditions = ["uuid=dc69c1d78fd236748df8597b74c78861"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVmSchedulingRuleGroupAction.Result res = action.call()