CfnLaunchTemplateProps
- class aws_cdk.aws_ec2.CfnLaunchTemplateProps(*, launch_template_data, launch_template_name=None, tag_specifications=None, version_description=None)
Bases:
object
Properties for defining a
CfnLaunchTemplate
.- Parameters:
launch_template_data (
Union
[IResolvable
,LaunchTemplateDataProperty
,Dict
[str
,Any
]]) – The information for the launch template.launch_template_name (
Optional
[str
]) – A name for the launch template.tag_specifications (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,LaunchTemplateTagSpecificationProperty
,Dict
[str
,Any
]]],None
]) – The tags to apply to the launch template on creation. To tag the launch template, the resource type must belaunch-template
. To specify the tags for resources that are created during instance launch, use TagSpecifications .version_description (
Optional
[str
]) – A description for the first version of the launch template.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html
- ExampleMetadata:
infused
Example:
# cluster: eks.Cluster user_data = """MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==MYBOUNDARY==" --==MYBOUNDARY== Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash echo "Running custom user data script" --==MYBOUNDARY==--\ """ lt = ec2.CfnLaunchTemplate(self, "LaunchTemplate", launch_template_data=ec2.CfnLaunchTemplate.LaunchTemplateDataProperty( instance_type="t3.small", user_data=Fn.base64(user_data) ) ) cluster.add_nodegroup_capacity("extra-ng", launch_template_spec=eks.LaunchTemplateSpec( id=lt.ref, version=lt.attr_latest_version_number ) )
Attributes
- launch_template_data
The information for the launch template.
- launch_template_name
A name for the launch template.
- tag_specifications
The tags to apply to the launch template on creation.
To tag the launch template, the resource type must be
launch-template
.To specify the tags for resources that are created during instance launch, use TagSpecifications .
- version_description
A description for the first version of the launch template.