Struct aws_sdk_ec2::model::InstanceStatusEvent
source · #[non_exhaustive]pub struct InstanceStatusEvent { /* private fields */ }
Expand description
Describes a scheduled event for an instance.
Implementations§
source§impl InstanceStatusEvent
impl InstanceStatusEvent
sourcepub fn instance_event_id(&self) -> Option<&str>
pub fn instance_event_id(&self) -> Option<&str>
The ID of the event.
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description of the event.
After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].
sourcepub fn not_before(&self) -> Option<&DateTime>
pub fn not_before(&self) -> Option<&DateTime>
The earliest scheduled start time for the event.
sourcepub fn not_before_deadline(&self) -> Option<&DateTime>
pub fn not_before_deadline(&self) -> Option<&DateTime>
The deadline for starting the event.
source§impl InstanceStatusEvent
impl InstanceStatusEvent
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceStatusEvent
.
Examples found in repository?
src/xml_deser.rs (line 37409)
37405 37406 37407 37408 37409 37410 37411 37412 37413 37414 37415 37416 37417 37418 37419 37420 37421 37422 37423 37424 37425 37426 37427 37428 37429 37430 37431 37432 37433 37434 37435 37436 37437 37438 37439 37440 37441 37442 37443 37444 37445 37446 37447 37448 37449 37450 37451 37452 37453 37454 37455 37456 37457 37458 37459 37460 37461 37462 37463 37464 37465 37466 37467 37468 37469 37470 37471 37472 37473 37474 37475 37476 37477 37478 37479 37480 37481 37482 37483 37484 37485 37486 37487 37488 37489 37490 37491 37492 37493 37494 37495 37496 37497 37498
pub fn deser_structure_crate_model_instance_status_event(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStatusEvent, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStatusEvent::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventId") /* InstanceEventId com.amazonaws.ec2#InstanceStatusEvent$InstanceEventId */ => {
let var_1559 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_event_id(var_1559);
}
,
s if s.matches("code") /* Code com.amazonaws.ec2#InstanceStatusEvent$Code */ => {
let var_1560 =
Some(
Result::<crate::model::EventCode, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EventCode::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_1560);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#InstanceStatusEvent$Description */ => {
let var_1561 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1561);
}
,
s if s.matches("notAfter") /* NotAfter com.amazonaws.ec2#InstanceStatusEvent$NotAfter */ => {
let var_1562 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_not_after(var_1562);
}
,
s if s.matches("notBefore") /* NotBefore com.amazonaws.ec2#InstanceStatusEvent$NotBefore */ => {
let var_1563 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_not_before(var_1563);
}
,
s if s.matches("notBeforeDeadline") /* NotBeforeDeadline com.amazonaws.ec2#InstanceStatusEvent$NotBeforeDeadline */ => {
let var_1564 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_not_before_deadline(var_1564);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceStatusEvent
impl Clone for InstanceStatusEvent
source§fn clone(&self) -> InstanceStatusEvent
fn clone(&self) -> InstanceStatusEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more