We recommend new projects start with resources from the AWS provider.
aws-native.ec2.getLaunchTemplate
We recommend new projects start with resources from the AWS provider.
Specifies the properties for creating a launch template. The minimum required properties for specifying a launch template are as follows:
- You must specify at least one property for the launch template data.
- You can optionally specify a name for the launch template. If you do not specify a name, CFN creates a name for you.
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.
For more information, see Launch an instance from a launch template in the Amazon EC2 User Guide.
Using getLaunchTemplate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLaunchTemplate(args: GetLaunchTemplateArgs, opts?: InvokeOptions): Promise<GetLaunchTemplateResult>
function getLaunchTemplateOutput(args: GetLaunchTemplateOutputArgs, opts?: InvokeOptions): Output<GetLaunchTemplateResult>def get_launch_template(launch_template_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetLaunchTemplateResult
def get_launch_template_output(launch_template_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetLaunchTemplateResult]func LookupLaunchTemplate(ctx *Context, args *LookupLaunchTemplateArgs, opts ...InvokeOption) (*LookupLaunchTemplateResult, error)
func LookupLaunchTemplateOutput(ctx *Context, args *LookupLaunchTemplateOutputArgs, opts ...InvokeOption) LookupLaunchTemplateResultOutput> Note: This function is named LookupLaunchTemplate in the Go SDK.
public static class GetLaunchTemplate 
{
    public static Task<GetLaunchTemplateResult> InvokeAsync(GetLaunchTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetLaunchTemplateResult> Invoke(GetLaunchTemplateInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLaunchTemplateResult> getLaunchTemplate(GetLaunchTemplateArgs args, InvokeOptions options)
public static Output<GetLaunchTemplateResult> getLaunchTemplate(GetLaunchTemplateArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:ec2:getLaunchTemplate
  arguments:
    # arguments dictionaryThe following arguments are supported:
- LaunchTemplate stringId 
- The ID of the launch template.
- LaunchTemplate stringId 
- The ID of the launch template.
- launchTemplate StringId 
- The ID of the launch template.
- launchTemplate stringId 
- The ID of the launch template.
- launch_template_ strid 
- The ID of the launch template.
- launchTemplate StringId 
- The ID of the launch template.
getLaunchTemplate Result
The following output properties are available:
- DefaultVersion stringNumber 
- The default version of the launch template, such as 2. - 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-templateAWS CLI command.
- LatestVersion stringNumber 
- The latest version of the launch template, such as 5.
- LaunchTemplate stringId 
- The ID of the launch template.
- DefaultVersion stringNumber 
- The default version of the launch template, such as 2. - 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-templateAWS CLI command.
- LatestVersion stringNumber 
- The latest version of the launch template, such as 5.
- LaunchTemplate stringId 
- The ID of the launch template.
- defaultVersion StringNumber 
- The default version of the launch template, such as 2. - 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-templateAWS CLI command.
- latestVersion StringNumber 
- The latest version of the launch template, such as 5.
- launchTemplate StringId 
- The ID of the launch template.
- defaultVersion stringNumber 
- The default version of the launch template, such as 2. - 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-templateAWS CLI command.
- latestVersion stringNumber 
- The latest version of the launch template, such as 5.
- launchTemplate stringId 
- The ID of the launch template.
- default_version_ strnumber 
- The default version of the launch template, such as 2. - 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-templateAWS CLI command.
- latest_version_ strnumber 
- The latest version of the launch template, such as 5.
- launch_template_ strid 
- The ID of the launch template.
- defaultVersion StringNumber 
- The default version of the launch template, such as 2. - 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-templateAWS CLI command.
- latestVersion StringNumber 
- The latest version of the launch template, such as 5.
- launchTemplate StringId 
- The ID of the launch template.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
