pub struct Builder { /* private fields */ }Expand description
A builder for LaunchTemplateSpecification.
Implementations§
source§impl Builder
impl Builder
sourcepub fn launch_template_id(self, input: impl Into<String>) -> Self
pub fn launch_template_id(self, input: impl Into<String>) -> Self
The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId or a LaunchTemplateName.
sourcepub fn set_launch_template_id(self, input: Option<String>) -> Self
pub fn set_launch_template_id(self, input: Option<String>) -> Self
The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId or a LaunchTemplateName.
Examples found in repository?
4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041
pub fn deser_structure_crate_model_launch_template_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LaunchTemplateId") /* LaunchTemplateId com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateId */ => {
let var_223 =
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_launch_template_id(var_223);
}
,
s if s.matches("LaunchTemplateName") /* LaunchTemplateName com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateName */ => {
let var_224 =
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_launch_template_name(var_224);
}
,
s if s.matches("Version") /* Version com.amazonaws.autoscaling#LaunchTemplateSpecification$Version */ => {
let var_225 =
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_version(var_225);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn launch_template_name(self, input: impl Into<String>) -> Self
pub fn launch_template_name(self, input: impl Into<String>) -> Self
The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId or a LaunchTemplateName.
sourcepub fn set_launch_template_name(self, input: Option<String>) -> Self
pub fn set_launch_template_name(self, input: Option<String>) -> Self
The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId or a LaunchTemplateName.
Examples found in repository?
4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041
pub fn deser_structure_crate_model_launch_template_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LaunchTemplateId") /* LaunchTemplateId com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateId */ => {
let var_223 =
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_launch_template_id(var_223);
}
,
s if s.matches("LaunchTemplateName") /* LaunchTemplateName com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateName */ => {
let var_224 =
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_launch_template_name(var_224);
}
,
s if s.matches("Version") /* Version com.amazonaws.autoscaling#LaunchTemplateSpecification$Version */ => {
let var_225 =
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_version(var_225);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn version(self, input: impl Into<String>) -> Self
pub fn version(self, input: impl Into<String>) -> Self
The version number, $Latest, or $Default. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.
sourcepub fn set_version(self, input: Option<String>) -> Self
pub fn set_version(self, input: Option<String>) -> Self
The version number, $Latest, or $Default. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.
Examples found in repository?
4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041
pub fn deser_structure_crate_model_launch_template_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LaunchTemplateId") /* LaunchTemplateId com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateId */ => {
let var_223 =
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_launch_template_id(var_223);
}
,
s if s.matches("LaunchTemplateName") /* LaunchTemplateName com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateName */ => {
let var_224 =
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_launch_template_name(var_224);
}
,
s if s.matches("Version") /* Version com.amazonaws.autoscaling#LaunchTemplateSpecification$Version */ => {
let var_225 =
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_version(var_225);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> LaunchTemplateSpecification
pub fn build(self) -> LaunchTemplateSpecification
Consumes the builder and constructs a LaunchTemplateSpecification.
Examples found in repository?
4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041
pub fn deser_structure_crate_model_launch_template_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateSpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LaunchTemplateId") /* LaunchTemplateId com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateId */ => {
let var_223 =
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_launch_template_id(var_223);
}
,
s if s.matches("LaunchTemplateName") /* LaunchTemplateName com.amazonaws.autoscaling#LaunchTemplateSpecification$LaunchTemplateName */ => {
let var_224 =
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_launch_template_name(var_224);
}
,
s if s.matches("Version") /* Version com.amazonaws.autoscaling#LaunchTemplateSpecification$Version */ => {
let var_225 =
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_version(var_225);
}
,
_ => {}
}
}
Ok(builder.build())
}