Struct aws_sdk_ec2::model::PlacementGroup
source · #[non_exhaustive]pub struct PlacementGroup { /* private fields */ }
Expand description
Describes a placement group.
Implementations§
source§impl PlacementGroup
impl PlacementGroup
sourcepub fn group_name(&self) -> Option<&str>
pub fn group_name(&self) -> Option<&str>
The name of the placement group.
sourcepub fn state(&self) -> Option<&PlacementGroupState>
pub fn state(&self) -> Option<&PlacementGroupState>
The state of the placement group.
sourcepub fn strategy(&self) -> Option<&PlacementStrategy>
pub fn strategy(&self) -> Option<&PlacementStrategy>
The placement strategy.
sourcepub fn partition_count(&self) -> Option<i32>
pub fn partition_count(&self) -> Option<i32>
The number of partitions. Valid only if strategy is set to partition
.
Any tags applied to the placement group.
sourcepub fn spread_level(&self) -> Option<&SpreadLevel>
pub fn spread_level(&self) -> Option<&SpreadLevel>
The spread level for the placement group. Only Outpost placement groups can be spread across hosts.
source§impl PlacementGroup
impl PlacementGroup
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture PlacementGroup
.
Examples found in repository?
src/xml_deser.rs (line 29598)
29594 29595 29596 29597 29598 29599 29600 29601 29602 29603 29604 29605 29606 29607 29608 29609 29610 29611 29612 29613 29614 29615 29616 29617 29618 29619 29620 29621 29622 29623 29624 29625 29626 29627 29628 29629 29630 29631 29632 29633 29634 29635 29636 29637 29638 29639 29640 29641 29642 29643 29644 29645 29646 29647 29648 29649 29650 29651 29652 29653 29654 29655 29656 29657 29658 29659 29660 29661 29662 29663 29664 29665 29666 29667 29668 29669 29670 29671 29672 29673 29674 29675 29676 29677 29678 29679 29680 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 29697 29698 29699 29700 29701 29702 29703 29704 29705 29706 29707 29708 29709 29710 29711
pub fn deser_structure_crate_model_placement_group(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PlacementGroup, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PlacementGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#PlacementGroup$GroupName */ => {
let var_1263 =
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_1263);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#PlacementGroup$State */ => {
let var_1264 =
Some(
Result::<crate::model::PlacementGroupState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::PlacementGroupState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1264);
}
,
s if s.matches("strategy") /* Strategy com.amazonaws.ec2#PlacementGroup$Strategy */ => {
let var_1265 =
Some(
Result::<crate::model::PlacementStrategy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::PlacementStrategy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_strategy(var_1265);
}
,
s if s.matches("partitionCount") /* PartitionCount com.amazonaws.ec2#PlacementGroup$PartitionCount */ => {
let var_1266 =
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_count(var_1266);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#PlacementGroup$GroupId */ => {
let var_1267 =
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_id(var_1267);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#PlacementGroup$Tags */ => {
let var_1268 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1268);
}
,
s if s.matches("groupArn") /* GroupArn com.amazonaws.ec2#PlacementGroup$GroupArn */ => {
let var_1269 =
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_arn(var_1269);
}
,
s if s.matches("spreadLevel") /* SpreadLevel com.amazonaws.ec2#PlacementGroup$SpreadLevel */ => {
let var_1270 =
Some(
Result::<crate::model::SpreadLevel, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::SpreadLevel::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_spread_level(var_1270);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for PlacementGroup
impl Clone for PlacementGroup
source§fn clone(&self) -> PlacementGroup
fn clone(&self) -> PlacementGroup
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