1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. getLaunchTemplate

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.ec2.getLaunchTemplate

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:ec2:getLaunchTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LaunchTemplateId string
    The ID of the launch template.
    LaunchTemplateId string
    The ID of the launch template.
    launchTemplateId String
    The ID of the launch template.
    launchTemplateId string
    The ID of the launch template.
    launch_template_id str
    The ID of the launch template.
    launchTemplateId String
    The ID of the launch template.

    getLaunchTemplate Result

    The following output properties are available:

    DefaultVersionNumber string

    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-template AWS CLI command.

    LatestVersionNumber string
    The latest version of the launch template, such as 5 .
    LaunchTemplateId string
    The ID of the launch template.
    DefaultVersionNumber string

    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-template AWS CLI command.

    LatestVersionNumber string
    The latest version of the launch template, such as 5 .
    LaunchTemplateId string
    The ID of the launch template.
    defaultVersionNumber String

    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-template AWS CLI command.

    latestVersionNumber String
    The latest version of the launch template, such as 5 .
    launchTemplateId String
    The ID of the launch template.
    defaultVersionNumber string

    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-template AWS CLI command.

    latestVersionNumber string
    The latest version of the launch template, such as 5 .
    launchTemplateId string
    The ID of the launch template.
    default_version_number str

    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-template AWS CLI command.

    latest_version_number str
    The latest version of the launch template, such as 5 .
    launch_template_id str
    The ID of the launch template.
    defaultVersionNumber String

    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-template AWS CLI command.

    latestVersionNumber String
    The latest version of the launch template, such as 5 .
    launchTemplateId String
    The ID of the launch template.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi