## ListEnvironmentClasses `environments.classes.list(ClassListParams**kwargs) -> SyncEnvironmentClassesPage[EnvironmentClass]` **post** `/gitpod.v1.EnvironmentService/ListEnvironmentClasses` Lists available environment classes with their specifications and resource limits. Use this method to understand what types of environments you can create and their capabilities. Environment classes define the compute resources and features available to your environments. ### Examples - List all available classes: Retrieves a list of all environment classes with their specifications. ```yaml {} ``` buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ### Parameters - `token: Optional[str]` - `page_size: Optional[int]` - `filter: Optional[Filter]` - `can_create_environments: Optional[bool]` can_create_environments filters the response to only environment classes that can be used to create new environments by the caller. Unlike enabled, which indicates general availability, this ensures the caller only sees environment classes they are allowed to use. - `enabled: Optional[bool]` enabled filters the response to only enabled or disabled environment classes. If not set, all environment classes are returned. - `runner_ids: Optional[Sequence[str]]` runner_ids filters the response to only EnvironmentClasses of these Runner IDs - `runner_kinds: Optional[List[RunnerKind]]` runner_kind filters the response to only environment classes from runners of these kinds. - `"RUNNER_KIND_UNSPECIFIED"` - `"RUNNER_KIND_LOCAL"` - `"RUNNER_KIND_REMOTE"` - `"RUNNER_KIND_LOCAL_CONFIGURATION"` - `runner_providers: Optional[List[RunnerProvider]]` runner_providers filters the response to only environment classes from runners of these providers. - `"RUNNER_PROVIDER_UNSPECIFIED"` - `"RUNNER_PROVIDER_AWS_EC2"` - `"RUNNER_PROVIDER_LINUX_HOST"` - `"RUNNER_PROVIDER_DESKTOP_MAC"` - `"RUNNER_PROVIDER_MANAGED"` - `"RUNNER_PROVIDER_GCP"` - `"RUNNER_PROVIDER_DEV_AGENT"` - `pagination: Optional[Pagination]` pagination contains the pagination options for listing environment classes - `token: Optional[str]` Token for the next set of results that was returned as next_token of a PaginationResponse - `page_size: Optional[int]` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. ### Returns - `class 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 - `display_name: Optional[str]` display_name is the human readable name of the environment class - `enabled: Optional[bool]` enabled indicates whether the environment class can be used to create new environments. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) page = client.environments.classes.list() page = page.environment_classes[0] print(page.id) ``` #### Response ```json { "environmentClasses": [ { "id": "id", "runnerId": "runnerId", "configuration": [ { "key": "key", "value": "value" } ], "description": "xxx", "displayName": "xxx", "enabled": true } ], "pagination": { "nextToken": "nextToken" } } ```