pub struct EnsureImageRequest {Show 20 fields
pub name_prefix: String,
pub binary: Vec<u8>,
pub dockerfile: String,
pub context: Option<BuildContext>,
pub s3_bucket: String,
pub s3_key_prefix: Option<String>,
pub build_role_arn: String,
pub size: SizeClass,
pub base_image: Option<BaseImage>,
pub force: bool,
pub tags: BTreeMap<String, String>,
pub wait_timeout: Option<Duration>,
pub project_files: Option<ProjectFiles>,
pub base_image_version: Option<String>,
pub log_group: Option<String>,
pub log_stream: Option<String>,
pub repair_guest_identity: bool,
pub inherit_workdir: bool,
pub run_hook_timeout: RunHookTimeout,
pub build_hook_timeout: BuildHookTimeout,
}Expand description
Everything Sandbox::ensure_image needs.
Fields§
§name_prefix: StringThe stem of the image name; the name is <prefix>-<hash12>.
binary: Vec<u8>The daemon binary’s bytes.
dockerfile: StringThe Dockerfile, usually wrap_dockerfile’s output. Checked by the create call’s
preflight before anything else happens.
context: Option<BuildContext>The files the Dockerfile may COPY ([super::context::from_dir]), or None.
s3_bucket: StringThe bucket the artifact is uploaded to, in the sandbox’s region.
s3_key_prefix: Option<String>A key prefix inside the bucket, or None for the bucket root.
build_role_arn: StringThe build role, which must read the bucket and write logs under
/aws/lambda-microvms/.
size: SizeClassThe size class the image is created with; part of the name.
base_image: Option<BaseImage>The base image, or None for BaseImage::from_dockerfile of the Dockerfile.
force: boolDelete what exists under the name and build afresh.
Tags for a created image. Not part of the name: a reused image keeps its own, and tags are not fixed at create.
wait_timeout: Option<Duration>The build wait’s deadline, or None for DEFAULT_BUILD_TIMEOUT.
project_files: Option<ProjectFiles>A project’s manifest and lockfile, baked as an environment layer (#74). Part of the name: they enter the artifact.
base_image_version: Option<String>baseImageVersion, or None for the service’s default. Part of the name when set.
log_group: Option<String>logging.cloudWatch.logGroup for a created image. Part of the name (#280): the
service sets an image’s logging when it creates it, so a reused image logs where its
creator asked.
log_stream: Option<String>The log-stream prefix for a created image; see CreateImageRequest::log_stream.
Part of the name, as log_group is.
repair_guest_identity: boolCreateImageRequest::repair_guest_identity for a created image. Part of the name
(#280): a reused image built without the repair would answer a caller who asked for it.
inherit_workdir: boolCreateImageRequest::inherit_workdir for a created image. Part of the name.
run_hook_timeout: RunHookTimeoutThe run-family hook timeouts for a created image. Part of the name.
build_hook_timeout: BuildHookTimeoutThe build-family hook timeouts for a created image. Part of the name.
Implementations§
Source§impl EnsureImageRequest
impl EnsureImageRequest
Sourcepub fn new(
name_prefix: impl Into<String>,
binary: Vec<u8>,
dockerfile: impl Into<String>,
s3_bucket: impl Into<String>,
build_role_arn: impl Into<String>,
) -> EnsureImageRequest
pub fn new( name_prefix: impl Into<String>, binary: Vec<u8>, dockerfile: impl Into<String>, s3_bucket: impl Into<String>, build_role_arn: impl Into<String>, ) -> EnsureImageRequest
A request with the defaults: no context, no key prefix, the default size class, the base derived from the Dockerfile, no force, no tags, the default wait, and the create request’s own defaults for everything a created image carries.
Sourcepub fn from_create(
create: CreateImageRequest,
dockerfile: String,
s3_bucket: impl Into<String>,
) -> EnsureImageRequest
pub fn from_create( create: CreateImageRequest, dockerfile: String, s3_bucket: impl Into<String>, ) -> EnsureImageRequest
The ensure request for a create request’s inputs (#258): its name becomes the prefix
and every field it carries a created image carries too. dockerfile is the text the
build takes, which a caller with no Dockerfile of its own gets from
ControlPlane::dockerfile_for. The artifact URI and token label are dropped: the
ensure derives both from the name it computes.
Trait Implementations§
Source§impl Clone for EnsureImageRequest
impl Clone for EnsureImageRequest
Source§fn clone(&self) -> EnsureImageRequest
fn clone(&self) -> EnsureImageRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for EnsureImageRequest
impl RefUnwindSafe for EnsureImageRequest
impl Send for EnsureImageRequest
impl Sync for EnsureImageRequest
impl Unpin for EnsureImageRequest
impl UnsafeUnpin for EnsureImageRequest
impl UnwindSafe for EnsureImageRequest
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more