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>,
) -> Self
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>, ) -> Self
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>,
) -> Self
pub fn from_create( create: CreateImageRequest, dockerfile: String, s3_bucket: impl Into<String>, ) -> Self
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.