Struct aws_sdk_ec2::model::SpotFleetRequestConfigData
source · #[non_exhaustive]pub struct SpotFleetRequestConfigData { /* private fields */ }
Expand description
Describes the configuration of a Spot Fleet request.
Implementations§
source§impl SpotFleetRequestConfigData
impl SpotFleetRequestConfigData
sourcepub fn allocation_strategy(&self) -> Option<&AllocationStrategy>
pub fn allocation_strategy(&self) -> Option<&AllocationStrategy>
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide for Linux Instances.
lowestPrice
- Spot Fleet launches instances from the lowest-price Spot Instance pool that has available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances come from the next cheapest pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools.
diversified
- Spot Fleet launches instances from all of the Spot Instance pools that you specify.
capacityOptimized
(recommended) - Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacityOptimizedPrioritized
. Set a priority for each instance type by using the Priority
parameter for LaunchTemplateOverrides
. You can assign the same priority to different LaunchTemplateOverrides
. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized
is supported only if your Spot Fleet uses a launch template. Note that if the OnDemandAllocationStrategy
is set to prioritized
, the same priority is applied when fulfilling On-Demand capacity.
Default: lowestPrice
sourcepub fn on_demand_allocation_strategy(
&self
) -> Option<&OnDemandAllocationStrategy>
pub fn on_demand_allocation_strategy(
&self
) -> Option<&OnDemandAllocationStrategy>
The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice
.
sourcepub fn spot_maintenance_strategies(&self) -> Option<&SpotMaintenanceStrategies>
pub fn spot_maintenance_strategies(&self) -> Option<&SpotMaintenanceStrategies>
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
sourcepub fn client_token(&self) -> Option<&str>
pub fn client_token(&self) -> Option<&str>
A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency.
sourcepub fn excess_capacity_termination_policy(
&self
) -> Option<&ExcessCapacityTerminationPolicy>
pub fn excess_capacity_termination_policy(
&self
) -> Option<&ExcessCapacityTerminationPolicy>
Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
sourcepub fn fulfilled_capacity(&self) -> Option<f64>
pub fn fulfilled_capacity(&self) -> Option<f64>
The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.
sourcepub fn on_demand_fulfilled_capacity(&self) -> Option<f64>
pub fn on_demand_fulfilled_capacity(&self) -> Option<f64>
The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.
sourcepub fn iam_fleet_role(&self) -> Option<&str>
pub fn iam_fleet_role(&self) -> Option<&str>
The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide for Linux Instances. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests or when the Spot Fleet request expires, if you set TerminateInstancesWithExpiration
.
sourcepub fn launch_specifications(&self) -> Option<&[SpotFleetLaunchSpecification]>
pub fn launch_specifications(&self) -> Option<&[SpotFleetLaunchSpecification]>
The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
, you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs
.
sourcepub fn launch_template_configs(&self) -> Option<&[LaunchTemplateConfig]>
pub fn launch_template_configs(&self) -> Option<&[LaunchTemplateConfig]>
The launch template and overrides. If you specify LaunchTemplateConfigs
, you can't specify LaunchSpecifications
. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs
.
sourcepub fn spot_price(&self) -> Option<&str>
pub fn spot_price(&self) -> Option<&str>
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
sourcepub fn target_capacity(&self) -> Option<i32>
pub fn target_capacity(&self) -> Option<i32>
The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity later.
sourcepub fn on_demand_target_capacity(&self) -> Option<i32>
pub fn on_demand_target_capacity(&self) -> Option<i32>
The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity later.
sourcepub fn on_demand_max_total_price(&self) -> Option<&str>
pub fn on_demand_max_total_price(&self) -> Option<&str>
The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice
parameter, the spotMaxTotalPrice
parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
sourcepub fn spot_max_total_price(&self) -> Option<&str>
pub fn spot_max_total_price(&self) -> Option<&str>
The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotdMaxTotalPrice
parameter, the onDemandMaxTotalPrice
parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
sourcepub fn terminate_instances_with_expiration(&self) -> Option<bool>
pub fn terminate_instances_with_expiration(&self) -> Option<bool>
Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
sourcepub fn type(&self) -> Option<&FleetType>
pub fn type(&self) -> Option<&FleetType>
The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request
, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain
. instant
is listed but is not used by Spot Fleet.
sourcepub fn valid_from(&self) -> Option<&DateTime>
pub fn valid_from(&self) -> Option<&DateTime>
The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). By default, Amazon EC2 starts fulfilling the request immediately.
sourcepub fn valid_until(&self) -> Option<&DateTime>
pub fn valid_until(&self) -> Option<&DateTime>
The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.
sourcepub fn replace_unhealthy_instances(&self) -> Option<bool>
pub fn replace_unhealthy_instances(&self) -> Option<bool>
Indicates whether Spot Fleet should replace unhealthy instances.
sourcepub fn instance_interruption_behavior(
&self
) -> Option<&InstanceInterruptionBehavior>
pub fn instance_interruption_behavior(
&self
) -> Option<&InstanceInterruptionBehavior>
The behavior when a Spot Instance is interrupted. The default is terminate
.
sourcepub fn load_balancers_config(&self) -> Option<&LoadBalancersConfig>
pub fn load_balancers_config(&self) -> Option<&LoadBalancersConfig>
One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.
With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.
sourcepub fn instance_pools_to_use_count(&self) -> Option<i32>
pub fn instance_pools_to_use_count(&self) -> Option<i32>
The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price
. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.
sourcepub fn target_capacity_unit_type(&self) -> Option<&TargetCapacityUnitType>
pub fn target_capacity_unit_type(&self) -> Option<&TargetCapacityUnitType>
The unit for the target capacity.
Default: units
(translates to number of instances)
sourcepub fn tag_specifications(&self) -> Option<&[TagSpecification]>
pub fn tag_specifications(&self) -> Option<&[TagSpecification]>
The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
must be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the SpotFleetTagSpecification
(valid only if you use LaunchSpecifications
). For information about tagging after launch, see Tagging Your Resources.
source§impl SpotFleetRequestConfigData
impl SpotFleetRequestConfigData
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture SpotFleetRequestConfigData
.
Examples found in repository?
60426 60427 60428 60429 60430 60431 60432 60433 60434 60435 60436 60437 60438 60439 60440 60441 60442 60443 60444 60445 60446 60447 60448 60449 60450 60451 60452 60453 60454 60455 60456 60457 60458 60459 60460 60461 60462 60463 60464 60465 60466 60467 60468 60469 60470 60471 60472 60473 60474 60475 60476 60477 60478 60479 60480 60481 60482 60483 60484 60485 60486 60487 60488 60489 60490 60491 60492 60493 60494 60495 60496 60497 60498 60499 60500 60501 60502 60503 60504 60505 60506 60507 60508 60509 60510 60511 60512 60513 60514 60515 60516 60517 60518 60519 60520 60521 60522 60523 60524 60525 60526 60527 60528 60529 60530 60531 60532 60533 60534 60535 60536 60537 60538 60539 60540 60541 60542 60543 60544 60545 60546 60547 60548 60549 60550 60551 60552 60553 60554 60555 60556 60557 60558 60559 60560 60561 60562 60563 60564 60565 60566 60567 60568 60569 60570 60571 60572 60573 60574 60575 60576 60577 60578 60579 60580 60581 60582 60583 60584 60585 60586 60587 60588 60589 60590 60591 60592 60593 60594 60595 60596 60597 60598 60599 60600 60601 60602 60603 60604 60605 60606 60607 60608 60609 60610 60611 60612 60613 60614 60615 60616 60617 60618 60619 60620 60621 60622 60623 60624 60625 60626 60627 60628 60629 60630 60631 60632 60633 60634 60635 60636 60637 60638 60639 60640 60641 60642 60643 60644 60645 60646 60647 60648 60649 60650 60651 60652 60653 60654 60655 60656 60657 60658 60659 60660 60661 60662 60663 60664 60665 60666 60667 60668 60669 60670 60671 60672 60673 60674 60675 60676 60677 60678 60679 60680 60681 60682 60683 60684 60685 60686 60687 60688 60689 60690 60691 60692 60693 60694 60695 60696 60697 60698 60699 60700 60701 60702 60703 60704 60705 60706 60707 60708 60709 60710 60711 60712 60713 60714 60715 60716 60717 60718 60719 60720 60721 60722 60723 60724 60725 60726 60727 60728 60729 60730 60731 60732 60733 60734 60735 60736 60737 60738 60739 60740 60741 60742 60743 60744 60745 60746 60747 60748 60749 60750 60751 60752 60753 60754 60755 60756 60757 60758 60759 60760 60761 60762 60763 60764 60765 60766 60767 60768 60769 60770 60771 60772 60773 60774 60775 60776 60777 60778 60779 60780 60781 60782
pub fn deser_structure_crate_model_spot_fleet_request_config_data(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotFleetRequestConfigData, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotFleetRequestConfigData::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#SpotFleetRequestConfigData$AllocationStrategy */ => {
let var_2941 =
Some(
Result::<crate::model::AllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2941);
}
,
s if s.matches("onDemandAllocationStrategy") /* OnDemandAllocationStrategy com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandAllocationStrategy */ => {
let var_2942 =
Some(
Result::<crate::model::OnDemandAllocationStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::OnDemandAllocationStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_on_demand_allocation_strategy(var_2942);
}
,
s if s.matches("spotMaintenanceStrategies") /* SpotMaintenanceStrategies com.amazonaws.ec2#SpotFleetRequestConfigData$SpotMaintenanceStrategies */ => {
let var_2943 =
Some(
crate::xml_deser::deser_structure_crate_model_spot_maintenance_strategies(&mut tag)
?
)
;
builder = builder.set_spot_maintenance_strategies(var_2943);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#SpotFleetRequestConfigData$ClientToken */ => {
let var_2944 =
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_client_token(var_2944);
}
,
s if s.matches("excessCapacityTerminationPolicy") /* ExcessCapacityTerminationPolicy com.amazonaws.ec2#SpotFleetRequestConfigData$ExcessCapacityTerminationPolicy */ => {
let var_2945 =
Some(
Result::<crate::model::ExcessCapacityTerminationPolicy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ExcessCapacityTerminationPolicy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_excess_capacity_termination_policy(var_2945);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$FulfilledCapacity */ => {
let var_2946 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_fulfilled_capacity(var_2946);
}
,
s if s.matches("onDemandFulfilledCapacity") /* OnDemandFulfilledCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandFulfilledCapacity */ => {
let var_2947 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_on_demand_fulfilled_capacity(var_2947);
}
,
s if s.matches("iamFleetRole") /* IamFleetRole com.amazonaws.ec2#SpotFleetRequestConfigData$IamFleetRole */ => {
let var_2948 =
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_iam_fleet_role(var_2948);
}
,
s if s.matches("launchSpecifications") /* LaunchSpecifications com.amazonaws.ec2#SpotFleetRequestConfigData$LaunchSpecifications */ => {
let var_2949 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_specs_list(&mut tag)
?
)
;
builder = builder.set_launch_specifications(var_2949);
}
,
s if s.matches("launchTemplateConfigs") /* LaunchTemplateConfigs com.amazonaws.ec2#SpotFleetRequestConfigData$LaunchTemplateConfigs */ => {
let var_2950 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_launch_template_config_list(&mut tag)
?
)
;
builder = builder.set_launch_template_configs(var_2950);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotFleetRequestConfigData$SpotPrice */ => {
let var_2951 =
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_spot_price(var_2951);
}
,
s if s.matches("targetCapacity") /* TargetCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$TargetCapacity */ => {
let var_2952 =
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_target_capacity(var_2952);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandTargetCapacity */ => {
let var_2953 =
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_on_demand_target_capacity(var_2953);
}
,
s if s.matches("onDemandMaxTotalPrice") /* OnDemandMaxTotalPrice com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandMaxTotalPrice */ => {
let var_2954 =
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_on_demand_max_total_price(var_2954);
}
,
s if s.matches("spotMaxTotalPrice") /* SpotMaxTotalPrice com.amazonaws.ec2#SpotFleetRequestConfigData$SpotMaxTotalPrice */ => {
let var_2955 =
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_spot_max_total_price(var_2955);
}
,
s if s.matches("terminateInstancesWithExpiration") /* TerminateInstancesWithExpiration com.amazonaws.ec2#SpotFleetRequestConfigData$TerminateInstancesWithExpiration */ => {
let var_2956 =
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_terminate_instances_with_expiration(var_2956);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#SpotFleetRequestConfigData$Type */ => {
let var_2957 =
Some(
Result::<crate::model::FleetType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FleetType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_2957);
}
,
s if s.matches("validFrom") /* ValidFrom com.amazonaws.ec2#SpotFleetRequestConfigData$ValidFrom */ => {
let var_2958 =
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_valid_from(var_2958);
}
,
s if s.matches("validUntil") /* ValidUntil com.amazonaws.ec2#SpotFleetRequestConfigData$ValidUntil */ => {
let var_2959 =
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_valid_until(var_2959);
}
,
s if s.matches("replaceUnhealthyInstances") /* ReplaceUnhealthyInstances com.amazonaws.ec2#SpotFleetRequestConfigData$ReplaceUnhealthyInstances */ => {
let var_2960 =
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_replace_unhealthy_instances(var_2960);
}
,
s if s.matches("instanceInterruptionBehavior") /* InstanceInterruptionBehavior com.amazonaws.ec2#SpotFleetRequestConfigData$InstanceInterruptionBehavior */ => {
let var_2961 =
Some(
Result::<crate::model::InstanceInterruptionBehavior, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceInterruptionBehavior::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_interruption_behavior(var_2961);
}
,
s if s.matches("loadBalancersConfig") /* LoadBalancersConfig com.amazonaws.ec2#SpotFleetRequestConfigData$LoadBalancersConfig */ => {
let var_2962 =
Some(
crate::xml_deser::deser_structure_crate_model_load_balancers_config(&mut tag)
?
)
;
builder = builder.set_load_balancers_config(var_2962);
}
,
s if s.matches("instancePoolsToUseCount") /* InstancePoolsToUseCount com.amazonaws.ec2#SpotFleetRequestConfigData$InstancePoolsToUseCount */ => {
let var_2963 =
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_instance_pools_to_use_count(var_2963);
}
,
s if s.matches("context") /* Context com.amazonaws.ec2#SpotFleetRequestConfigData$Context */ => {
let var_2964 =
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_context(var_2964);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#SpotFleetRequestConfigData$TargetCapacityUnitType */ => {
let var_2965 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2965);
}
,
s if s.matches("TagSpecification") /* TagSpecifications com.amazonaws.ec2#SpotFleetRequestConfigData$TagSpecifications */ => {
let var_2966 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_specification_list(&mut tag)
?
)
;
builder = builder.set_tag_specifications(var_2966);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for SpotFleetRequestConfigData
impl Clone for SpotFleetRequestConfigData
source§fn clone(&self) -> SpotFleetRequestConfigData
fn clone(&self) -> SpotFleetRequestConfigData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more