pub struct Image {
pub identifier: String,
pub name: String,
pub version: String,
pub state: String,
pub size: SizeClass,
}Expand description
A built image, and the log group the service created alongside it.
Fields§
§identifier: StringThe image ARN, which is what imageIdentifier takes.
name: StringThe image name.
version: StringThe version the create call produced.
state: StringThe state the service last reported.
size: SizeClassThe class the requested baseline selected.
Carried on the image because billing follows the baseline requested at create time, and by the time anyone asks what a run cost the request is gone.
Implementations§
Source§impl Image
impl Image
Sourcepub fn build_log_group(&self) -> String
pub fn build_log_group(&self) -> String
/aws/lambda-microvms/<image-name>.
The service creates this itself, so a Terraform stack never owns it and terraform destroy leaves it behind — “the stack destroyed cleanly” is not “the account is
clean”. Six of these accumulated before anyone noticed.
Sourcepub fn is_ready(state: &str) -> bool
pub fn is_ready(state: &str) -> bool
Whether the state the service reported means “built and usable”.
Accepts the two model-backed spellings and the two tolerated ones. Kept generous because the service has answered differently across API versions, and a hard equality check on one spelling is how a working build looks like a stalled one.
Sourcepub fn is_failed(state: &str) -> bool
pub fn is_failed(state: &str) -> bool
Whether the state means the build failed.
A substring test rather than a set, because the model’s failure spellings are
CREATE_FAILED, UPDATE_FAILED, and DELETE_FAILED and the thing they share is
the word — matching that means a fourth added later is still recognised as a
failure rather than polled until the deadline.
Trait Implementations§
impl Eq for Image
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnsafeUnpin for Image
impl UnwindSafe for Image
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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