@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.464Z") @Stability(value=Stable) public class LaunchTemplate extends Resource implements ILaunchTemplate, IGrantable, IConnectable
Example:
// Example automatically generated from non-compiling source. May contain errors.
UserData bootHookConf = UserData.forLinux();
bootHookConf.addCommands("cloud-init-per once docker_options echo 'OPTIONS=\"${OPTIONS} --storage-opt dm.basesize=40G\"' >> /etc/sysconfig/docker");
UserData setupCommands = UserData.forLinux();
setupCommands.addCommands("sudo yum install awscli && echo Packages installed らと > /var/tmp/setup");
MultipartUserData multipartUserData = new MultipartUserData();
// The docker has to be configured at early stage, so content type is overridden to boothook
multipartUserData.addPart(MultipartBody.fromUserData(bootHookConf, "text/cloud-boothook; charset=\"us-ascii\""));
// Execute the rest of setup
multipartUserData.addPart(MultipartBody.fromUserData(setupCommands));
LaunchTemplate.Builder.create(this, "")
.userData(multipartUserData)
.blockDevices(List.of())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
LaunchTemplate.Builder
A fluent builder for
LaunchTemplate. |
software.amazon.jsii.JsiiObject.InitializationModeILaunchTemplate.Jsii$Default, ILaunchTemplate.Jsii$ProxyIGrantable.Jsii$Default, IGrantable.Jsii$ProxyIConnectable.Jsii$Default, IConnectable.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
LaunchTemplate(software.constructs.Construct scope,
String id) |
|
LaunchTemplate(software.constructs.Construct scope,
String id,
LaunchTemplateProps props) |
protected |
LaunchTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LaunchTemplate(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static ILaunchTemplate |
fromLaunchTemplateAttributes(software.constructs.Construct scope,
String id,
LaunchTemplateAttributes attrs)
Import an existing LaunchTemplate.
|
Connections |
getConnections()
Allows specifying security group connections for the instance.
|
String |
getDefaultVersionNumber()
The default version for the launch template.
|
IPrincipal |
getGrantPrincipal()
Principal to grant permissions to.
|
String |
getImageId()
The AMI ID of the image to use.
|
InstanceType |
getInstanceType()
Type of instance to launch.
|
String |
getLatestVersionNumber()
The latest version of the launch template.
|
String |
getLaunchTemplateId()
The identifier of the Launch Template.
|
String |
getLaunchTemplateName()
The name of the Launch Template.
|
OperatingSystemType |
getOsType()
The type of OS the instance is running.
|
IRole |
getRole()
IAM Role assumed by instances that are launched from this template.
|
protected TagManager |
getTags()
TagManager for tagging support.
|
UserData |
getUserData()
UserData executed by instances that are launched from this template.
|
String |
getVersionNumber()
The version number of this launch template to use.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected LaunchTemplate(software.amazon.jsii.JsiiObjectRef objRef)
protected LaunchTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public LaunchTemplate(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
LaunchTemplateProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public LaunchTemplate(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static ILaunchTemplate fromLaunchTemplateAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull LaunchTemplateAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public Connections getConnections()
getConnections in interface IConnectable@Stability(value=Stable) @NotNull public String getDefaultVersionNumber()
@Stability(value=Stable) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Stable) @NotNull public String getLatestVersionNumber()
@Stability(value=Stable) @NotNull protected TagManager getTags()
@Stability(value=Stable) @NotNull public String getVersionNumber()
getVersionNumber in interface ILaunchTemplate@Stability(value=Stable) @Nullable public String getImageId()
@Stability(value=Stable) @Nullable public InstanceType getInstanceType()
@Stability(value=Stable) @Nullable public String getLaunchTemplateId()
Exactly one of launchTemplateId and launchTemplateName will be set.
getLaunchTemplateId in interface ILaunchTemplate@Stability(value=Stable) @Nullable public String getLaunchTemplateName()
Exactly one of launchTemplateId and launchTemplateName will be set.
getLaunchTemplateName in interface ILaunchTemplate@Stability(value=Stable) @Nullable public OperatingSystemType getOsType()
@Stability(value=Stable) @Nullable public IRole getRole()
@Stability(value=Stable) @Nullable public UserData getUserData()
Copyright © 2022. All rights reserved.