GetVmsCapabilities
API Request
URLs
POST zstack/v1/vm-instances/capabilitiesHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"vmUuids": [
"86db798b3a0530b187380da6c9c58190"
]
},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"vmUuids":["86db798b3a0530b187380da6c9c58190"]}}' http://localhost:8080/zstack/v1/vm-instances/capabilitiesRequest Parameters
| Name | Type | Location | Description | Valid Value | Starting Version |
|---|---|---|---|---|---|
| vmUuids | String | body(contained in the params structure) | The UUID of the VM instance to be queried. | 4.0.0 | |
| systemTags | List | body | Optional. The system tags. | 4.0.0 | |
| userTags | List | body | Optional. The user tags. | 4.0.0 |
API Response
Sample Response
{
"vmsCaps": {
"68e8ed0735333faab95816b3e8596cea": {
"supportLiveMigration": true,
"supportVolumeMigration": true,
"supportReimage": true,
"supportMemorySnapshot": false
}
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.0.0 |
| vmsCaps | Map | For more information, see vmsCaps. | 4.0.0 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 4.0.0 |
| description | String | The brief description of the error. | 4.0.0 |
| details | String | The details about the error. | 4.0.0 |
| elaboration | String | The reserved field. Default value: null. | 4.0.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.0.0 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.0.0 |
#vmsCaps
| Name | Type | Description | Starting Version |
|---|---|---|---|
| supportLiveMigration | boolean | 4.0.0 | |
| supportVolumeMigration | boolean | 4.0.0 | |
| supportReimage | boolean | 4.0.0 | |
| supportMemorySnapshot | boolean | 4.0.0 |
SDK Sample
Java
SDK
GetVmsCapabilitiesAction action = new GetVmsCapabilitiesAction();
action.vmUuids = asList("86db798b3a0530b187380da6c9c58190");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmsCapabilitiesAction.Result res = action.call();Python
SDK
GetVmsCapabilitiesAction action = GetVmsCapabilitiesAction()
action.vmUuids = [86db798b3a0530b187380da6c9c58190]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmsCapabilitiesAction.Result res = action.call()