pub struct Builder { /* private fields */ }Expand description
A builder for InstanceFleetProvisioningSpecifications.
Implementations§
source§impl Builder
impl Builder
sourcepub fn spot_specification(self, input: SpotProvisioningSpecification) -> Self
pub fn spot_specification(self, input: SpotProvisioningSpecification) -> Self
The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.
sourcepub fn set_spot_specification(
self,
input: Option<SpotProvisioningSpecification>
) -> Self
pub fn set_spot_specification(
self,
input: Option<SpotProvisioningSpecification>
) -> Self
The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.
Examples found in repository?
7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738
pub(crate) fn deser_structure_crate_model_instance_fleet_provisioning_specifications<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::InstanceFleetProvisioningSpecifications>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder =
crate::model::instance_fleet_provisioning_specifications::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"SpotSpecification" => {
builder = builder.set_spot_specification(
crate::json_deser::deser_structure_crate_model_spot_provisioning_specification(tokens)?
);
}
"OnDemandSpecification" => {
builder = builder.set_on_demand_specification(
crate::json_deser::deser_structure_crate_model_on_demand_provisioning_specification(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn on_demand_specification(
self,
input: OnDemandProvisioningSpecification
) -> Self
pub fn on_demand_specification(
self,
input: OnDemandProvisioningSpecification
) -> Self
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
sourcepub fn set_on_demand_specification(
self,
input: Option<OnDemandProvisioningSpecification>
) -> Self
pub fn set_on_demand_specification(
self,
input: Option<OnDemandProvisioningSpecification>
) -> Self
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
Examples found in repository?
7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738
pub(crate) fn deser_structure_crate_model_instance_fleet_provisioning_specifications<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::InstanceFleetProvisioningSpecifications>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder =
crate::model::instance_fleet_provisioning_specifications::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"SpotSpecification" => {
builder = builder.set_spot_specification(
crate::json_deser::deser_structure_crate_model_spot_provisioning_specification(tokens)?
);
}
"OnDemandSpecification" => {
builder = builder.set_on_demand_specification(
crate::json_deser::deser_structure_crate_model_on_demand_provisioning_specification(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn build(self) -> InstanceFleetProvisioningSpecifications
pub fn build(self) -> InstanceFleetProvisioningSpecifications
Consumes the builder and constructs a InstanceFleetProvisioningSpecifications.
Examples found in repository?
7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738
pub(crate) fn deser_structure_crate_model_instance_fleet_provisioning_specifications<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::InstanceFleetProvisioningSpecifications>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder =
crate::model::instance_fleet_provisioning_specifications::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"SpotSpecification" => {
builder = builder.set_spot_specification(
crate::json_deser::deser_structure_crate_model_spot_provisioning_specification(tokens)?
);
}
"OnDemandSpecification" => {
builder = builder.set_on_demand_specification(
crate::json_deser::deser_structure_crate_model_on_demand_provisioning_specification(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}