pub struct Builder { /* private fields */ }
Expand description
A builder for ReservedInstancesConfiguration
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone for the modified Reserved Instances.
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone for the modified Reserved Instances.
Examples found in repository?
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())
}
sourcepub fn instance_count(self, input: i32) -> Self
pub fn instance_count(self, input: i32) -> Self
The number of modified Reserved Instances.
This is a required field for a request.
sourcepub fn set_instance_count(self, input: Option<i32>) -> Self
pub fn set_instance_count(self, input: Option<i32>) -> Self
The number of modified Reserved Instances.
This is a required field for a request.
Examples found in repository?
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())
}
sourcepub fn instance_type(self, input: InstanceType) -> Self
pub fn instance_type(self, input: InstanceType) -> Self
The instance type for the modified Reserved Instances.
sourcepub fn set_instance_type(self, input: Option<InstanceType>) -> Self
pub fn set_instance_type(self, input: Option<InstanceType>) -> Self
The instance type for the modified Reserved Instances.
Examples found in repository?
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())
}
sourcepub fn platform(self, input: impl Into<String>) -> Self
pub fn platform(self, input: impl Into<String>) -> Self
The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.
sourcepub fn set_platform(self, input: Option<String>) -> Self
pub fn set_platform(self, input: Option<String>) -> Self
The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.
Examples found in repository?
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())
}
sourcepub fn scope(self, input: Scope) -> Self
pub fn scope(self, input: Scope) -> Self
Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.
sourcepub fn set_scope(self, input: Option<Scope>) -> Self
pub fn set_scope(self, input: Option<Scope>) -> Self
Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.
Examples found in repository?
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())
}
sourcepub fn build(self) -> ReservedInstancesConfiguration
pub fn build(self) -> ReservedInstancesConfiguration
Consumes the builder and constructs a ReservedInstancesConfiguration
.
Examples found in repository?
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())
}