Struct aws_sdk_ec2::model::StateReason
source · #[non_exhaustive]pub struct StateReason { /* private fields */ }
Expand description
Describes a state change.
Implementations§
source§impl StateReason
impl StateReason
sourcepub fn message(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
The message for the state change.
-
Server.InsufficientInstanceCapacity
: There was insufficient capacity available to satisfy the launch request. -
Server.InternalError
: An internal error caused the instance to terminate during launch. -
Server.ScheduledStop
: The instance was stopped due to a scheduled retirement. -
Server.SpotInstanceShutdown
: The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price. -
Server.SpotInstanceTermination
: The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price. -
Client.InstanceInitiatedShutdown
: The instance was shut down using theshutdown -h
command from the instance. -
Client.InstanceTerminated
: The instance was terminated or rebooted during AMI creation. -
Client.InternalError
: A client error caused the instance to terminate during launch. -
Client.InvalidSnapshot.NotFound
: The specified snapshot was not found. -
Client.UserInitiatedHibernate
: Hibernation was initiated on the instance. -
Client.UserInitiatedShutdown
: The instance was shut down using the Amazon EC2 API. -
Client.VolumeLimitExceeded
: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your account limits.
source§impl StateReason
impl StateReason
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture StateReason
.
Examples found in repository?
40773 40774 40775 40776 40777 40778 40779 40780 40781 40782 40783 40784 40785 40786 40787 40788 40789 40790 40791 40792 40793 40794 40795 40796 40797 40798 40799 40800 40801 40802 40803 40804 40805 40806 40807 40808 40809 40810
pub fn deser_structure_crate_model_state_reason(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StateReason, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StateReason::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#StateReason$Code */ => {
let var_1741 =
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_code(var_1741);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#StateReason$Message */ => {
let var_1742 =
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_message(var_1742);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for StateReason
impl Clone for StateReason
source§fn clone(&self) -> StateReason
fn clone(&self) -> StateReason
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more