Skip to content
Ona Docs

GetEnvironmentClass

runners.configurations.environment_classes.retrieve(EnvironmentClassRetrieveParams**kwargs) -> EnvironmentClassRetrieveResponse
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
environment_class_id: Optional[str]
formatuuid
ReturnsExpand Collapse
class EnvironmentClassRetrieveResponse:
environment_class: Optional[EnvironmentClass]
id: str

id is the unique identifier of the environment class

runner_id: str

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

configuration: Optional[List[FieldValue]]

configuration describes the configuration of the environment class

key: Optional[str]
value: Optional[str]
description: Optional[str]

description is a human readable description of the environment class

maxLength200
minLength3
display_name: Optional[str]

display_name is the human readable name of the environment class

maxLength127
minLength3
enabled: Optional[bool]

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

GetEnvironmentClass

import os
from gitpod import Gitpod

client = Gitpod(
    bearer_token=os.environ.get("GITPOD_API_KEY"),  # This is the default and can be omitted
)
environment_class = client.runners.configurations.environment_classes.retrieve(
    environment_class_id="d2c94c27-3b76-4a42-b88c-95a85e392c68",
)
print(environment_class.environment_class)
{
  "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
  }
}