POST

授权

x-api-key
string
header
必填

路径参数

pool_id
string
必填

请求体

application/json
name
string

Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.

Required string length: 1 - 64
description
string

Free-text note describing what the pool is for.

default_machine_cpu
integer<int32> | null

Number of CPUs a newly created machine gets unless the request asks for another value.

必填范围: 1 <= x <= 2147483647
default_machine_memory_mb
integer<int32> | null

Memory in MB a newly created machine gets unless the request asks for another value.

必填范围: 1 <= x <= 2147483647
default_machine_env
object

Default environment for pool machines. A machine's environment, including resolved secret_env values, is applied to the provider machine at provisioning, so the provider_options startup_script and the daemon run with it, and is resolved again for each process at launch.

default_machine_secret_env
object

Default secret environment for pool machines, mapping env names to generic secret references. References are resolved to secret values wherever the machine environment is applied.

default_machine_provider_options
object

Options passed to the machine provider for every machine the pool creates.

default_cwd
string

Working directory for processes of machines the pool creates from now on; existing machines keep theirs.

provider_config
object

Settings the machine provider needs for this pool.

provider_auth_secret_id
string

Secret ID (sec_...).

Pattern: ^sec_[a-z2-7]{26}$
runtime_protection_enabled
boolean

Set true to have BMA remove a machine of this pool whose provider instance is still up after its daemon went inactive.

max_total_machines
integer<int32>

Deprecated, not enforced: how many machines a pool has no longer blocks new machines. Organization and project quotas over in-use machines (org resource limits max_in_use_pool_machines_per_project and max_in_use_pool_machines_per_org) govern capacity.

必填范围: 0 <= x <= 2147483647
max_total_cpu
integer<int32> | null

Deprecated, not enforced: organization and project in-use machine CPU quotas govern capacity.

必填范围: 0 <= x <= 2147483647
max_total_memory_mb
integer<int32> | null

Deprecated, not enforced: organization and project in-use machine memory quotas govern capacity.

必填范围: 0 <= x <= 2147483647
min_machine_cpu
integer<int32> | null

Lower bound on the CPU count of any one machine in the pool.

必填范围: 0 <= x <= 2147483647
min_machine_memory_mb
integer<int32> | null

Lower bound on the memory, in MB, of any one machine in the pool.

必填范围: 0 <= x <= 2147483647
max_machine_cpu
integer<int32> | null

Upper bound on the CPU count of any one machine in the pool.

必填范围: 1 <= x <= 2147483647
max_machine_memory_mb
integer<int32> | null

Upper bound on the memory, in MB, of any one machine in the pool.

必填范围: 1 <= x <= 2147483647
delete_after_idle_minutes
integer<int32> | null

Idle minutes before deleting a machine from this pool. Null clears the pool default; omitted leaves it unchanged.

必填范围: 5 <= x <= 2147483647
pause_after_idle_minutes
integer<int32> | null

Idle minutes before pausing a machine from this pool. Null clears it; omitted leaves it unchanged. Exclusive with delete_after_idle_minutes.

必填范围: 5 <= x <= 2147483647
archive_after_paused_days
integer<int32> | null

Days a machine stays paused before it is archived. Null clears it; omitted leaves it unchanged. Requires pause_after_idle_minutes.

必填范围: 1 <= x <= 3650
delete_after_paused_days
integer<int32> | null

Days a machine stays paused before it is deleted, counted from when it paused. Null clears it; omitted leaves it unchanged. Requires pause_after_idle_minutes; cannot be combined with archive_after_paused_days.

必填范围: 1 <= x <= 3650
metadata
object

User-supplied metadata stored on a machine, provided directly or copied from the machine pool that provisions it. A restriction of Metadata that leaves room for one reserved pair - BMA sets observed_platform on the machine to the platform reported by its daemon, so the key is reserved and at most 15 user pairs are accepted.

响应

Success.

type
string
必填

Always machine_pool.

Allowed value: "machine_pool"
id
string
必填

Machine pool ID (mpo_...), or env_... for a cloud environment's own pool, which shares the environment's ID.

Pattern: ^(mpo|env)_[a-z2-7]{26}$
org_id
string
必填
Pattern: ^org_[a-z2-7]{26}$
name
string
必填

Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.

Required string length: 1 - 64
management_kind
enum<string>
必填

Lifecycle owner. Tenant-managed resources can be changed through tenant APIs. Cluster-managed resources are installed and lifecycle-managed by the control plane; individual APIs may explicitly expose tenant-editable settings.

可用选项:
tenant,
cluster
description
string
必填
provider
string
必填
default_machine_cpu
integer<int32> | null
必填
必填范围: 1 <= x <= 2147483647
default_machine_memory_mb
integer<int32> | null
必填
必填范围: 1 <= x <= 2147483647
default_machine_env
object
必填

Default environment for pool machines. A machine's environment, including resolved secret_env values, is applied to the provider machine at provisioning, so the provider_options startup_script and the daemon run with it, and is resolved again for each process at launch.

default_machine_secret_env
object
必填

Default secret environment for pool machines, mapping env names to generic secret references. References are resolved to secret values wherever the machine environment is applied.

default_machine_provider_options
object
必填
default_cwd
string
必填
provider_config
object
必填
runtime_protection_enabled
boolean
必填

When true, BMA removes a machine of this pool whose provider instance is still up once its daemon has gone inactive.

max_total_machines
integer<int32>
必填

Deprecated, not enforced: how many machines a pool has no longer blocks new machines. Organization and project quotas over in-use machines (org resource limits max_in_use_pool_machines_per_project and max_in_use_pool_machines_per_org) govern capacity.

必填范围: 0 <= x <= 2147483647
max_total_cpu
integer<int32> | null
必填

Deprecated, not enforced: organization and project in-use machine CPU quotas govern capacity.

必填范围: 0 <= x <= 2147483647
max_total_memory_mb
integer<int32> | null
必填

Deprecated, not enforced: organization and project in-use machine memory quotas govern capacity.

必填范围: 0 <= x <= 2147483647
min_machine_cpu
integer<int32> | null
必填
必填范围: 0 <= x <= 2147483647
min_machine_memory_mb
integer<int32> | null
必填
必填范围: 0 <= x <= 2147483647
max_machine_cpu
integer<int32> | null
必填
必填范围: 1 <= x <= 2147483647
max_machine_memory_mb
integer<int32> | null
必填
必填范围: 1 <= x <= 2147483647
delete_after_idle_minutes
integer<int32> | null
必填

Minutes a machine of this pool may sit idle before it is deleted; null when the pool sets no default.

必填范围: 5 <= x <= 2147483647
pause_after_idle_minutes
integer<int32> | null
必填

Idle minutes before pausing a machine from this pool, or null when the pool does not pause idle machines.

必填范围: 5 <= x <= 2147483647
archive_after_paused_days
integer<int32> | null
必填

Days a machine stays paused before it is archived, or null when the pool does not archive.

必填范围: 1 <= x <= 3650
delete_after_paused_days
integer<int32> | null
必填

Days a machine stays paused before it is deleted, counted from when it paused, or null when the pool keeps paused machines.

必填范围: 1 <= x <= 3650
metadata
object
必填

Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 characters, values must be strings of up to 512 characters.

created_at
string<date-time>
必填
updated_at
string<date-time>
必填
provider_auth_secret_id
string

The organization's vault credential the pool's provider authenticates with, an opaque ID (a migrated one keeps its legacy sec_ ID); absent when the pool uses the platform's credential of its provider tier.

Pattern: ^[A-Za-z0-9_-]{1,128}$
usage
object

Quota currently consumed by the pool's machines. Present only on responses of the list and get operations.