launch_template
Gets or updates an individual launch_template
resource, use launch_templates
to retrieve a list of resources or to create or delete a resource.
Overview
Name | launch_template |
Type | Resource |
Description | Specifies the properties for creating a launch template.<br/> The minimum required properties for specifying a launch template are as follows:<br/> + You must specify at least one property for the launch template data.<br/> + You do not need to specify a name for the launch template. If you do not specify a name, CFN creates the name for you.<br/> <br/> A launch template can contain some or all of the configuration information to launch an instance. When you launch an instance using a launch template, instance properties that are not specified in the launch template use default values, except the ImageId property, which has no default value. If you do not specify an AMI ID for the launch template ImageId property, you must specify an AMI ID for the instance ImageId property.<br/> For more information, see [Launch an instance from a launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) in the *Amazon EC2 User Guide*. |
Id | aws.ec2.launch_template |
Fields
Name | Datatype | Description |
---|---|---|
launch_template_name | string | A name for the launch template. |
launch_template_data | object | The information for the launch template. |
version_description | string | A description for the first version of the launch template. |
tag_specifications | array | The tags to apply to the launch template on creation. To tag the launch template, the resource type must be launch-template .<br/> To specify the tags for the resources that are created when an instance is launched, you must use [TagSpecifications](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#cfn-ec2-launchtemplate-tagspecifications). |
latest_version_number | string | |
launch_template_id | string | |
default_version_number | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
Example
SELECT
region,
launch_template_name,
launch_template_data,
version_description,
tag_specifications,
latest_version_number,
launch_template_id,
default_version_number
FROM aws.ec2.launch_template
WHERE region = 'us-east-1' AND data__Identifier = '<LaunchTemplateId>';
Permissions
To operate on the launch_template
resource, the following permissions are required:
Read
ec2:DescribeLaunchTemplates
Update
ec2:CreateLaunchTemplateVersion