Sleep
The sleep policy of an SVM
Resource, request and plan limits are listed on Limits.
Download OpenAPI specification · Version 0.1.0
Change the sleep policy of an SVM
Sets the sleep policy and sends it to the node at once: auto sleeps when the workload is idle, timer sleeps after_s seconds after the last external activity, and on never sleeps. A sleeping SVM takes the new policy at its next wake; see sleep and wake.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Header Parameters
if-match?stringThe generation that the change expects, the generation of the last answer for this SVM; a different stored generation answers 412 generation_mismatch and changes nothing, and without the header the change is unconditional.
Request Body
The sleep policy: {"mode":"auto"}, {"mode":"timer","after_s":1800} or {"mode":"on"}.
- body
The sleep policy: {"mode":"auto"}, {"mode":"timer","after_s":1800} or {"mode":"on"}.
after_s?numberThe inactivity of a timer in seconds: an integer from 30 to 86400; only timer uses it.
mode*stringauto sleeps when the workload is idle; timer sleeps after_s seconds after the last external activity; on never sleeps and uses its memory all the time.
Response Body
The sleep policy of an SVM: auto follows the workload; timer ignores background signals; on never sleeps. An open terminal, or a preview that moves data, keeps the SVM awake in auto and timer modes.
application/json- response
Sleep when the workload is idle; background work keeps the SVM awake.
mode*stringcurl -X PUT 'https://api.slashinfra.com/svms/build-1/sleep' \ -H 'Content-Type: application/json' \ -d '{ "mode": "timer"}'{ "mode": "auto"}curl -X PUT 'https://api.slashinfra.com/svms/build-1/sleep' \
-H 'Content-Type: application/json' \
-d '{
"mode": "timer"
}'{
"mode": "auto"
}