1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. getLaunchConfiguration
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.ec2.getLaunchConfiguration

Explore with Pulumi AI

Provides information about a Launch Configuration.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const ubuntu = aws.ec2.getLaunchConfiguration({
    name: "test-launch-config",
});
Copy
import pulumi
import pulumi_aws as aws

ubuntu = aws.ec2.get_launch_configuration(name="test-launch-config")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.LookupLaunchConfiguration(ctx, &ec2.LookupLaunchConfigurationArgs{
			Name: "test-launch-config",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var ubuntu = Aws.Ec2.GetLaunchConfiguration.Invoke(new()
    {
        Name = "test-launch-config",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetLaunchConfigurationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var ubuntu = Ec2Functions.getLaunchConfiguration(GetLaunchConfigurationArgs.builder()
            .name("test-launch-config")
            .build());

    }
}
Copy
variables:
  ubuntu:
    fn::invoke:
      function: aws:ec2:getLaunchConfiguration
      arguments:
        name: test-launch-config
Copy

Using getLaunchConfiguration

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 getLaunchConfiguration(args: GetLaunchConfigurationArgs, opts?: InvokeOptions): Promise<GetLaunchConfigurationResult>
function getLaunchConfigurationOutput(args: GetLaunchConfigurationOutputArgs, opts?: InvokeOptions): Output<GetLaunchConfigurationResult>
Copy
def get_launch_configuration(name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetLaunchConfigurationResult
def get_launch_configuration_output(name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetLaunchConfigurationResult]
Copy
func LookupLaunchConfiguration(ctx *Context, args *LookupLaunchConfigurationArgs, opts ...InvokeOption) (*LookupLaunchConfigurationResult, error)
func LookupLaunchConfigurationOutput(ctx *Context, args *LookupLaunchConfigurationOutputArgs, opts ...InvokeOption) LookupLaunchConfigurationResultOutput
Copy

> Note: This function is named LookupLaunchConfiguration in the Go SDK.

public static class GetLaunchConfiguration 
{
    public static Task<GetLaunchConfigurationResult> InvokeAsync(GetLaunchConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetLaunchConfigurationResult> Invoke(GetLaunchConfigurationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLaunchConfigurationResult> getLaunchConfiguration(GetLaunchConfigurationArgs args, InvokeOptions options)
public static Output<GetLaunchConfigurationResult> getLaunchConfiguration(GetLaunchConfigurationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:ec2/getLaunchConfiguration:getLaunchConfiguration
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the launch configuration.
Name This property is required. string
Name of the launch configuration.
name This property is required. String
Name of the launch configuration.
name This property is required. string
Name of the launch configuration.
name This property is required. str
Name of the launch configuration.
name This property is required. String
Name of the launch configuration.

getLaunchConfiguration Result

The following output properties are available:

Arn string
Amazon Resource Name of the launch configuration.
AssociatePublicIpAddress bool
Whether a Public IP address is associated with the instance.
EbsBlockDevices List<GetLaunchConfigurationEbsBlockDevice>
EBS Block Devices attached to the instance.
EbsOptimized bool
Whether the launched EC2 instance will be EBS-optimized.
EnableMonitoring bool
Whether Detailed Monitoring is Enabled.
EphemeralBlockDevices List<GetLaunchConfigurationEphemeralBlockDevice>
The Ephemeral volumes on the instance.
IamInstanceProfile string
The IAM Instance Profile to associate with launched instances.
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
EC2 Image ID of the instance.
InstanceType string
Instance Type of the instance to launch.
KeyName string
Key Name that should be used for the instance.
MetadataOptions List<GetLaunchConfigurationMetadataOption>
Metadata options for the instance.
Name string
Name of the launch configuration.
PlacementTenancy string
Tenancy of the instance.
RootBlockDevices List<GetLaunchConfigurationRootBlockDevice>
Root Block Device of the instance.
SecurityGroups List<string>
List of associated Security Group IDS.
SpotPrice string
Price to use for reserving Spot instances.
UserData string
User Data of the instance.
Arn string
Amazon Resource Name of the launch configuration.
AssociatePublicIpAddress bool
Whether a Public IP address is associated with the instance.
EbsBlockDevices []GetLaunchConfigurationEbsBlockDevice
EBS Block Devices attached to the instance.
EbsOptimized bool
Whether the launched EC2 instance will be EBS-optimized.
EnableMonitoring bool
Whether Detailed Monitoring is Enabled.
EphemeralBlockDevices []GetLaunchConfigurationEphemeralBlockDevice
The Ephemeral volumes on the instance.
IamInstanceProfile string
The IAM Instance Profile to associate with launched instances.
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
EC2 Image ID of the instance.
InstanceType string
Instance Type of the instance to launch.
KeyName string
Key Name that should be used for the instance.
MetadataOptions []GetLaunchConfigurationMetadataOption
Metadata options for the instance.
Name string
Name of the launch configuration.
PlacementTenancy string
Tenancy of the instance.
RootBlockDevices []GetLaunchConfigurationRootBlockDevice
Root Block Device of the instance.
SecurityGroups []string
List of associated Security Group IDS.
SpotPrice string
Price to use for reserving Spot instances.
UserData string
User Data of the instance.
arn String
Amazon Resource Name of the launch configuration.
associatePublicIpAddress Boolean
Whether a Public IP address is associated with the instance.
ebsBlockDevices List<GetLaunchConfigurationEbsBlockDevice>
EBS Block Devices attached to the instance.
ebsOptimized Boolean
Whether the launched EC2 instance will be EBS-optimized.
enableMonitoring Boolean
Whether Detailed Monitoring is Enabled.
ephemeralBlockDevices List<GetLaunchConfigurationEphemeralBlockDevice>
The Ephemeral volumes on the instance.
iamInstanceProfile String
The IAM Instance Profile to associate with launched instances.
id String
The provider-assigned unique ID for this managed resource.
imageId String
EC2 Image ID of the instance.
instanceType String
Instance Type of the instance to launch.
keyName String
Key Name that should be used for the instance.
metadataOptions List<GetLaunchConfigurationMetadataOption>
Metadata options for the instance.
name String
Name of the launch configuration.
placementTenancy String
Tenancy of the instance.
rootBlockDevices List<GetLaunchConfigurationRootBlockDevice>
Root Block Device of the instance.
securityGroups List<String>
List of associated Security Group IDS.
spotPrice String
Price to use for reserving Spot instances.
userData String
User Data of the instance.
arn string
Amazon Resource Name of the launch configuration.
associatePublicIpAddress boolean
Whether a Public IP address is associated with the instance.
ebsBlockDevices GetLaunchConfigurationEbsBlockDevice[]
EBS Block Devices attached to the instance.
ebsOptimized boolean
Whether the launched EC2 instance will be EBS-optimized.
enableMonitoring boolean
Whether Detailed Monitoring is Enabled.
ephemeralBlockDevices GetLaunchConfigurationEphemeralBlockDevice[]
The Ephemeral volumes on the instance.
iamInstanceProfile string
The IAM Instance Profile to associate with launched instances.
id string
The provider-assigned unique ID for this managed resource.
imageId string
EC2 Image ID of the instance.
instanceType string
Instance Type of the instance to launch.
keyName string
Key Name that should be used for the instance.
metadataOptions GetLaunchConfigurationMetadataOption[]
Metadata options for the instance.
name string
Name of the launch configuration.
placementTenancy string
Tenancy of the instance.
rootBlockDevices GetLaunchConfigurationRootBlockDevice[]
Root Block Device of the instance.
securityGroups string[]
List of associated Security Group IDS.
spotPrice string
Price to use for reserving Spot instances.
userData string
User Data of the instance.
arn str
Amazon Resource Name of the launch configuration.
associate_public_ip_address bool
Whether a Public IP address is associated with the instance.
ebs_block_devices Sequence[GetLaunchConfigurationEbsBlockDevice]
EBS Block Devices attached to the instance.
ebs_optimized bool
Whether the launched EC2 instance will be EBS-optimized.
enable_monitoring bool
Whether Detailed Monitoring is Enabled.
ephemeral_block_devices Sequence[GetLaunchConfigurationEphemeralBlockDevice]
The Ephemeral volumes on the instance.
iam_instance_profile str
The IAM Instance Profile to associate with launched instances.
id str
The provider-assigned unique ID for this managed resource.
image_id str
EC2 Image ID of the instance.
instance_type str
Instance Type of the instance to launch.
key_name str
Key Name that should be used for the instance.
metadata_options Sequence[GetLaunchConfigurationMetadataOption]
Metadata options for the instance.
name str
Name of the launch configuration.
placement_tenancy str
Tenancy of the instance.
root_block_devices Sequence[GetLaunchConfigurationRootBlockDevice]
Root Block Device of the instance.
security_groups Sequence[str]
List of associated Security Group IDS.
spot_price str
Price to use for reserving Spot instances.
user_data str
User Data of the instance.
arn String
Amazon Resource Name of the launch configuration.
associatePublicIpAddress Boolean
Whether a Public IP address is associated with the instance.
ebsBlockDevices List<Property Map>
EBS Block Devices attached to the instance.
ebsOptimized Boolean
Whether the launched EC2 instance will be EBS-optimized.
enableMonitoring Boolean
Whether Detailed Monitoring is Enabled.
ephemeralBlockDevices List<Property Map>
The Ephemeral volumes on the instance.
iamInstanceProfile String
The IAM Instance Profile to associate with launched instances.
id String
The provider-assigned unique ID for this managed resource.
imageId String
EC2 Image ID of the instance.
instanceType String
Instance Type of the instance to launch.
keyName String
Key Name that should be used for the instance.
metadataOptions List<Property Map>
Metadata options for the instance.
name String
Name of the launch configuration.
placementTenancy String
Tenancy of the instance.
rootBlockDevices List<Property Map>
Root Block Device of the instance.
securityGroups List<String>
List of associated Security Group IDS.
spotPrice String
Price to use for reserving Spot instances.
userData String
User Data of the instance.

Supporting Types

GetLaunchConfigurationEbsBlockDevice

DeleteOnTermination This property is required. bool
Whether the EBS Volume will be deleted on instance termination.
DeviceName This property is required. string
Name of the device.
Encrypted This property is required. bool
Whether the volume is Encrypted.
Iops This property is required. int
Provisioned IOPs of the volume.
NoDevice This property is required. bool
Whether the device in the block device mapping of the AMI is suppressed.
SnapshotId This property is required. string
Snapshot ID of the mount.
Throughput This property is required. int
Throughput of the volume.
VolumeSize This property is required. int
Size of the volume.
VolumeType This property is required. string
Type of the volume.
DeleteOnTermination This property is required. bool
Whether the EBS Volume will be deleted on instance termination.
DeviceName This property is required. string
Name of the device.
Encrypted This property is required. bool
Whether the volume is Encrypted.
Iops This property is required. int
Provisioned IOPs of the volume.
NoDevice This property is required. bool
Whether the device in the block device mapping of the AMI is suppressed.
SnapshotId This property is required. string
Snapshot ID of the mount.
Throughput This property is required. int
Throughput of the volume.
VolumeSize This property is required. int
Size of the volume.
VolumeType This property is required. string
Type of the volume.
deleteOnTermination This property is required. Boolean
Whether the EBS Volume will be deleted on instance termination.
deviceName This property is required. String
Name of the device.
encrypted This property is required. Boolean
Whether the volume is Encrypted.
iops This property is required. Integer
Provisioned IOPs of the volume.
noDevice This property is required. Boolean
Whether the device in the block device mapping of the AMI is suppressed.
snapshotId This property is required. String
Snapshot ID of the mount.
throughput This property is required. Integer
Throughput of the volume.
volumeSize This property is required. Integer
Size of the volume.
volumeType This property is required. String
Type of the volume.
deleteOnTermination This property is required. boolean
Whether the EBS Volume will be deleted on instance termination.
deviceName This property is required. string
Name of the device.
encrypted This property is required. boolean
Whether the volume is Encrypted.
iops This property is required. number
Provisioned IOPs of the volume.
noDevice This property is required. boolean
Whether the device in the block device mapping of the AMI is suppressed.
snapshotId This property is required. string
Snapshot ID of the mount.
throughput This property is required. number
Throughput of the volume.
volumeSize This property is required. number
Size of the volume.
volumeType This property is required. string
Type of the volume.
delete_on_termination This property is required. bool
Whether the EBS Volume will be deleted on instance termination.
device_name This property is required. str
Name of the device.
encrypted This property is required. bool
Whether the volume is Encrypted.
iops This property is required. int
Provisioned IOPs of the volume.
no_device This property is required. bool
Whether the device in the block device mapping of the AMI is suppressed.
snapshot_id This property is required. str
Snapshot ID of the mount.
throughput This property is required. int
Throughput of the volume.
volume_size This property is required. int
Size of the volume.
volume_type This property is required. str
Type of the volume.
deleteOnTermination This property is required. Boolean
Whether the EBS Volume will be deleted on instance termination.
deviceName This property is required. String
Name of the device.
encrypted This property is required. Boolean
Whether the volume is Encrypted.
iops This property is required. Number
Provisioned IOPs of the volume.
noDevice This property is required. Boolean
Whether the device in the block device mapping of the AMI is suppressed.
snapshotId This property is required. String
Snapshot ID of the mount.
throughput This property is required. Number
Throughput of the volume.
volumeSize This property is required. Number
Size of the volume.
volumeType This property is required. String
Type of the volume.

GetLaunchConfigurationEphemeralBlockDevice

DeviceName This property is required. string
Name of the device.
VirtualName This property is required. string
Virtual Name of the device.
DeviceName This property is required. string
Name of the device.
VirtualName This property is required. string
Virtual Name of the device.
deviceName This property is required. String
Name of the device.
virtualName This property is required. String
Virtual Name of the device.
deviceName This property is required. string
Name of the device.
virtualName This property is required. string
Virtual Name of the device.
device_name This property is required. str
Name of the device.
virtual_name This property is required. str
Virtual Name of the device.
deviceName This property is required. String
Name of the device.
virtualName This property is required. String
Virtual Name of the device.

GetLaunchConfigurationMetadataOption

HttpEndpoint This property is required. string
State of the metadata service: enabled, disabled.
HttpPutResponseHopLimit This property is required. int
The desired HTTP PUT response hop limit for instance metadata requests.
HttpTokens This property is required. string
If session tokens are required: optional, required.
HttpEndpoint This property is required. string
State of the metadata service: enabled, disabled.
HttpPutResponseHopLimit This property is required. int
The desired HTTP PUT response hop limit for instance metadata requests.
HttpTokens This property is required. string
If session tokens are required: optional, required.
httpEndpoint This property is required. String
State of the metadata service: enabled, disabled.
httpPutResponseHopLimit This property is required. Integer
The desired HTTP PUT response hop limit for instance metadata requests.
httpTokens This property is required. String
If session tokens are required: optional, required.
httpEndpoint This property is required. string
State of the metadata service: enabled, disabled.
httpPutResponseHopLimit This property is required. number
The desired HTTP PUT response hop limit for instance metadata requests.
httpTokens This property is required. string
If session tokens are required: optional, required.
http_endpoint This property is required. str
State of the metadata service: enabled, disabled.
http_put_response_hop_limit This property is required. int
The desired HTTP PUT response hop limit for instance metadata requests.
http_tokens This property is required. str
If session tokens are required: optional, required.
httpEndpoint This property is required. String
State of the metadata service: enabled, disabled.
httpPutResponseHopLimit This property is required. Number
The desired HTTP PUT response hop limit for instance metadata requests.
httpTokens This property is required. String
If session tokens are required: optional, required.

GetLaunchConfigurationRootBlockDevice

DeleteOnTermination This property is required. bool
Whether the EBS Volume will be deleted on instance termination.
Encrypted This property is required. bool
Whether the volume is Encrypted.
Iops This property is required. int
Provisioned IOPs of the volume.
Throughput This property is required. int
Throughput of the volume.
VolumeSize This property is required. int
Size of the volume.
VolumeType This property is required. string
Type of the volume.
DeleteOnTermination This property is required. bool
Whether the EBS Volume will be deleted on instance termination.
Encrypted This property is required. bool
Whether the volume is Encrypted.
Iops This property is required. int
Provisioned IOPs of the volume.
Throughput This property is required. int
Throughput of the volume.
VolumeSize This property is required. int
Size of the volume.
VolumeType This property is required. string
Type of the volume.
deleteOnTermination This property is required. Boolean
Whether the EBS Volume will be deleted on instance termination.
encrypted This property is required. Boolean
Whether the volume is Encrypted.
iops This property is required. Integer
Provisioned IOPs of the volume.
throughput This property is required. Integer
Throughput of the volume.
volumeSize This property is required. Integer
Size of the volume.
volumeType This property is required. String
Type of the volume.
deleteOnTermination This property is required. boolean
Whether the EBS Volume will be deleted on instance termination.
encrypted This property is required. boolean
Whether the volume is Encrypted.
iops This property is required. number
Provisioned IOPs of the volume.
throughput This property is required. number
Throughput of the volume.
volumeSize This property is required. number
Size of the volume.
volumeType This property is required. string
Type of the volume.
delete_on_termination This property is required. bool
Whether the EBS Volume will be deleted on instance termination.
encrypted This property is required. bool
Whether the volume is Encrypted.
iops This property is required. int
Provisioned IOPs of the volume.
throughput This property is required. int
Throughput of the volume.
volume_size This property is required. int
Size of the volume.
volume_type This property is required. str
Type of the volume.
deleteOnTermination This property is required. Boolean
Whether the EBS Volume will be deleted on instance termination.
encrypted This property is required. Boolean
Whether the volume is Encrypted.
iops This property is required. Number
Provisioned IOPs of the volume.
throughput This property is required. Number
Throughput of the volume.
volumeSize This property is required. Number
Size of the volume.
volumeType This property is required. String
Type of the volume.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.