deploy.kill-switches.applyPull a kill switch on an app
route_offline: target is one of the app’s hostnames, or a path prefix such as /admin on every hostname of a machine-hosted app; it answers 503 (a pooled app’s host answers 404 for a hostname taken offline). private_only: only private-network sources (RFC 1918, the app’s VPC) are served, public ones get 403 — HTTP-level, TLS still completes; behind a load balancer the balancer itself is refused; not for pooled apps (409). scale_to_zero: every container stops; machines stay on and are billed; a deployment started meanwhile also stays at zero. Effective on the machines’ next poll, within seconds. A switch survives deploys, app updates and Terraform applies, and is never released by the platform. Pulling an active switch again returns it (200).
Request syntax
POST /deploy/api/apps/{id}/kill-switches
{
"kind": "enum",
"target": "string",
"reason": "string",
"findingId": "string"
}Path parameters
idRequiredstring
Constraints: uuid
Request body
kindRequiredenum
route_offline, private_only or scale_to_zero
One of:
route_offline,private_only,scale_to_zerotargetOptionalstring
route_offline only: one of the app’s hostnames, or a path prefix such as /admin
reasonRequiredstring
Why, for the record (3–500 characters)
Constraints: 3-500 chars
findingIdOptionalstring
The Security Posture finding it answers, if any
Response
201 with `data`: the switch (200 when the same switch was already active). 409 when it does not fit the app (a pooled app, a hostname that is not the app’s); 502 when the app’s load balancer could not be read.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
idAlwaysstring
The switch id, which releases itappIdAlwaysstring
The app it is pulled onappNameWhen presentstring
The app’s name (list-active only)kindAlwaysone of route_offline, private_only, scale_to_zero
What the switch doeslabelAlwaysstring
The kind, for people: "Route offline"targetAlwaysstring, may be null
route_offline: the hostname or path prefix; null for the other kindsreasonAlwaysstring
Why it was pulled, as givenfindingIdAlwaysstring, may be null
The Security Posture finding it was pulled fromactiveAlwaysboolean
true until releasedappliedByAlwaysstring
Who pulled itappliedAtAlwaysstring
When it was pulledreleasedByAlwaysstring, may be null
Who released it; null while activereleasedAtAlwaysstring, may be null
When it was released; null while active
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow deploy:ApplyKillSwitch on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud deploy kill-switches apply id --kind route_offline --reason examplecurl -X POST "https://console.platform.deutschecloud.app/deploy/api/apps/id/kill-switches" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"route_offline","reason":"example"}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_deploy_kill-switches_apply.