Set an update schedule for a Stack
PUT/v2/ stacks/ {stackId}/ update-schedule/
v2
PUT
container-set-stack-update-schedule
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PUT \
-d '{"updateSchedule":{"cron":"* * * * *","timezone":"Europe/Berlin"}}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/stacks/f0f86186-0a5a-45b2-aa33-502777496347/update-schedule
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.container.setStackUpdateSchedule({
"stackId": "f0f86186-0a5a-45b2-aa33-502777496347",
"data": {
"updateSchedule": {
"cron": "* * * * *",
"timezone": "Europe/Berlin"
}
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\Container\SetStackUpdateSchedule\SetStackUpdateScheduleRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Container\SetStackUpdateSchedule\SetStackUpdateScheduleRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// SetStackUpdateScheduleRequestBody to learn how to construct a valid instance
$body = new SetStackUpdateScheduleRequestBody(/* TODO: ... */);
$request = (new SetStackUpdateScheduleRequest(
stackId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->container()->setStackUpdateSchedule($request);
var_dump($response->getBody();