Struct aws_sdk_ec2::model::VolumeAttachment
source · #[non_exhaustive]pub struct VolumeAttachment { /* private fields */ }
Expand description
Describes volume attachment details.
Implementations§
source§impl VolumeAttachment
impl VolumeAttachment
sourcepub fn attach_time(&self) -> Option<&DateTime>
pub fn attach_time(&self) -> Option<&DateTime>
The time stamp when the attachment initiated.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance.
sourcepub fn state(&self) -> Option<&VolumeAttachmentState>
pub fn state(&self) -> Option<&VolumeAttachmentState>
The attachment state of the volume.
sourcepub fn delete_on_termination(&self) -> Option<bool>
pub fn delete_on_termination(&self) -> Option<bool>
Indicates whether the EBS volume is deleted on instance termination.
source§impl VolumeAttachment
impl VolumeAttachment
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture VolumeAttachment
.
Examples found in repository?
src/xml_deser.rs (line 41920)
41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009
pub fn deser_structure_crate_model_volume_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1794 =
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_attach_time(var_1794);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1795 =
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_device(var_1795);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1796 =
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_1796);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1797 =
Some(
Result::<crate::model::VolumeAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeAttachmentState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1797);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1798 =
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_volume_id(var_1798);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1799 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_1799);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for VolumeAttachment
impl Clone for VolumeAttachment
source§fn clone(&self) -> VolumeAttachment
fn clone(&self) -> VolumeAttachment
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