pub struct CreateOptions {
pub packages: Option<Vec<String>>,
pub envs: HashMap<String, String>,
pub name: String,
pub egress: Option<Vec<String>>,
pub egress_policy: String,
pub document: Option<Vec<u8>>,
pub source: Option<GitSource>,
pub start_timeout: Option<Duration>,
pub client: Option<Client>,
pub instance: String,
}Expand description
Configures Sandbox::create. The default is a sandbox with DEFAULT_PACKAGES and open
egress.
Fields§
§packages: Option<Vec<String>>Packages installed in the sandbox (Chainguard package names). None means
DEFAULT_PACKAGES; Some(vec![]) means none beyond the base system. They are resolved
when the sandbox is created; an unknown package fails create.
envs: HashMap<String, String>Environment variables for every command (per-command ones override them). They are kept
client-side, in this Sandbox value.
name: StringLabels the sandbox. Its display name becomes <name>/<word-word>. Defaults to “sandbox”.
egress: Option<Vec<String>>The outbound allowlist (hostnames; “*” allows all). None means ["*"]. The platform
always blocks cloud metadata, loopback and private ranges.
egress_policy: StringWhat happens to a connection outside egress: “deny” (refuse it; the default) or
“destroy” (tear the sandbox down).
document: Option<Vec<u8>>Replaces the generated environment document entirely (a .chainguard/ci.yaml-style
document). packages, egress and egress_policy are then ignored.
source: Option<GitSource>Starts from a GitHub repository instead of an empty tree.
start_timeout: Option<Duration>Bounds waiting for the guest to start (default 3 minutes).
client: Option<Client>The Workspaces client to use. None creates one with the default login and the
organization from instance.
instance: StringThe organization ID (used when client is None). If empty, $CHAINCTL_SANDBOX_INSTANCE
is used; if that’s empty too, the organization is auto-detected when you belong to exactly
one (turn off with $CHAINGUARD_SANDBOX_NO_DETECT_INSTANCE=1). List IDs with
list_organizations, chainguard-sandbox orgs or chainctl iam organizations list.
Trait Implementations§
Source§impl Clone for CreateOptions
impl Clone for CreateOptions
Source§fn clone(&self) -> CreateOptions
fn clone(&self) -> CreateOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateOptions
impl Debug for CreateOptions
Source§impl Default for CreateOptions
impl Default for CreateOptions
Source§fn default() -> CreateOptions
fn default() -> CreateOptions
Auto Trait Implementations§
impl !Freeze for CreateOptions
impl !RefUnwindSafe for CreateOptions
impl Send for CreateOptions
impl Sync for CreateOptions
impl Unpin for CreateOptions
impl UnsafeUnpin for CreateOptions
impl !UnwindSafe for CreateOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].