Struct aws_sdk_autoscaling::model::Ebs
source · #[non_exhaustive]pub struct Ebs { /* private fields */ }Expand description
Describes information used to set up an Amazon EBS volume specified in a block device mapping.
Implementations§
source§impl Ebs
impl Ebs
sourcepub fn snapshot_id(&self) -> Option<&str>
pub fn snapshot_id(&self) -> Option<&str>
The snapshot ID of the volume to use.
You must specify either a VolumeSize or a SnapshotId.
sourcepub fn volume_size(&self) -> Option<i32>
pub fn volume_size(&self) -> Option<i32>
The volume size, in GiBs. The following are the supported volumes sizes for each volume type:
-
gp2andgp3: 1-16,384 -
io1: 4-16,384 -
st1andsc1: 125-16,384 -
standard: 1-1,024
You must specify either a SnapshotId or a VolumeSize. If you specify both SnapshotId and VolumeSize, the volume size must be equal or greater than the size of the snapshot.
sourcepub fn volume_type(&self) -> Option<&str>
pub fn volume_type(&self) -> Option<&str>
The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide for Linux Instances.
Valid values: standard | io1 | gp2 | st1 | sc1 | gp3
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. For Amazon EC2 Auto Scaling, the default value is true.
sourcepub fn iops(&self) -> Option<i32>
pub fn iops(&self) -> Option<i32>
The number of input/output (I/O) operations per second (IOPS) to provision for the volume. For gp3 and io1 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.
The following are the supported values for each volume type:
-
gp3: 3,000-16,000 IOPS -
io1: 100-64,000 IOPS
For io1 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System. Other instance families guarantee performance up to 32,000 IOPS.
Iops is supported when the volume type is gp3 or io1 and required only when the volume type is io1. (Not used with standard, gp2, st1, or sc1 volumes.)
sourcepub fn encrypted(&self) -> Option<bool>
pub fn encrypted(&self) -> Option<bool>
Specifies whether the volume should be encrypted. Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types. If your AMI uses encrypted volumes, you can also only launch it on supported instance types.
If you are creating a volume from a snapshot, you cannot create an unencrypted volume from an encrypted snapshot. Also, you cannot specify a KMS key ID when using a launch configuration.
If you enable encryption by default, the EBS volumes that you create are always encrypted, either using the Amazon Web Services managed KMS key or a customer-managed KMS key, regardless of whether the snapshot was encrypted.
For more information, see Use Amazon Web Services KMS keys to encrypt Amazon EBS volumes in the Amazon EC2 Auto Scaling User Guide.
sourcepub fn throughput(&self) -> Option<i32>
pub fn throughput(&self) -> Option<i32>
The throughput (MiBps) to provision for a gp3 volume.
source§impl Ebs
impl Ebs
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture Ebs.
Examples found in repository?
6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650
pub fn deser_structure_crate_model_ebs(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ebs, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ebs::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("SnapshotId") /* SnapshotId com.amazonaws.autoscaling#Ebs$SnapshotId */ => {
let var_296 =
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_snapshot_id(var_296);
}
,
s if s.matches("VolumeSize") /* VolumeSize com.amazonaws.autoscaling#Ebs$VolumeSize */ => {
let var_297 =
Some(
{
<i32 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 (integer: `com.amazonaws.autoscaling#BlockDeviceEbsVolumeSize`)"))
}
?
)
;
builder = builder.set_volume_size(var_297);
}
,
s if s.matches("VolumeType") /* VolumeType com.amazonaws.autoscaling#Ebs$VolumeType */ => {
let var_298 =
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_type(var_298);
}
,
s if s.matches("DeleteOnTermination") /* DeleteOnTermination com.amazonaws.autoscaling#Ebs$DeleteOnTermination */ => {
let var_299 =
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.autoscaling#BlockDeviceEbsDeleteOnTermination`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_299);
}
,
s if s.matches("Iops") /* Iops com.amazonaws.autoscaling#Ebs$Iops */ => {
let var_300 =
Some(
{
<i32 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 (integer: `com.amazonaws.autoscaling#BlockDeviceEbsIops`)"))
}
?
)
;
builder = builder.set_iops(var_300);
}
,
s if s.matches("Encrypted") /* Encrypted com.amazonaws.autoscaling#Ebs$Encrypted */ => {
let var_301 =
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.autoscaling#BlockDeviceEbsEncrypted`)"))
}
?
)
;
builder = builder.set_encrypted(var_301);
}
,
s if s.matches("Throughput") /* Throughput com.amazonaws.autoscaling#Ebs$Throughput */ => {
let var_302 =
Some(
{
<i32 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 (integer: `com.amazonaws.autoscaling#BlockDeviceEbsThroughput`)"))
}
?
)
;
builder = builder.set_throughput(var_302);
}
,
_ => {}
}
}
Ok(builder.build())
}