Skip to content
Ona Docs

GetEnvironmentClass

client.runners.configurations.environmentClasses.retrieve(EnvironmentClassRetrieveParams { environmentClassId } body, RequestOptionsoptions?): EnvironmentClassRetrieveResponse { environmentClass }
POST/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass

Gets details about a specific environment class.

Use this method to:

  • View class configuration
  • Check resource settings
  • Verify availability

Examples

  • Get class details:

    Retrieves information about a specific class.

    environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
ParametersExpand Collapse
body: EnvironmentClassRetrieveParams { environmentClassId }
environmentClassId?: string
formatuuid
ReturnsExpand Collapse
EnvironmentClassRetrieveResponse { environmentClass }
environmentClass?: EnvironmentClass { id, runnerId, configuration, 3 more }
id: string

id is the unique identifier of the environment class

runnerId: string

runner_id is the unique identifier of the runner the environment class belongs to

configuration?: Array<FieldValue { key, value } >

configuration describes the configuration of the environment class

key?: string
value?: string
description?: string

description is a human readable description of the environment class

maxLength200
minLength3
displayName?: string

display_name is the human readable name of the environment class

maxLength127
minLength3
enabled?: boolean

enabled indicates whether the environment class can be used to create new environments.

GetEnvironmentClass

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.retrieve({
  environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});

console.log(environmentClass.environmentClass);
{
  "environmentClass": {
    "id": "id",
    "runnerId": "runnerId",
    "configuration": [
      {
        "key": "key",
        "value": "value"
      }
    ],
    "description": "xxx",
    "displayName": "xxx",
    "enabled": true
  }
}
Returns Examples
{
  "environmentClass": {
    "id": "id",
    "runnerId": "runnerId",
    "configuration": [
      {
        "key": "key",
        "value": "value"
      }
    ],
    "description": "xxx",
    "displayName": "xxx",
    "enabled": true
  }
}