pub enum Logging {
Disabled {
disabled: LoggingDisabled,
},
CloudWatch {
cloud_watch: CloudWatchLogging,
},
}Expand description
Logging, the model’s tagged union: exactly one of disabled or cloudWatch.
The same wire shape as PortSpecification and modelled the same way: a Smithy union
serialises as one key — {"disabled": {}} or {"cloudWatch": {...}} — not a
discriminator field, so #[serde(untagged)] plus a rename per variant is what keeps
serde’s default {"Disabled": ...} spelling off the wire.
Both CreateMicrovmImageRequest and RunMicrovmRequest carry a logging member of
this shape in the model, and this client binds both: the image-build side for issue #98
(three build VMs, three streams, the exact-name collision) and the per-VM side for #201.
Variants§
Disabled
LoggingDisabled: no logs at all. An empty struct rather than a unit variant for
AllPorts’s reason — the wire form is {} and a unit serialises to null,
which the service rejects as a malformed union member.
Fields
disabled: LoggingDisabledCloudWatch
CloudWatchLogging: a caller-named group and, optionally, stream.
Fields
cloud_watch: CloudWatchLoggingImplementations§
Source§impl Logging
impl Logging
Sourcepub fn cloud_watch(
log_group: impl Into<String>,
log_stream: Option<String>,
) -> Logging
pub fn cloud_watch( log_group: impl Into<String>, log_stream: Option<String>, ) -> Logging
Logs to log_group, with the service naming the streams inside it.
Sourcepub fn from_parts(
log_group: Option<String>,
log_stream: Option<String>,
disabled: bool,
) -> Result<Option<Logging>, Error>
pub fn from_parts( log_group: Option<String>, log_stream: Option<String>, disabled: bool, ) -> Result<Option<Logging>, Error>
A per-VM configuration from a launch surface’s three arguments: a group, an exact
stream inside it, or disabled. None when none was given.
One place for the refusal, so the CLI and both bindings word it identically.
Sourcepub fn log_stream(&self) -> Option<&str>
pub fn log_stream(&self) -> Option<&str>
The resolved logStream this configuration carries, when it carries one.
Trait Implementations§
Source§impl Serialize for Logging
impl Serialize for Logging
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Logging
Auto Trait Implementations§
impl Freeze for Logging
impl RefUnwindSafe for Logging
impl Send for Logging
impl Sync for Logging
impl Unpin for Logging
impl UnsafeUnpin for Logging
impl UnwindSafe for Logging
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