Update a Scheduler Job Group
Headers
Authorization: OAuth the-session-uuidBody
{
"updateSchedulerJobGroup": {
"name": "Test2",
"description": "new test"
},
"systemTags": [],
"userTags": []
}The systemTags and userTags fields in the above example are optional. 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 '{"updateSchedulerJobGroup":{"name":"Test2","description":"new test"}}' http://localhost:8080/zstack/v1/scheduler/jobgroups/4dc1dbf847d733fc98ee2998b5e0eca2/actionsParameter List
Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
uuid | String | url | UUID of the scheduler job group. Uniquely identifies the resource |
| 3.4.0 |
name (optional) | String | body (included in the updateSchedulerJobGroup structure) | Resource name |
| 3.4.0 |
description (optional) | String | body (included in the updateSchedulerJobGroup structure) | Detailed description of the resource |
| 3.4.0 |
state (optional) | String | body (included in the updateSchedulerJobGroup structure) | State |
| 3.4.0 |
parameters (optional) | Map | body (included in the updateSchedulerJobGroup structure) | Scheduler job group parameters |
| 3.4.0 |
systemTags (optional) | List | body | System tag list |
| 3.4.0 |
userTags (optional) | List | body | User tag list |
| 3.4.0 |
API Response
Response Example
{
"inventory": {
"uuid": "e344fd75079735369cbffda253cc173c",
"name": "Test",
"description": "create volume snapshot job",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 3.4.0 |
| inventory | SchedulerJobGroupInventory | For details, see inventory | 3.4.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001 | 3.4.0 |
| description | String | Brief description of the error | 3.4.0 |
| details | String | Detailed information about the error | 3.4.0 |
| elaboration | String | Reserved field. Default is null | 3.4.0 |
| opaque | LinkedHashMap | Reserved field. Default is null | 3.4.0 |
| cause | ErrorCode | Root error. The source error that caused the current error. This field is null if there is no source error | 3.4.0 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the scheduler job group. Uniquely identifies the resource | 3.4.0 |
| name | String | Scheduler job group name | 3.4.0 |
| description | String | Detailed description of the scheduler job group | 3.4.0 |
| state | String | State of the scheduler job group | 3.4.0 |
| createDate | Timestamp | Creation time | 3.4.0 |
| lastOpDate | Timestamp | Last modification time | 3.4.0 |
| jobData | String | Job parameters | 3.4.0 |
| triggersUuid | List | Trigger UUID | 3.4.0 |
SDK Examples
Java SDK
UpdateSchedulerJobGroupAction action = new UpdateSchedulerJobGroupAction();
action.uuid = "4dc1dbf847d733fc98ee2998b5e0eca2";
action.name = "Test2";
action.description = "new test";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSchedulerJobGroupAction.Result res = action.call();Python SDK
UpdateSchedulerJobGroupAction action = UpdateSchedulerJobGroupAction()
action.uuid = "4dc1dbf847d733fc98ee2998b5e0eca2"
action.name = "Test2"
action.description = "new test"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSchedulerJobGroupAction.Result res = action.call()