AWS Native is in preview. AWS Classic is fully supported.
aws-native.ec2.getLaunchTemplate
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
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:
- Launch
Template stringId - The ID of the launch template.
- Launch
Template stringId - The ID of the launch template.
- launch
Template StringId - The ID of the launch template.
- launch
Template stringId - The ID of the launch template.
- launch_
template_ strid - The ID of the launch template.
- launch
Template StringId - The ID of the launch template.
getLaunchTemplate Result
The following output properties are available:
- Default
Version 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-template
AWS CLI command.- Latest
Version stringNumber - The latest version of the launch template, such as
5
. - Launch
Template stringId - The ID of the launch template.
- Default
Version 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-template
AWS CLI command.- Latest
Version stringNumber - The latest version of the launch template, such as
5
. - Launch
Template stringId - The ID of the launch template.
- default
Version 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-template
AWS CLI command.- latest
Version StringNumber - The latest version of the launch template, such as
5
. - launch
Template StringId - The ID of the launch template.
- default
Version 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-template
AWS CLI command.- latest
Version stringNumber - The latest version of the launch template, such as
5
. - launch
Template 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-template
AWS CLI command.- latest_
version_ strnumber - The latest version of the launch template, such as
5
. - launch_
template_ strid - The ID of the launch template.
- default
Version 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-template
AWS CLI command.- latest
Version StringNumber - The latest version of the launch template, such as
5
. - launch
Template StringId - The ID of the launch template.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.