Struct aws_sdk_ec2::model::VCpuInfo
source · #[non_exhaustive]pub struct VCpuInfo { /* private fields */ }
Expand description
Describes the vCPU configurations for the instance type.
Implementations§
source§impl VCpuInfo
impl VCpuInfo
sourcepub fn default_v_cpus(&self) -> Option<i32>
pub fn default_v_cpus(&self) -> Option<i32>
The default number of vCPUs for the instance type.
sourcepub fn default_cores(&self) -> Option<i32>
pub fn default_cores(&self) -> Option<i32>
The default number of cores for the instance type.
sourcepub fn default_threads_per_core(&self) -> Option<i32>
pub fn default_threads_per_core(&self) -> Option<i32>
The default number of threads per core for the instance type.
sourcepub fn valid_cores(&self) -> Option<&[i32]>
pub fn valid_cores(&self) -> Option<&[i32]>
The valid number of cores that can be configured for the instance type.
sourcepub fn valid_threads_per_core(&self) -> Option<&[i32]>
pub fn valid_threads_per_core(&self) -> Option<&[i32]>
The valid number of threads per core that can be configured for the instance type.
source§impl VCpuInfo
impl VCpuInfo
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture VCpuInfo
.
Examples found in repository?
src/xml_deser.rs (line 59648)
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}