Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

RequestLaunchTemplateData

The information to include in the launch template.

Contents

BlockDeviceMappings

The block device mapping.

Important

Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.

Type: Array of LaunchTemplateBlockDeviceMappingRequest objects

Required: No

CreditSpecification

The credit option for CPU usage of the instance. Valid for T2 instances only.

Type: CreditSpecificationRequest object

Required: No

DisableApiTermination

If set to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API. To change this attribute to false after launch, use ModifyInstanceAttribute.

Type: Boolean

Required: No

EbsOptimized

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

Type: Boolean

Required: No

ElasticGpuSpecifications

An elastic GPU to associate with the instance.

Type: Array of ElasticGpuSpecification objects

Required: No

IamInstanceProfile

The IAM instance profile.

Type: LaunchTemplateIamInstanceProfileSpecificationRequest object

Required: No

ImageId

The ID of the AMI, which you can get by using DescribeImages.

Type: String

Required: No

InstanceInitiatedShutdownBehavior

Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Default: stop

Type: String

Valid Values: stop | terminate

Required: No

InstanceMarketOptions

The market (purchasing) option for the instances.

Type: LaunchTemplateInstanceMarketOptionsRequest object

Required: No

InstanceType

The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

Type: String

Valid Values: t1.micro | t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | m1.small | m1.medium | m1.large | m1.xlarge | m3.medium | m3.large | m3.xlarge | m3.2xlarge | m4.large | m4.xlarge | m4.2xlarge | m4.4xlarge | m4.10xlarge | m4.16xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cr1.8xlarge | r3.large | r3.xlarge | r3.2xlarge | r3.4xlarge | r3.8xlarge | r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | x1.16xlarge | x1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge | i2.xlarge | i2.2xlarge | i2.4xlarge | i2.8xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge | hi1.4xlarge | hs1.8xlarge | c1.medium | c1.xlarge | c3.large | c3.xlarge | c3.2xlarge | c3.4xlarge | c3.8xlarge | c4.large | c4.xlarge | c4.2xlarge | c4.4xlarge | c4.8xlarge | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.18xlarge | cc1.4xlarge | cc2.8xlarge | g2.2xlarge | g2.8xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | cg1.4xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge | d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | f1.2xlarge | f1.16xlarge | m5.large | m5.xlarge | m5.2xlarge | m5.4xlarge | m5.12xlarge | m5.24xlarge | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge

Required: No

KernelId

The ID of the kernel.

Important

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.

Type: String

Required: No

KeyName

The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

Important

If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

Type: String

Required: No

Monitoring

The monitoring for the instance.

Type: LaunchTemplatesMonitoringRequest object

Required: No

NetworkInterfaces

One or more network interfaces.

Type: Array of LaunchTemplateInstanceNetworkInterfaceSpecificationRequest objects

Required: No

Placement

The placement for the instance.

Type: LaunchTemplatePlacementRequest object

Required: No

RamDiskId

The ID of the RAM disk.

Important

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.

Type: String

Required: No

SecurityGroups

[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.

Type: Array of strings

Required: No

SecurityGroupIds

One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.

Type: Array of strings

Required: No

TagSpecifications

The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.

Type: Array of LaunchTemplateTagSpecificationRequest objects

Required: No

UserData

The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for you and you can load the text from a file. Otherwise, you must provide base64-encoded text.

Type: String

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

On this page: