Struct aws_sdk_ec2::model::ReservedInstancesConfiguration
source · #[non_exhaustive]pub struct ReservedInstancesConfiguration { /* private fields */ }
Expand description
Describes the configuration settings for the modified Reserved Instances.
Implementations§
source§impl ReservedInstancesConfiguration
impl ReservedInstancesConfiguration
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone for the modified Reserved Instances.
sourcepub fn instance_count(&self) -> Option<i32>
pub fn instance_count(&self) -> Option<i32>
The number of modified Reserved Instances.
This is a required field for a request.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type for the modified Reserved Instances.
source§impl ReservedInstancesConfiguration
impl ReservedInstancesConfiguration
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ReservedInstancesConfiguration
.
Examples found in repository?
src/xml_deser.rs (line 69152)
69148 69149 69150 69151 69152 69153 69154 69155 69156 69157 69158 69159 69160 69161 69162 69163 69164 69165 69166 69167 69168 69169 69170 69171 69172 69173 69174 69175 69176 69177 69178 69179 69180 69181 69182 69183 69184 69185 69186 69187 69188 69189 69190 69191 69192 69193 69194 69195 69196 69197 69198 69199 69200 69201 69202 69203 69204 69205 69206 69207 69208 69209 69210 69211 69212 69213 69214 69215 69216 69217 69218 69219 69220 69221 69222 69223 69224 69225 69226 69227 69228
pub fn deser_structure_crate_model_reserved_instances_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ReservedInstancesConfiguration$AvailabilityZone */ => {
let var_3411 =
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_3411);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ReservedInstancesConfiguration$InstanceCount */ => {
let var_3412 =
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_instance_count(var_3412);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ReservedInstancesConfiguration$InstanceType */ => {
let var_3413 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_3413);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ReservedInstancesConfiguration$Platform */ => {
let var_3414 =
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_platform(var_3414);
}
,
s if s.matches("scope") /* Scope com.amazonaws.ec2#ReservedInstancesConfiguration$Scope */ => {
let var_3415 =
Some(
Result::<crate::model::Scope, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::Scope::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_scope(var_3415);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ReservedInstancesConfiguration
impl Clone for ReservedInstancesConfiguration
source§fn clone(&self) -> ReservedInstancesConfiguration
fn clone(&self) -> ReservedInstancesConfiguration
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more