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>,
) -> Self
pub fn cloud_watch( log_group: impl Into<String>, log_stream: Option<String>, ) -> Self
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<Self>, Error>
pub fn from_parts( log_group: Option<String>, log_stream: Option<String>, disabled: bool, ) -> Result<Option<Self>, 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.