ListRunnerPolicies
client.runners.policies.list(PolicyListParams { token, pageSize, pagination, runnerId } params, RequestOptionsoptions?): PoliciesPage<RunnerPolicy { groupId, role } >
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.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20
ListRunnerPolicies
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const runnerPolicy of client.runners.policies.list({
pagination: { pageSize: 20 },
runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
})) {
console.log(runnerPolicy.groupId);
}{
"pagination": {
"nextToken": "nextToken"
},
"policies": [
{
"groupId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"role": "RUNNER_ROLE_UNSPECIFIED"
}
]
}Returns Examples
{
"pagination": {
"nextToken": "nextToken"
},
"policies": [
{
"groupId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"role": "RUNNER_ROLE_UNSPECIFIED"
}
]
}