Struct aws_sdk_ec2::model::block_device_mapping::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for BlockDeviceMapping
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn device_name(self, input: impl Into<String>) -> Self
pub fn device_name(self, input: impl Into<String>) -> Self
The device name (for example, /dev/sdh
or xvdh
).
sourcepub fn set_device_name(self, input: Option<String>) -> Self
pub fn set_device_name(self, input: Option<String>) -> Self
The device name (for example, /dev/sdh
or xvdh
).
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())
}
sourcepub fn virtual_name(self, input: impl Into<String>) -> Self
pub fn virtual_name(self, input: impl Into<String>) -> Self
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 set_virtual_name(self, input: Option<String>) -> Self
pub fn set_virtual_name(self, input: Option<String>) -> Self
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.
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())
}
sourcepub fn ebs(self, input: EbsBlockDevice) -> Self
pub fn ebs(self, input: EbsBlockDevice) -> Self
Parameters used to automatically set up EBS volumes when the instance is launched.
sourcepub fn set_ebs(self, input: Option<EbsBlockDevice>) -> Self
pub fn set_ebs(self, input: Option<EbsBlockDevice>) -> Self
Parameters used to automatically set up EBS volumes when the instance is launched.
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())
}
sourcepub fn no_device(self, input: impl Into<String>) -> Self
pub fn no_device(self, input: impl Into<String>) -> Self
To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.
sourcepub fn set_no_device(self, input: Option<String>) -> Self
pub fn set_no_device(self, input: Option<String>) -> Self
To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.
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())
}
sourcepub fn build(self) -> BlockDeviceMapping
pub fn build(self) -> BlockDeviceMapping
Consumes the builder and constructs a 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())
}