Skip to content
Ona Docs

UpdateEnvironmentClass

client.runners.configurations.environmentClasses.update(EnvironmentClassUpdateParams { description, displayName, enabled, environmentClassId } body, RequestOptionsoptions?): EnvironmentClassUpdateResponse
POST/gitpod.v1.RunnerConfigurationService/UpdateEnvironmentClass

Updates an environment class.

Use this method to:

  • Modify class settings
  • Update resource limits
  • Change availability

Examples

  • Update class:

    Changes class configuration.

    environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    displayName: "Updated Large Instance"
    description: "16 CPU, 32GB RAM"
    enabled: true
ParametersExpand Collapse
body: EnvironmentClassUpdateParams { description, displayName, enabled, environmentClassId }
description?: string | null
maxLength200
minLength3
displayName?: string | null
maxLength127
minLength3
enabled?: boolean | null
environmentClassId?: string
formatuuid
ReturnsExpand Collapse
EnvironmentClassUpdateResponse = unknown

UpdateEnvironmentClass

import Gitpod from '@gitpod/sdk';

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

const environmentClass = await client.runners.configurations.environmentClasses.update({
  description: '16 CPU, 32GB RAM',
  displayName: 'Updated Large Instance',
  enabled: true,
  environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});

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