LaunchTemplateArgs

data class LaunchTemplateArgs(val autoReleaseTime: Output<String>? = null, val dataDisks: Output<List<LaunchTemplateDataDiskArgs>>? = null, val deploymentSetId: Output<String>? = null, val description: Output<String>? = null, val enableVmOsConfig: Output<Boolean>? = null, val hostName: Output<String>? = null, val imageId: Output<String>? = null, val imageOwnerAlias: Output<String>? = null, val instanceChargeType: Output<String>? = null, val instanceName: Output<String>? = null, val instanceType: Output<String>? = null, val internetChargeType: Output<String>? = null, val internetMaxBandwidthIn: Output<Int>? = null, val internetMaxBandwidthOut: Output<Int>? = null, val ioOptimized: Output<String>? = null, val keyPairName: Output<String>? = null, val launchTemplateName: Output<String>? = null, val name: Output<String>? = null, val networkInterfaces: Output<LaunchTemplateNetworkInterfacesArgs>? = null, val networkType: Output<String>? = null, val passwordInherit: Output<Boolean>? = null, val period: Output<Int>? = null, val privateIpAddress: Output<String>? = null, val ramRoleName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val securityEnhancementStrategy: Output<String>? = null, val securityGroupId: Output<String>? = null, val securityGroupIds: Output<List<String>>? = null, val spotDuration: Output<String>? = null, val spotPriceLimit: Output<Double>? = null, val spotStrategy: Output<String>? = null, val systemDisk: Output<LaunchTemplateSystemDiskArgs>? = null, val systemDiskCategory: Output<String>? = null, val systemDiskDescription: Output<String>? = null, val systemDiskName: Output<String>? = null, val systemDiskSize: Output<Int>? = null, val tags: Output<Map<String, Any>>? = null, val templateResourceGroupId: Output<String>? = null, val templateTags: Output<Map<String, Any>>? = null, val userData: Output<String>? = null, val userdata: Output<String>? = null, val versionDescription: Output<String>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<LaunchTemplateArgs>

Provides an ECS Launch Template resource. For information about Launch Template and how to use it, see Launch Template.

DEPRECATED: This resource has been deprecated from version 1.120.0. Please use new resource alicloud_ecs_launch_template.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
import com.pulumi.alicloud.ecs.LaunchTemplate;
import com.pulumi.alicloud.ecs.LaunchTemplateArgs;
import com.pulumi.alicloud.ecs.inputs.LaunchTemplateNetworkInterfacesArgs;
import com.pulumi.alicloud.ecs.inputs.LaunchTemplateDataDiskArgs;
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 images = EcsFunctions.getImages(GetImagesArgs.builder()
.owners("system")
.build());
final var instances = EcsFunctions.getInstances();
var template = new LaunchTemplate("template", LaunchTemplateArgs.builder()
.description("test1")
.imageId(images.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.hostName("tf-test-host")
.instanceChargeType("PrePaid")
.instanceName("tf-instance-name")
.instanceType(instances.applyValue(getInstancesResult -> getInstancesResult.instances()[0].instanceType()))
.internetChargeType("PayByBandwidth")
.internetMaxBandwidthIn(5)
.internetMaxBandwidthOut(0)
.ioOptimized("none")
.keyPairName("test-key-pair")
.ramRoleName("xxxxx")
.networkType("vpc")
.securityEnhancementStrategy("Active")
.spotPriceLimit(5)
.spotStrategy("SpotWithPriceLimit")
.securityGroupId("sg-zxcvj0lasdf102350asdf9a")
.systemDiskCategory("cloud_ssd")
.systemDiskDescription("test disk")
.systemDiskName("hello")
.systemDiskSize(40)
.resourceGroupId("rg-zkdfjahg9zxncv0")
.userdata("xxxxxxxxxxxxxx")
.vswitchId("sw-ljkngaksdjfj0nnasdf")
.vpcId("vpc-asdfnbg0as8dfk1nb2")
.zoneId("beijing-a")
.tags(Map.ofEntries(
Map.entry("tag1", "hello"),
Map.entry("tag2", "world")
))
.networkInterfaces(LaunchTemplateNetworkInterfacesArgs.builder()
.name("eth0")
.description("hello1")
.primaryIp("10.0.0.2")
.securityGroupId("xxxx")
.vswitchId("xxxxxxx")
.build())
.dataDisks(
LaunchTemplateDataDiskArgs.builder()
.name("disk1")
.description("test1")
.build(),
LaunchTemplateDataDiskArgs.builder()
.name("disk2")
.description("test2")
.build())
.build());
}
}

Import

Launch Template can be imported using the id, e.g.

$ pulumi import alicloud:ecs/launchTemplate:LaunchTemplate lt lt-abc1234567890000

Constructors

Link copied to clipboard
fun LaunchTemplateArgs(autoReleaseTime: Output<String>? = null, dataDisks: Output<List<LaunchTemplateDataDiskArgs>>? = null, deploymentSetId: Output<String>? = null, description: Output<String>? = null, enableVmOsConfig: Output<Boolean>? = null, hostName: Output<String>? = null, imageId: Output<String>? = null, imageOwnerAlias: Output<String>? = null, instanceChargeType: Output<String>? = null, instanceName: Output<String>? = null, instanceType: Output<String>? = null, internetChargeType: Output<String>? = null, internetMaxBandwidthIn: Output<Int>? = null, internetMaxBandwidthOut: Output<Int>? = null, ioOptimized: Output<String>? = null, keyPairName: Output<String>? = null, launchTemplateName: Output<String>? = null, name: Output<String>? = null, networkInterfaces: Output<LaunchTemplateNetworkInterfacesArgs>? = null, networkType: Output<String>? = null, passwordInherit: Output<Boolean>? = null, period: Output<Int>? = null, privateIpAddress: Output<String>? = null, ramRoleName: Output<String>? = null, resourceGroupId: Output<String>? = null, securityEnhancementStrategy: Output<String>? = null, securityGroupId: Output<String>? = null, securityGroupIds: Output<List<String>>? = null, spotDuration: Output<String>? = null, spotPriceLimit: Output<Double>? = null, spotStrategy: Output<String>? = null, systemDisk: Output<LaunchTemplateSystemDiskArgs>? = null, systemDiskCategory: Output<String>? = null, systemDiskDescription: Output<String>? = null, systemDiskName: Output<String>? = null, systemDiskSize: Output<Int>? = null, tags: Output<Map<String, Any>>? = null, templateResourceGroupId: Output<String>? = null, templateTags: Output<Map<String, Any>>? = null, userData: Output<String>? = null, userdata: Output<String>? = null, versionDescription: Output<String>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): LaunchTemplateArgs

Properties

Link copied to clipboard
val autoReleaseTime: Output<String>? = null

Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.

Link copied to clipboard

The list of data disks created with instance.

Link copied to clipboard
val deploymentSetId: Output<String>? = null
Link copied to clipboard
val description: Output<String>? = null

The description of the data disk.

Link copied to clipboard
val enableVmOsConfig: Output<Boolean>? = null
Link copied to clipboard
val hostName: Output<String>? = null

Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be 2, 15 characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be 2, 64 characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).

Link copied to clipboard
val imageId: Output<String>? = null

Image ID.

Link copied to clipboard
val imageOwnerAlias: Output<String>? = null
Link copied to clipboard
val instanceChargeType: Output<String>? = null

Billing methods. Optional values:

Link copied to clipboard
val instanceName: Output<String>? = null

The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).

Link copied to clipboard
val instanceType: Output<String>? = null

Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.

Link copied to clipboard
val internetChargeType: Output<String>? = null

Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.

Link copied to clipboard
val internetMaxBandwidthIn: Output<Int>? = null

The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: 1, 200.

Link copied to clipboard
val internetMaxBandwidthOut: Output<Int>? = null

Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: 0, 100.

Link copied to clipboard
val ioOptimized: Output<String>? = null

Whether it is an I/O-optimized instance or not. Optional values:

Link copied to clipboard
val keyPairName: Output<String>? = null

The name of the key pair.

Link copied to clipboard
val launchTemplateName: Output<String>? = null
Link copied to clipboard
val name: Output<String>? = null

The name of the data disk.

Link copied to clipboard

The list of network interfaces created with instance.

Link copied to clipboard
val networkType: Output<String>? = null

Network type of the instance. Value options: classic | vpc.

Link copied to clipboard
val passwordInherit: Output<Boolean>? = null
Link copied to clipboard
val period: Output<Int>? = null
Link copied to clipboard
val privateIpAddress: Output<String>? = null
Link copied to clipboard
val ramRoleName: Output<String>? = null

The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.

Link copied to clipboard
val resourceGroupId: Output<String>? = null
Link copied to clipboard
val securityEnhancementStrategy: Output<String>? = null

Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.

Link copied to clipboard
val securityGroupId: Output<String>? = null

The security group ID must be one in the same VPC.

Link copied to clipboard
val securityGroupIds: Output<List<String>>? = null
Link copied to clipboard
val spotDuration: Output<String>? = null
Link copied to clipboard
val spotPriceLimit: Output<Double>? = null

Sets the maximum hourly instance price. Supports up to three decimal places.

Link copied to clipboard
val spotStrategy: Output<String>? = null

The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:

Link copied to clipboard
Link copied to clipboard
val systemDiskCategory: Output<String>? = null

The category of the system disk. System disk type. Optional values:

Link copied to clipboard
val systemDiskDescription: Output<String>? = null

System disk description. It cannot begin with http:// or https://.

Link copied to clipboard
val systemDiskName: Output<String>? = null

System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).

Link copied to clipboard
val systemDiskSize: Output<Int>? = null

Size of the system disk, measured in GB. Value range: 20, 500.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val templateResourceGroupId: Output<String>? = null
Link copied to clipboard
val templateTags: Output<Map<String, Any>>? = null
Link copied to clipboard
val userData: Output<String>? = null
Link copied to clipboard
val userdata: Output<String>? = null

User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Link copied to clipboard
val versionDescription: Output<String>? = null
Link copied to clipboard
val vpcId: Output<String>? = null
Link copied to clipboard
val vswitchId: Output<String>? = null

The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.

Link copied to clipboard
val zoneId: Output<String>? = null

The zone ID of the instance.