Skip to main content
POST
Create an instance pool
Requires the IAM action compute:CreateInstancePool. See COMPUTE permissions for the full list, what each one covers, and an example policy.

Authorizations

Authorization
string
header
required

An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. This is the recommended way to authenticate.

Get one by exchanging a service account's access key pair at POST /v1/oauth/token with grant_type=client_credentials. It is the standard client-credentials grant, so any OAuth-aware library will obtain and refresh it for you.

Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.

Headers

Idempotency-Key
string

Optional client-generated key that makes a create replay-safe. Retrying a request with the same key returns the original outcome verbatim instead of creating a duplicate resource. Reusing a key with a different request body is rejected (422); a request whose key is still being processed returns 409. Records are honored for 24 hours. Use a UUID or similarly unique token.

Maximum string length: 255

Body

application/json

Create a pool with one interface per member. Subnets must be nonempty, unique, and belong to the same account, region and VPC. New members are placed in the least-populated selected subnet. Omitted min_count and max_count default to desired_count.

subnets
string[]
required

Subnet UUIDs or CRNs in the same VPC.

Minimum array length: 1
name
string
required

Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).

Example:

"web-asg"

template
object
required

Launch configuration shared by every member. Each member receives one interface in a subnet selected from the pool's top-level subnets. The template controls that interface's security groups, allocated address families and optional per-member floating IPs. Fixed addresses are not allowed.

autoscaling
object

Target tracking shared by instance pools and load balancers. Updates replace the policy. Set enabled=false to retain settings and use manual sizing. Each metric recommends a desired count; the largest recommendation wins. Missing, stale or incomplete observations prevent scale-in but do not block scale-out recommended by another valid metric. Decisions obey the resource's min_count/max_count, warmup, cooldown, stabilization, step limits and quotas. State survives controller restarts. Active policies own desired_count; manual changes are accepted and automatic evaluation resumes after cooldown. Custom telemetry requires telemetry:ReadMetrics in the same account.

description
string
tags
object

Labels on the pool resource, for IAM conditions (basalt:RequestTag/<key> here, basalt:ResourceTag/<key> on later operations) and cost attribution. They are not propagated to the instances the pool launches; template.tags is that set. A pool field, sent beside template. Replica tags are only reachable through template.tags.

Example:
desired_count
integer
Required range: 0 <= x <= 100
Example:

2

min_count
integer
Required range: 0 <= x <= 100
Example:

1

max_count
integer

A value of 0 means the pool holds no members until max_count is raised.

Required range: 0 <= x <= 100
Example:

3

Response

Pool created; initial instances spawned.

instance_pool
object
required

A launch template plus a desired count. Creating a pool spawns desired_count instances; a reconciler converges member_count toward desired_count as it changes. member_count is how many members the pool holds; live_count is how many of them are running. A pool carries two tag sets and they answer different questions. tags labels the pool resource — that is what an IAM condition reads as basalt:ResourceTag/<key> and what a cost report groups by, and it reaches no instance. template.tags is the set stamped on every replica the pool launches.