Struct aws_sdk_ec2::model::state_reason::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for StateReason
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_code(self, input: Option<String>) -> Self
pub fn set_code(self, input: Option<String>) -> Self
The reason code for the state change.
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())
}
sourcepub fn message(self, input: impl Into<String>) -> Self
pub fn message(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
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.
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())
}
sourcepub fn build(self) -> StateReason
pub fn build(self) -> StateReason
Consumes the builder and constructs a 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())
}