Zum Hauptinhalt springen

Set an update schedule for a Stack

PUT/v2/stacks/{stackId}/update-schedule
API-Version
v2
Request-Methode
PUT
Operation-ID
deprecated-container-set-stack-update-schedule

Request​

  • stackIdstring (uuid)
    required

    ID of the Stack to set an update schedule for.

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ 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.deprecatedContainerSetStackUpdateSchedule({
"stackId": "f0f86186-0a5a-45b2-aa33-502777496347",
"data": {
"updateSchedule": {
"cron": "* * * * *",
"timezone": "Europe/Berlin"
}
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Container\DeprecatedContainerSetStackUpdateSchedule\DeprecatedContainerSetStackUpdateScheduleRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Container\DeprecatedContainerSetStackUpdateSchedule\DeprecatedContainerSetStackUpdateScheduleRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// DeprecatedContainerSetStackUpdateScheduleRequestBody to learn how to construct a valid instance
$body = new DeprecatedContainerSetStackUpdateScheduleRequestBody(/* TODO: ... */);

$request = (new DeprecatedContainerSetStackUpdateScheduleRequest(
stackId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->container()->deprecatedContainerSetStackUpdateSchedule($request);

var_dump($response->getBody();

Auf dieser Seite