Interface ICfnLaunchTemplateProps
Properties for defining a CfnLaunchTemplate
.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public interface ICfnLaunchTemplateProps
Syntax (vb)
Public Interface ICfnLaunchTemplateProps
Remarks
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html
ExampleMetadata: infused
Examples
Cluster cluster;
var userData = @"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==--\
";
var lt = new CfnLaunchTemplate(this, "LaunchTemplate", new CfnLaunchTemplateProps {
LaunchTemplateData = new LaunchTemplateDataProperty {
InstanceType = "t3.small",
UserData = Fn.Base64(userData)
}
});
cluster.AddNodegroupCapacity("extra-ng", new NodegroupOptions {
LaunchTemplateSpec = new LaunchTemplateSpec {
Id = lt.Ref,
Version = lt.AttrLatestVersionNumber
}
});
Synopsis
Properties
LaunchTemplateData | The information for the launch template. |
LaunchTemplateName | A name for the launch template. |
TagSpecifications | The tags to apply to the launch template on creation. |
VersionDescription | A description for the first version of the launch template. |
Properties
LaunchTemplateData
The information for the launch template.
object LaunchTemplateData { get; }
Property Value
System.Object
Remarks
LaunchTemplateName
A name for the launch template.
virtual string LaunchTemplateName { get; }
Property Value
System.String
Remarks
TagSpecifications
The tags to apply to the launch template on creation.
virtual object TagSpecifications { get; }
Property Value
System.Object
Remarks
To tag the launch template, the resource type must be launch-template
.
To specify the tags for the resources that are created when an instance is launched, you must use the TagSpecifications
parameter in the launch template data structure.
VersionDescription
A description for the first version of the launch template.
virtual string VersionDescription { get; }
Property Value
System.String