## ListProjectEnvironmentClasses `client.Projects.EnvironmentClases.List(ctx, params) (*ProjectEnvironmentClassesPage[ProjectEnvironmentClass], error)` **post** `/gitpod.v1.ProjectService/ListProjectEnvironmentClasses` Lists environment classes of a project. Use this method to: - View all environment classes of a project ### Examples - List project environment classes: Shows all environment classes of a project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ``` ### Parameters - `params ProjectEnvironmentClaseListParams` - `Token param.Field[string]` Query param - `PageSize param.Field[int64]` Query param - `Pagination param.Field[ProjectEnvironmentClaseListParamsPagination]` Body param: pagination contains the pagination options for listing project policies - `Token string` Token for the next set of results that was returned as next_token of a PaginationResponse - `PageSize int64` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. - `ProjectID param.Field[string]` Body param: project_id specifies the project identifier ### Returns - `type ProjectEnvironmentClass struct{…}` - `EnvironmentClassID string` Use a fixed environment class on a given Runner. This cannot be a local runner's environment class. - `LocalRunner bool` Use a local runner for the user - `Order int64` order is the priority of this entry ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) page, err := client.Projects.EnvironmentClases.List(context.TODO(), gitpod.ProjectEnvironmentClaseListParams{ Pagination: gitpod.F(gitpod.ProjectEnvironmentClaseListParamsPagination{ PageSize: gitpod.F(int64(20)), }), ProjectID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "pagination": { "nextToken": "nextToken" }, "projectEnvironmentClasses": [ { "environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "localRunner": true, "order": 0 } ] } ```