pub struct CreateSandboxOptions { /* private fields */ }Expand description
Builder for POST /v1/sandboxes’s optional fields. All fields are
unset (server defaults apply) unless set via the chained setters.
use boxxkite_client::CreateSandboxOptions;
let options = CreateSandboxOptions::new()
.label("demo")
.storage_gb(20.0)
.lifetime_minutes(120);Implementations§
Source§impl CreateSandboxOptions
impl CreateSandboxOptions
pub fn new() -> Self
Sourcepub fn label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
Optional human-readable label for the sandbox.
Sourcepub fn size(self, size: SandboxSize) -> Self
pub fn size(self, size: SandboxSize) -> Self
CPU/memory size preset. Defaults to Small server-side when omitted.
Sourcepub fn storage_gb(self, storage_gb: f64) -> Self
pub fn storage_gb(self, storage_gb: f64) -> Self
Requested persistent storage in GB.
Sourcepub fn lifetime_minutes(self, lifetime_minutes: i64) -> Self
pub fn lifetime_minutes(self, lifetime_minutes: i64) -> Self
Maximum lifetime of the sandbox in minutes before automatic teardown.
Sourcepub fn count(self, count: u32) -> Self
pub fn count(self, count: u32) -> Self
Number of sandboxes to create in this request (1-10). Use
Client::create_sandbox_batch, not Client::create_sandbox, to
create more than one – the server returns a JSON array only when
count is greater than 1.
Sourcepub fn secret_names<I, S>(self, secret_names: I) -> Self
pub fn secret_names<I, S>(self, secret_names: I) -> Self
Names of this account’s secrets (see docs/SECRETS-DESIGN.md) this
session should be granted access to via the sidecar’s secrets-broker
http_request tool. A name that doesn’t exist for this account 404s
before any sandbox is created.
Sourcepub fn image_id(self, image_id: impl Into<String>) -> Self
pub fn image_id(self, image_id: impl Into<String>) -> Self
Id of a completed custom image built via Client::create_image.
404s if not owned by this account or not yet status "completed".
Sourcepub fn mcp_connection_names<I, S>(self, names: I) -> Self
pub fn mcp_connection_names<I, S>(self, names: I) -> Self
Labels of this account’s outbound-MCP connections (see
Client::create_mcp_connection) this session should be granted
network egress to.
Sourcepub fn volume_mounts(self, volume_mounts: HashMap<String, String>) -> Self
pub fn volume_mounts(self, volume_mounts: HashMap<String, String>) -> Self
{volume_id: mount_path} mapping of independent PVC-backed volumes
(see Client::create_volume) to mount into this sandbox.
Sourcepub fn gpu_count(self, gpu_count: i64) -> Self
pub fn gpu_count(self, gpu_count: i64) -> Self
Opt-in, experimental (docs/GPU-SUPPORT-SCOPING.md) – requests this
many GPUs as a Kubernetes extended-resource limit on the sandbox
container. 422s (gpu_support_disabled) unless the deployment has
BOXXKITE_GPU_ENABLED set and a GPU-equipped node pool with a device
plugin provisioned; not verified against real GPU hardware in this
codebase. Bounded by BOXXKITE_MAX_GPU_COUNT_PER_SESSION
(422 invalid_gpu_count otherwise).