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

CreateStartVmInstanceScheduler

CreateStartVmInstanceScheduler

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.

    • clusterUuidString

      Optional. The cluster UUID.

    • hostUuidString

      Optional. The host UUID.

    • 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/starting

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

Operation ID

CreateStartVmInstanceScheduler

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/vm-instances/{vmUuid}/schedulers/starting' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","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": "3e27a74894fb47b5a3c86c2b44409ccb", "targetResourceUuid": "d596e0adcb2b49a8a9efd132f0e43a73", "schedulerName": "Test", "schedulerType": "simple", "repeatCount": 10.0, "startTime": "Apr 24, 2017 7:11:02 PM", "createDate": "Apr 24, 2017 7:11:02 PM", "lastOpDate": "Apr 24, 2017 7:11:02 PM", "jobClassName": "CreateVolumeSnapshotJob", "state": "Enabled" } }

Change History

This API has no change history records yet.

View all change history