Struct aws_sdk_ec2::model::IamInstanceProfileAssociation
source · #[non_exhaustive]pub struct IamInstanceProfileAssociation { /* private fields */ }
Expand description
Describes an association between an IAM instance profile and an instance.
Implementations§
source§impl IamInstanceProfileAssociation
impl IamInstanceProfileAssociation
sourcepub fn association_id(&self) -> Option<&str>
pub fn association_id(&self) -> Option<&str>
The ID of the association.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance.
sourcepub fn iam_instance_profile(&self) -> Option<&IamInstanceProfile>
pub fn iam_instance_profile(&self) -> Option<&IamInstanceProfile>
The IAM instance profile.
sourcepub fn state(&self) -> Option<&IamInstanceProfileAssociationState>
pub fn state(&self) -> Option<&IamInstanceProfileAssociationState>
The state of the association.
source§impl IamInstanceProfileAssociation
impl IamInstanceProfileAssociation
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
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§
source§impl Clone for IamInstanceProfileAssociation
impl Clone for IamInstanceProfileAssociation
source§fn clone(&self) -> IamInstanceProfileAssociation
fn clone(&self) -> IamInstanceProfileAssociation
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