QueryVmCdRom
API Request
URLs
GET zstack/v1/vm-instances/cdroms
GET zstack/v1/vm-instances/cdroms/{uuid}Headers
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/cdroms?q=name=cd-1curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/cdroms/cd0360ac748b3983897eb41913e97a6bQueryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryVmCdRom, and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"uuid": "68d090e26a0539f9b1b5d37229ee97de",
"deviceId": 0.0,
"isoUuid": "539acd1389523fb9ab243096d9842a05",
"name": "cd-1",
"description": "desc",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.3.0 |
| inventories | List | See inventories. | 3.3.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. | 3.3.0 |
| description | String | The brief description of the error. | 3.3.0 |
| details | String | The details about the error. | 3.3.0 |
| elaboration | String | The reserved field. Default value: null. | 3.3.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.3.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. | 3.3.0 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 3.3.0 |
| vmInstanceUuid | String | The VM instance UUID. | 3.3.0 |
| deviceId | Integer | The CD-ROM device ID. | 3.3.0 |
| isoUuid | String | The ISO image UUID. | 3.3.0 |
| isoInstallPath | String | The path to install the ISO image. | 3.3.0 |
| name | String | The resource name. | 3.3.0 |
| description | String | The detailed description of the resource. | 3.3.0 |
| createDate | Timestamp | The creation date. | 3.3.0 |
| lastOpDate | Timestamp | The last operation date. | 3.3.0 |
SDK Sample
Java
SDK
QueryVmCdRomAction action = new QueryVmCdRomAction();
action.conditions = asList("name=cd-1");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVmCdRomAction.Result res = action.call();Python
SDK
QueryVmCdRomAction action = QueryVmCdRomAction()
action.conditions = ["name=cd-1"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVmCdRomAction.Result res = action.call()