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

Describes an association between an IAM instance profile and an instance.

Implementations§

The ID of the association.

The ID of the instance.

The IAM instance profile.

The state of the association.

The time the IAM instance profile was associated with the instance.

Creates a new builder-style object to manufacture IamInstanceProfileAssociation.

Examples found in repository?
src/xml_deser.rs (line 24612)
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
pub fn deser_structure_crate_model_iam_instance_profile_association(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IamInstanceProfileAssociation, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::IamInstanceProfileAssociation::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#IamInstanceProfileAssociation$AssociationId */ =>  {
                let var_938 =
                    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_association_id(var_938);
            }
            ,
            s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#IamInstanceProfileAssociation$InstanceId */ =>  {
                let var_939 =
                    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_instance_id(var_939);
            }
            ,
            s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#IamInstanceProfileAssociation$IamInstanceProfile */ =>  {
                let var_940 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_iam_instance_profile(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_iam_instance_profile(var_940);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#IamInstanceProfileAssociation$State */ =>  {
                let var_941 =
                    Some(
                        Result::<crate::model::IamInstanceProfileAssociationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::IamInstanceProfileAssociationState::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_941);
            }
            ,
            s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#IamInstanceProfileAssociation$Timestamp */ =>  {
                let var_942 =
                    Some(
                        aws_smithy_types::DateTime::from_str(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            , aws_smithy_types::date_time::Format::DateTime
                        )
                        .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
                        ?
                    )
                ;
                builder = builder.set_timestamp(var_942);
            }
            ,
            _ => {}
        }
    }
    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