Struct aws_sdk_ec2::model::EbsInstanceBlockDevice
source · #[non_exhaustive]pub struct EbsInstanceBlockDevice { /* private fields */ }
Expand description
Describes a parameter used to set up an EBS volume in a block device mapping.
Implementations§
source§impl EbsInstanceBlockDevice
impl EbsInstanceBlockDevice
sourcepub fn attach_time(&self) -> Option<&DateTime>
pub fn attach_time(&self) -> Option<&DateTime>
The time stamp when the attachment initiated.
sourcepub fn delete_on_termination(&self) -> Option<bool>
pub fn delete_on_termination(&self) -> Option<bool>
Indicates whether the volume is deleted on instance termination.
sourcepub fn status(&self) -> Option<&AttachmentStatus>
pub fn status(&self) -> Option<&AttachmentStatus>
The attachment state.
source§impl EbsInstanceBlockDevice
impl EbsInstanceBlockDevice
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture EbsInstanceBlockDevice
.
Examples found in repository?
src/xml_deser.rs (line 59372)
59368 59369 59370 59371 59372 59373 59374 59375 59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 59387 59388 59389 59390 59391 59392 59393 59394 59395 59396 59397 59398 59399 59400 59401 59402 59403 59404 59405 59406 59407 59408 59409 59410 59411 59412 59413 59414 59415 59416 59417 59418 59419 59420 59421 59422 59423 59424 59425 59426 59427 59428 59429 59430 59431 59432 59433 59434 59435
pub fn deser_structure_crate_model_ebs_instance_block_device(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2894 =
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_2894);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2895 =
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_2895);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2896 =
Some(
Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AttachmentStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2896);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2897 =
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_2897);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for EbsInstanceBlockDevice
impl Clone for EbsInstanceBlockDevice
source§fn clone(&self) -> EbsInstanceBlockDevice
fn clone(&self) -> EbsInstanceBlockDevice
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