GetLaunchTemplate
Provides information about a Launch Template.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @default = Output.Create(Aws.Ec2.GetLaunchTemplate.InvokeAsync(new Aws.Ec2.GetLaunchTemplateArgs
{
Name = "my-launch-template",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "my-launch-template"
_, err := ec2.LookupLaunchTemplate(ctx, &ec2.LookupLaunchTemplateArgs{
Name: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
default = aws.ec2.get_launch_template(name="my-launch-template")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const defaultLaunchTemplate = pulumi.output(aws.ec2.getLaunchTemplate({
name: "my-launch-template",
}, { async: true }));Filter
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Aws.Ec2.GetLaunchTemplate.InvokeAsync(new Aws.Ec2.GetLaunchTemplateArgs
{
Filters =
{
new Aws.Ec2.Inputs.GetLaunchTemplateFilterArgs
{
Name = "launch-template-name",
Values =
{
"some-template",
},
},
},
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupLaunchTemplate(ctx, &ec2.LookupLaunchTemplateArgs{
Filters: []ec2.GetLaunchTemplateFilter{
ec2.GetLaunchTemplateFilter{
Name: "launch-template-name",
Values: []string{
"some-template",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
test = aws.ec2.get_launch_template(filters=[{
"name": "launch-template-name",
"values": ["some-template"],
}])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = pulumi.output(aws.ec2.getLaunchTemplate({
filters: [{
name: "launch-template-name",
values: ["some-template"],
}],
}, { async: true }));Using GetLaunchTemplate
function getLaunchTemplate(args: GetLaunchTemplateArgs, opts?: InvokeOptions): Promise<GetLaunchTemplateResult>function get_launch_template(filters=None, name=None, tags=None, opts=None)func LookupLaunchTemplate(ctx *Context, args *LookupLaunchTemplateArgs, opts ...InvokeOption) (*LookupLaunchTemplateResult, error)Note: This function is named
LookupLaunchTemplatein the Go SDK.
public static class GetLaunchTemplate {
public static Task<GetLaunchTemplateResult> InvokeAsync(GetLaunchTemplateArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Launch Template Filter Args> Configuration block(s) for filtering. Detailed below.
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
- Filters
[]Get
Launch Template Filter Configuration block(s) for filtering. Detailed below.
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- map[string]string
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
- filters
Get
Launch Template Filter[] Configuration block(s) for filtering. Detailed below.
- name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
- filters
List[Get
Launch Template Filter] Configuration block(s) for filtering. Detailed below.
- name str
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- Dict[str, str]
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
GetLaunchTemplate Result
The following output properties are available:
- Arn string
Amazon Resource Name (ARN) of the launch template.
- Block
Device List<GetMappings Launch Template Block Device Mapping> Specify volumes to attach to the instance besides the volumes specified by the AMI.
- Credit
Specifications List<GetLaunch Template Credit Specification> Customize the credit specification of the instance. See Credit Specification below for more details.
- Default
Version int The default version of the launch template.
- Description string
Description of the launch template.
- Disable
Api boolTermination If
true, enables EC2 Instance Termination Protection- Ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- Elastic
Gpu List<GetSpecifications Launch Template Elastic Gpu Specification> The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- Hibernation
Options List<GetLaunch Template Hibernation Option> The hibernation options for the instance.
- Iam
Instance List<GetProfiles Launch Template Iam Instance Profile> The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- Id string
The provider-assigned unique ID for this managed resource.
- Image
Id string The AMI from which to launch the instance.
- Instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- Instance
Market List<GetOptions Launch Template Instance Market Option> The market (purchasing) option for the instance. below for details.
- Instance
Type string The type of the instance.
- Kernel
Id string The kernel ID.
- Key
Name string The key name to use for the instance.
- Latest
Version int The latest version of the launch template.
- Metadata
Options List<GetLaunch Template Metadata Option> The metadata options for the instance.
- Monitorings
List<Get
Launch Template Monitoring> The monitoring option for the instance.
- Network
Interfaces List<GetLaunch Template Network Interface> Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placements
List<Get
Launch Template Placement> The placement of the instance.
- Ram
Disk stringId The ID of the RAM disk.
- Security
Group List<string>Names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
List<Get
Launch Template Tag Specification> The tags to apply to the resources during launch.
- Dictionary<string, string>
(Optional) A map of tags to assign to the launch template.
- User
Data string The Base64-encoded user data to provide when launching the instance.
- Vpc
Security List<string>Group Ids A list of security group IDs to associate with.
- Filters
List<Get
Launch Template Filter> - Name string
- Arn string
Amazon Resource Name (ARN) of the launch template.
- Block
Device []GetMappings Launch Template Block Device Mapping Specify volumes to attach to the instance besides the volumes specified by the AMI.
- Credit
Specifications []GetLaunch Template Credit Specification Customize the credit specification of the instance. See Credit Specification below for more details.
- Default
Version int The default version of the launch template.
- Description string
Description of the launch template.
- Disable
Api boolTermination If
true, enables EC2 Instance Termination Protection- Ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- Elastic
Gpu []GetSpecifications Launch Template Elastic Gpu Specification The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- Hibernation
Options []GetLaunch Template Hibernation Option The hibernation options for the instance.
- Iam
Instance []GetProfiles Launch Template Iam Instance Profile The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- Id string
The provider-assigned unique ID for this managed resource.
- Image
Id string The AMI from which to launch the instance.
- Instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- Instance
Market []GetOptions Launch Template Instance Market Option The market (purchasing) option for the instance. below for details.
- Instance
Type string The type of the instance.
- Kernel
Id string The kernel ID.
- Key
Name string The key name to use for the instance.
- Latest
Version int The latest version of the launch template.
- Metadata
Options []GetLaunch Template Metadata Option The metadata options for the instance.
- Monitorings
[]Get
Launch Template Monitoring The monitoring option for the instance.
- Network
Interfaces []GetLaunch Template Network Interface Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placements
[]Get
Launch Template Placement The placement of the instance.
- Ram
Disk stringId The ID of the RAM disk.
- Security
Group []stringNames A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
[]Get
Launch Template Tag Specification The tags to apply to the resources during launch.
- map[string]string
(Optional) A map of tags to assign to the launch template.
- User
Data string The Base64-encoded user data to provide when launching the instance.
- Vpc
Security []stringGroup Ids A list of security group IDs to associate with.
- Filters
[]Get
Launch Template Filter - Name string
- arn string
Amazon Resource Name (ARN) of the launch template.
- block
Device GetMappings Launch Template Block Device Mapping[] Specify volumes to attach to the instance besides the volumes specified by the AMI.
- credit
Specifications GetLaunch Template Credit Specification[] Customize the credit specification of the instance. See Credit Specification below for more details.
- default
Version number The default version of the launch template.
- description string
Description of the launch template.
- disable
Api booleanTermination If
true, enables EC2 Instance Termination Protection- ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- elastic
Gpu GetSpecifications Launch Template Elastic Gpu Specification[] The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- hibernation
Options GetLaunch Template Hibernation Option[] The hibernation options for the instance.
- iam
Instance GetProfiles Launch Template Iam Instance Profile[] The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- id string
The provider-assigned unique ID for this managed resource.
- image
Id string The AMI from which to launch the instance.
- instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- instance
Market GetOptions Launch Template Instance Market Option[] The market (purchasing) option for the instance. below for details.
- instance
Type string The type of the instance.
- kernel
Id string The kernel ID.
- key
Name string The key name to use for the instance.
- latest
Version number The latest version of the launch template.
- metadata
Options GetLaunch Template Metadata Option[] The metadata options for the instance.
- monitorings
Get
Launch Template Monitoring[] The monitoring option for the instance.
- network
Interfaces GetLaunch Template Network Interface[] Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placements
Get
Launch Template Placement[] The placement of the instance.
- ram
Disk stringId The ID of the RAM disk.
- security
Group string[]Names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
Get
Launch Template Tag Specification[] The tags to apply to the resources during launch.
- {[key: string]: string}
(Optional) A map of tags to assign to the launch template.
- user
Data string The Base64-encoded user data to provide when launching the instance.
- vpc
Security string[]Group Ids A list of security group IDs to associate with.
- filters
Get
Launch Template Filter[] - name string
- arn str
Amazon Resource Name (ARN) of the launch template.
- block_
device_ List[Getmappings Launch Template Block Device Mapping] Specify volumes to attach to the instance besides the volumes specified by the AMI.
- credit_
specifications List[GetLaunch Template Credit Specification] Customize the credit specification of the instance. See Credit Specification below for more details.
- default_
version float The default version of the launch template.
- description str
Description of the launch template.
- disable_
api_ booltermination If
true, enables EC2 Instance Termination Protection- ebs_
optimized str If
true, the launched EC2 instance will be EBS-optimized.- elastic_
gpu_ List[Getspecifications Launch Template Elastic Gpu Specification] The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- hibernation_
options List[GetLaunch Template Hibernation Option] The hibernation options for the instance.
- iam_
instance_ List[Getprofiles Launch Template Iam Instance Profile] The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- id str
The provider-assigned unique ID for this managed resource.
- image_
id str The AMI from which to launch the instance.
- instance_
initiated_ strshutdown_ behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- instance_
market_ List[Getoptions Launch Template Instance Market Option] The market (purchasing) option for the instance. below for details.
- instance_
type str The type of the instance.
- kernel_
id str The kernel ID.
- key_
name str The key name to use for the instance.
- latest_
version float The latest version of the launch template.
- metadata_
options List[GetLaunch Template Metadata Option] The metadata options for the instance.
- monitorings
List[Get
Launch Template Monitoring] The monitoring option for the instance.
- network_
interfaces List[GetLaunch Template Network Interface] Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placements
List[Get
Launch Template Placement] The placement of the instance.
- ram_
disk_ strid The ID of the RAM disk.
- security_
group_ List[str]names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.- tag_
specifications List[GetLaunch Template Tag Specification] The tags to apply to the resources during launch.
- Dict[str, str]
(Optional) A map of tags to assign to the launch template.
- user_
data str The Base64-encoded user data to provide when launching the instance.
- vpc_
security_ List[str]group_ ids A list of security group IDs to associate with.
- filters
List[Get
Launch Template Filter] - name str
Supporting Types
GetLaunchTemplateBlockDeviceMapping
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateBlockDeviceMappingEb
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateCreditSpecification
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateElasticGpuSpecification
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateFilter
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- Values List<string>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- Values []string
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- values string[]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name str
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- values List[str]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
GetLaunchTemplateHibernationOption
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateIamInstanceProfile
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Arn string
Amazon Resource Name (ARN) of the launch template.
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- Arn string
Amazon Resource Name (ARN) of the launch template.
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- arn string
Amazon Resource Name (ARN) of the launch template.
- name string
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
- arn str
Amazon Resource Name (ARN) of the launch template.
- name str
The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
GetLaunchTemplateInstanceMarketOption
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateInstanceMarketOptionSpotOption
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateMetadataOption
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Http
Endpoint string The state of the metadata service:
enabled,disabled.- Http
Put intResponse Hop Limit The desired HTTP PUT response hop limit for instance metadata requests.
- Http
Tokens string If session tokens are required:
optional,required.
- Http
Endpoint string The state of the metadata service:
enabled,disabled.- Http
Put intResponse Hop Limit The desired HTTP PUT response hop limit for instance metadata requests.
- Http
Tokens string If session tokens are required:
optional,required.
- http
Endpoint string The state of the metadata service:
enabled,disabled.- http
Put numberResponse Hop Limit The desired HTTP PUT response hop limit for instance metadata requests.
- http
Tokens string If session tokens are required:
optional,required.
- http
Endpoint str The state of the metadata service:
enabled,disabled.- http
Put floatResponse Hop Limit The desired HTTP PUT response hop limit for instance metadata requests.
- http
Tokens str If session tokens are required:
optional,required.
GetLaunchTemplateMonitoring
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateNetworkInterface
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Delete
On boolTermination - Description string
Description of the launch template.
- Device
Index int - Ipv4Address
Count int - Ipv4Addresses List<string>
- Ipv6Address
Count int - Ipv6Addresses List<string>
- Network
Interface stringId - Private
Ip stringAddress - Security
Groups List<string> - Subnet
Id string - Associate
Public boolIp Address
- delete
On booleanTermination - description string
Description of the launch template.
- device
Index number - ipv4Address
Count number - ipv4Addresses string[]
- ipv6Address
Count number - ipv6Addresses string[]
- network
Interface stringId - private
Ip stringAddress - security
Groups string[] - subnet
Id string - associate
Public booleanIp Address
- delete
On boolTermination - description str
Description of the launch template.
- device_
index float - ipv4Address
Count float - ipv4Addresses List[str]
- ipv6_
address_ floatcount - ipv6_
addresses List[str] - network_
interface_ strid - private_
ip_ straddress - security_
groups List[str] - subnet_
id str - associate_
public_ boolip_ address
GetLaunchTemplatePlacement
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLaunchTemplateTagSpecification
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Resource
Type string - Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
- Resource
Type string - map[string]string
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
- resource
Type string - {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
- resource_
type str - Dict[str, str]
A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.