Update a Scheduler Job Group

PUT/zstack/v1/scheduler/jobgroups/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "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/actions

Parameter 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

  • enable
  • disable

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"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error3.4.0
inventorySchedulerJobGroupInventoryFor details, see inventory3.4.0

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.10013.4.0
descriptionStringBrief description of the error3.4.0
detailsStringDetailed information about the error3.4.0
elaborationStringReserved field. Default is null3.4.0
opaqueLinkedHashMapReserved field. Default is null3.4.0
causeErrorCodeRoot error. The source error that caused the current error. This field is null if there is no source error3.4.0

inventory

NameTypeDescriptionStarting Version
uuidStringUUID of the scheduler job group. Uniquely identifies the resource3.4.0
nameStringScheduler job group name3.4.0
descriptionStringDetailed description of the scheduler job group3.4.0
stateStringState of the scheduler job group3.4.0
createDateTimestampCreation time3.4.0
lastOpDateTimestampLast modification time3.4.0
jobDataStringJob parameters3.4.0
triggersUuidListTrigger UUID3.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()