Show / Hide Table of Contents

Class LaunchTemplate

Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups.

Inheritance
System.Object
Resource
CustomResource
LaunchTemplate
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class LaunchTemplate : CustomResource

Constructors

View Source

LaunchTemplate(String, LaunchTemplateArgs, CustomResourceOptions)

Create a LaunchTemplate resource with the given unique name, arguments, and options.

Declaration
public LaunchTemplate(string name, LaunchTemplateArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

LaunchTemplateArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The Amazon Resource Name (ARN) of the instance profile.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

BlockDeviceMappings

Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.

Declaration
public Output<ImmutableArray<LaunchTemplateBlockDeviceMapping>> BlockDeviceMappings { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LaunchTemplateBlockDeviceMapping>>
View Source

CapacityReservationSpecification

Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.

Declaration
public Output<LaunchTemplateCapacityReservationSpecification> CapacityReservationSpecification { get; }
Property Value
Type Description
Output<LaunchTemplateCapacityReservationSpecification>
View Source

CpuOptions

The CPU options for the instance. See CPU Options below for more details.

Declaration
public Output<LaunchTemplateCpuOptions> CpuOptions { get; }
Property Value
Type Description
Output<LaunchTemplateCpuOptions>
View Source

CreditSpecification

Customize the credit specification of the instance. See Credit Specification below for more details.

Declaration
public Output<LaunchTemplateCreditSpecification> CreditSpecification { get; }
Property Value
Type Description
Output<LaunchTemplateCreditSpecification>
View Source

DefaultVersion

The default version of the launch template.

Declaration
public Output<int> DefaultVersion { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Description

Description of the launch template.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DisableApiTermination

If true, enables EC2 Instance Termination Protection

Declaration
public Output<bool?> DisableApiTermination { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

EbsOptimized

If true, the launched EC2 instance will be EBS-optimized.

Declaration
public Output<string> EbsOptimized { get; }
Property Value
Type Description
Output<System.String>
View Source

ElasticGpuSpecifications

The elastic GPU to attach to the instance. See Elastic GPU below for more details.

Declaration
public Output<ImmutableArray<LaunchTemplateElasticGpuSpecification>> ElasticGpuSpecifications { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LaunchTemplateElasticGpuSpecification>>
View Source

ElasticInferenceAccelerator

Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.

Declaration
public Output<LaunchTemplateElasticInferenceAccelerator> ElasticInferenceAccelerator { get; }
Property Value
Type Description
Output<LaunchTemplateElasticInferenceAccelerator>
View Source

HibernationOptions

The hibernation options for the instance. See Hibernation Options below for more details.

Declaration
public Output<LaunchTemplateHibernationOptions> HibernationOptions { get; }
Property Value
Type Description
Output<LaunchTemplateHibernationOptions>
View Source

IamInstanceProfile

The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.

Declaration
public Output<LaunchTemplateIamInstanceProfile> IamInstanceProfile { get; }
Property Value
Type Description
Output<LaunchTemplateIamInstanceProfile>
View Source

ImageId

The AMI from which to launch the instance.

Declaration
public Output<string> ImageId { get; }
Property Value
Type Description
Output<System.String>
View Source

InstanceInitiatedShutdownBehavior

Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).

Declaration
public Output<string> InstanceInitiatedShutdownBehavior { get; }
Property Value
Type Description
Output<System.String>
View Source

InstanceMarketOptions

The market (purchasing) option for the instance. See Market Options below for details.

Declaration
public Output<LaunchTemplateInstanceMarketOptions> InstanceMarketOptions { get; }
Property Value
Type Description
Output<LaunchTemplateInstanceMarketOptions>
View Source

InstanceType

The type of the instance.

Declaration
public Output<string> InstanceType { get; }
Property Value
Type Description
Output<System.String>
View Source

KernelId

The kernel ID.

Declaration
public Output<string> KernelId { get; }
Property Value
Type Description
Output<System.String>
View Source

KeyName

The key name to use for the instance.

Declaration
public Output<string> KeyName { get; }
Property Value
Type Description
Output<System.String>
View Source

LatestVersion

The latest version of the launch template.

Declaration
public Output<int> LatestVersion { get; }
Property Value
Type Description
Output<System.Int32>
View Source

LicenseSpecifications

A list of license specifications to associate with. See License Specification below for more details.

Declaration
public Output<ImmutableArray<LaunchTemplateLicenseSpecification>> LicenseSpecifications { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LaunchTemplateLicenseSpecification>>
View Source

MetadataOptions

Customize the metadata options for the instance. See Metadata Options below for more details.

Declaration
public Output<LaunchTemplateMetadataOptions> MetadataOptions { get; }
Property Value
Type Description
Output<LaunchTemplateMetadataOptions>
View Source

Monitoring

The monitoring option for the instance. See Monitoring below for more details.

Declaration
public Output<LaunchTemplateMonitoring> Monitoring { get; }
Property Value
Type Description
Output<LaunchTemplateMonitoring>
View Source

Name

The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NamePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name.

Declaration
public Output<string> NamePrefix { get; }
Property Value
Type Description
Output<System.String>
View Source

NetworkInterfaces

Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.

Declaration
public Output<ImmutableArray<LaunchTemplateNetworkInterface>> NetworkInterfaces { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LaunchTemplateNetworkInterface>>
View Source

Placement

The placement of the instance. See Placement below for more details.

Declaration
public Output<LaunchTemplatePlacement> Placement { get; }
Property Value
Type Description
Output<LaunchTemplatePlacement>
View Source

RamDiskId

The ID of the RAM disk.

Declaration
public Output<string> RamDiskId { get; }
Property Value
Type Description
Output<System.String>
View Source

SecurityGroupNames

A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.

Declaration
public Output<ImmutableArray<string>> SecurityGroupNames { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Tags

A map of tags to assign to the launch template.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TagSpecifications

The tags to apply to the resources during launch. See Tag Specifications below for more details.

Declaration
public Output<ImmutableArray<LaunchTemplateTagSpecification>> TagSpecifications { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<LaunchTemplateTagSpecification>>
View Source

UserData

The Base64-encoded user data to provide when launching the instance.

Declaration
public Output<string> UserData { get; }
Property Value
Type Description
Output<System.String>
View Source

VpcSecurityGroupIds

A list of security group IDs to associate with.

Declaration
public Output<ImmutableArray<string>> VpcSecurityGroupIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, LaunchTemplateState, CustomResourceOptions)

Get an existing LaunchTemplate resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static LaunchTemplate Get(string name, Input<string> id, LaunchTemplateState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

LaunchTemplateState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
LaunchTemplate
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.