Image Storage Related InterfacesImage Related Interfaces
Set Image Boot Mode
Headers
Authorization: OAuth the-session-uuidBody
{
"setImageBootMode": {
"bootMode": "Legacy"
},
"systemTags": [],
"userTags": []
}In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"setImageBootMode":{"bootMode":"Legacy"}}' http://localhost:8080/zstack/v1/images/4efcba4c12cc35f4a1b262038f7e7b80/actionsParameter List
Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
uuid | String | url | Resource UUID, uniquely identifies the resource |
| 3.9.0 |
bootMode | String | body (contained in setImageBootMode structure) | Image boot mode |
| 3.9.0 |
systemTags (Optional) | List | body | System Tags |
| 3.9.0 |
userTags (Optional) | List | body | User Tags |
| 3.9.0 |
API Response
This API returns an empty JSON object {} on success. On error, the returned JSON contains an error field, for example:
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
Java SDK
SetImageBootModeAction action = new SetImageBootModeAction();
action.uuid = "4efcba4c12cc35f4a1b262038f7e7b80";
action.bootMode = "Legacy";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SetImageBootModeAction.Result res = action.call();Python SDK
SetImageBootModeAction action = SetImageBootModeAction()
action.uuid = "4efcba4c12cc35f4a1b262038f7e7b80"
action.bootMode = "Legacy"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SetImageBootModeAction.Result res = action.call()