Struct aws_sdk_ec2::model::LaunchTemplatePlacement
source · #[non_exhaustive]pub struct LaunchTemplatePlacement { /* private fields */ }
Expand description
Describes the placement of an instance.
Implementations§
source§impl LaunchTemplatePlacement
impl LaunchTemplatePlacement
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone of the instance.
sourcepub fn affinity(&self) -> Option<&str>
pub fn affinity(&self) -> Option<&str>
The affinity setting for the instance on the Dedicated Host.
sourcepub fn group_name(&self) -> Option<&str>
pub fn group_name(&self) -> Option<&str>
The name of the placement group for the instance.
sourcepub fn tenancy(&self) -> Option<&Tenancy>
pub fn tenancy(&self) -> Option<&Tenancy>
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.
sourcepub fn spread_domain(&self) -> Option<&str>
pub fn spread_domain(&self) -> Option<&str>
Reserved for future use.
sourcepub fn host_resource_group_arn(&self) -> Option<&str>
pub fn host_resource_group_arn(&self) -> Option<&str>
The ARN of the host resource group in which to launch the instances.
sourcepub fn partition_number(&self) -> Option<i32>
pub fn partition_number(&self) -> Option<i32>
The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition
.
source§impl LaunchTemplatePlacement
impl LaunchTemplatePlacement
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LaunchTemplatePlacement
.
Examples found in repository?
src/xml_deser.rs (line 52717)
52713 52714 52715 52716 52717 52718 52719 52720 52721 52722 52723 52724 52725 52726 52727 52728 52729 52730 52731 52732 52733 52734 52735 52736 52737 52738 52739 52740 52741 52742 52743 52744 52745 52746 52747 52748 52749 52750 52751 52752 52753 52754 52755 52756 52757 52758 52759 52760 52761 52762 52763 52764 52765 52766 52767 52768 52769 52770 52771 52772 52773 52774 52775 52776 52777 52778 52779 52780 52781 52782 52783 52784 52785 52786 52787 52788 52789 52790 52791 52792 52793 52794 52795 52796 52797 52798 52799 52800 52801 52802 52803 52804 52805 52806 52807 52808 52809 52810 52811 52812 52813 52814 52815 52816 52817 52818 52819 52820 52821 52822 52823 52824 52825 52826 52827 52828 52829 52830 52831
pub fn deser_structure_crate_model_launch_template_placement(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplatePlacement, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplatePlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#LaunchTemplatePlacement$AvailabilityZone */ => {
let var_2516 =
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_2516);
}
,
s if s.matches("affinity") /* Affinity com.amazonaws.ec2#LaunchTemplatePlacement$Affinity */ => {
let var_2517 =
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_affinity(var_2517);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#LaunchTemplatePlacement$GroupName */ => {
let var_2518 =
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_2518);
}
,
s if s.matches("hostId") /* HostId com.amazonaws.ec2#LaunchTemplatePlacement$HostId */ => {
let var_2519 =
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_host_id(var_2519);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#LaunchTemplatePlacement$Tenancy */ => {
let var_2520 =
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_2520);
}
,
s if s.matches("spreadDomain") /* SpreadDomain com.amazonaws.ec2#LaunchTemplatePlacement$SpreadDomain */ => {
let var_2521 =
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_spread_domain(var_2521);
}
,
s if s.matches("hostResourceGroupArn") /* HostResourceGroupArn com.amazonaws.ec2#LaunchTemplatePlacement$HostResourceGroupArn */ => {
let var_2522 =
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_host_resource_group_arn(var_2522);
}
,
s if s.matches("partitionNumber") /* PartitionNumber com.amazonaws.ec2#LaunchTemplatePlacement$PartitionNumber */ => {
let var_2523 =
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_partition_number(var_2523);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LaunchTemplatePlacement
impl Clone for LaunchTemplatePlacement
source§fn clone(&self) -> LaunchTemplatePlacement
fn clone(&self) -> LaunchTemplatePlacement
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