API reference
Set a pool's policy
Create a pool or write its next version, with a reason. An owner or admin of the account only. Send expected_version 0 to create and the version you read to change it; a newer one answers aborted. A runner is in one pool at most, and its trust tier comes from the pool.
Needs scope coordinator:write.
bearerAuthorizationBearer <JWT>An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.
pool_id*stringThe pool's id: lower case letters, digits, ., _ and -.
iohr.coordinator.v1.UpsertPoolPolicyRequest; path variables override their fields
application/json- body
iohr.coordinator.v1.UpsertPoolPolicyRequest
account_id?stringexpected_version?integerint32policy?iohr.coordinator.v1.PoolPolicy
pool_id?stringreason?stringiohr.coordinator.v1.UpsertPoolPolicyResponse
application/json- response
iohr.coordinator.v1.UpsertPoolPolicyResponse
policy?iohr.coordinator.v1.PoolPolicy
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { const { value } = await api.coordinator.upsertPoolPolicy("<pool_id>", { reason: "<reason>" }); console.log(value);} catch (e) { if (!(e instanceof ApiError)) throw e; console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`); process.exitCode = 1;}npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.
{ "policy": { "max_load_per_core": 0.1, "max_slots": 0, "min_free_disk_bytes": "string", "paused": true, "pool_id": "string", "reason": "string", "runners": [ { "max_build_slots": 0, "max_slots": 0, "runner_id": "string" } ], "thermal_limits": { "property1": 0.1, "property2": 0.1 }, "trust_tier": "string", "updated_at": "string", "updated_by": "string", "version": 0 }}