launch_template_datas
Creates, updates, deletes, gets or lists a launch_template_datas resource.
Overview
| Name | launch_template_datas |
| Type | Resource |
| Id | aws.ec2.launch_template_datas |
Fields
The following fields are returned by SELECT queries:
- get_launch_template_data
| Name | Datatype | Description |
|---|---|---|
block_device_mappings | string | The block device mappings. |
capacity_reservation_specification | string | Information about the Capacity Reservation targeting option. |
cpu_options | string | The CPU options for the instance. For more information, see CPU options for Amazon EC2 instances in the Amazon EC2 User Guide. |
credit_specification | string | The credit option for CPU usage of the instance. |
disable_api_stop | boolean | Indicates whether the instance is enabled for stop protection. For more information, see Enable stop protection for your EC2 instances in the Amazon EC2 User Guide. |
disable_api_termination | boolean | If set to true, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API. |
ebs_optimized | boolean | Indicates whether the instance is optimized for Amazon EBS I/O. |
elastic_gpu_specifications | string | Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. |
elastic_inference_accelerators | string | Amazon Elastic Inference is no longer available. An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads. You cannot specify accelerators from different generations in the same request. |
enclave_options | string | Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. |
hibernation_options | string | Indicates whether an instance is configured for hibernation. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide. |
iam_instance_profile | string | The IAM instance profile. |
image_id | string | The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch. The value depends on what you specified in the request. The possible values are: If an AMI ID was specified in the request, then this is the AMI ID. If a Systems Manager parameter was specified in the request, and ResolveAlias was configured as true, then this is the AMI ID that the parameter is mapped to in the Parameter Store. If a Systems Manager parameter was specified in the request, and ResolveAlias was configured as false, then this is the parameter value. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide. |
instance_initiated_shutdown_behavior | string | Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown). |
instance_market_options | string | The market (purchasing) option for the instances. |
instance_requirements | string | The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes. If you specify InstanceRequirements, you can't specify InstanceTypes. |
instance_type | string | The instance type. |
kernel_id | string | The ID of the kernel, if applicable. |
key_name | string | The name of the key pair. |
license_specifications | string | The license configurations. |
maintenance_options | string | The maintenance options for your instance. |
metadata_options | string | The metadata options for the instance. For more information, see Configure the Instance Metadata Service options in the Amazon EC2 User Guide. |
monitoring | string | The monitoring for the instance. |
network_interfaces | string | The network interfaces. |
network_performance_options | string | Contains the launch template settings for network performance options for your instance. |
operator | string | The entity that manages the launch template. |
placement | string | The placement of the instance. |
private_dns_name_options | string | The options for the instance hostname. |
ram_disk_id | string | The ID of the RAM disk, if applicable. |
secondary_interfaces | string | The secondary interfaces associated with the launch template. |
security_group_ids | string | The security group IDs. |
security_groups | string | The security group names. |
tag_specifications | string | The tags that are applied to the resources that are created during instance launch. |
user_data | string | The user data for the instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_launch_template_data | select | InstanceId, region | DryRun | Retrieves the configuration data of the specified instance. You can use this data to create a launch template. This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, and DescribeInstanceAttribute. Or, you can allow describe* depending on your instance requirements. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
InstanceId | string | The ID of the instance. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
SELECT examples
- get_launch_template_data
Retrieves the configuration data of the specified instance. You can use this data to create a launch template. This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, and DescribeInstanceAttribute. Or, you can allow describe* depending on your instance requirements.
SELECT
block_device_mappings,
capacity_reservation_specification,
cpu_options,
credit_specification,
disable_api_stop,
disable_api_termination,
ebs_optimized,
elastic_gpu_specifications,
elastic_inference_accelerators,
enclave_options,
hibernation_options,
iam_instance_profile,
image_id,
instance_initiated_shutdown_behavior,
instance_market_options,
instance_requirements,
instance_type,
kernel_id,
key_name,
license_specifications,
maintenance_options,
metadata_options,
monitoring,
network_interfaces,
network_performance_options,
operator,
placement,
private_dns_name_options,
ram_disk_id,
secondary_interfaces,
security_group_ids,
security_groups,
tag_specifications,
user_data
FROM aws.ec2.launch_template_datas
WHERE InstanceId = '{{ InstanceId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;