Skip to content

deployment_service_update

Update service fields.

Tool

deployment_service_update

Update service fields.

Update service fields. mode is immutable. On a scheduled service (mode:'scheduled') you may change schedule (five-field UTC cron, or null to leave it on demand only), command, jobTimeoutSec, jobConcurrency ('forbid' | 'allow' | 'replace'), and scheduleSuspended, which pauses or resumes the schedule without losing it. publicDomain false removes the auto-domain and its route; true re-creates them under the same hostname. Custom domains are untouched either way. Switching the GitHub connection: send the source with a new connectorId (source.repo.connectorId for a static site; build, spa and markdown you leave out keep their values). The new connection must be working and able to read repoFullName, otherwise the update is refused with 409 source_connection_unavailable and a candidates list (the other connections that can read it; pick one, the platform never picks), or 503 source_connection_check_failed when the check could not finish (try again). A successful switch records service.source.reconnected with reason 'manual'. Editing branch or path with the same connectorId is never checked, even when the connection is unavailable. For a git source only, source.build.secrets selects existing secret variables by name from the effective product → environment → service variable set. Image and static sources cannot use this field. Each deploy re-checks the selection and gives the values to the Docker build as BuildKit secrets: in the Dockerfile use RUN --mount=type=secret,id=<key> and read /run/secrets/<key> (env= is not supported). If you omit build when updating the same git repo, the current selection is preserved. Use build: { secrets: [] } to clear it.

Behavior

HTTP
PATCH /deployment/services/:id

Arguments

Name
Type
Required
Description
id
string
•
No description in the catalog.
mode
string
—
No description in the catalog.
name
string
—
No description in the catalog.
probes
object
—
No description in the catalog.
source
object
—
No description in the catalog.
command
string
—
Shell command a scheduled run executes (`/bin/sh -c <command>`). Scheduled services only; omit it to run the image entrypoint. `null` clears a command that was set and returns the run to the image entrypoint.
tracing
string
—
OTel SDK to inject into this service's pods: 'off' (none), 'node' or 'python'. Read when a deploy builds the workload — takes effect on the next deploy, running pods are untouched.
replicas
integer
—
No description in the catalog.
schedule
string
—
Five-field UTC cron expression (minute hour day-of-month month day-of-week), or null for a scheduled service with no schedule yet.
resources
object
—
No description in the catalog.
autoDeploy
boolean
—
Whether a push to this service's repo+branch queues a deploy. Default true. Turning it off suppresses push-triggered deploys only — manual and API-triggered deploys still work. Applies to git and static sources alike; the UI toggle is currently git-only, so a static service is switched through this field.
idleMinutes
integer
—
No description in the catalog.
scaleToZero
boolean
—
No description in the catalog.
publicDomain
boolean
—
Whether this service gets its public auto-domain (`<slug>-<hash>.<suffix>`) and the HTTPRoute that fronts it. Default true. Set false for a service that must not face the internet (minio, pgadmin, a worker): the auto-domain and its route are removed, which also frees a URL-map host rule. A custom domain attached to this service is NOT touched in either direction — it keeps serving. Set true again to re-create the auto-domain under the same hostname.
containerPort
integer
—
No description in the catalog.
jobTimeoutSec
integer
—
Wall-clock budget for one run, in seconds (60..86400). Becomes the Job activeDeadlineSeconds — an overrunning run is killed, not left going.
jobConcurrency
string
—
What happens when a run is still going at the next tick: 'forbid' (skip the tick), 'allow' (run in parallel) or 'replace' (kill the running one).
buildMachineType
string
—
No description in the catalog.
scheduleSuspended
boolean
—
Pause or resume a scheduled service without losing its schedule.

Response

Field
Type
Always
Description
id
string
•
mode
string
—
name
string
•
slug
string
•
memory
object
—
Memory of the running version. Absent for static sites and when it could not be read.
probes
object
•
source
string
•
command
string
—
lastRun
object
—
tracing
string
—
replicas
integer
•
schedule
string
—
createdAt
string
•
dependsOn
array
•
nextRunAt
string
—
resources
object
—
updatedAt
string
•
autoDeploy
boolean
—
sleepState
string
•
idleMinutes
integer
•
scaleToZero
boolean
•
publicDomain
boolean
—
appliedProbes
object
—
Probes of the version running now: what the serving deployment rendered (the Active one, or the Crashed one while it crash-loops). null when no deployment runs, or when they could not be read (appliedProbesUnknown). A change to probes reaches it only through a deploy. To apply pendingProbes now, deploy the service, or roll back to its current Active deployment (same image, fresh render).
containerPort
integer
•
environmentId
string
•
jobTimeoutSec
integer
—
pendingProbes
object
—
Probes the next deploy of this service will apply, from its current settings and defaults. Absent for static and scheduled services.
jobConcurrency
string
—
buildMachineType
string
—
sourceConnection
object
—
startupAutomatic
boolean
—
True when appliedProbes.startup is the automatic startup probe (added for a liveness-only service), not the service's own probes.startup.
scheduleSuspended
boolean
—
suspendedByBilling
boolean
—
lastReplicasRunning
integer
•
appliedProbesUnknown
boolean
—
True when a deployment runs but its probes could not be read; appliedProbes is then null. The next deploy records them.
probesPendingRedeploy
boolean
—
True when pendingProbes differ from appliedProbes: the running version does not have them yet. To apply pendingProbes now, deploy the service, or roll back to its current Active deployment (same image, fresh render). False when no deployment runs or appliedProbes are unknown.
scaleToZeroEligibility
object
—
pendingStartupAutomatic
boolean
—
True when pendingProbes.startup is the automatic startup probe.

Try it

Update service fields.

When to use

Update service fields. mode is immutable. On a scheduled service (mode:'scheduled') you may change schedule (five-field UTC cron, or null to leave it on demand only), command, jobTimeoutSec, jobConcurrency ('forbid' | 'allow' | 'replace'), and scheduleSuspended, which pauses or resumes the schedule without losing it. publicDomain false removes the auto-domain and its route; true re-creates them under the same hostname. Custom domains are untouched either way. Switching the GitHub connection: send the source with a new connectorId (source.repo.connectorId for a static site; build, spa and markdown you leave out keep their values). The new connection must be working and able to read repoFullName, otherwise the update is refused with 409 source_connection_unavailable and a candidates list (the other connections that can read it; pick one, the platform never picks), or 503 source_connection_check_failed when the check could not finish (try again). A successful switch records service.source.reconnected with reason 'manual'. Editing branch or path with the same connectorId is never checked, even when the connection is unavailable. For a git source only, source.build.secrets selects existing secret variables by name from the effective product → environment → service variable set. Image and static sources cannot use this field. Each deploy re-checks the selection and gives the values to the Docker build as BuildKit secrets: in the Dockerfile use RUN --mount=type=secret,id=<key> and read /run/secrets/<key> (env= is not supported). If you omit build when updating the same git repo, the current selection is preserved. Use build: { secrets: [] } to clear it.

Example

Ask your agent something like this:

Update service fields.

The agent will invoke deployment_service_update with these arguments:

{
  "id": "<id>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select