Struct aws_sdk_ec2::model::FleetLaunchTemplateOverrides
source · #[non_exhaustive]pub struct FleetLaunchTemplateOverrides { /* private fields */ }
Expand description
Describes overrides for a launch template.
Implementations§
source§impl FleetLaunchTemplateOverrides
impl FleetLaunchTemplateOverrides
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type.
If you specify InstanceType
, you can't specify InstanceRequirements
.
sourcepub fn max_price(&self) -> Option<&str>
pub fn max_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 availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone in which to launch the instances.
sourcepub fn weighted_capacity(&self) -> Option<f64>
pub fn weighted_capacity(&self) -> Option<f64>
The number of units provided by the specified instance type.
sourcepub fn priority(&self) -> Option<f64>
pub fn priority(&self) -> Option<f64>
The priority for the launch template override. The highest priority is launched first.
If the On-Demand AllocationStrategy
is set to prioritized
, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
If the Spot AllocationStrategy
is set to capacity-optimized-prioritized
, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
Valid values are whole numbers starting at 0
. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.
sourcepub fn placement(&self) -> Option<&PlacementResponse>
pub fn placement(&self) -> Option<&PlacementResponse>
The location where the instance launched, if applicable.
sourcepub fn instance_requirements(&self) -> Option<&InstanceRequirements>
pub fn instance_requirements(&self) -> Option<&InstanceRequirements>
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
source§impl FleetLaunchTemplateOverrides
impl FleetLaunchTemplateOverrides
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture FleetLaunchTemplateOverrides
.
Examples found in repository?
64185 64186 64187 64188 64189 64190 64191 64192 64193 64194 64195 64196 64197 64198 64199 64200 64201 64202 64203 64204 64205 64206 64207 64208 64209 64210 64211 64212 64213 64214 64215 64216 64217 64218 64219 64220 64221 64222 64223 64224 64225 64226 64227 64228 64229 64230 64231 64232 64233 64234 64235 64236 64237 64238 64239 64240 64241 64242 64243 64244 64245 64246 64247 64248 64249 64250 64251 64252 64253 64254 64255 64256 64257 64258 64259 64260 64261 64262 64263 64264 64265 64266 64267 64268 64269 64270 64271 64272 64273 64274 64275 64276 64277 64278 64279 64280 64281 64282 64283 64284 64285 64286 64287 64288 64289 64290 64291 64292 64293 64294 64295 64296 64297 64298 64299 64300 64301 64302 64303 64304 64305 64306 64307 64308 64309 64310 64311 64312
pub fn deser_structure_crate_model_fleet_launch_template_overrides(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetLaunchTemplateOverrides, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetLaunchTemplateOverrides::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetLaunchTemplateOverrides$InstanceType */ => {
let var_3156 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_3156);
}
,
s if s.matches("maxPrice") /* MaxPrice com.amazonaws.ec2#FleetLaunchTemplateOverrides$MaxPrice */ => {
let var_3157 =
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_price(var_3157);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#FleetLaunchTemplateOverrides$SubnetId */ => {
let var_3158 =
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_subnet_id(var_3158);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetLaunchTemplateOverrides$AvailabilityZone */ => {
let var_3159 =
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_availability_zone(var_3159);
}
,
s if s.matches("weightedCapacity") /* WeightedCapacity com.amazonaws.ec2#FleetLaunchTemplateOverrides$WeightedCapacity */ => {
let var_3160 =
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_weighted_capacity(var_3160);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetLaunchTemplateOverrides$Priority */ => {
let var_3161 =
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_priority(var_3161);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#FleetLaunchTemplateOverrides$Placement */ => {
let var_3162 =
Some(
crate::xml_deser::deser_structure_crate_model_placement_response(&mut tag)
?
)
;
builder = builder.set_placement(var_3162);
}
,
s if s.matches("instanceRequirements") /* InstanceRequirements com.amazonaws.ec2#FleetLaunchTemplateOverrides$InstanceRequirements */ => {
let var_3163 =
Some(
crate::xml_deser::deser_structure_crate_model_instance_requirements(&mut tag)
?
)
;
builder = builder.set_instance_requirements(var_3163);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#FleetLaunchTemplateOverrides$ImageId */ => {
let var_3164 =
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_image_id(var_3164);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for FleetLaunchTemplateOverrides
impl Clone for FleetLaunchTemplateOverrides
source§fn clone(&self) -> FleetLaunchTemplateOverrides
fn clone(&self) -> FleetLaunchTemplateOverrides
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more