Struct aws_sdk_ec2::model::BlockDeviceMapping
source · #[non_exhaustive]pub struct BlockDeviceMapping { /* private fields */ }
Expand description
Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.
Implementations§
source§impl BlockDeviceMapping
impl BlockDeviceMapping
sourcepub fn device_name(&self) -> Option<&str>
pub fn device_name(&self) -> Option<&str>
The device name (for example, /dev/sdh
or xvdh
).
sourcepub fn virtual_name(&self) -> Option<&str>
pub fn virtual_name(&self) -> Option<&str>
The virtual device name (ephemeral
N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0
and ephemeral1
. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
sourcepub fn ebs(&self) -> Option<&EbsBlockDevice>
pub fn ebs(&self) -> Option<&EbsBlockDevice>
Parameters used to automatically set up EBS volumes when the instance is launched.
source§impl BlockDeviceMapping
impl BlockDeviceMapping
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture BlockDeviceMapping
.
Examples found in repository?
46091 46092 46093 46094 46095 46096 46097 46098 46099 46100 46101 46102 46103 46104 46105 46106 46107 46108 46109 46110 46111 46112 46113 46114 46115 46116 46117 46118 46119 46120 46121 46122 46123 46124 46125 46126 46127 46128 46129 46130 46131 46132 46133 46134 46135 46136 46137 46138 46139 46140 46141 46142 46143 46144 46145 46146 46147 46148 46149 46150 46151
pub fn deser_structure_crate_model_block_device_mapping(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::BlockDeviceMapping, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::BlockDeviceMapping::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deviceName") /* DeviceName com.amazonaws.ec2#BlockDeviceMapping$DeviceName */ => {
let var_2069 =
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_name(var_2069);
}
,
s if s.matches("virtualName") /* VirtualName com.amazonaws.ec2#BlockDeviceMapping$VirtualName */ => {
let var_2070 =
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_virtual_name(var_2070);
}
,
s if s.matches("ebs") /* Ebs com.amazonaws.ec2#BlockDeviceMapping$Ebs */ => {
let var_2071 =
Some(
crate::xml_deser::deser_structure_crate_model_ebs_block_device(&mut tag)
?
)
;
builder = builder.set_ebs(var_2071);
}
,
s if s.matches("noDevice") /* NoDevice com.amazonaws.ec2#BlockDeviceMapping$NoDevice */ => {
let var_2072 =
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_no_device(var_2072);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for BlockDeviceMapping
impl Clone for BlockDeviceMapping
source§fn clone(&self) -> BlockDeviceMapping
fn clone(&self) -> BlockDeviceMapping
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more