aws::launch-template¶
Creates a Launch Template from config or an existing Instance Id.
Example¶
aws::launch-template launch-template
name: "launch-template-gyro-1"
ami: "amzn-ami-hvm-2018.03.0.20181129-x86_64-gp2"
shutdown-behavior: "STOP"
instance-type: "t2.micro"
key-name: "example"
security-groups: [
$(aws::security-group security-group-launch-template-example-1),
$(aws::security-group security-group-launch-template-example-2)
]
disable-api-termination: false
ebs-optimized: false
block-device-mapping
device-name: "/dev/sdb"
volume-size: 100
auto-enable-io: false
end
capacity-reservation: "open"
network-interfaces:[
$(aws::network-interface nic-example-launch-template-1),
$(aws::network-interface nic-example-launch-template-2)
]
tags: {
Name: "launch-template-example-1"
}
end
Attributes¶
Attribute | Description |
---|---|
name | The name of the launch template. (Required) |
ami | The AMI to be used to launch the Instance created by this Template. |
ebs-optimized | When set to true , EBS optimization for an instance is enabled. Defaults to false. See Amazon EBS–Optimized Instances. |
configure-hibernate-option | When set to true , hibernate options for an instance are enabled. Defaults to false. See Hibernate your Instances. |
shutdown-behavior | The shutdown behavior options for an instance. Valid values are stop or terminate . See Changing the Instance Initiated Shutdown Behavior. |
instance-type | The launch instance with the type of hardware you desire. See Instance Types. |
key-name | The launch instance with the key name of an EC2 Key Pair. This is a certificate required to access your instance. See `Amazon EC2 Key Pairs < https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html/>`_. |
security-groups list | The security groups associated with the launch instance. Required if Network Interface not configured. See Amazon EC2 Security Groups for Linux Instances. |
disable-api-termination | When set to true , api termination of an instance is enabled. See Enabling Termination Protection for an Instance. |
user-data | The user data for your instance. See Instance Metadata and User Data. |
block-device-mapping list subresource | The block device Mapping for the instances being launched using this template. |
capacity-reservation | The capacity reservation for the instances being launched using this template. |
instance-profile | Iam instance profile to be linked with the instances being launched using this template. |
network-interfaces set | The set of Network Interfaces to be attached to the instances being launched using this template. Required if Security Group not provided. |
metadata-options subresource | The metadata options for the instance.
|
credit-specification | The credit specifications for the instance. |
elastic-gpu-specification list | The elastic GPU to associate with the instance. |
inference-accelerator list | The elastic inference accelerator for the instance. |
enclave-options | The enclave options for the instance. |
hibernation-options | The hibernation options for the instance. |
market-options | The spot market options for the instance. |
tag-specification list subresource | The tags to apply to the resources during launch.
|
kernel-id | The ID of the kernel. |
ram-disk-id | The ID of the RAM disk. Can only be set if kernel is set. |
placement | The placement for the instance; |
cpu-options | The cpu options for the instance. |
monitoring | The monitoring for the instance. |
Outputs¶
Attribute | Description |
---|---|
id | The ID of the launch template. |
version | The version of the Launch Template. |