1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. LaunchTemplate
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ecs.LaunchTemplate

Explore with Pulumi AI

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

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

const images = alicloud.ecs.getImages({
    owners: "system",
});
const instances = alicloud.ecs.getInstances({});
const template = new alicloud.ecs.LaunchTemplate("template", {
    name: "tf-test-template",
    description: "test1",
    imageId: images.then(images => images.images?.[0]?.id),
    hostName: "tf-test-host",
    instanceChargeType: "PrePaid",
    instanceName: "tf-instance-name",
    instanceType: instances.then(instances => instances.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: {
        tag1: "hello",
        tag2: "world",
    },
    networkInterfaces: {
        name: "eth0",
        description: "hello1",
        primaryIp: "10.0.0.2",
        securityGroupId: "xxxx",
        vswitchId: "xxxxxxx",
    },
    dataDisks: [
        {
            name: "disk1",
            description: "test1",
        },
        {
            name: "disk2",
            description: "test2",
        },
    ],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

images = alicloud.ecs.get_images(owners="system")
instances = alicloud.ecs.get_instances()
template = alicloud.ecs.LaunchTemplate("template",
    name="tf-test-template",
    description="test1",
    image_id=images.images[0].id,
    host_name="tf-test-host",
    instance_charge_type="PrePaid",
    instance_name="tf-instance-name",
    instance_type=instances.instances[0].instance_type,
    internet_charge_type="PayByBandwidth",
    internet_max_bandwidth_in=5,
    internet_max_bandwidth_out=0,
    io_optimized="none",
    key_pair_name="test-key-pair",
    ram_role_name="xxxxx",
    network_type="vpc",
    security_enhancement_strategy="Active",
    spot_price_limit=5,
    spot_strategy="SpotWithPriceLimit",
    security_group_id="sg-zxcvj0lasdf102350asdf9a",
    system_disk_category="cloud_ssd",
    system_disk_description="test disk",
    system_disk_name="hello",
    system_disk_size=40,
    resource_group_id="rg-zkdfjahg9zxncv0",
    userdata="xxxxxxxxxxxxxx",
    vswitch_id="sw-ljkngaksdjfj0nnasdf",
    vpc_id="vpc-asdfnbg0as8dfk1nb2",
    zone_id="beijing-a",
    tags={
        "tag1": "hello",
        "tag2": "world",
    },
    network_interfaces={
        "name": "eth0",
        "description": "hello1",
        "primary_ip": "10.0.0.2",
        "security_group_id": "xxxx",
        "vswitch_id": "xxxxxxx",
    },
    data_disks=[
        {
            "name": "disk1",
            "description": "test1",
        },
        {
            "name": "disk2",
            "description": "test2",
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		images, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			Owners: pulumi.StringRef("system"),
		}, nil)
		if err != nil {
			return err
		}
		instances, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.NewLaunchTemplate(ctx, "template", &ecs.LaunchTemplateArgs{
			Name:                        pulumi.String("tf-test-template"),
			Description:                 pulumi.String("test1"),
			ImageId:                     pulumi.String(images.Images[0].Id),
			HostName:                    pulumi.String("tf-test-host"),
			InstanceChargeType:          pulumi.String("PrePaid"),
			InstanceName:                pulumi.String("tf-instance-name"),
			InstanceType:                pulumi.String(instances.Instances[0].InstanceType),
			InternetChargeType:          pulumi.String("PayByBandwidth"),
			InternetMaxBandwidthIn:      pulumi.Int(5),
			InternetMaxBandwidthOut:     pulumi.Int(0),
			IoOptimized:                 pulumi.String("none"),
			KeyPairName:                 pulumi.String("test-key-pair"),
			RamRoleName:                 pulumi.String("xxxxx"),
			NetworkType:                 pulumi.String("vpc"),
			SecurityEnhancementStrategy: pulumi.String("Active"),
			SpotPriceLimit:              pulumi.Float64(5),
			SpotStrategy:                pulumi.String("SpotWithPriceLimit"),
			SecurityGroupId:             pulumi.String("sg-zxcvj0lasdf102350asdf9a"),
			SystemDiskCategory:          pulumi.String("cloud_ssd"),
			SystemDiskDescription:       pulumi.String("test disk"),
			SystemDiskName:              pulumi.String("hello"),
			SystemDiskSize:              pulumi.Int(40),
			ResourceGroupId:             pulumi.String("rg-zkdfjahg9zxncv0"),
			Userdata:                    pulumi.String("xxxxxxxxxxxxxx"),
			VswitchId:                   pulumi.String("sw-ljkngaksdjfj0nnasdf"),
			VpcId:                       pulumi.String("vpc-asdfnbg0as8dfk1nb2"),
			ZoneId:                      pulumi.String("beijing-a"),
			Tags: pulumi.StringMap{
				"tag1": pulumi.String("hello"),
				"tag2": pulumi.String("world"),
			},
			NetworkInterfaces: &ecs.LaunchTemplateNetworkInterfacesArgs{
				Name:            pulumi.String("eth0"),
				Description:     pulumi.String("hello1"),
				PrimaryIp:       pulumi.String("10.0.0.2"),
				SecurityGroupId: pulumi.String("xxxx"),
				VswitchId:       pulumi.String("xxxxxxx"),
			},
			DataDisks: ecs.LaunchTemplateDataDiskArray{
				&ecs.LaunchTemplateDataDiskArgs{
					Name:        pulumi.String("disk1"),
					Description: pulumi.String("test1"),
				},
				&ecs.LaunchTemplateDataDiskArgs{
					Name:        pulumi.String("disk2"),
					Description: pulumi.String("test2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var images = AliCloud.Ecs.GetImages.Invoke(new()
    {
        Owners = "system",
    });

    var instances = AliCloud.Ecs.GetInstances.Invoke();

    var template = new AliCloud.Ecs.LaunchTemplate("template", new()
    {
        Name = "tf-test-template",
        Description = "test1",
        ImageId = images.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
        HostName = "tf-test-host",
        InstanceChargeType = "PrePaid",
        InstanceName = "tf-instance-name",
        InstanceType = instances.Apply(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 = 
        {
            { "tag1", "hello" },
            { "tag2", "world" },
        },
        NetworkInterfaces = new AliCloud.Ecs.Inputs.LaunchTemplateNetworkInterfacesArgs
        {
            Name = "eth0",
            Description = "hello1",
            PrimaryIp = "10.0.0.2",
            SecurityGroupId = "xxxx",
            VswitchId = "xxxxxxx",
        },
        DataDisks = new[]
        {
            new AliCloud.Ecs.Inputs.LaunchTemplateDataDiskArgs
            {
                Name = "disk1",
                Description = "test1",
            },
            new AliCloud.Ecs.Inputs.LaunchTemplateDataDiskArgs
            {
                Name = "disk2",
                Description = "test2",
            },
        },
    });

});
Copy
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()
            .name("tf-test-template")
            .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());

    }
}
Copy
resources:
  template:
    type: alicloud:ecs:LaunchTemplate
    properties:
      name: tf-test-template
      description: test1
      imageId: ${images.images[0].id}
      hostName: tf-test-host
      instanceChargeType: PrePaid
      instanceName: tf-instance-name
      instanceType: ${instances.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:
        tag1: hello
        tag2: world
      networkInterfaces:
        name: eth0
        description: hello1
        primaryIp: 10.0.0.2
        securityGroupId: xxxx
        vswitchId: xxxxxxx
      dataDisks:
        - name: disk1
          description: test1
        - name: disk2
          description: test2
variables:
  images:
    fn::invoke:
      function: alicloud:ecs:getImages
      arguments:
        owners: system
  instances:
    fn::invoke:
      function: alicloud:ecs:getInstances
      arguments: {}
Copy

Create LaunchTemplate Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LaunchTemplate(name: string, args?: LaunchTemplateArgs, opts?: CustomResourceOptions);
@overload
def LaunchTemplate(resource_name: str,
                   args: Optional[LaunchTemplateArgs] = None,
                   opts: Optional[ResourceOptions] = None)

@overload
def LaunchTemplate(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   auto_release_time: Optional[str] = None,
                   auto_renew: Optional[bool] = None,
                   auto_renew_period: Optional[int] = None,
                   data_disks: Optional[Sequence[LaunchTemplateDataDiskArgs]] = None,
                   default_version_number: Optional[int] = None,
                   deployment_set_id: Optional[str] = None,
                   description: Optional[str] = None,
                   enable_vm_os_config: Optional[bool] = None,
                   host_name: Optional[str] = None,
                   http_endpoint: Optional[str] = None,
                   http_put_response_hop_limit: Optional[int] = None,
                   http_tokens: Optional[str] = None,
                   image_id: Optional[str] = None,
                   image_owner_alias: Optional[str] = None,
                   instance_charge_type: Optional[str] = None,
                   instance_name: Optional[str] = None,
                   instance_type: Optional[str] = None,
                   internet_charge_type: Optional[str] = None,
                   internet_max_bandwidth_in: Optional[int] = None,
                   internet_max_bandwidth_out: Optional[int] = None,
                   io_optimized: Optional[str] = None,
                   key_pair_name: Optional[str] = None,
                   launch_template_name: Optional[str] = None,
                   name: Optional[str] = None,
                   network_interfaces: Optional[LaunchTemplateNetworkInterfacesArgs] = None,
                   network_type: Optional[str] = None,
                   password_inherit: Optional[bool] = None,
                   period: Optional[int] = None,
                   period_unit: Optional[str] = None,
                   private_ip_address: Optional[str] = None,
                   ram_role_name: Optional[str] = None,
                   resource_group_id: Optional[str] = None,
                   security_enhancement_strategy: Optional[str] = None,
                   security_group_id: Optional[str] = None,
                   security_group_ids: Optional[Sequence[str]] = None,
                   spot_duration: Optional[str] = None,
                   spot_price_limit: Optional[float] = None,
                   spot_strategy: Optional[str] = None,
                   system_disk: Optional[LaunchTemplateSystemDiskArgs] = None,
                   system_disk_category: Optional[str] = None,
                   system_disk_description: Optional[str] = None,
                   system_disk_name: Optional[str] = None,
                   system_disk_size: Optional[int] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   template_resource_group_id: Optional[str] = None,
                   template_tags: Optional[Mapping[str, str]] = None,
                   update_default_version_number: Optional[bool] = None,
                   user_data: Optional[str] = None,
                   userdata: Optional[str] = None,
                   version_description: Optional[str] = None,
                   vpc_id: Optional[str] = None,
                   vswitch_id: Optional[str] = None,
                   zone_id: Optional[str] = None)
func NewLaunchTemplate(ctx *Context, name string, args *LaunchTemplateArgs, opts ...ResourceOption) (*LaunchTemplate, error)
public LaunchTemplate(string name, LaunchTemplateArgs? args = null, CustomResourceOptions? opts = null)
public LaunchTemplate(String name, LaunchTemplateArgs args)
public LaunchTemplate(String name, LaunchTemplateArgs args, CustomResourceOptions options)
type: alicloud:ecs:LaunchTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args LaunchTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args LaunchTemplateArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args LaunchTemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args LaunchTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LaunchTemplateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var launchTemplateResource = new AliCloud.Ecs.LaunchTemplate("launchTemplateResource", new()
{
    AutoReleaseTime = "string",
    AutoRenew = false,
    AutoRenewPeriod = 0,
    DataDisks = new[]
    {
        new AliCloud.Ecs.Inputs.LaunchTemplateDataDiskArgs
        {
            Category = "string",
            DeleteWithInstance = false,
            Description = "string",
            Device = "string",
            Encrypted = false,
            Name = "string",
            PerformanceLevel = "string",
            Size = 0,
            SnapshotId = "string",
        },
    },
    DefaultVersionNumber = 0,
    DeploymentSetId = "string",
    Description = "string",
    EnableVmOsConfig = false,
    HostName = "string",
    HttpEndpoint = "string",
    HttpPutResponseHopLimit = 0,
    HttpTokens = "string",
    ImageId = "string",
    ImageOwnerAlias = "string",
    InstanceChargeType = "string",
    InstanceName = "string",
    InstanceType = "string",
    InternetChargeType = "string",
    InternetMaxBandwidthIn = 0,
    InternetMaxBandwidthOut = 0,
    IoOptimized = "string",
    KeyPairName = "string",
    LaunchTemplateName = "string",
    NetworkInterfaces = new AliCloud.Ecs.Inputs.LaunchTemplateNetworkInterfacesArgs
    {
        DeleteOnRelease = false,
        Description = "string",
        Name = "string",
        PrimaryIp = "string",
        SecurityGroupId = "string",
        VswitchId = "string",
    },
    NetworkType = "string",
    PasswordInherit = false,
    Period = 0,
    PeriodUnit = "string",
    PrivateIpAddress = "string",
    RamRoleName = "string",
    ResourceGroupId = "string",
    SecurityEnhancementStrategy = "string",
    SecurityGroupId = "string",
    SecurityGroupIds = new[]
    {
        "string",
    },
    SpotDuration = "string",
    SpotPriceLimit = 0,
    SpotStrategy = "string",
    SystemDisk = new AliCloud.Ecs.Inputs.LaunchTemplateSystemDiskArgs
    {
        Category = "string",
        DeleteWithInstance = false,
        Description = "string",
        Encrypted = false,
        Iops = "string",
        Name = "string",
        PerformanceLevel = "string",
        Size = 0,
    },
    Tags = 
    {
        { "string", "string" },
    },
    TemplateResourceGroupId = "string",
    TemplateTags = 
    {
        { "string", "string" },
    },
    UpdateDefaultVersionNumber = false,
    UserData = "string",
    VersionDescription = "string",
    VpcId = "string",
    VswitchId = "string",
    ZoneId = "string",
});
Copy
example, err := ecs.NewLaunchTemplate(ctx, "launchTemplateResource", &ecs.LaunchTemplateArgs{
	AutoReleaseTime: pulumi.String("string"),
	AutoRenew:       pulumi.Bool(false),
	AutoRenewPeriod: pulumi.Int(0),
	DataDisks: ecs.LaunchTemplateDataDiskArray{
		&ecs.LaunchTemplateDataDiskArgs{
			Category:           pulumi.String("string"),
			DeleteWithInstance: pulumi.Bool(false),
			Description:        pulumi.String("string"),
			Device:             pulumi.String("string"),
			Encrypted:          pulumi.Bool(false),
			Name:               pulumi.String("string"),
			PerformanceLevel:   pulumi.String("string"),
			Size:               pulumi.Int(0),
			SnapshotId:         pulumi.String("string"),
		},
	},
	DefaultVersionNumber:    pulumi.Int(0),
	DeploymentSetId:         pulumi.String("string"),
	Description:             pulumi.String("string"),
	EnableVmOsConfig:        pulumi.Bool(false),
	HostName:                pulumi.String("string"),
	HttpEndpoint:            pulumi.String("string"),
	HttpPutResponseHopLimit: pulumi.Int(0),
	HttpTokens:              pulumi.String("string"),
	ImageId:                 pulumi.String("string"),
	ImageOwnerAlias:         pulumi.String("string"),
	InstanceChargeType:      pulumi.String("string"),
	InstanceName:            pulumi.String("string"),
	InstanceType:            pulumi.String("string"),
	InternetChargeType:      pulumi.String("string"),
	InternetMaxBandwidthIn:  pulumi.Int(0),
	InternetMaxBandwidthOut: pulumi.Int(0),
	IoOptimized:             pulumi.String("string"),
	KeyPairName:             pulumi.String("string"),
	LaunchTemplateName:      pulumi.String("string"),
	NetworkInterfaces: &ecs.LaunchTemplateNetworkInterfacesArgs{
		DeleteOnRelease: pulumi.Bool(false),
		Description:     pulumi.String("string"),
		Name:            pulumi.String("string"),
		PrimaryIp:       pulumi.String("string"),
		SecurityGroupId: pulumi.String("string"),
		VswitchId:       pulumi.String("string"),
	},
	NetworkType:                 pulumi.String("string"),
	PasswordInherit:             pulumi.Bool(false),
	Period:                      pulumi.Int(0),
	PeriodUnit:                  pulumi.String("string"),
	PrivateIpAddress:            pulumi.String("string"),
	RamRoleName:                 pulumi.String("string"),
	ResourceGroupId:             pulumi.String("string"),
	SecurityEnhancementStrategy: pulumi.String("string"),
	SecurityGroupId:             pulumi.String("string"),
	SecurityGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	SpotDuration:   pulumi.String("string"),
	SpotPriceLimit: pulumi.Float64(0),
	SpotStrategy:   pulumi.String("string"),
	SystemDisk: &ecs.LaunchTemplateSystemDiskArgs{
		Category:           pulumi.String("string"),
		DeleteWithInstance: pulumi.Bool(false),
		Description:        pulumi.String("string"),
		Encrypted:          pulumi.Bool(false),
		Iops:               pulumi.String("string"),
		Name:               pulumi.String("string"),
		PerformanceLevel:   pulumi.String("string"),
		Size:               pulumi.Int(0),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TemplateResourceGroupId: pulumi.String("string"),
	TemplateTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	UpdateDefaultVersionNumber: pulumi.Bool(false),
	UserData:                   pulumi.String("string"),
	VersionDescription:         pulumi.String("string"),
	VpcId:                      pulumi.String("string"),
	VswitchId:                  pulumi.String("string"),
	ZoneId:                     pulumi.String("string"),
})
Copy
var launchTemplateResource = new LaunchTemplate("launchTemplateResource", LaunchTemplateArgs.builder()
    .autoReleaseTime("string")
    .autoRenew(false)
    .autoRenewPeriod(0)
    .dataDisks(LaunchTemplateDataDiskArgs.builder()
        .category("string")
        .deleteWithInstance(false)
        .description("string")
        .device("string")
        .encrypted(false)
        .name("string")
        .performanceLevel("string")
        .size(0)
        .snapshotId("string")
        .build())
    .defaultVersionNumber(0)
    .deploymentSetId("string")
    .description("string")
    .enableVmOsConfig(false)
    .hostName("string")
    .httpEndpoint("string")
    .httpPutResponseHopLimit(0)
    .httpTokens("string")
    .imageId("string")
    .imageOwnerAlias("string")
    .instanceChargeType("string")
    .instanceName("string")
    .instanceType("string")
    .internetChargeType("string")
    .internetMaxBandwidthIn(0)
    .internetMaxBandwidthOut(0)
    .ioOptimized("string")
    .keyPairName("string")
    .launchTemplateName("string")
    .networkInterfaces(LaunchTemplateNetworkInterfacesArgs.builder()
        .deleteOnRelease(false)
        .description("string")
        .name("string")
        .primaryIp("string")
        .securityGroupId("string")
        .vswitchId("string")
        .build())
    .networkType("string")
    .passwordInherit(false)
    .period(0)
    .periodUnit("string")
    .privateIpAddress("string")
    .ramRoleName("string")
    .resourceGroupId("string")
    .securityEnhancementStrategy("string")
    .securityGroupId("string")
    .securityGroupIds("string")
    .spotDuration("string")
    .spotPriceLimit(0)
    .spotStrategy("string")
    .systemDisk(LaunchTemplateSystemDiskArgs.builder()
        .category("string")
        .deleteWithInstance(false)
        .description("string")
        .encrypted(false)
        .iops("string")
        .name("string")
        .performanceLevel("string")
        .size(0)
        .build())
    .tags(Map.of("string", "string"))
    .templateResourceGroupId("string")
    .templateTags(Map.of("string", "string"))
    .updateDefaultVersionNumber(false)
    .userData("string")
    .versionDescription("string")
    .vpcId("string")
    .vswitchId("string")
    .zoneId("string")
    .build());
Copy
launch_template_resource = alicloud.ecs.LaunchTemplate("launchTemplateResource",
    auto_release_time="string",
    auto_renew=False,
    auto_renew_period=0,
    data_disks=[{
        "category": "string",
        "delete_with_instance": False,
        "description": "string",
        "device": "string",
        "encrypted": False,
        "name": "string",
        "performance_level": "string",
        "size": 0,
        "snapshot_id": "string",
    }],
    default_version_number=0,
    deployment_set_id="string",
    description="string",
    enable_vm_os_config=False,
    host_name="string",
    http_endpoint="string",
    http_put_response_hop_limit=0,
    http_tokens="string",
    image_id="string",
    image_owner_alias="string",
    instance_charge_type="string",
    instance_name="string",
    instance_type="string",
    internet_charge_type="string",
    internet_max_bandwidth_in=0,
    internet_max_bandwidth_out=0,
    io_optimized="string",
    key_pair_name="string",
    launch_template_name="string",
    network_interfaces={
        "delete_on_release": False,
        "description": "string",
        "name": "string",
        "primary_ip": "string",
        "security_group_id": "string",
        "vswitch_id": "string",
    },
    network_type="string",
    password_inherit=False,
    period=0,
    period_unit="string",
    private_ip_address="string",
    ram_role_name="string",
    resource_group_id="string",
    security_enhancement_strategy="string",
    security_group_id="string",
    security_group_ids=["string"],
    spot_duration="string",
    spot_price_limit=0,
    spot_strategy="string",
    system_disk={
        "category": "string",
        "delete_with_instance": False,
        "description": "string",
        "encrypted": False,
        "iops": "string",
        "name": "string",
        "performance_level": "string",
        "size": 0,
    },
    tags={
        "string": "string",
    },
    template_resource_group_id="string",
    template_tags={
        "string": "string",
    },
    update_default_version_number=False,
    user_data="string",
    version_description="string",
    vpc_id="string",
    vswitch_id="string",
    zone_id="string")
Copy
const launchTemplateResource = new alicloud.ecs.LaunchTemplate("launchTemplateResource", {
    autoReleaseTime: "string",
    autoRenew: false,
    autoRenewPeriod: 0,
    dataDisks: [{
        category: "string",
        deleteWithInstance: false,
        description: "string",
        device: "string",
        encrypted: false,
        name: "string",
        performanceLevel: "string",
        size: 0,
        snapshotId: "string",
    }],
    defaultVersionNumber: 0,
    deploymentSetId: "string",
    description: "string",
    enableVmOsConfig: false,
    hostName: "string",
    httpEndpoint: "string",
    httpPutResponseHopLimit: 0,
    httpTokens: "string",
    imageId: "string",
    imageOwnerAlias: "string",
    instanceChargeType: "string",
    instanceName: "string",
    instanceType: "string",
    internetChargeType: "string",
    internetMaxBandwidthIn: 0,
    internetMaxBandwidthOut: 0,
    ioOptimized: "string",
    keyPairName: "string",
    launchTemplateName: "string",
    networkInterfaces: {
        deleteOnRelease: false,
        description: "string",
        name: "string",
        primaryIp: "string",
        securityGroupId: "string",
        vswitchId: "string",
    },
    networkType: "string",
    passwordInherit: false,
    period: 0,
    periodUnit: "string",
    privateIpAddress: "string",
    ramRoleName: "string",
    resourceGroupId: "string",
    securityEnhancementStrategy: "string",
    securityGroupId: "string",
    securityGroupIds: ["string"],
    spotDuration: "string",
    spotPriceLimit: 0,
    spotStrategy: "string",
    systemDisk: {
        category: "string",
        deleteWithInstance: false,
        description: "string",
        encrypted: false,
        iops: "string",
        name: "string",
        performanceLevel: "string",
        size: 0,
    },
    tags: {
        string: "string",
    },
    templateResourceGroupId: "string",
    templateTags: {
        string: "string",
    },
    updateDefaultVersionNumber: false,
    userData: "string",
    versionDescription: "string",
    vpcId: "string",
    vswitchId: "string",
    zoneId: "string",
});
Copy
type: alicloud:ecs:LaunchTemplate
properties:
    autoReleaseTime: string
    autoRenew: false
    autoRenewPeriod: 0
    dataDisks:
        - category: string
          deleteWithInstance: false
          description: string
          device: string
          encrypted: false
          name: string
          performanceLevel: string
          size: 0
          snapshotId: string
    defaultVersionNumber: 0
    deploymentSetId: string
    description: string
    enableVmOsConfig: false
    hostName: string
    httpEndpoint: string
    httpPutResponseHopLimit: 0
    httpTokens: string
    imageId: string
    imageOwnerAlias: string
    instanceChargeType: string
    instanceName: string
    instanceType: string
    internetChargeType: string
    internetMaxBandwidthIn: 0
    internetMaxBandwidthOut: 0
    ioOptimized: string
    keyPairName: string
    launchTemplateName: string
    networkInterfaces:
        deleteOnRelease: false
        description: string
        name: string
        primaryIp: string
        securityGroupId: string
        vswitchId: string
    networkType: string
    passwordInherit: false
    period: 0
    periodUnit: string
    privateIpAddress: string
    ramRoleName: string
    resourceGroupId: string
    securityEnhancementStrategy: string
    securityGroupId: string
    securityGroupIds:
        - string
    spotDuration: string
    spotPriceLimit: 0
    spotStrategy: string
    systemDisk:
        category: string
        deleteWithInstance: false
        description: string
        encrypted: false
        iops: string
        name: string
        performanceLevel: string
        size: 0
    tags:
        string: string
    templateResourceGroupId: string
    templateTags:
        string: string
    updateDefaultVersionNumber: false
    userData: string
    versionDescription: string
    vpcId: string
    vswitchId: string
    zoneId: string
Copy

LaunchTemplate Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LaunchTemplate resource accepts the following input properties:

AutoReleaseTime string
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
AutoRenew Changes to this property will trigger replacement. bool
AutoRenewPeriod Changes to this property will trigger replacement. int
DataDisks List<Pulumi.AliCloud.Ecs.Inputs.LaunchTemplateDataDisk>
The list of data disks created with instance.
DefaultVersionNumber int
DeploymentSetId string
Description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
EnableVmOsConfig bool
HostName string
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 (-).
HttpEndpoint Changes to this property will trigger replacement. string
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
HttpTokens Changes to this property will trigger replacement. string
ImageId string
Image ID.
ImageOwnerAlias string
InstanceChargeType string

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

InstanceName string
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 (-).
InstanceType string
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
InternetChargeType string
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
InternetMaxBandwidthIn int
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
InternetMaxBandwidthOut int
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
IoOptimized string
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
KeyPairName string
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
LaunchTemplateName Changes to this property will trigger replacement. string
Name Changes to this property will trigger replacement. string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

NetworkInterfaces Pulumi.AliCloud.Ecs.Inputs.LaunchTemplateNetworkInterfaces
The list of network interfaces created with instance.
NetworkType string
Network type of the instance. Value options: classic | vpc.
PasswordInherit bool
Period Changes to this property will trigger replacement. int
PeriodUnit Changes to this property will trigger replacement. string
PrivateIpAddress string
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds List<string>
SpotDuration string
SpotPriceLimit double
Sets the maximum hourly instance price. Supports up to three decimal places.
SpotStrategy string
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
SystemDisk Pulumi.AliCloud.Ecs.Inputs.LaunchTemplateSystemDisk
SystemDiskCategory string
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskName string
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskSize int
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

Tags Dictionary<string, string>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
TemplateResourceGroupId Changes to this property will trigger replacement. string
TemplateTags Dictionary<string, string>
UpdateDefaultVersionNumber bool
UserData string
Userdata string
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

VersionDescription string
VpcId string
VswitchId string
When creating a VPC-Connected instance, you must specify its VSwitch ID.
ZoneId string
The zone ID of the instance.
AutoReleaseTime string
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
AutoRenew Changes to this property will trigger replacement. bool
AutoRenewPeriod Changes to this property will trigger replacement. int
DataDisks []LaunchTemplateDataDiskArgs
The list of data disks created with instance.
DefaultVersionNumber int
DeploymentSetId string
Description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
EnableVmOsConfig bool
HostName string
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 (-).
HttpEndpoint Changes to this property will trigger replacement. string
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
HttpTokens Changes to this property will trigger replacement. string
ImageId string
Image ID.
ImageOwnerAlias string
InstanceChargeType string

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

InstanceName string
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 (-).
InstanceType string
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
InternetChargeType string
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
InternetMaxBandwidthIn int
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
InternetMaxBandwidthOut int
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
IoOptimized string
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
KeyPairName string
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
LaunchTemplateName Changes to this property will trigger replacement. string
Name Changes to this property will trigger replacement. string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

NetworkInterfaces LaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance.
NetworkType string
Network type of the instance. Value options: classic | vpc.
PasswordInherit bool
Period Changes to this property will trigger replacement. int
PeriodUnit Changes to this property will trigger replacement. string
PrivateIpAddress string
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds []string
SpotDuration string
SpotPriceLimit float64
Sets the maximum hourly instance price. Supports up to three decimal places.
SpotStrategy string
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
SystemDisk LaunchTemplateSystemDiskArgs
SystemDiskCategory string
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskName string
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskSize int
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

Tags map[string]string
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
TemplateResourceGroupId Changes to this property will trigger replacement. string
TemplateTags map[string]string
UpdateDefaultVersionNumber bool
UserData string
Userdata string
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

VersionDescription string
VpcId string
VswitchId string
When creating a VPC-Connected instance, you must specify its VSwitch ID.
ZoneId string
The zone ID of the instance.
autoReleaseTime String
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
autoRenew Changes to this property will trigger replacement. Boolean
autoRenewPeriod Changes to this property will trigger replacement. Integer
dataDisks List<LaunchTemplateDataDisk>
The list of data disks created with instance.
defaultVersionNumber Integer
deploymentSetId String
description String
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enableVmOsConfig Boolean
hostName String
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 (-).
httpEndpoint Changes to this property will trigger replacement. String
httpPutResponseHopLimit Changes to this property will trigger replacement. Integer
httpTokens Changes to this property will trigger replacement. String
imageId String
Image ID.
imageOwnerAlias String
instanceChargeType String

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instanceName String
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 (-).
instanceType String
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internetChargeType String
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internetMaxBandwidthIn Integer
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internetMaxBandwidthOut Integer
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
ioOptimized String
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
keyPairName String
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
launchTemplateName Changes to this property will trigger replacement. String
name Changes to this property will trigger replacement. String
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

networkInterfaces LaunchTemplateNetworkInterfaces
The list of network interfaces created with instance.
networkType String
Network type of the instance. Value options: classic | vpc.
passwordInherit Boolean
period Changes to this property will trigger replacement. Integer
periodUnit Changes to this property will trigger replacement. String
privateIpAddress String
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
spotDuration String
spotPriceLimit Double
Sets the maximum hourly instance price. Supports up to three decimal places.
spotStrategy String
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
systemDisk LaunchTemplateSystemDisk
systemDiskCategory String
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskName String
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskSize Integer
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags Map<String,String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
templateResourceGroupId Changes to this property will trigger replacement. String
templateTags Map<String,String>
updateDefaultVersionNumber Boolean
userData String
userdata String
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

versionDescription String
vpcId String
vswitchId String
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId String
The zone ID of the instance.
autoReleaseTime string
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
autoRenew Changes to this property will trigger replacement. boolean
autoRenewPeriod Changes to this property will trigger replacement. number
dataDisks LaunchTemplateDataDisk[]
The list of data disks created with instance.
defaultVersionNumber number
deploymentSetId string
description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enableVmOsConfig boolean
hostName string
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 (-).
httpEndpoint Changes to this property will trigger replacement. string
httpPutResponseHopLimit Changes to this property will trigger replacement. number
httpTokens Changes to this property will trigger replacement. string
imageId string
Image ID.
imageOwnerAlias string
instanceChargeType string

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instanceName string
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 (-).
instanceType string
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internetChargeType string
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internetMaxBandwidthIn number
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internetMaxBandwidthOut number
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
ioOptimized string
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
keyPairName string
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
launchTemplateName Changes to this property will trigger replacement. string
name Changes to this property will trigger replacement. string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

networkInterfaces LaunchTemplateNetworkInterfaces
The list of network interfaces created with instance.
networkType string
Network type of the instance. Value options: classic | vpc.
passwordInherit boolean
period Changes to this property will trigger replacement. number
periodUnit Changes to this property will trigger replacement. string
privateIpAddress string
ramRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId string
securityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
securityGroupId string
The security group ID.
securityGroupIds string[]
spotDuration string
spotPriceLimit number
Sets the maximum hourly instance price. Supports up to three decimal places.
spotStrategy string
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
systemDisk LaunchTemplateSystemDisk
systemDiskCategory string
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskName string
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskSize number
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags {[key: string]: string}
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
templateResourceGroupId Changes to this property will trigger replacement. string
templateTags {[key: string]: string}
updateDefaultVersionNumber boolean
userData string
userdata string
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

versionDescription string
vpcId string
vswitchId string
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId string
The zone ID of the instance.
auto_release_time str
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
auto_renew Changes to this property will trigger replacement. bool
auto_renew_period Changes to this property will trigger replacement. int
data_disks Sequence[LaunchTemplateDataDiskArgs]
The list of data disks created with instance.
default_version_number int
deployment_set_id str
description str
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enable_vm_os_config bool
host_name str
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 (-).
http_endpoint Changes to this property will trigger replacement. str
http_put_response_hop_limit Changes to this property will trigger replacement. int
http_tokens Changes to this property will trigger replacement. str
image_id str
Image ID.
image_owner_alias str
instance_charge_type str

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instance_name str
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 (-).
instance_type str
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internet_charge_type str
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internet_max_bandwidth_in int
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internet_max_bandwidth_out int
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
io_optimized str
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
key_pair_name str
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
launch_template_name Changes to this property will trigger replacement. str
name Changes to this property will trigger replacement. str
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

network_interfaces LaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance.
network_type str
Network type of the instance. Value options: classic | vpc.
password_inherit bool
period Changes to this property will trigger replacement. int
period_unit Changes to this property will trigger replacement. str
private_ip_address str
ram_role_name str
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resource_group_id str
security_enhancement_strategy str
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
security_group_id str
The security group ID.
security_group_ids Sequence[str]
spot_duration str
spot_price_limit float
Sets the maximum hourly instance price. Supports up to three decimal places.
spot_strategy str
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
system_disk LaunchTemplateSystemDiskArgs
system_disk_category str
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

system_disk_name str
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

system_disk_size int
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags Mapping[str, str]
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
template_resource_group_id Changes to this property will trigger replacement. str
template_tags Mapping[str, str]
update_default_version_number bool
user_data str
userdata str
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

version_description str
vpc_id str
vswitch_id str
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zone_id str
The zone ID of the instance.
autoReleaseTime String
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
autoRenew Changes to this property will trigger replacement. Boolean
autoRenewPeriod Changes to this property will trigger replacement. Number
dataDisks List<Property Map>
The list of data disks created with instance.
defaultVersionNumber Number
deploymentSetId String
description String
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enableVmOsConfig Boolean
hostName String
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 (-).
httpEndpoint Changes to this property will trigger replacement. String
httpPutResponseHopLimit Changes to this property will trigger replacement. Number
httpTokens Changes to this property will trigger replacement. String
imageId String
Image ID.
imageOwnerAlias String
instanceChargeType String

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instanceName String
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 (-).
instanceType String
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internetChargeType String
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internetMaxBandwidthIn Number
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internetMaxBandwidthOut Number
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
ioOptimized String
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
keyPairName String
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
launchTemplateName Changes to this property will trigger replacement. String
name Changes to this property will trigger replacement. String
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

networkInterfaces Property Map
The list of network interfaces created with instance.
networkType String
Network type of the instance. Value options: classic | vpc.
passwordInherit Boolean
period Changes to this property will trigger replacement. Number
periodUnit Changes to this property will trigger replacement. String
privateIpAddress String
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
spotDuration String
spotPriceLimit Number
Sets the maximum hourly instance price. Supports up to three decimal places.
spotStrategy String
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
systemDisk Property Map
systemDiskCategory String
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskName String
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskSize Number
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags Map<String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
templateResourceGroupId Changes to this property will trigger replacement. String
templateTags Map<String>
updateDefaultVersionNumber Boolean
userData String
userdata String
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

versionDescription String
vpcId String
vswitchId String
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId String
The zone ID of the instance.

Outputs

All input properties are implicitly available as output properties. Additionally, the LaunchTemplate resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
LatestVersionNumber int
Id string
The provider-assigned unique ID for this managed resource.
LatestVersionNumber int
id String
The provider-assigned unique ID for this managed resource.
latestVersionNumber Integer
id string
The provider-assigned unique ID for this managed resource.
latestVersionNumber number
id str
The provider-assigned unique ID for this managed resource.
latest_version_number int
id String
The provider-assigned unique ID for this managed resource.
latestVersionNumber Number

Look up Existing LaunchTemplate Resource

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

public static get(name: string, id: Input<ID>, state?: LaunchTemplateState, opts?: CustomResourceOptions): LaunchTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_release_time: Optional[str] = None,
        auto_renew: Optional[bool] = None,
        auto_renew_period: Optional[int] = None,
        data_disks: Optional[Sequence[LaunchTemplateDataDiskArgs]] = None,
        default_version_number: Optional[int] = None,
        deployment_set_id: Optional[str] = None,
        description: Optional[str] = None,
        enable_vm_os_config: Optional[bool] = None,
        host_name: Optional[str] = None,
        http_endpoint: Optional[str] = None,
        http_put_response_hop_limit: Optional[int] = None,
        http_tokens: Optional[str] = None,
        image_id: Optional[str] = None,
        image_owner_alias: Optional[str] = None,
        instance_charge_type: Optional[str] = None,
        instance_name: Optional[str] = None,
        instance_type: Optional[str] = None,
        internet_charge_type: Optional[str] = None,
        internet_max_bandwidth_in: Optional[int] = None,
        internet_max_bandwidth_out: Optional[int] = None,
        io_optimized: Optional[str] = None,
        key_pair_name: Optional[str] = None,
        latest_version_number: Optional[int] = None,
        launch_template_name: Optional[str] = None,
        name: Optional[str] = None,
        network_interfaces: Optional[LaunchTemplateNetworkInterfacesArgs] = None,
        network_type: Optional[str] = None,
        password_inherit: Optional[bool] = None,
        period: Optional[int] = None,
        period_unit: Optional[str] = None,
        private_ip_address: Optional[str] = None,
        ram_role_name: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        security_enhancement_strategy: Optional[str] = None,
        security_group_id: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        spot_duration: Optional[str] = None,
        spot_price_limit: Optional[float] = None,
        spot_strategy: Optional[str] = None,
        system_disk: Optional[LaunchTemplateSystemDiskArgs] = None,
        system_disk_category: Optional[str] = None,
        system_disk_description: Optional[str] = None,
        system_disk_name: Optional[str] = None,
        system_disk_size: Optional[int] = None,
        tags: Optional[Mapping[str, str]] = None,
        template_resource_group_id: Optional[str] = None,
        template_tags: Optional[Mapping[str, str]] = None,
        update_default_version_number: Optional[bool] = None,
        user_data: Optional[str] = None,
        userdata: Optional[str] = None,
        version_description: Optional[str] = None,
        vpc_id: Optional[str] = None,
        vswitch_id: Optional[str] = None,
        zone_id: Optional[str] = None) -> LaunchTemplate
func GetLaunchTemplate(ctx *Context, name string, id IDInput, state *LaunchTemplateState, opts ...ResourceOption) (*LaunchTemplate, error)
public static LaunchTemplate Get(string name, Input<string> id, LaunchTemplateState? state, CustomResourceOptions? opts = null)
public static LaunchTemplate get(String name, Output<String> id, LaunchTemplateState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ecs:LaunchTemplate    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AutoReleaseTime string
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
AutoRenew Changes to this property will trigger replacement. bool
AutoRenewPeriod Changes to this property will trigger replacement. int
DataDisks List<Pulumi.AliCloud.Ecs.Inputs.LaunchTemplateDataDisk>
The list of data disks created with instance.
DefaultVersionNumber int
DeploymentSetId string
Description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
EnableVmOsConfig bool
HostName string
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 (-).
HttpEndpoint Changes to this property will trigger replacement. string
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
HttpTokens Changes to this property will trigger replacement. string
ImageId string
Image ID.
ImageOwnerAlias string
InstanceChargeType string

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

InstanceName string
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 (-).
InstanceType string
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
InternetChargeType string
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
InternetMaxBandwidthIn int
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
InternetMaxBandwidthOut int
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
IoOptimized string
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
KeyPairName string
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
LatestVersionNumber int
LaunchTemplateName Changes to this property will trigger replacement. string
Name Changes to this property will trigger replacement. string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

NetworkInterfaces Pulumi.AliCloud.Ecs.Inputs.LaunchTemplateNetworkInterfaces
The list of network interfaces created with instance.
NetworkType string
Network type of the instance. Value options: classic | vpc.
PasswordInherit bool
Period Changes to this property will trigger replacement. int
PeriodUnit Changes to this property will trigger replacement. string
PrivateIpAddress string
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds List<string>
SpotDuration string
SpotPriceLimit double
Sets the maximum hourly instance price. Supports up to three decimal places.
SpotStrategy string
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
SystemDisk Pulumi.AliCloud.Ecs.Inputs.LaunchTemplateSystemDisk
SystemDiskCategory string
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskName string
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskSize int
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

Tags Dictionary<string, string>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
TemplateResourceGroupId Changes to this property will trigger replacement. string
TemplateTags Dictionary<string, string>
UpdateDefaultVersionNumber bool
UserData string
Userdata string
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

VersionDescription string
VpcId string
VswitchId string
When creating a VPC-Connected instance, you must specify its VSwitch ID.
ZoneId string
The zone ID of the instance.
AutoReleaseTime string
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
AutoRenew Changes to this property will trigger replacement. bool
AutoRenewPeriod Changes to this property will trigger replacement. int
DataDisks []LaunchTemplateDataDiskArgs
The list of data disks created with instance.
DefaultVersionNumber int
DeploymentSetId string
Description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
EnableVmOsConfig bool
HostName string
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 (-).
HttpEndpoint Changes to this property will trigger replacement. string
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
HttpTokens Changes to this property will trigger replacement. string
ImageId string
Image ID.
ImageOwnerAlias string
InstanceChargeType string

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

InstanceName string
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 (-).
InstanceType string
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
InternetChargeType string
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
InternetMaxBandwidthIn int
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
InternetMaxBandwidthOut int
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
IoOptimized string
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
KeyPairName string
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
LatestVersionNumber int
LaunchTemplateName Changes to this property will trigger replacement. string
Name Changes to this property will trigger replacement. string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

NetworkInterfaces LaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance.
NetworkType string
Network type of the instance. Value options: classic | vpc.
PasswordInherit bool
Period Changes to this property will trigger replacement. int
PeriodUnit Changes to this property will trigger replacement. string
PrivateIpAddress string
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds []string
SpotDuration string
SpotPriceLimit float64
Sets the maximum hourly instance price. Supports up to three decimal places.
SpotStrategy string
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
SystemDisk LaunchTemplateSystemDiskArgs
SystemDiskCategory string
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskName string
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

SystemDiskSize int
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

Tags map[string]string
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
TemplateResourceGroupId Changes to this property will trigger replacement. string
TemplateTags map[string]string
UpdateDefaultVersionNumber bool
UserData string
Userdata string
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

VersionDescription string
VpcId string
VswitchId string
When creating a VPC-Connected instance, you must specify its VSwitch ID.
ZoneId string
The zone ID of the instance.
autoReleaseTime String
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
autoRenew Changes to this property will trigger replacement. Boolean
autoRenewPeriod Changes to this property will trigger replacement. Integer
dataDisks List<LaunchTemplateDataDisk>
The list of data disks created with instance.
defaultVersionNumber Integer
deploymentSetId String
description String
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enableVmOsConfig Boolean
hostName String
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 (-).
httpEndpoint Changes to this property will trigger replacement. String
httpPutResponseHopLimit Changes to this property will trigger replacement. Integer
httpTokens Changes to this property will trigger replacement. String
imageId String
Image ID.
imageOwnerAlias String
instanceChargeType String

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instanceName String
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 (-).
instanceType String
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internetChargeType String
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internetMaxBandwidthIn Integer
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internetMaxBandwidthOut Integer
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
ioOptimized String
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
keyPairName String
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
latestVersionNumber Integer
launchTemplateName Changes to this property will trigger replacement. String
name Changes to this property will trigger replacement. String
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

networkInterfaces LaunchTemplateNetworkInterfaces
The list of network interfaces created with instance.
networkType String
Network type of the instance. Value options: classic | vpc.
passwordInherit Boolean
period Changes to this property will trigger replacement. Integer
periodUnit Changes to this property will trigger replacement. String
privateIpAddress String
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
spotDuration String
spotPriceLimit Double
Sets the maximum hourly instance price. Supports up to three decimal places.
spotStrategy String
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
systemDisk LaunchTemplateSystemDisk
systemDiskCategory String
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskName String
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskSize Integer
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags Map<String,String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
templateResourceGroupId Changes to this property will trigger replacement. String
templateTags Map<String,String>
updateDefaultVersionNumber Boolean
userData String
userdata String
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

versionDescription String
vpcId String
vswitchId String
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId String
The zone ID of the instance.
autoReleaseTime string
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
autoRenew Changes to this property will trigger replacement. boolean
autoRenewPeriod Changes to this property will trigger replacement. number
dataDisks LaunchTemplateDataDisk[]
The list of data disks created with instance.
defaultVersionNumber number
deploymentSetId string
description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enableVmOsConfig boolean
hostName string
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 (-).
httpEndpoint Changes to this property will trigger replacement. string
httpPutResponseHopLimit Changes to this property will trigger replacement. number
httpTokens Changes to this property will trigger replacement. string
imageId string
Image ID.
imageOwnerAlias string
instanceChargeType string

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instanceName string
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 (-).
instanceType string
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internetChargeType string
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internetMaxBandwidthIn number
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internetMaxBandwidthOut number
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
ioOptimized string
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
keyPairName string
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
latestVersionNumber number
launchTemplateName Changes to this property will trigger replacement. string
name Changes to this property will trigger replacement. string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

networkInterfaces LaunchTemplateNetworkInterfaces
The list of network interfaces created with instance.
networkType string
Network type of the instance. Value options: classic | vpc.
passwordInherit boolean
period Changes to this property will trigger replacement. number
periodUnit Changes to this property will trigger replacement. string
privateIpAddress string
ramRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId string
securityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
securityGroupId string
The security group ID.
securityGroupIds string[]
spotDuration string
spotPriceLimit number
Sets the maximum hourly instance price. Supports up to three decimal places.
spotStrategy string
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
systemDisk LaunchTemplateSystemDisk
systemDiskCategory string
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskName string
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskSize number
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags {[key: string]: string}
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
templateResourceGroupId Changes to this property will trigger replacement. string
templateTags {[key: string]: string}
updateDefaultVersionNumber boolean
userData string
userdata string
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

versionDescription string
vpcId string
vswitchId string
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId string
The zone ID of the instance.
auto_release_time str
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
auto_renew Changes to this property will trigger replacement. bool
auto_renew_period Changes to this property will trigger replacement. int
data_disks Sequence[LaunchTemplateDataDiskArgs]
The list of data disks created with instance.
default_version_number int
deployment_set_id str
description str
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enable_vm_os_config bool
host_name str
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 (-).
http_endpoint Changes to this property will trigger replacement. str
http_put_response_hop_limit Changes to this property will trigger replacement. int
http_tokens Changes to this property will trigger replacement. str
image_id str
Image ID.
image_owner_alias str
instance_charge_type str

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instance_name str
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 (-).
instance_type str
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internet_charge_type str
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internet_max_bandwidth_in int
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internet_max_bandwidth_out int
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
io_optimized str
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
key_pair_name str
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
latest_version_number int
launch_template_name Changes to this property will trigger replacement. str
name Changes to this property will trigger replacement. str
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

network_interfaces LaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance.
network_type str
Network type of the instance. Value options: classic | vpc.
password_inherit bool
period Changes to this property will trigger replacement. int
period_unit Changes to this property will trigger replacement. str
private_ip_address str
ram_role_name str
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resource_group_id str
security_enhancement_strategy str
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
security_group_id str
The security group ID.
security_group_ids Sequence[str]
spot_duration str
spot_price_limit float
Sets the maximum hourly instance price. Supports up to three decimal places.
spot_strategy str
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
system_disk LaunchTemplateSystemDiskArgs
system_disk_category str
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

system_disk_name str
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

system_disk_size int
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags Mapping[str, str]
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
template_resource_group_id Changes to this property will trigger replacement. str
template_tags Mapping[str, str]
update_default_version_number bool
user_data str
userdata str
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

version_description str
vpc_id str
vswitch_id str
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zone_id str
The zone ID of the instance.
autoReleaseTime String
Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
autoRenew Changes to this property will trigger replacement. Boolean
autoRenewPeriod Changes to this property will trigger replacement. Number
dataDisks List<Property Map>
The list of data disks created with instance.
defaultVersionNumber Number
deploymentSetId String
description String
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
enableVmOsConfig Boolean
hostName String
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 (-).
httpEndpoint Changes to this property will trigger replacement. String
httpPutResponseHopLimit Changes to this property will trigger replacement. Number
httpTokens Changes to this property will trigger replacement. String
imageId String
Image ID.
imageOwnerAlias String
instanceChargeType String

Billing methods. Optional values:

  • PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
  • PostPaid: Pay-As-You-Go.

Default value: PostPaid.

instanceName String
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 (-).
instanceType String
Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internetChargeType String
Internet bandwidth billing method. Optional values: PayByTraffic | PayByBandwidth.
internetMaxBandwidthIn Number
The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internetMaxBandwidthOut Number
Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
ioOptimized String
Whether it is an I/O-optimized instance or not. Optional values:

  • none
  • optimized
keyPairName String
The name of the key pair.

  • Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
  • The password logon method for Linux instances is set to forbidden upon initialization.
latestVersionNumber Number
launchTemplateName Changes to this property will trigger replacement. String
name Changes to this property will trigger replacement. String
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".

Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'launch_template_name' instead.

networkInterfaces Property Map
The list of network interfaces created with instance.
networkType String
Network type of the instance. Value options: classic | vpc.
passwordInherit Boolean
period Changes to this property will trigger replacement. Number
periodUnit Changes to this property will trigger replacement. String
privateIpAddress String
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
spotDuration String
spotPriceLimit Number
Sets the maximum hourly instance price. Supports up to three decimal places.
spotStrategy String
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:

  • NoSpot: Normal Pay-As-You-Go instance.
  • SpotWithPriceLimit: Sets the maximum price for a spot instance.
  • SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
systemDisk Property Map
systemDiskCategory String
The category of the system disk. System disk type. Optional values:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Deprecated: Field 'system_disk_category' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

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

Deprecated: Field 'system_disk_description' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskName String
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 (-).

Deprecated: Field 'system_disk_name' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

systemDiskSize Number
Size of the system disk, measured in GB. Value range: [20, 500].

Deprecated: Field 'system_disk_size' has been deprecated from provider version 1.120.0. New field 'system_disk' instead.

tags Map<String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
templateResourceGroupId Changes to this property will trigger replacement. String
templateTags Map<String>
updateDefaultVersionNumber Boolean
userData String
userdata String
User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.

Deprecated: Field 'userdata' has been deprecated from provider version 1.120.0. New field 'user_data' instead.

versionDescription String
vpcId String
vswitchId String
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId String
The zone ID of the instance.

Supporting Types

LaunchTemplateDataDisk
, LaunchTemplateDataDiskArgs

Category string

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

DeleteWithInstance bool

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

Description string
The description of the data disk.
Device string
Encrypted bool

Encrypted the data in this disk.

Default to false

Name string
The name of the data disk.
PerformanceLevel string
Size int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
SnapshotId string
The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
Category string

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

DeleteWithInstance bool

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

Description string
The description of the data disk.
Device string
Encrypted bool

Encrypted the data in this disk.

Default to false

Name string
The name of the data disk.
PerformanceLevel string
Size int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
SnapshotId string
The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
category String

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

deleteWithInstance Boolean

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description String
The description of the data disk.
device String
encrypted Boolean

Encrypted the data in this disk.

Default to false

name String
The name of the data disk.
performanceLevel String
size Integer
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
snapshotId String
The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
category string

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

deleteWithInstance boolean

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description string
The description of the data disk.
device string
encrypted boolean

Encrypted the data in this disk.

Default to false

name string
The name of the data disk.
performanceLevel string
size number
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
snapshotId string
The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
category str

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

delete_with_instance bool

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description str
The description of the data disk.
device str
encrypted bool

Encrypted the data in this disk.

Default to false

name str
The name of the data disk.
performance_level str
size int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
snapshot_id str
The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
category String

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

deleteWithInstance Boolean

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description String
The description of the data disk.
device String
encrypted Boolean

Encrypted the data in this disk.

Default to false

name String
The name of the data disk.
performanceLevel String
size Number
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
snapshotId String
The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.

LaunchTemplateNetworkInterfaces
, LaunchTemplateNetworkInterfacesArgs

DeleteOnRelease bool
Description string
The ENI description.
Name string
ENI name.
PrimaryIp string
The primary private IP address of the ENI.
SecurityGroupId string
The security group ID must be one in the same VPC.
VswitchId string
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.
DeleteOnRelease bool
Description string
The ENI description.
Name string
ENI name.
PrimaryIp string
The primary private IP address of the ENI.
SecurityGroupId string
The security group ID must be one in the same VPC.
VswitchId string
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.
deleteOnRelease Boolean
description String
The ENI description.
name String
ENI name.
primaryIp String
The primary private IP address of the ENI.
securityGroupId String
The security group ID must be one in the same VPC.
vswitchId String
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.
deleteOnRelease boolean
description string
The ENI description.
name string
ENI name.
primaryIp string
The primary private IP address of the ENI.
securityGroupId string
The security group ID must be one in the same VPC.
vswitchId string
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.
delete_on_release bool
description str
The ENI description.
name str
ENI name.
primary_ip str
The primary private IP address of the ENI.
security_group_id str
The security group ID must be one in the same VPC.
vswitch_id str
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.
deleteOnRelease Boolean
description String
The ENI description.
name String
ENI name.
primaryIp String
The primary private IP address of the ENI.
securityGroupId String
The security group ID must be one in the same VPC.
vswitchId String
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.

LaunchTemplateSystemDisk
, LaunchTemplateSystemDiskArgs

Category string

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

DeleteWithInstance bool

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

Description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
Encrypted bool

Encrypted the data in this disk.

Default to false

Iops string
Name string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".
PerformanceLevel string
Size int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
Category string

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

DeleteWithInstance bool

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

Description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
Encrypted bool

Encrypted the data in this disk.

Default to false

Iops string
Name string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".
PerformanceLevel string
Size int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
category String

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

deleteWithInstance Boolean

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description String
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
encrypted Boolean

Encrypted the data in this disk.

Default to false

iops String
name String
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".
performanceLevel String
size Integer
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
category string

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

deleteWithInstance boolean

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description string
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
encrypted boolean

Encrypted the data in this disk.

Default to false

iops string
name string
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".
performanceLevel string
size number
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
category str

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

delete_with_instance bool

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description str
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
encrypted bool

Encrypted the data in this disk.

Default to false

iops str
name str
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".
performance_level str
size int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
category String

The category of the disk:

  • cloud: Basic cloud disk.
  • cloud_efficiency: Ultra cloud disk.
  • cloud_ssd: SSD cloud Disks.
  • ephemeral_ssd: local SSD Disks
  • cloud_essd: ESSD cloud Disks.

Default to cloud_efficiency.

deleteWithInstance Boolean

Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don't set this param.

Default to true

description String
Description of instance launch template version 1. It can be [2, 256] characters in length. It cannot start with "http://" or "https://". The default value is null.
encrypted Boolean

Encrypted the data in this disk.

Default to false

iops String
name String
Instance launch template name. Can contain [2, 128] characters in length. It must start with an English letter or Chinese, can contain numbers, periods (.), colons (:), underscores (_), and hyphens (-). It cannot start with "http://" or "https://".
performanceLevel String
size Number
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]

Import

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

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

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.