Struct aws_sdk_ec2::model::Volume
source · #[non_exhaustive]pub struct Volume { /* private fields */ }
Expand description
Describes a volume.
Implementations§
source§impl Volume
impl Volume
sourcepub fn attachments(&self) -> Option<&[VolumeAttachment]>
pub fn attachments(&self) -> Option<&[VolumeAttachment]>
Information about the volume attachments.
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone for the volume.
sourcepub fn create_time(&self) -> Option<&DateTime>
pub fn create_time(&self) -> Option<&DateTime>
The time stamp when volume creation was initiated.
sourcepub fn kms_key_id(&self) -> Option<&str>
pub fn kms_key_id(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.
sourcepub fn outpost_arn(&self) -> Option<&str>
pub fn outpost_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Outpost.
sourcepub fn snapshot_id(&self) -> Option<&str>
pub fn snapshot_id(&self) -> Option<&str>
The snapshot from which the volume was created, if applicable.
sourcepub fn state(&self) -> Option<&VolumeState>
pub fn state(&self) -> Option<&VolumeState>
The volume state.
sourcepub fn iops(&self) -> Option<i32>
pub fn iops(&self) -> Option<i32>
The number of I/O operations per second (IOPS). For gp3
, io1
, and io2
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.
Any tags assigned to the volume.
sourcepub fn volume_type(&self) -> Option<&VolumeType>
pub fn volume_type(&self) -> Option<&VolumeType>
The volume type.
sourcepub fn fast_restored(&self) -> Option<bool>
pub fn fast_restored(&self) -> Option<bool>
Indicates whether the volume was created using fast snapshot restore.
sourcepub fn multi_attach_enabled(&self) -> Option<bool>
pub fn multi_attach_enabled(&self) -> Option<bool>
Indicates whether Amazon EBS Multi-Attach is enabled.
sourcepub fn throughput(&self) -> Option<i32>
pub fn throughput(&self) -> Option<i32>
The throughput that the volume supports, in MiB/s.
source§impl Volume
impl Volume
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture Volume
.
Examples found in repository?
50803 50804 50805 50806 50807 50808 50809 50810 50811 50812 50813 50814 50815 50816 50817 50818 50819 50820 50821 50822 50823 50824 50825 50826 50827 50828 50829 50830 50831 50832 50833 50834 50835 50836 50837 50838 50839 50840 50841 50842 50843 50844 50845 50846 50847 50848 50849 50850 50851 50852 50853 50854 50855 50856 50857 50858 50859 50860 50861 50862 50863 50864 50865 50866 50867 50868 50869 50870 50871 50872 50873 50874 50875 50876 50877 50878 50879 50880 50881 50882 50883 50884 50885 50886 50887 50888 50889 50890 50891 50892 50893 50894 50895 50896 50897 50898 50899 50900 50901 50902 50903 50904 50905 50906 50907 50908 50909 50910 50911 50912 50913 50914 50915 50916 50917 50918 50919 50920 50921 50922 50923 50924 50925 50926 50927 50928 50929 50930 50931 50932 50933 50934 50935 50936 50937 50938 50939 50940 50941 50942 50943 50944 50945 50946 50947 50948 50949 50950 50951 50952 50953 50954 50955 50956 50957 50958 50959 50960 50961 50962 50963 50964 50965 50966 50967 50968 50969 50970 50971 50972 50973 50974 50975 50976 50977 50978 50979 50980 50981 50982 50983 50984 50985 50986 50987 50988 50989 50990 50991 50992 50993 50994 50995 50996 50997 50998 50999 51000 51001 51002 51003 51004 51005 51006 51007 51008 51009 51010 51011 51012 51013 51014 51015 51016 51017 51018 51019 51020 51021 51022 51023 51024 51025 51026 51027 51028 51029 51030 51031
pub fn deser_structure_crate_model_volume(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Volume, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Volume::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachmentSet") /* Attachments com.amazonaws.ec2#Volume$Attachments */ => {
let var_2394 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_volume_attachment_list(&mut tag)
?
)
;
builder = builder.set_attachments(var_2394);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Volume$AvailabilityZone */ => {
let var_2395 =
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_availability_zone(var_2395);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#Volume$CreateTime */ => {
let var_2396 =
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_create_time(var_2396);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#Volume$Encrypted */ => {
let var_2397 =
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_encrypted(var_2397);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#Volume$KmsKeyId */ => {
let var_2398 =
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_kms_key_id(var_2398);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Volume$OutpostArn */ => {
let var_2399 =
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_outpost_arn(var_2399);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#Volume$Size */ => {
let var_2400 =
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.ec2#Integer`)"))
}
?
)
;
builder = builder.set_size(var_2400);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#Volume$SnapshotId */ => {
let var_2401 =
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_2401);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#Volume$State */ => {
let var_2402 =
Some(
Result::<crate::model::VolumeState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2402);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#Volume$VolumeId */ => {
let var_2403 =
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_2403);
}
,
s if s.matches("iops") /* Iops com.amazonaws.ec2#Volume$Iops */ => {
let var_2404 =
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.ec2#Integer`)"))
}
?
)
;
builder = builder.set_iops(var_2404);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Volume$Tags */ => {
let var_2405 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2405);
}
,
s if s.matches("volumeType") /* VolumeType com.amazonaws.ec2#Volume$VolumeType */ => {
let var_2406 =
Some(
Result::<crate::model::VolumeType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VolumeType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_volume_type(var_2406);
}
,
s if s.matches("fastRestored") /* FastRestored com.amazonaws.ec2#Volume$FastRestored */ => {
let var_2407 =
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_fast_restored(var_2407);
}
,
s if s.matches("multiAttachEnabled") /* MultiAttachEnabled com.amazonaws.ec2#Volume$MultiAttachEnabled */ => {
let var_2408 =
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_multi_attach_enabled(var_2408);
}
,
s if s.matches("throughput") /* Throughput com.amazonaws.ec2#Volume$Throughput */ => {
let var_2409 =
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.ec2#Integer`)"))
}
?
)
;
builder = builder.set_throughput(var_2409);
}
,
_ => {}
}
}
Ok(builder.build())
}