Skip to content
Ona Docs

UpdateRunner

client.runners.update(RunnerUpdateParams { name, runnerId, spec } body, RequestOptionsoptions?): RunnerUpdateResponse
POST/gitpod.v1.RunnerService/UpdateRunner

Updates a runner’s configuration.

Use this method to:

  • Modify runner settings
  • Update release channels
  • Change runner status
  • Configure auto-update settings

Examples

  • Update configuration:

    Changes runner settings.

    runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    name: "Updated Runner Name"
    spec:
      configuration:
        releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST
        autoUpdate: true
ParametersExpand Collapse
body: RunnerUpdateParams { name, runnerId, spec }
name?: string | null

The runner’s name which is shown to users

maxLength127
minLength3
runnerId?: string

runner_id specifies which runner to be updated.

+required

formatuuid
spec?: Spec | null
configuration?: Configuration | null
autoUpdate?: boolean | null

auto_update indicates whether the runner should automatically update itself.

devcontainerImageCacheEnabled?: boolean | null

devcontainer_image_cache_enabled controls whether the shared devcontainer build cache is enabled for this runner.

logLevel?: LogLevel | null

log_level is the log level for the runner

One of the following:
"LOG_LEVEL_UNSPECIFIED"
"LOG_LEVEL_DEBUG"
"LOG_LEVEL_INFO"
"LOG_LEVEL_WARN"
"LOG_LEVEL_ERROR"
metrics?: Metrics | null

metrics contains configuration for the runner’s metrics collection

enabled?: boolean | null

enabled indicates whether the runner should collect metrics

managedMetricsEnabled?: boolean | null

When true, the runner pushes metrics to the management plane via ReportRunnerMetrics instead of directly to the remote_write endpoint.

password?: string | null

password is the password to use for the metrics collector

url?: string | null

url is the URL of the metrics collector

username?: string | null

username is the username to use for the metrics collector

releaseChannel?: RunnerReleaseChannel | null

The release channel the runner is on

One of the following:
"RUNNER_RELEASE_CHANNEL_UNSPECIFIED"
"RUNNER_RELEASE_CHANNEL_STABLE"
"RUNNER_RELEASE_CHANNEL_LATEST"
updateWindow?: UpdateWindow { endHour, startHour } | null

update_window defines the daily time window (UTC) during which auto-updates are allowed. start_hour is required. If end_hour is omitted, it defaults to start_hour + 2. Send an empty UpdateWindow (no start_hour or end_hour) to clear a custom window and allow updates at any time.

endHour?: number | null

end_hour is the end of the update window as a UTC hour (0-23). If not set, defaults to start_hour + 2.

startHour?: number | null

start_hour is the beginning of the update window as a UTC hour (0-23). +required

desiredPhase?: RunnerPhase | null

desired_phase can currently only be updated on local-configuration runners, to toggle whether local runners are allowed for running environments in the organization. Set to:

  • ACTIVE to enable local runners.
  • INACTIVE to disable all local runners. Existing local runners and their environments will stop, and cannot be started again until the desired_phase is set to ACTIVE. Use this carefully, as it will affect all users in the organization who use local runners.
One of the following:
"RUNNER_PHASE_UNSPECIFIED"
"RUNNER_PHASE_CREATED"
"RUNNER_PHASE_INACTIVE"
"RUNNER_PHASE_ACTIVE"
"RUNNER_PHASE_DELETING"
"RUNNER_PHASE_DELETED"
"RUNNER_PHASE_DEGRADED"
ReturnsExpand Collapse
RunnerUpdateResponse = unknown

UpdateRunner

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const runner = await client.runners.update({
  name: 'Updated Runner Name',
  runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
  spec: { configuration: { autoUpdate: true, releaseChannel: 'RUNNER_RELEASE_CHANNEL_LATEST' } },
});

console.log(runner);
{}
Returns Examples
{}