Struct aws_sdk_ec2::model::spot_placement::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SpotPlacement
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone.
[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone.
[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".
Examples found in repository?
66006 66007 66008 66009 66010 66011 66012 66013 66014 66015 66016 66017 66018 66019 66020 66021 66022 66023 66024 66025 66026 66027 66028 66029 66030 66031 66032 66033 66034 66035 66036 66037 66038 66039 66040 66041 66042 66043 66044 66045 66046 66047 66048 66049 66050 66051 66052 66053 66054 66055 66056 66057
pub fn deser_structure_crate_model_spot_placement(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPlacement, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPlacement$AvailabilityZone */ => {
let var_3242 =
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_3242);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SpotPlacement$GroupName */ => {
let var_3243 =
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_group_name(var_3243);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#SpotPlacement$Tenancy */ => {
let var_3244 =
Some(
Result::<crate::model::Tenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Tenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_3244);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn group_name(self, input: impl Into<String>) -> Self
pub fn group_name(self, input: impl Into<String>) -> Self
The name of the placement group.
sourcepub fn set_group_name(self, input: Option<String>) -> Self
pub fn set_group_name(self, input: Option<String>) -> Self
The name of the placement group.
Examples found in repository?
66006 66007 66008 66009 66010 66011 66012 66013 66014 66015 66016 66017 66018 66019 66020 66021 66022 66023 66024 66025 66026 66027 66028 66029 66030 66031 66032 66033 66034 66035 66036 66037 66038 66039 66040 66041 66042 66043 66044 66045 66046 66047 66048 66049 66050 66051 66052 66053 66054 66055 66056 66057
pub fn deser_structure_crate_model_spot_placement(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPlacement, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPlacement$AvailabilityZone */ => {
let var_3242 =
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_3242);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SpotPlacement$GroupName */ => {
let var_3243 =
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_group_name(var_3243);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#SpotPlacement$Tenancy */ => {
let var_3244 =
Some(
Result::<crate::model::Tenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Tenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_3244);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn tenancy(self, input: Tenancy) -> Self
pub fn tenancy(self, input: Tenancy) -> Self
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated
runs on single-tenant hardware. The host
tenancy is not supported for Spot Instances.
sourcepub fn set_tenancy(self, input: Option<Tenancy>) -> Self
pub fn set_tenancy(self, input: Option<Tenancy>) -> Self
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated
runs on single-tenant hardware. The host
tenancy is not supported for Spot Instances.
Examples found in repository?
66006 66007 66008 66009 66010 66011 66012 66013 66014 66015 66016 66017 66018 66019 66020 66021 66022 66023 66024 66025 66026 66027 66028 66029 66030 66031 66032 66033 66034 66035 66036 66037 66038 66039 66040 66041 66042 66043 66044 66045 66046 66047 66048 66049 66050 66051 66052 66053 66054 66055 66056 66057
pub fn deser_structure_crate_model_spot_placement(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPlacement, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPlacement$AvailabilityZone */ => {
let var_3242 =
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_3242);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SpotPlacement$GroupName */ => {
let var_3243 =
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_group_name(var_3243);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#SpotPlacement$Tenancy */ => {
let var_3244 =
Some(
Result::<crate::model::Tenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Tenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_3244);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> SpotPlacement
pub fn build(self) -> SpotPlacement
Consumes the builder and constructs a SpotPlacement
.
Examples found in repository?
66006 66007 66008 66009 66010 66011 66012 66013 66014 66015 66016 66017 66018 66019 66020 66021 66022 66023 66024 66025 66026 66027 66028 66029 66030 66031 66032 66033 66034 66035 66036 66037 66038 66039 66040 66041 66042 66043 66044 66045 66046 66047 66048 66049 66050 66051 66052 66053 66054 66055 66056 66057
pub fn deser_structure_crate_model_spot_placement(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPlacement, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPlacement$AvailabilityZone */ => {
let var_3242 =
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_3242);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SpotPlacement$GroupName */ => {
let var_3243 =
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_group_name(var_3243);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#SpotPlacement$Tenancy */ => {
let var_3244 =
Some(
Result::<crate::model::Tenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Tenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_3244);
}
,
_ => {}
}
}
Ok(builder.build())
}