@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:37.015Z") public class CfnLaunchTemplate extends CfnResource implements IInspectable
Specifies a launch template for an Amazon EC2 instance. A launch template contains the parameters to launch an instance. For more information, see Launch an instance from a launch template in the Amazon EC2 User Guide .
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());
Modifier and Type | Class and Description |
---|---|
static interface |
CfnLaunchTemplate.AcceleratorCountProperty
The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.
|
static interface |
CfnLaunchTemplate.AcceleratorTotalMemoryMiBProperty
The minimum and maximum amount of total accelerator memory, in MiB.
|
static interface |
CfnLaunchTemplate.BaselineEbsBandwidthMbpsProperty
The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps.
|
static interface |
CfnLaunchTemplate.BlockDeviceMappingProperty
Information about a block device mapping for an Amazon EC2 launch template.
|
static class |
CfnLaunchTemplate.Builder
A fluent builder for
CfnLaunchTemplate . |
static interface |
CfnLaunchTemplate.CapacityReservationSpecificationProperty
Specifies an instance's Capacity Reservation targeting option.
|
static interface |
CfnLaunchTemplate.CapacityReservationTargetProperty
Specifies a target Capacity Reservation.
|
static interface |
CfnLaunchTemplate.CpuOptionsProperty
Specifies the CPU options for an instance.
|
static interface |
CfnLaunchTemplate.CreditSpecificationProperty
Specifies the credit option for CPU usage of a T2, T3, or T3a instance.
|
static interface |
CfnLaunchTemplate.EbsProperty
Parameters for a block device for an EBS volume in an Amazon EC2 launch template.
|
static interface |
CfnLaunchTemplate.ElasticGpuSpecificationProperty
Specifies a specification for an Elastic GPU for an Amazon EC2 launch template.
|
static interface |
CfnLaunchTemplate.EnclaveOptionsProperty
Indicates whether the instance is enabled for AWS Nitro Enclaves.
|
static interface |
CfnLaunchTemplate.HibernationOptionsProperty
Specifies whether your instance is configured for hibernation.
|
static interface |
CfnLaunchTemplate.IamInstanceProfileProperty
Specifies an IAM instance profile, which is a container for an IAM role for your instance.
|
static interface |
CfnLaunchTemplate.InstanceMarketOptionsProperty
Specifies the market (purchasing) option for an instance.
|
static interface |
CfnLaunchTemplate.InstanceRequirementsProperty
The attributes for the instance types.
|
static interface |
CfnLaunchTemplate.Ipv4PrefixSpecificationProperty
Specifies an IPv4 prefix for a network interface.
|
static interface |
CfnLaunchTemplate.Ipv6AddProperty
Specifies an IPv6 address in an Amazon EC2 launch template.
|
static interface |
CfnLaunchTemplate.Ipv6PrefixSpecificationProperty
Specifies an IPv6 prefix for a network interface.
|
static interface |
CfnLaunchTemplate.LaunchTemplateDataProperty
The information to include in the launch template.
|
static interface |
CfnLaunchTemplate.LaunchTemplateElasticInferenceAcceleratorProperty
Specifies an elastic inference accelerator.
|
static interface |
CfnLaunchTemplate.LaunchTemplateTagSpecificationProperty
Specifies the tags to apply to the launch template during creation.
|
static interface |
CfnLaunchTemplate.LicenseSpecificationProperty
Specifies a license configuration for an instance.
|
static interface |
CfnLaunchTemplate.MaintenanceOptionsProperty
The maintenance options of your instance.
|
static interface |
CfnLaunchTemplate.MemoryGiBPerVCpuProperty
The minimum and maximum amount of memory per vCPU, in GiB.
|
static interface |
CfnLaunchTemplate.MemoryMiBProperty
The minimum and maximum amount of memory, in MiB.
|
static interface |
CfnLaunchTemplate.MetadataOptionsProperty
Specifies the metadata options for the instance.
|
static interface |
CfnLaunchTemplate.MonitoringProperty
Specifies whether detailed monitoring is enabled for an instance.
|
static interface |
CfnLaunchTemplate.NetworkInterfaceCountProperty
The minimum and maximum number of network interfaces.
|
static interface |
CfnLaunchTemplate.NetworkInterfaceProperty
Specifies the parameters for a network interface.
|
static interface |
CfnLaunchTemplate.PlacementProperty
Specifies the placement of an instance.
|
static interface |
CfnLaunchTemplate.PrivateDnsNameOptionsProperty
Describes the options for instance hostnames.
|
static interface |
CfnLaunchTemplate.PrivateIpAddProperty
Specifies a secondary private IPv4 address for a network interface.
|
static interface |
CfnLaunchTemplate.SpotOptionsProperty
Specifies options for Spot Instances.
|
static interface |
CfnLaunchTemplate.TagSpecificationProperty
Specifies the tags to apply to a resource when the resource is created for the launch template.
|
static interface |
CfnLaunchTemplate.TotalLocalStorageGBProperty
The minimum and maximum amount of total local storage, in GB.
|
static interface |
CfnLaunchTemplate.VCpuCountProperty
The minimum and maximum number of vCPUs.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnLaunchTemplate(Construct scope,
java.lang.String id,
CfnLaunchTemplateProps props)
Create a new `AWS::EC2::LaunchTemplate`.
|
protected |
CfnLaunchTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnLaunchTemplate(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrDefaultVersionNumber()
The default version of the launch template, such as 2.
|
java.lang.String |
getAttrLatestVersionNumber()
The latest version of the launch template, such as `5` .
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getLaunchTemplateData()
The information for the launch template.
|
java.lang.String |
getLaunchTemplateName()
A name for the launch template.
|
java.lang.Object |
getTagSpecifications()
The tags to apply to the launch template during creation.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setLaunchTemplateData(CfnLaunchTemplate.LaunchTemplateDataProperty value)
The information for the launch template.
|
void |
setLaunchTemplateData(IResolvable value)
The information for the launch template.
|
void |
setLaunchTemplateName(java.lang.String value)
A name for the launch template.
|
void |
setTagSpecifications(IResolvable value)
The tags to apply to the launch template during creation.
|
void |
setTagSpecifications(java.util.List<java.lang.Object> value)
The tags to apply to the launch template during creation.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnLaunchTemplate(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnLaunchTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnLaunchTemplate(Construct scope, java.lang.String id, CfnLaunchTemplateProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrDefaultVersionNumber()
The default version of a launch template cannot be specified in AWS CloudFormation . The default version can be set in the Amazon EC2 Console or by using the modify-launch-template
AWS CLI command.
public java.lang.String getAttrLatestVersionNumber()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getLaunchTemplateData()
public void setLaunchTemplateData(IResolvable value)
public void setLaunchTemplateData(CfnLaunchTemplate.LaunchTemplateDataProperty value)
public java.lang.String getLaunchTemplateName()
public void setLaunchTemplateName(java.lang.String value)
public java.lang.Object getTagSpecifications()
public void setTagSpecifications(IResolvable value)
public void setTagSpecifications(java.util.List<java.lang.Object> value)