Struct aws_sdk_ec2::model::on_demand_options::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for OnDemandOptions
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn allocation_strategy(self, input: FleetOnDemandAllocationStrategy) -> Self
pub fn allocation_strategy(self, input: FleetOnDemandAllocationStrategy) -> Self
The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.
lowest-price
- EC2 Fleet uses price to determine the order, launching the lowest price first.
prioritized
- EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.
Default: lowest-price
sourcepub fn set_allocation_strategy(
self,
input: Option<FleetOnDemandAllocationStrategy>
) -> Self
pub fn set_allocation_strategy(
self,
input: Option<FleetOnDemandAllocationStrategy>
) -> Self
The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.
lowest-price
- EC2 Fleet uses price to determine the order, launching the lowest price first.
prioritized
- EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.
Default: lowest-price
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn capacity_reservation_options(
self,
input: CapacityReservationOptions
) -> Self
pub fn capacity_reservation_options(
self,
input: CapacityReservationOptions
) -> Self
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.
Supported only for fleets of type instant
.
sourcepub fn set_capacity_reservation_options(
self,
input: Option<CapacityReservationOptions>
) -> Self
pub fn set_capacity_reservation_options(
self,
input: Option<CapacityReservationOptions>
) -> Self
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.
Supported only for fleets of type instant
.
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn single_instance_type(self, input: bool) -> Self
pub fn single_instance_type(self, input: bool) -> Self
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.
Supported only for fleets of type instant
.
sourcepub fn set_single_instance_type(self, input: Option<bool>) -> Self
pub fn set_single_instance_type(self, input: Option<bool>) -> Self
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.
Supported only for fleets of type instant
.
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn single_availability_zone(self, input: bool) -> Self
pub fn single_availability_zone(self, input: bool) -> Self
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
Supported only for fleets of type instant
.
sourcepub fn set_single_availability_zone(self, input: Option<bool>) -> Self
pub fn set_single_availability_zone(self, input: Option<bool>) -> Self
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
Supported only for fleets of type instant
.
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn min_target_capacity(self, input: i32) -> Self
pub fn min_target_capacity(self, input: i32) -> Self
The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
Supported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
| SingleInstanceType
sourcepub fn set_min_target_capacity(self, input: Option<i32>) -> Self
pub fn set_min_target_capacity(self, input: Option<i32>) -> Self
The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
Supported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
| SingleInstanceType
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn max_total_price(self, input: impl Into<String>) -> Self
pub fn max_total_price(self, input: impl Into<String>) -> Self
The maximum amount per hour for On-Demand Instances that you're willing to pay.
sourcepub fn set_max_total_price(self, input: Option<String>) -> Self
pub fn set_max_total_price(self, input: Option<String>) -> Self
The maximum amount per hour for On-Demand Instances that you're willing to pay.
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> OnDemandOptions
pub fn build(self) -> OnDemandOptions
Consumes the builder and constructs a OnDemandOptions
.
Examples found in repository?
58725 58726 58727 58728 58729 58730 58731 58732 58733 58734 58735 58736 58737 58738 58739 58740 58741 58742 58743 58744 58745 58746 58747 58748 58749 58750 58751 58752 58753 58754 58755 58756 58757 58758 58759 58760 58761 58762 58763 58764 58765 58766 58767 58768 58769 58770 58771 58772 58773 58774 58775 58776 58777 58778 58779 58780 58781 58782 58783 58784 58785 58786 58787 58788 58789 58790 58791 58792 58793 58794 58795 58796 58797 58798 58799 58800 58801 58802 58803 58804 58805 58806 58807 58808 58809 58810 58811 58812 58813 58814 58815 58816 58817 58818
pub fn deser_structure_crate_model_on_demand_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2861 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2861);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2862);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2863 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2863);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2864 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2864);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2865 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2865);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2866 =
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_max_total_price(var_2866);
}
,
_ => {}
}
}
Ok(builder.build())
}