CreateStopVmInstanceScheduler
CreateStopVmInstanceScheduler
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
vmUuidStringRequiredThe VM instance UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
schedulerNameStringRequiredThe scheduler name.
schedulerDescriptionStringOptional. The scheduler description.
typeStringRequiredThe scheduler type, including: simple and cron.
intervalIntegerOptional. The scheduler interval. Unit: second.
repeatCountIntegerOptional. The scheduler repeat count. This parameter is applied to only schedulers of the simple type.
startTimeLongOptional. The scheduler start time, which must conform to the Unix timestamp format. If set to 0, the scheduler starts immediately.
cronStringOptional. The Cron expression, which must conform to the Java Quartz Cron format.
resourceUuidStringOptional. The UUID that is used to create a scheduler.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vm-instances/{vmUuid}/schedulers/stopping
/zstack/v1/vm-instances/{vmUuid}/schedulers/stopping
Request Example
curl -X POST 'http://{host}/zstack/v1/vm-instances/{vmUuid}/schedulers/stopping' -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": "1c1b66d878494610aab6833dde9c6c04", "targetResourceUuid": "f1dd6bd2ae484bd5b3375c7579756e48", "schedulerName": "Test", "schedulerType": "simple", "repeatCount": 10.0, "startTime": "May 11, 2017 1:22:53 PM", "createDate": "May 11, 2017 1:22:53 PM", "lastOpDate": "May 11, 2017 1:22:53 PM", "jobClassName": "StopVmInstanceJob", "state": "Enabled" } }Change History
This API has no change history records yet.
