## ListRunnerPolicies `client.Runners.Policies.List(ctx, params) (*PoliciesPage[RunnerPolicy], error)` **post** `/gitpod.v1.RunnerService/ListRunnerPolicies` Lists policies for a runner. Use this method to: - View access controls - Check policy configurations - Audit permissions ### Examples - List policies: Shows all policies for a runner. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ``` ### Parameters - `params RunnerPolicyListParams` - `Token param.Field[string]` Query param - `PageSize param.Field[int64]` Query param - `Pagination param.Field[RunnerPolicyListParamsPagination]` 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. - `RunnerID param.Field[string]` Body param: runner_id specifies the project identifier ### Returns - `type RunnerPolicy struct{…}` - `GroupID string` - `Role RunnerRole` role is the role assigned to the group - `const RunnerRoleUnspecified RunnerRole = "RUNNER_ROLE_UNSPECIFIED"` - `const RunnerRoleAdmin RunnerRole = "RUNNER_ROLE_ADMIN"` - `const RunnerRoleUser RunnerRole = "RUNNER_ROLE_USER"` ### 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.Runners.Policies.List(context.TODO(), gitpod.RunnerPolicyListParams{ Pagination: gitpod.F(gitpod.RunnerPolicyListParamsPagination{ PageSize: gitpod.F(int64(20)), }), RunnerID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "pagination": { "nextToken": "nextToken" }, "policies": [ { "groupId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "role": "RUNNER_ROLE_UNSPECIFIED" } ] } ```