Skip to main content
Resource Center/Resource Pool/VM Instance Operations
POSTVM Instance OperationsSince 0.6SynchronousAuth Required

CreateRebootVmInstanceScheduler

CreateRebootVmInstanceScheduler

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

    The VM instance UUID.

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • schedulerNameStringRequired

      The scheduler name.

    • schedulerDescriptionString

      Optional. The scheduler description.

    • typeStringRequired

      The scheduler type, including: simple and cron.

    • intervalInteger

      Optional. The scheduler interval. Unit: second.

    • repeatCountInteger

      Optional. The scheduler repeat count. This parameter is applied to only schedulers of the simple type.

    • startTimeLong

      Optional. The scheduler start time, which must conform to the Unix timestamp format. If set to 0, the scheduler starts immediately.

    • cronString

      Optional. The Cron expression, which must conform to the Java Quartz Cron format.

    • resourceUuidString

      Optional. The UUID that is used to create a scheduler.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventorySchedulerInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • targetResourceUuidStringRequired

      目标资源UUID。

    • schedulerNameStringRequired

      调度器名称。

    • schedulerJobStringRequired

      调度器任务。

    • schedulerTypeStringRequired

      调度器类型。

    • schedulerIntervalIntegerRequired

      调度器周期。

    • repeatCountIntegerRequired

      重试次数。

    • cronSchedulerStringRequired

      Cron调度器。

    • startTimeTimestampRequired

      起始时间。

    • stopTimeTimestampRequired

      停止时间。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation 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