Interface LaunchTemplateSpec
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LaunchTemplateSpec.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:36.337Z")
@Stability(Stable)
public interface LaunchTemplateSpec
extends software.amazon.jsii.JsiiSerializable
Launch template property specification.
Example:
Cluster cluster;
String userData = "MIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"==MYBOUNDARY==\"\n\n--==MYBOUNDARY==\nContent-Type: text/x-shellscript; charset=\"us-ascii\"\n\n#!/bin/bash\necho \"Running custom user data script\"\n\n--==MYBOUNDARY==--\\\n";
CfnLaunchTemplate lt = CfnLaunchTemplate.Builder.create(this, "LaunchTemplate")
.launchTemplateData(LaunchTemplateDataProperty.builder()
.instanceType("t3.small")
.userData(Fn.base64(userData))
.build())
.build();
cluster.addNodegroupCapacity("extra-ng", NodegroupOptions.builder()
.launchTemplateSpec(LaunchTemplateSpec.builder()
.id(lt.getRef())
.version(lt.getAttrLatestVersionNumber())
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLaunchTemplateSpecstatic final classAn implementation forLaunchTemplateSpec -
Method Summary
Modifier and TypeMethodDescriptionstatic LaunchTemplateSpec.Builderbuilder()getId()The Launch template ID.default StringThe launch template version to be used (optional).Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getId
The Launch template ID. -
getVersion
The launch template version to be used (optional).Default: - the default version of the launch template
-
builder
- Returns:
- a
LaunchTemplateSpec.BuilderofLaunchTemplateSpec
-