Skip to main content
Compute Management/VM Related Interfaces
POSTVM Related InterfacesSince 0.6SynchronousAuth Required

Create Reboot Virtual Machine Scheduler

Create Reboot Virtual Machine Scheduler

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • vmUuidStringRequired

    Virtual Machine UUID

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • schedulerNameStringRequired

      Scheduler name

    • schedulerDescriptionString

      Scheduler description

    • typeStringRequired

      Scheduler type, simple or cron

    • intervalInteger

      Scheduler interval in seconds

    • repeatCountInteger

      Repeat count for the scheduler, only applies to simple type scheduler

    • startTimeLong

      Scheduler start time, must follow unix timestamp format, 0 means start immediately

    • cronString

      Cron expression, must follow Java Quartz cron format standard

    • resourceUuidString

      User can specify the UUID used for creating the Scheduler

  • systemTagsList

    System Tag

  • userTagsList

    User Tag

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. This field is null when the operation is successful. For details, see error

    • codeStringRequired

      Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field, defaults to null

    • opaqueLinkedHashMapRequired

      Reserved field, defaults to null

    • causeErrorCodeRequired

      Root cause. The source error that caused the current error. If there is no original error, this field is null

  • inventorySchedulerInventoryRequired

    For details, see inventory

    • uuidStringRequired

      Resource UUID, uniquely identifying the resource

    • targetResourceUuidStringRequired

      目标资源UUID。

    • schedulerNameStringRequired

      调度器名称。

    • schedulerJobStringRequired

      调度器任务。

    • schedulerTypeStringRequired

      调度器类型。

    • schedulerIntervalIntegerRequired

      调度器周期。

    • repeatCountIntegerRequired

      重试次数。

    • cronSchedulerStringRequired

      Cron调度器。

    • startTimeTimestampRequired

      起始时间。

    • stopTimeTimestampRequired

      停止时间。

    • createDateTimestampRequired

      Create date

    • lastOpDateTimestampRequired

      Last update date

    • stateStringRequired

      当前状态。

Endpoint

POST/zstack/v1/vm-instances/{vmUuid}/schedulers/rebooting

/zstack/v1/vm-instances/{vmUuid}/schedulers/rebooting

Operation ID

CreateRebootVmInstanceScheduler

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/vm-instances/{vmUuid}/schedulers/rebooting' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"schedulerName":"<schedulerName>","schedulerDescription":"<schedulerDescription>","type":"<type>","interval":1,"repeatCount":1,"startTime":1,"cron":"<cron>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "2664ccec6e584e529ab6671d88f87763", "targetResourceUuid": "308a32f93a7842ce94bdab3220f75aeb", "schedulerName": "Test", "schedulerType": "simple", "repeatCount": 10.0, "startTime": "May 11, 2017 1:22:27 PM", "createDate": "May 11, 2017 1:22:27 PM", "lastOpDate": "May 11, 2017 1:22:27 PM", "jobClassName": "CreateVolumeSnapshotJob", "state": "Enabled" } }

Change History

This API has no change history records yet.

View all change history