Package com.pulumi.aws.ec2
Class LaunchTemplate
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.LaunchTemplate
-
public class LaunchTemplate extends com.pulumi.resources.CustomResourceProvides an EC2 launch template resource. Can be used to create instances or Auto Scaling groups. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import Launch Templates using the `id`. For example: ```sh $ pulumi import aws:ec2/launchTemplate:LaunchTemplate web lt-12345678 ```
-
-
Constructor Summary
Constructors Constructor Description LaunchTemplate(java.lang.String name)LaunchTemplate(java.lang.String name, LaunchTemplateArgs args)LaunchTemplate(java.lang.String name, LaunchTemplateArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateBlockDeviceMapping>>>blockDeviceMappings()com.pulumi.core.Output<java.util.Optional<LaunchTemplateCapacityReservationSpecification>>capacityReservationSpecification()com.pulumi.core.Output<java.util.Optional<LaunchTemplateCpuOptions>>cpuOptions()com.pulumi.core.Output<java.util.Optional<LaunchTemplateCreditSpecification>>creditSpecification()com.pulumi.core.Output<java.lang.Integer>defaultVersion()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>disableApiStop()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>disableApiTermination()com.pulumi.core.Output<java.util.Optional<java.lang.String>>ebsOptimized()com.pulumi.core.Output<java.util.Optional<LaunchTemplateEnclaveOptions>>enclaveOptions()static LaunchTemplateget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, LaunchTemplateState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<LaunchTemplateHibernationOptions>>hibernationOptions()com.pulumi.core.Output<java.util.Optional<LaunchTemplateIamInstanceProfile>>iamInstanceProfile()com.pulumi.core.Output<java.util.Optional<java.lang.String>>imageId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>instanceInitiatedShutdownBehavior()com.pulumi.core.Output<java.util.Optional<LaunchTemplateInstanceMarketOptions>>instanceMarketOptions()com.pulumi.core.Output<java.util.Optional<LaunchTemplateInstanceRequirements>>instanceRequirements()com.pulumi.core.Output<java.util.Optional<java.lang.String>>instanceType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>kernelId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>keyName()com.pulumi.core.Output<java.lang.Integer>latestVersion()com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateLicenseSpecification>>>licenseSpecifications()com.pulumi.core.Output<java.util.Optional<LaunchTemplateMaintenanceOptions>>maintenanceOptions()com.pulumi.core.Output<LaunchTemplateMetadataOptions>metadataOptions()com.pulumi.core.Output<java.util.Optional<LaunchTemplateMonitoring>>monitoring()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>namePrefix()com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateNetworkInterface>>>networkInterfaces()com.pulumi.core.Output<java.util.Optional<LaunchTemplateNetworkPerformanceOptions>>networkPerformanceOptions()com.pulumi.core.Output<java.util.Optional<LaunchTemplatePlacement>>placement()com.pulumi.core.Output<java.util.Optional<LaunchTemplatePrivateDnsNameOptions>>privateDnsNameOptions()com.pulumi.core.Output<java.util.Optional<java.lang.String>>ramDiskId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateSecondaryInterface>>>secondaryInterfaces()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>securityGroupNames()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateTagSpecification>>>tagSpecifications()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>updateDefaultVersion()com.pulumi.core.Output<java.util.Optional<java.lang.String>>userData()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>vpcSecurityGroupIds()
-
-
-
Constructor Detail
-
LaunchTemplate
public LaunchTemplate(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
LaunchTemplate
public LaunchTemplate(java.lang.String name, @Nullable LaunchTemplateArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
LaunchTemplate
public LaunchTemplate(java.lang.String name, @Nullable LaunchTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the launch template.
-
blockDeviceMappings
public com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateBlockDeviceMapping>>> blockDeviceMappings()
- Returns:
- Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
-
capacityReservationSpecification
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateCapacityReservationSpecification>> capacityReservationSpecification()
- Returns:
- Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
-
cpuOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateCpuOptions>> cpuOptions()
- Returns:
- The CPU options for the instance. See CPU Options below for more details.
-
creditSpecification
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateCreditSpecification>> creditSpecification()
- Returns:
- Customize the credit specification of the instance. See Credit Specification below for more details.
-
defaultVersion
public com.pulumi.core.Output<java.lang.Integer> defaultVersion()
- Returns:
- Default Version of the launch template.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Description of the launch template version (`VersionDescription` in the [EC2 API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplateVersion.html)). Launch templates in AWS do not have a template-level description; whenever a change to this resource creates a new version, the new version is created with this description. To give each version a distinct description, update this argument in the same apply as the other changes.
-
disableApiStop
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> disableApiStop()
- Returns:
- If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html).
-
disableApiTermination
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> disableApiTermination()
- Returns:
- If `true`, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingDisableAPITermination.html)
-
ebsOptimized
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ebsOptimized()
- Returns:
- If `true`, the launched EC2 instance will be EBS-optimized.
-
enclaveOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateEnclaveOptions>> enclaveOptions()
- Returns:
- Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
-
hibernationOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateHibernationOptions>> hibernationOptions()
- Returns:
- The hibernation options for the instance. See Hibernation Options below for more details.
-
iamInstanceProfile
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateIamInstanceProfile>> iamInstanceProfile()
- Returns:
- The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
-
imageId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageId()
- Returns:
- The AMI from which to launch the instance or use a Systems Manager parameter convention e.g. `resolve:ssm:parameter-name`. See [docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id) for more details.
-
instanceInitiatedShutdownBehavior
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceInitiatedShutdownBehavior()
- Returns:
- Shutdown behavior for the instance. Can be `stop` or `terminate`. (Default: `stop`).
-
instanceMarketOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateInstanceMarketOptions>> instanceMarketOptions()
- Returns:
- The market (purchasing) option for the instance. See Market Options below for details.
-
instanceRequirements
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateInstanceRequirements>> instanceRequirements()
- Returns:
- The attribute requirements for the type of instance. If present then `instanceType` cannot be present.
-
instanceType
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceType()
- Returns:
- The type of the instance. If present then `instanceRequirements` cannot be present.
-
kernelId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kernelId()
- Returns:
- The kernel ID.
-
keyName
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> keyName()
- Returns:
- The key name to use for the instance.
-
latestVersion
public com.pulumi.core.Output<java.lang.Integer> latestVersion()
- Returns:
- The latest version of the launch template.
-
licenseSpecifications
public com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateLicenseSpecification>>> licenseSpecifications()
- Returns:
- A list of license specifications to associate with. See License Specification below for more details.
-
maintenanceOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateMaintenanceOptions>> maintenanceOptions()
- Returns:
- The maintenance options for the instance. See Maintenance Options below for more details.
-
metadataOptions
public com.pulumi.core.Output<LaunchTemplateMetadataOptions> metadataOptions()
- Returns:
- Customize the metadata options for the instance. See Metadata Options below for more details.
-
monitoring
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateMonitoring>> monitoring()
- Returns:
- The monitoring option for the instance. See Monitoring below for more details.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the launch template. If you leave this blank, the provider will auto-generate a unique name.
-
namePrefix
public com.pulumi.core.Output<java.lang.String> namePrefix()
- Returns:
- Creates a unique name beginning with the specified prefix. Conflicts with `name`.
-
networkInterfaces
public com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateNetworkInterface>>> networkInterfaces()
- Returns:
- Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
-
networkPerformanceOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplateNetworkPerformanceOptions>> networkPerformanceOptions()
-
placement
public com.pulumi.core.Output<java.util.Optional<LaunchTemplatePlacement>> placement()
- Returns:
- The placement of the instance. See Placement below for more details.
-
privateDnsNameOptions
public com.pulumi.core.Output<java.util.Optional<LaunchTemplatePrivateDnsNameOptions>> privateDnsNameOptions()
- Returns:
- The options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
-
ramDiskId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ramDiskId()
- Returns:
- The ID of the RAM disk.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
secondaryInterfaces
public com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateSecondaryInterface>>> secondaryInterfaces()
- Returns:
- Secondary interfaces to associate with instances launched from the template. See Secondary Interfaces below for more details.
-
securityGroupNames
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> securityGroupNames()
- Returns:
- A list of security group names to associate with. If you are creating Instances in a VPC, use `vpcSecurityGroupIds` instead.
-
tagSpecifications
public com.pulumi.core.Output<java.util.Optional<java.util.List<LaunchTemplateTagSpecification>>> tagSpecifications()
- Returns:
- The tags to apply to the resources during launch. See Tag Specifications below for more details. Default tags are currently not propagated to ASG created resources so you may wish to inject your default tags into this variable against the relevant child resource types created.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the launch template. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
updateDefaultVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> updateDefaultVersion()
- Returns:
- Whether to update Default Version each update. Conflicts with `defaultVersion`.
-
userData
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> userData()
- Returns:
- The base64-encoded user data to provide when launching the instance.
-
vpcSecurityGroupIds
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> vpcSecurityGroupIds()
- Returns:
- A list of security group IDs to associate with. Conflicts with `network_interfaces.security_groups`
-
get
public static LaunchTemplate get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable LaunchTemplateState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-