Struct aws_sdk_autoscaling::model::MixedInstancesPolicy
source · #[non_exhaustive]pub struct MixedInstancesPolicy { /* private fields */ }Expand description
Describes a mixed instances policy. A mixed instances policy contains the instance types that Amazon EC2 Auto Scaling can launch and other information that Amazon EC2 Auto Scaling can use to launch instances and help optimize your costs. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide.
Implementations§
source§impl MixedInstancesPolicy
impl MixedInstancesPolicy
sourcepub fn launch_template(&self) -> Option<&LaunchTemplate>
pub fn launch_template(&self) -> Option<&LaunchTemplate>
One or more launch templates and the instance types (overrides) that are used to launch EC2 instances to fulfill On-Demand and Spot capacities.
sourcepub fn instances_distribution(&self) -> Option<&InstancesDistribution>
pub fn instances_distribution(&self) -> Option<&InstancesDistribution>
The instances distribution.
source§impl MixedInstancesPolicy
impl MixedInstancesPolicy
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture MixedInstancesPolicy.
Examples found in repository?
src/xml_deser.rs (line 5047)
5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074
pub fn deser_structure_crate_model_mixed_instances_policy(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MixedInstancesPolicy, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::MixedInstancesPolicy::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LaunchTemplate") /* LaunchTemplate com.amazonaws.autoscaling#MixedInstancesPolicy$LaunchTemplate */ => {
let var_226 =
Some(
crate::xml_deser::deser_structure_crate_model_launch_template(&mut tag)
?
)
;
builder = builder.set_launch_template(var_226);
}
,
s if s.matches("InstancesDistribution") /* InstancesDistribution com.amazonaws.autoscaling#MixedInstancesPolicy$InstancesDistribution */ => {
let var_227 =
Some(
crate::xml_deser::deser_structure_crate_model_instances_distribution(&mut tag)
?
)
;
builder = builder.set_instances_distribution(var_227);
}
,
_ => {}
}
}
Ok(builder.build())
}Trait Implementations§
source§impl Clone for MixedInstancesPolicy
impl Clone for MixedInstancesPolicy
source§fn clone(&self) -> MixedInstancesPolicy
fn clone(&self) -> MixedInstancesPolicy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more