#[non_exhaustive]
pub struct PlacementGroup { /* private fields */ }
Expand description

Describes a placement group.

Implementations§

The name of the placement group.

The state of the placement group.

The placement strategy.

The number of partitions. Valid only if strategy is set to partition.

The ID of the placement group.

Any tags applied to the placement group.

The Amazon Resource Name (ARN) of the placement group.

The spread level for the placement group. Only Outpost placement groups can be spread across hosts.

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more