1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. EcsLaunchTemplate
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.ecs.EcsLaunchTemplate

Explore with Pulumi AI

Provides a ECS Launch Template resource.

For information about ECS Launch Template and how to use it, see What is Launch Template.

NOTE: Available since v1.120.0.

Example Usage

Basic Usage

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

const _default = alicloud.getZones({
    availableDiskCategory: "cloud_efficiency",
    availableResourceCreation: "VSwitch",
});
const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
    availabilityZone: _default.zones?.[0]?.id,
}));
const defaultGetImages = alicloud.ecs.getImages({
    nameRegex: "^ubuntu_18.*64",
    owners: "system",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: "terraform-example",
    cidrBlock: "172.17.3.0/24",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vswitchName: "terraform-example",
    cidrBlock: "172.17.3.0/24",
    vpcId: defaultNetwork.id,
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
    name: "terraform-example",
    vpcId: defaultNetwork.id,
});
const defaultEcsLaunchTemplate = new alicloud.ecs.EcsLaunchTemplate("default", {
    launchTemplateName: "terraform-example",
    description: "terraform-example",
    imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
    hostName: "terraform-example",
    instanceChargeType: "PrePaid",
    instanceName: "terraform-example",
    instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
    internetChargeType: "PayByBandwidth",
    internetMaxBandwidthIn: 5,
    internetMaxBandwidthOut: 5,
    ioOptimized: "optimized",
    keyPairName: "key_pair_name",
    ramRoleName: "ram_role_name",
    networkType: "vpc",
    securityEnhancementStrategy: "Active",
    spotPriceLimit: 5,
    spotStrategy: "SpotWithPriceLimit",
    securityGroupIds: [defaultSecurityGroup.id],
    systemDisk: {
        category: "cloud_ssd",
        description: "Test For Terraform",
        name: "terraform-example",
        size: 40,
        deleteWithInstance: false,
    },
    userData: "xxxxxxx",
    vswitchId: defaultSwitch.id,
    vpcId: defaultNetwork.id,
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
    templateTags: {
        Create: "Terraform",
        For: "example",
    },
    networkInterfaces: {
        name: "eth0",
        description: "hello1",
        primaryIp: "10.0.0.2",
        securityGroupId: defaultSecurityGroup.id,
        vswitchId: defaultSwitch.id,
    },
    dataDisks: [
        {
            name: "disk1",
            description: "description",
            deleteWithInstance: true,
            category: "cloud",
            encrypted: false,
            performanceLevel: "PL0",
            size: 20,
        },
        {
            name: "disk2",
            description: "description2",
            deleteWithInstance: true,
            category: "cloud",
            encrypted: false,
            performanceLevel: "PL0",
            size: 20,
        },
    ],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.get_zones(available_disk_category="cloud_efficiency",
    available_resource_creation="VSwitch")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id)
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
    owners="system")
default_network = alicloud.vpc.Network("default",
    vpc_name="terraform-example",
    cidr_block="172.17.3.0/24")
default_switch = alicloud.vpc.Switch("default",
    vswitch_name="terraform-example",
    cidr_block="172.17.3.0/24",
    vpc_id=default_network.id,
    zone_id=default.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default",
    name="terraform-example",
    vpc_id=default_network.id)
default_ecs_launch_template = alicloud.ecs.EcsLaunchTemplate("default",
    launch_template_name="terraform-example",
    description="terraform-example",
    image_id=default_get_images.images[0].id,
    host_name="terraform-example",
    instance_charge_type="PrePaid",
    instance_name="terraform-example",
    instance_type=default_get_instance_types.instance_types[0].id,
    internet_charge_type="PayByBandwidth",
    internet_max_bandwidth_in=5,
    internet_max_bandwidth_out=5,
    io_optimized="optimized",
    key_pair_name="key_pair_name",
    ram_role_name="ram_role_name",
    network_type="vpc",
    security_enhancement_strategy="Active",
    spot_price_limit=5,
    spot_strategy="SpotWithPriceLimit",
    security_group_ids=[default_security_group.id],
    system_disk={
        "category": "cloud_ssd",
        "description": "Test For Terraform",
        "name": "terraform-example",
        "size": 40,
        "delete_with_instance": False,
    },
    user_data="xxxxxxx",
    vswitch_id=default_switch.id,
    vpc_id=default_network.id,
    zone_id=default.zones[0].id,
    template_tags={
        "Create": "Terraform",
        "For": "example",
    },
    network_interfaces={
        "name": "eth0",
        "description": "hello1",
        "primary_ip": "10.0.0.2",
        "security_group_id": default_security_group.id,
        "vswitch_id": default_switch.id,
    },
    data_disks=[
        {
            "name": "disk1",
            "description": "description",
            "delete_with_instance": True,
            "category": "cloud",
            "encrypted": False,
            "performance_level": "PL0",
            "size": 20,
        },
        {
            "name": "disk2",
            "description": "description2",
            "delete_with_instance": True,
            "category": "cloud",
            "encrypted": False,
            "performance_level": "PL0",
            "size": 20,
        },
    ])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableDiskCategory:     pulumi.StringRef("cloud_efficiency"),
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
		}, nil)
		if err != nil {
			return err
		}
		defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
			Owners:    pulumi.StringRef("system"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String("terraform-example"),
			CidrBlock: pulumi.String("172.17.3.0/24"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String("terraform-example"),
			CidrBlock:   pulumi.String("172.17.3.0/24"),
			VpcId:       defaultNetwork.ID(),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			Name:  pulumi.String("terraform-example"),
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewEcsLaunchTemplate(ctx, "default", &ecs.EcsLaunchTemplateArgs{
			LaunchTemplateName:          pulumi.String("terraform-example"),
			Description:                 pulumi.String("terraform-example"),
			ImageId:                     pulumi.String(defaultGetImages.Images[0].Id),
			HostName:                    pulumi.String("terraform-example"),
			InstanceChargeType:          pulumi.String("PrePaid"),
			InstanceName:                pulumi.String("terraform-example"),
			InstanceType:                pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
			InternetChargeType:          pulumi.String("PayByBandwidth"),
			InternetMaxBandwidthIn:      pulumi.Int(5),
			InternetMaxBandwidthOut:     pulumi.Int(5),
			IoOptimized:                 pulumi.String("optimized"),
			KeyPairName:                 pulumi.String("key_pair_name"),
			RamRoleName:                 pulumi.String("ram_role_name"),
			NetworkType:                 pulumi.String("vpc"),
			SecurityEnhancementStrategy: pulumi.String("Active"),
			SpotPriceLimit:              pulumi.Float64(5),
			SpotStrategy:                pulumi.String("SpotWithPriceLimit"),
			SecurityGroupIds: pulumi.StringArray{
				defaultSecurityGroup.ID(),
			},
			SystemDisk: &ecs.EcsLaunchTemplateSystemDiskArgs{
				Category:           pulumi.String("cloud_ssd"),
				Description:        pulumi.String("Test For Terraform"),
				Name:               pulumi.String("terraform-example"),
				Size:               pulumi.Int(40),
				DeleteWithInstance: pulumi.Bool(false),
			},
			UserData:  pulumi.String("xxxxxxx"),
			VswitchId: defaultSwitch.ID(),
			VpcId:     defaultNetwork.ID(),
			ZoneId:    pulumi.String(_default.Zones[0].Id),
			TemplateTags: pulumi.StringMap{
				"Create": pulumi.String("Terraform"),
				"For":    pulumi.String("example"),
			},
			NetworkInterfaces: &ecs.EcsLaunchTemplateNetworkInterfacesArgs{
				Name:            pulumi.String("eth0"),
				Description:     pulumi.String("hello1"),
				PrimaryIp:       pulumi.String("10.0.0.2"),
				SecurityGroupId: defaultSecurityGroup.ID(),
				VswitchId:       defaultSwitch.ID(),
			},
			DataDisks: ecs.EcsLaunchTemplateDataDiskArray{
				&ecs.EcsLaunchTemplateDataDiskArgs{
					Name:               pulumi.String("disk1"),
					Description:        pulumi.String("description"),
					DeleteWithInstance: pulumi.Bool(true),
					Category:           pulumi.String("cloud"),
					Encrypted:          pulumi.Bool(false),
					PerformanceLevel:   pulumi.String("PL0"),
					Size:               pulumi.Int(20),
				},
				&ecs.EcsLaunchTemplateDataDiskArgs{
					Name:               pulumi.String("disk2"),
					Description:        pulumi.String("description2"),
					DeleteWithInstance: pulumi.Bool(true),
					Category:           pulumi.String("cloud"),
					Encrypted:          pulumi.Bool(false),
					PerformanceLevel:   pulumi.String("PL0"),
					Size:               pulumi.Int(20),
				},
			},
		})
		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 @default = AliCloud.GetZones.Invoke(new()
    {
        AvailableDiskCategory = "cloud_efficiency",
        AvailableResourceCreation = "VSwitch",
    });

    var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
    {
        AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
    });

    var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
    {
        NameRegex = "^ubuntu_18.*64",
        Owners = "system",
    });

    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = "terraform-example",
        CidrBlock = "172.17.3.0/24",
    });

    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VswitchName = "terraform-example",
        CidrBlock = "172.17.3.0/24",
        VpcId = defaultNetwork.Id,
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
    });

    var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
    {
        Name = "terraform-example",
        VpcId = defaultNetwork.Id,
    });

    var defaultEcsLaunchTemplate = new AliCloud.Ecs.EcsLaunchTemplate("default", new()
    {
        LaunchTemplateName = "terraform-example",
        Description = "terraform-example",
        ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
        HostName = "terraform-example",
        InstanceChargeType = "PrePaid",
        InstanceName = "terraform-example",
        InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
        InternetChargeType = "PayByBandwidth",
        InternetMaxBandwidthIn = 5,
        InternetMaxBandwidthOut = 5,
        IoOptimized = "optimized",
        KeyPairName = "key_pair_name",
        RamRoleName = "ram_role_name",
        NetworkType = "vpc",
        SecurityEnhancementStrategy = "Active",
        SpotPriceLimit = 5,
        SpotStrategy = "SpotWithPriceLimit",
        SecurityGroupIds = new[]
        {
            defaultSecurityGroup.Id,
        },
        SystemDisk = new AliCloud.Ecs.Inputs.EcsLaunchTemplateSystemDiskArgs
        {
            Category = "cloud_ssd",
            Description = "Test For Terraform",
            Name = "terraform-example",
            Size = 40,
            DeleteWithInstance = false,
        },
        UserData = "xxxxxxx",
        VswitchId = defaultSwitch.Id,
        VpcId = defaultNetwork.Id,
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        TemplateTags = 
        {
            { "Create", "Terraform" },
            { "For", "example" },
        },
        NetworkInterfaces = new AliCloud.Ecs.Inputs.EcsLaunchTemplateNetworkInterfacesArgs
        {
            Name = "eth0",
            Description = "hello1",
            PrimaryIp = "10.0.0.2",
            SecurityGroupId = defaultSecurityGroup.Id,
            VswitchId = defaultSwitch.Id,
        },
        DataDisks = new[]
        {
            new AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDiskArgs
            {
                Name = "disk1",
                Description = "description",
                DeleteWithInstance = true,
                Category = "cloud",
                Encrypted = false,
                PerformanceLevel = "PL0",
                Size = 20,
            },
            new AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDiskArgs
            {
                Name = "disk2",
                Description = "description2",
                DeleteWithInstance = true,
                Category = "cloud",
                Encrypted = false,
                PerformanceLevel = "PL0",
                Size = 20,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.EcsLaunchTemplate;
import com.pulumi.alicloud.ecs.EcsLaunchTemplateArgs;
import com.pulumi.alicloud.ecs.inputs.EcsLaunchTemplateSystemDiskArgs;
import com.pulumi.alicloud.ecs.inputs.EcsLaunchTemplateNetworkInterfacesArgs;
import com.pulumi.alicloud.ecs.inputs.EcsLaunchTemplateDataDiskArgs;
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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableDiskCategory("cloud_efficiency")
            .availableResourceCreation("VSwitch")
            .build());

        final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .availabilityZone(default_.zones()[0].id())
            .build());

        final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
            .nameRegex("^ubuntu_18.*64")
            .owners("system")
            .build());

        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName("terraform-example")
            .cidrBlock("172.17.3.0/24")
            .build());

        var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
            .vswitchName("terraform-example")
            .cidrBlock("172.17.3.0/24")
            .vpcId(defaultNetwork.id())
            .zoneId(default_.zones()[0].id())
            .build());

        var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
            .name("terraform-example")
            .vpcId(defaultNetwork.id())
            .build());

        var defaultEcsLaunchTemplate = new EcsLaunchTemplate("defaultEcsLaunchTemplate", EcsLaunchTemplateArgs.builder()
            .launchTemplateName("terraform-example")
            .description("terraform-example")
            .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
            .hostName("terraform-example")
            .instanceChargeType("PrePaid")
            .instanceName("terraform-example")
            .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
            .internetChargeType("PayByBandwidth")
            .internetMaxBandwidthIn("5")
            .internetMaxBandwidthOut("5")
            .ioOptimized("optimized")
            .keyPairName("key_pair_name")
            .ramRoleName("ram_role_name")
            .networkType("vpc")
            .securityEnhancementStrategy("Active")
            .spotPriceLimit("5")
            .spotStrategy("SpotWithPriceLimit")
            .securityGroupIds(defaultSecurityGroup.id())
            .systemDisk(EcsLaunchTemplateSystemDiskArgs.builder()
                .category("cloud_ssd")
                .description("Test For Terraform")
                .name("terraform-example")
                .size("40")
                .deleteWithInstance("false")
                .build())
            .userData("xxxxxxx")
            .vswitchId(defaultSwitch.id())
            .vpcId(defaultNetwork.id())
            .zoneId(default_.zones()[0].id())
            .templateTags(Map.ofEntries(
                Map.entry("Create", "Terraform"),
                Map.entry("For", "example")
            ))
            .networkInterfaces(EcsLaunchTemplateNetworkInterfacesArgs.builder()
                .name("eth0")
                .description("hello1")
                .primaryIp("10.0.0.2")
                .securityGroupId(defaultSecurityGroup.id())
                .vswitchId(defaultSwitch.id())
                .build())
            .dataDisks(            
                EcsLaunchTemplateDataDiskArgs.builder()
                    .name("disk1")
                    .description("description")
                    .deleteWithInstance("true")
                    .category("cloud")
                    .encrypted("false")
                    .performanceLevel("PL0")
                    .size("20")
                    .build(),
                EcsLaunchTemplateDataDiskArgs.builder()
                    .name("disk2")
                    .description("description2")
                    .deleteWithInstance("true")
                    .category("cloud")
                    .encrypted("false")
                    .performanceLevel("PL0")
                    .size("20")
                    .build())
            .build());

    }
}
Copy
resources:
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: terraform-example
      cidrBlock: 172.17.3.0/24
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vswitchName: terraform-example
      cidrBlock: 172.17.3.0/24
      vpcId: ${defaultNetwork.id}
      zoneId: ${default.zones[0].id}
  defaultSecurityGroup:
    type: alicloud:ecs:SecurityGroup
    name: default
    properties:
      name: terraform-example
      vpcId: ${defaultNetwork.id}
  defaultEcsLaunchTemplate:
    type: alicloud:ecs:EcsLaunchTemplate
    name: default
    properties:
      launchTemplateName: terraform-example
      description: terraform-example
      imageId: ${defaultGetImages.images[0].id}
      hostName: terraform-example
      instanceChargeType: PrePaid
      instanceName: terraform-example
      instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
      internetChargeType: PayByBandwidth
      internetMaxBandwidthIn: '5'
      internetMaxBandwidthOut: '5'
      ioOptimized: optimized
      keyPairName: key_pair_name
      ramRoleName: ram_role_name
      networkType: vpc
      securityEnhancementStrategy: Active
      spotPriceLimit: '5'
      spotStrategy: SpotWithPriceLimit
      securityGroupIds:
        - ${defaultSecurityGroup.id}
      systemDisk:
        category: cloud_ssd
        description: Test For Terraform
        name: terraform-example
        size: '40'
        deleteWithInstance: 'false'
      userData: xxxxxxx
      vswitchId: ${defaultSwitch.id}
      vpcId: ${defaultNetwork.id}
      zoneId: ${default.zones[0].id}
      templateTags:
        Create: Terraform
        For: example
      networkInterfaces:
        name: eth0
        description: hello1
        primaryIp: 10.0.0.2
        securityGroupId: ${defaultSecurityGroup.id}
        vswitchId: ${defaultSwitch.id}
      dataDisks:
        - name: disk1
          description: description
          deleteWithInstance: 'true'
          category: cloud
          encrypted: 'false'
          performanceLevel: PL0
          size: '20'
        - name: disk2
          description: description2
          deleteWithInstance: 'true'
          category: cloud
          encrypted: 'false'
          performanceLevel: PL0
          size: '20'
variables:
  default:
    fn::invoke:
      function: alicloud:getZones
      arguments:
        availableDiskCategory: cloud_efficiency
        availableResourceCreation: VSwitch
  defaultGetInstanceTypes:
    fn::invoke:
      function: alicloud:ecs:getInstanceTypes
      arguments:
        availabilityZone: ${default.zones[0].id}
  defaultGetImages:
    fn::invoke:
      function: alicloud:ecs:getImages
      arguments:
        nameRegex: ^ubuntu_18.*64
        owners: system
Copy

Create EcsLaunchTemplate Resource

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

Constructor syntax

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

@overload
def EcsLaunchTemplate(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[EcsLaunchTemplateDataDiskArgs]] = 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[EcsLaunchTemplateNetworkInterfacesArgs] = 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[EcsLaunchTemplateSystemDiskArgs] = 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 NewEcsLaunchTemplate(ctx *Context, name string, args *EcsLaunchTemplateArgs, opts ...ResourceOption) (*EcsLaunchTemplate, error)
public EcsLaunchTemplate(string name, EcsLaunchTemplateArgs? args = null, CustomResourceOptions? opts = null)
public EcsLaunchTemplate(String name, EcsLaunchTemplateArgs args)
public EcsLaunchTemplate(String name, EcsLaunchTemplateArgs args, CustomResourceOptions options)
type: alicloud:ecs:EcsLaunchTemplate
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 EcsLaunchTemplateArgs
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 EcsLaunchTemplateArgs
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 EcsLaunchTemplateArgs
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 EcsLaunchTemplateArgs
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. EcsLaunchTemplateArgs
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 ecsLaunchTemplateResource = new AliCloud.Ecs.EcsLaunchTemplate("ecsLaunchTemplateResource", new()
{
    AutoReleaseTime = "string",
    AutoRenew = false,
    AutoRenewPeriod = 0,
    DataDisks = new[]
    {
        new AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDiskArgs
        {
            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.EcsLaunchTemplateNetworkInterfacesArgs
    {
        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.EcsLaunchTemplateSystemDiskArgs
    {
        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.NewEcsLaunchTemplate(ctx, "ecsLaunchTemplateResource", &ecs.EcsLaunchTemplateArgs{
	AutoReleaseTime: pulumi.String("string"),
	AutoRenew:       pulumi.Bool(false),
	AutoRenewPeriod: pulumi.Int(0),
	DataDisks: ecs.EcsLaunchTemplateDataDiskArray{
		&ecs.EcsLaunchTemplateDataDiskArgs{
			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.EcsLaunchTemplateNetworkInterfacesArgs{
		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.EcsLaunchTemplateSystemDiskArgs{
		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 ecsLaunchTemplateResource = new EcsLaunchTemplate("ecsLaunchTemplateResource", EcsLaunchTemplateArgs.builder()
    .autoReleaseTime("string")
    .autoRenew(false)
    .autoRenewPeriod(0)
    .dataDisks(EcsLaunchTemplateDataDiskArgs.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(EcsLaunchTemplateNetworkInterfacesArgs.builder()
        .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(EcsLaunchTemplateSystemDiskArgs.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
ecs_launch_template_resource = alicloud.ecs.EcsLaunchTemplate("ecsLaunchTemplateResource",
    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={
        "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 ecsLaunchTemplateResource = new alicloud.ecs.EcsLaunchTemplate("ecsLaunchTemplateResource", {
    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: {
        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:EcsLaunchTemplate
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:
        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

EcsLaunchTemplate 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 EcsLaunchTemplate 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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
AutoRenewPeriod Changes to this property will trigger replacement. int
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
DataDisks List<Pulumi.AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDisk>
The list of data disks created with instance. See data_disks below.
DefaultVersionNumber int
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
DeploymentSetId string
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
The HTTP PUT response hop limit required for instance metadata requests.
HttpTokens Changes to this property will trigger replacement. string
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
ImageId string
The Image ID.
ImageOwnerAlias string
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
InstanceChargeType string
Billing methods. Valid values: PostPaid, PrePaid.
InstanceName string
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The name of Launch Template.
Name Changes to this property will trigger replacement. string
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

NetworkInterfaces Pulumi.AliCloud.Ecs.Inputs.EcsLaunchTemplateNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
NetworkType string
Network type of the instance. Valid values: classic, vpc.
PasswordInherit bool
Whether to use the password preset by the mirror.
Period Changes to this property will trigger replacement. int
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
PeriodUnit Changes to this property will trigger replacement. string
The unit of the subscription period. Valid values: Month (default).
PrivateIpAddress string
The private IP address of the instance.
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds List<string>
The ID of security group N to which to assign the instance.
SpotDuration string
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
SystemDisk Pulumi.AliCloud.Ecs.Inputs.EcsLaunchTemplateSystemDisk
The System Disk. See system_disk below.
SystemDiskCategory string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskDescription string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskName string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskSize int
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
TemplateTags Dictionary<string, string>
A mapping of tags to assign to the launch template.
UpdateDefaultVersionNumber bool
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
UserData string
The User Data.
Userdata string
It has been deprecated from version 1.120.0, and use field user_data instead.

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

VersionDescription string
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
VpcId string
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
AutoRenewPeriod Changes to this property will trigger replacement. int
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
DataDisks []EcsLaunchTemplateDataDiskArgs
The list of data disks created with instance. See data_disks below.
DefaultVersionNumber int
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
DeploymentSetId string
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
The HTTP PUT response hop limit required for instance metadata requests.
HttpTokens Changes to this property will trigger replacement. string
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
ImageId string
The Image ID.
ImageOwnerAlias string
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
InstanceChargeType string
Billing methods. Valid values: PostPaid, PrePaid.
InstanceName string
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The name of Launch Template.
Name Changes to this property will trigger replacement. string
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

NetworkInterfaces EcsLaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
NetworkType string
Network type of the instance. Valid values: classic, vpc.
PasswordInherit bool
Whether to use the password preset by the mirror.
Period Changes to this property will trigger replacement. int
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
PeriodUnit Changes to this property will trigger replacement. string
The unit of the subscription period. Valid values: Month (default).
PrivateIpAddress string
The private IP address of the instance.
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds []string
The ID of security group N to which to assign the instance.
SpotDuration string
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
SystemDisk EcsLaunchTemplateSystemDiskArgs
The System Disk. See system_disk below.
SystemDiskCategory string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskDescription string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskName string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskSize int
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
TemplateTags map[string]string
A mapping of tags to assign to the launch template.
UpdateDefaultVersionNumber bool
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
UserData string
The User Data.
Userdata string
It has been deprecated from version 1.120.0, and use field user_data instead.

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

VersionDescription string
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
VpcId string
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
autoRenewPeriod Changes to this property will trigger replacement. Integer
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
dataDisks List<EcsLaunchTemplateDataDisk>
The list of data disks created with instance. See data_disks below.
defaultVersionNumber Integer
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deploymentSetId String
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Integer
The HTTP PUT response hop limit required for instance metadata requests.
httpTokens Changes to this property will trigger replacement. String
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
imageId String
The Image ID.
imageOwnerAlias String
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instanceChargeType String
Billing methods. Valid values: PostPaid, PrePaid.
instanceName String
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The name of Launch Template.
name Changes to this property will trigger replacement. String
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

networkInterfaces EcsLaunchTemplateNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
networkType String
Network type of the instance. Valid values: classic, vpc.
passwordInherit Boolean
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. Integer
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
periodUnit Changes to this property will trigger replacement. String
The unit of the subscription period. Valid values: Month (default).
privateIpAddress String
The private IP address of the instance.
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
The ID of security group N to which to assign the instance.
spotDuration String
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
systemDisk EcsLaunchTemplateSystemDisk
The System Disk. See system_disk below.
systemDiskCategory String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskDescription String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskName String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskSize Integer
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
templateTags Map<String,String>
A mapping of tags to assign to the launch template.
updateDefaultVersionNumber Boolean
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
userData String
The User Data.
userdata String
It has been deprecated from version 1.120.0, and use field user_data instead.

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

versionDescription String
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpcId String
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
autoRenewPeriod Changes to this property will trigger replacement. number
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
dataDisks EcsLaunchTemplateDataDisk[]
The list of data disks created with instance. See data_disks below.
defaultVersionNumber number
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deploymentSetId string
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. number
The HTTP PUT response hop limit required for instance metadata requests.
httpTokens Changes to this property will trigger replacement. string
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
imageId string
The Image ID.
imageOwnerAlias string
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instanceChargeType string
Billing methods. Valid values: PostPaid, PrePaid.
instanceName string
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The name of Launch Template.
name Changes to this property will trigger replacement. string
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

networkInterfaces EcsLaunchTemplateNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
networkType string
Network type of the instance. Valid values: classic, vpc.
passwordInherit boolean
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. number
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
periodUnit Changes to this property will trigger replacement. string
The unit of the subscription period. Valid values: Month (default).
privateIpAddress string
The private IP address of the instance.
ramRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId string
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
securityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
securityGroupId string
The security group ID.
securityGroupIds string[]
The ID of security group N to which to assign the instance.
spotDuration string
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
systemDisk EcsLaunchTemplateSystemDisk
The System Disk. See system_disk below.
systemDiskCategory string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskDescription string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskName string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskSize number
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
templateTags {[key: string]: string}
A mapping of tags to assign to the launch template.
updateDefaultVersionNumber boolean
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
userData string
The User Data.
userdata string
It has been deprecated from version 1.120.0, and use field user_data instead.

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

versionDescription string
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpcId string
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
auto_renew_period Changes to this property will trigger replacement. int
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
data_disks Sequence[EcsLaunchTemplateDataDiskArgs]
The list of data disks created with instance. See data_disks below.
default_version_number int
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deployment_set_id str
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
http_put_response_hop_limit Changes to this property will trigger replacement. int
The HTTP PUT response hop limit required for instance metadata requests.
http_tokens Changes to this property will trigger replacement. str
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
image_id str
The Image ID.
image_owner_alias str
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instance_charge_type str
Billing methods. Valid values: PostPaid, PrePaid.
instance_name str
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The name of Launch Template.
name Changes to this property will trigger replacement. str
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

network_interfaces EcsLaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
network_type str
Network type of the instance. Valid values: classic, vpc.
password_inherit bool
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. int
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
period_unit Changes to this property will trigger replacement. str
The unit of the subscription period. Valid values: Month (default).
private_ip_address str
The private IP address of the instance.
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
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
security_enhancement_strategy str
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
security_group_id str
The security group ID.
security_group_ids Sequence[str]
The ID of security group N to which to assign the instance.
spot_duration str
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
system_disk EcsLaunchTemplateSystemDiskArgs
The System Disk. See system_disk below.
system_disk_category str
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

system_disk_description str
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

system_disk_name str
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

system_disk_size int
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
template_tags Mapping[str, str]
A mapping of tags to assign to the launch template.
update_default_version_number bool
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
user_data str
The User Data.
userdata str
It has been deprecated from version 1.120.0, and use field user_data instead.

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

version_description str
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpc_id str
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
autoRenewPeriod Changes to this property will trigger replacement. Number
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
dataDisks List<Property Map>
The list of data disks created with instance. See data_disks below.
defaultVersionNumber Number
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deploymentSetId String
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Number
The HTTP PUT response hop limit required for instance metadata requests.
httpTokens Changes to this property will trigger replacement. String
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
imageId String
The Image ID.
imageOwnerAlias String
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instanceChargeType String
Billing methods. Valid values: PostPaid, PrePaid.
instanceName String
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The name of Launch Template.
name Changes to this property will trigger replacement. String
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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. See network_interfaces below.
networkType String
Network type of the instance. Valid values: classic, vpc.
passwordInherit Boolean
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. Number
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
periodUnit Changes to this property will trigger replacement. String
The unit of the subscription period. Valid values: Month (default).
privateIpAddress String
The private IP address of the instance.
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
The ID of security group N to which to assign the instance.
spotDuration String
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
systemDisk Property Map
The System Disk. See system_disk below.
systemDiskCategory String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskDescription String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskName String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskSize Number
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
templateTags Map<String>
A mapping of tags to assign to the launch template.
updateDefaultVersionNumber Boolean
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
userData String
The User Data.
userdata String
It has been deprecated from version 1.120.0, and use field user_data instead.

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

versionDescription String
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpcId String
The ID of the VPC.
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 EcsLaunchTemplate resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
LatestVersionNumber int
The latest version number of the launch template.
Id string
The provider-assigned unique ID for this managed resource.
LatestVersionNumber int
The latest version number of the launch template.
id String
The provider-assigned unique ID for this managed resource.
latestVersionNumber Integer
The latest version number of the launch template.
id string
The provider-assigned unique ID for this managed resource.
latestVersionNumber number
The latest version number of the launch template.
id str
The provider-assigned unique ID for this managed resource.
latest_version_number int
The latest version number of the launch template.
id String
The provider-assigned unique ID for this managed resource.
latestVersionNumber Number
The latest version number of the launch template.

Look up Existing EcsLaunchTemplate Resource

Get an existing EcsLaunchTemplate 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?: EcsLaunchTemplateState, opts?: CustomResourceOptions): EcsLaunchTemplate
@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[EcsLaunchTemplateDataDiskArgs]] = 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[EcsLaunchTemplateNetworkInterfacesArgs] = 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[EcsLaunchTemplateSystemDiskArgs] = 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) -> EcsLaunchTemplate
func GetEcsLaunchTemplate(ctx *Context, name string, id IDInput, state *EcsLaunchTemplateState, opts ...ResourceOption) (*EcsLaunchTemplate, error)
public static EcsLaunchTemplate Get(string name, Input<string> id, EcsLaunchTemplateState? state, CustomResourceOptions? opts = null)
public static EcsLaunchTemplate get(String name, Output<String> id, EcsLaunchTemplateState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ecs:EcsLaunchTemplate    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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
AutoRenewPeriod Changes to this property will trigger replacement. int
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
DataDisks List<Pulumi.AliCloud.Ecs.Inputs.EcsLaunchTemplateDataDisk>
The list of data disks created with instance. See data_disks below.
DefaultVersionNumber int
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
DeploymentSetId string
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
The HTTP PUT response hop limit required for instance metadata requests.
HttpTokens Changes to this property will trigger replacement. string
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
ImageId string
The Image ID.
ImageOwnerAlias string
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
InstanceChargeType string
Billing methods. Valid values: PostPaid, PrePaid.
InstanceName string
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The latest version number of the launch template.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of Launch Template.
Name Changes to this property will trigger replacement. string
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

NetworkInterfaces Pulumi.AliCloud.Ecs.Inputs.EcsLaunchTemplateNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
NetworkType string
Network type of the instance. Valid values: classic, vpc.
PasswordInherit bool
Whether to use the password preset by the mirror.
Period Changes to this property will trigger replacement. int
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
PeriodUnit Changes to this property will trigger replacement. string
The unit of the subscription period. Valid values: Month (default).
PrivateIpAddress string
The private IP address of the instance.
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds List<string>
The ID of security group N to which to assign the instance.
SpotDuration string
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
SystemDisk Pulumi.AliCloud.Ecs.Inputs.EcsLaunchTemplateSystemDisk
The System Disk. See system_disk below.
SystemDiskCategory string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskDescription string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskName string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskSize int
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
TemplateTags Dictionary<string, string>
A mapping of tags to assign to the launch template.
UpdateDefaultVersionNumber bool
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
UserData string
The User Data.
Userdata string
It has been deprecated from version 1.120.0, and use field user_data instead.

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

VersionDescription string
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
VpcId string
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
AutoRenewPeriod Changes to this property will trigger replacement. int
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
DataDisks []EcsLaunchTemplateDataDiskArgs
The list of data disks created with instance. See data_disks below.
DefaultVersionNumber int
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
DeploymentSetId string
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
The HTTP PUT response hop limit required for instance metadata requests.
HttpTokens Changes to this property will trigger replacement. string
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
ImageId string
The Image ID.
ImageOwnerAlias string
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
InstanceChargeType string
Billing methods. Valid values: PostPaid, PrePaid.
InstanceName string
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The latest version number of the launch template.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of Launch Template.
Name Changes to this property will trigger replacement. string
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

NetworkInterfaces EcsLaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
NetworkType string
Network type of the instance. Valid values: classic, vpc.
PasswordInherit bool
Whether to use the password preset by the mirror.
Period Changes to this property will trigger replacement. int
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
PeriodUnit Changes to this property will trigger replacement. string
The unit of the subscription period. Valid values: Month (default).
PrivateIpAddress string
The private IP address of the instance.
RamRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
ResourceGroupId string
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
SecurityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
SecurityGroupId string
The security group ID.
SecurityGroupIds []string
The ID of security group N to which to assign the instance.
SpotDuration string
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
SystemDisk EcsLaunchTemplateSystemDiskArgs
The System Disk. See system_disk below.
SystemDiskCategory string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskDescription string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskName string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

SystemDiskSize int
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
TemplateTags map[string]string
A mapping of tags to assign to the launch template.
UpdateDefaultVersionNumber bool
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
UserData string
The User Data.
Userdata string
It has been deprecated from version 1.120.0, and use field user_data instead.

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

VersionDescription string
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
VpcId string
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
autoRenewPeriod Changes to this property will trigger replacement. Integer
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
dataDisks List<EcsLaunchTemplateDataDisk>
The list of data disks created with instance. See data_disks below.
defaultVersionNumber Integer
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deploymentSetId String
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Integer
The HTTP PUT response hop limit required for instance metadata requests.
httpTokens Changes to this property will trigger replacement. String
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
imageId String
The Image ID.
imageOwnerAlias String
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instanceChargeType String
Billing methods. Valid values: PostPaid, PrePaid.
instanceName String
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The latest version number of the launch template.
launchTemplateName Changes to this property will trigger replacement. String
The name of Launch Template.
name Changes to this property will trigger replacement. String
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

networkInterfaces EcsLaunchTemplateNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
networkType String
Network type of the instance. Valid values: classic, vpc.
passwordInherit Boolean
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. Integer
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
periodUnit Changes to this property will trigger replacement. String
The unit of the subscription period. Valid values: Month (default).
privateIpAddress String
The private IP address of the instance.
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
The ID of security group N to which to assign the instance.
spotDuration String
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
systemDisk EcsLaunchTemplateSystemDisk
The System Disk. See system_disk below.
systemDiskCategory String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskDescription String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskName String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskSize Integer
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
templateTags Map<String,String>
A mapping of tags to assign to the launch template.
updateDefaultVersionNumber Boolean
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
userData String
The User Data.
userdata String
It has been deprecated from version 1.120.0, and use field user_data instead.

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

versionDescription String
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpcId String
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
autoRenewPeriod Changes to this property will trigger replacement. number
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
dataDisks EcsLaunchTemplateDataDisk[]
The list of data disks created with instance. See data_disks below.
defaultVersionNumber number
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deploymentSetId string
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. number
The HTTP PUT response hop limit required for instance metadata requests.
httpTokens Changes to this property will trigger replacement. string
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
imageId string
The Image ID.
imageOwnerAlias string
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instanceChargeType string
Billing methods. Valid values: PostPaid, PrePaid.
instanceName string
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The latest version number of the launch template.
launchTemplateName Changes to this property will trigger replacement. string
The name of Launch Template.
name Changes to this property will trigger replacement. string
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

networkInterfaces EcsLaunchTemplateNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
networkType string
Network type of the instance. Valid values: classic, vpc.
passwordInherit boolean
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. number
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
periodUnit Changes to this property will trigger replacement. string
The unit of the subscription period. Valid values: Month (default).
privateIpAddress string
The private IP address of the instance.
ramRoleName string
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId string
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
securityEnhancementStrategy string
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
securityGroupId string
The security group ID.
securityGroupIds string[]
The ID of security group N to which to assign the instance.
spotDuration string
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
systemDisk EcsLaunchTemplateSystemDisk
The System Disk. See system_disk below.
systemDiskCategory string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskDescription string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskName string
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskSize number
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
templateTags {[key: string]: string}
A mapping of tags to assign to the launch template.
updateDefaultVersionNumber boolean
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
userData string
The User Data.
userdata string
It has been deprecated from version 1.120.0, and use field user_data instead.

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

versionDescription string
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpcId string
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
auto_renew_period Changes to this property will trigger replacement. int
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
data_disks Sequence[EcsLaunchTemplateDataDiskArgs]
The list of data disks created with instance. See data_disks below.
default_version_number int
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deployment_set_id str
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
http_put_response_hop_limit Changes to this property will trigger replacement. int
The HTTP PUT response hop limit required for instance metadata requests.
http_tokens Changes to this property will trigger replacement. str
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
image_id str
The Image ID.
image_owner_alias str
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instance_charge_type str
Billing methods. Valid values: PostPaid, PrePaid.
instance_name str
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The latest version number of the launch template.
launch_template_name Changes to this property will trigger replacement. str
The name of Launch Template.
name Changes to this property will trigger replacement. str
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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

network_interfaces EcsLaunchTemplateNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
network_type str
Network type of the instance. Valid values: classic, vpc.
password_inherit bool
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. int
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
period_unit Changes to this property will trigger replacement. str
The unit of the subscription period. Valid values: Month (default).
private_ip_address str
The private IP address of the instance.
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
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
security_enhancement_strategy str
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
security_group_id str
The security group ID.
security_group_ids Sequence[str]
The ID of security group N to which to assign the instance.
spot_duration str
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
system_disk EcsLaunchTemplateSystemDiskArgs
The System Disk. See system_disk below.
system_disk_category str
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

system_disk_description str
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

system_disk_name str
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

system_disk_size int
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
template_tags Mapping[str, str]
A mapping of tags to assign to the launch template.
update_default_version_number bool
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
user_data str
The User Data.
userdata str
It has been deprecated from version 1.120.0, and use field user_data instead.

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

version_description str
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpc_id str
The ID of the VPC.
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
Specifies whether to enable auto-renewal for the instance. This parameter is valid only if internet_charge_type is set to PrePaid.
autoRenewPeriod Changes to this property will trigger replacement. Number
The auto-renewal period of the instance. Valid values when period_unit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
dataDisks List<Property Map>
The list of data disks created with instance. See data_disks below.
defaultVersionNumber Number
The version number of the default launch template version. Default to 1. It is conflict with update_default_version_number.
deploymentSetId String
The Deployment Set Id.
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
Whether to enable the instance operating system configuration.
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
Whether to enable access to instance metadata. Valid values:

  • enabled: Enabled.
  • disabled: Disabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Number
The HTTP PUT response hop limit required for instance metadata requests.
httpTokens Changes to this property will trigger replacement. String
Whether to use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: Not mandatory.
  • required: Mandatory. After this value is set, the normal mode cannot access instance metadata.
imageId String
The Image ID.
imageOwnerAlias String
Mirror source. Valid values: system, self, others, marketplace, "". Default to: "".
instanceChargeType String
Billing methods. Valid values: PostPaid, PrePaid.
instanceName String
The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), commas (,), brackets ([]), 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. Valid 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. Valid 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
The latest version number of the launch template.
launchTemplateName Changes to this property will trigger replacement. String
The name of Launch Template.
name Changes to this property will trigger replacement. String
It has been deprecated from version 1.120.0, and use field launch_template_name instead.

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. See network_interfaces below.
networkType String
Network type of the instance. Valid values: classic, vpc.
passwordInherit Boolean
Whether to use the password preset by the mirror.
period Changes to this property will trigger replacement. Number
The subscription period of the instance. Unit: months. This parameter takes effect and is required only when InstanceChargeType is set to PrePaid. If the DedicatedHostId parameter is specified, the value of the Period parameter must be within the subscription period of the dedicated host.

  • When the PeriodUnit parameter is set to Week, the valid values of the Period parameter are 1, 2, 3, and 4.
  • When the PeriodUnit parameter is set to Month, the valid values of the Period parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
periodUnit Changes to this property will trigger replacement. String
The unit of the subscription period. Valid values: Month (default).
privateIpAddress String
The private IP address of the instance.
ramRoleName String
The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
resourceGroupId String
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and ENI.
securityEnhancementStrategy String
Whether or not to activate the security enhancement feature and install network security software free of charge. Valid values: Active, Deactive.
securityGroupId String
The security group ID.
securityGroupIds List<String>
The ID of security group N to which to assign the instance.
spotDuration String
The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. Default to: 1.
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. Valid values: NoSpot, SpotAsPriceGo, SpotWithPriceLimit.
systemDisk Property Map
The System Disk. See system_disk below.
systemDiskCategory String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskDescription String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskName String
It has been deprecated from version 1.120.0, and use field system_disk instead.

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

systemDiskSize Number
It has been deprecated from version 1.120.0, and use field system_disk instead.

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 instance, block storage, and elastic network.

  • 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
The template resource group id.
templateTags Map<String>
A mapping of tags to assign to the launch template.
updateDefaultVersionNumber Boolean
Whether to update the default version of the launch template to the latest version automatically. It is conflict with default_version_number.
userData String
The User Data.
userdata String
It has been deprecated from version 1.120.0, and use field user_data instead.

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

versionDescription String
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
vpcId String
The ID of the VPC.
vswitchId String
When creating a VPC-Connected instance, you must specify its VSwitch ID.
zoneId String
The zone ID of the instance.

Supporting Types

EcsLaunchTemplateDataDisk
, EcsLaunchTemplateDataDiskArgs

Category string
The category of the disk.
DeleteWithInstance bool
Indicates whether the data disk is released with the instance.
Description string
The description of the data disk.
Device string
The mount point of the data disk.
Encrypted bool
Encrypted the data in this disk.
Name string
The name of the data disk.
PerformanceLevel string
The performance level of the ESSD used as the data disk.
Size int
The size of the data disk.
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.
DeleteWithInstance bool
Indicates whether the data disk is released with the instance.
Description string
The description of the data disk.
Device string
The mount point of the data disk.
Encrypted bool
Encrypted the data in this disk.
Name string
The name of the data disk.
PerformanceLevel string
The performance level of the ESSD used as the data disk.
Size int
The size of the data disk.
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.
deleteWithInstance Boolean
Indicates whether the data disk is released with the instance.
description String
The description of the data disk.
device String
The mount point of the data disk.
encrypted Boolean
Encrypted the data in this disk.
name String
The name of the data disk.
performanceLevel String
The performance level of the ESSD used as the data disk.
size Integer
The size of the data disk.
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.
deleteWithInstance boolean
Indicates whether the data disk is released with the instance.
description string
The description of the data disk.
device string
The mount point of the data disk.
encrypted boolean
Encrypted the data in this disk.
name string
The name of the data disk.
performanceLevel string
The performance level of the ESSD used as the data disk.
size number
The size of the data disk.
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.
delete_with_instance bool
Indicates whether the data disk is released with the instance.
description str
The description of the data disk.
device str
The mount point of the data disk.
encrypted bool
Encrypted the data in this disk.
name str
The name of the data disk.
performance_level str
The performance level of the ESSD used as the data disk.
size int
The size of the data disk.
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.
deleteWithInstance Boolean
Indicates whether the data disk is released with the instance.
description String
The description of the data disk.
device String
The mount point of the data disk.
encrypted Boolean
Encrypted the data in this disk.
name String
The name of the data disk.
performanceLevel String
The performance level of the ESSD used as the data disk.
size Number
The size of the data disk.
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.

EcsLaunchTemplateNetworkInterfaces
, EcsLaunchTemplateNetworkInterfacesArgs

Description string
The ENI description.
Name string
The 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.
Description string
The ENI description.
Name string
The 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.
description String
The ENI description.
name String
The 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.
description string
The ENI description.
name string
The 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.
description str
The ENI description.
name str
The 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.
description String
The ENI description.
name String
The 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.

EcsLaunchTemplateSystemDisk
, EcsLaunchTemplateSystemDiskArgs

Category string
The category of the system disk. System disk type. Valid values: all, cloud, ephemeral_ssd, cloud_essd, cloud_efficiency, cloud_ssd, local_disk.
DeleteWithInstance bool
Specifies whether to release the system disk when the instance is released. Default to true.
Description string
System disk description. It cannot begin with http:// or https://.
Encrypted bool
Specifies whether the system disk is encrypted.
Iops string
The Iops.
Name 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 (-).
PerformanceLevel string
The performance level of the ESSD used as the system disk. Valid Values: PL0, PL1, PL2, and PL3. Default to: PL0.
Size int
Size of the system disk, measured in GB. Value range: [20, 500].
Category string
The category of the system disk. System disk type. Valid values: all, cloud, ephemeral_ssd, cloud_essd, cloud_efficiency, cloud_ssd, local_disk.
DeleteWithInstance bool
Specifies whether to release the system disk when the instance is released. Default to true.
Description string
System disk description. It cannot begin with http:// or https://.
Encrypted bool
Specifies whether the system disk is encrypted.
Iops string
The Iops.
Name 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 (-).
PerformanceLevel string
The performance level of the ESSD used as the system disk. Valid Values: PL0, PL1, PL2, and PL3. Default to: PL0.
Size int
Size of the system disk, measured in GB. Value range: [20, 500].
category String
The category of the system disk. System disk type. Valid values: all, cloud, ephemeral_ssd, cloud_essd, cloud_efficiency, cloud_ssd, local_disk.
deleteWithInstance Boolean
Specifies whether to release the system disk when the instance is released. Default to true.
description String
System disk description. It cannot begin with http:// or https://.
encrypted Boolean
Specifies whether the system disk is encrypted.
iops String
The Iops.
name 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 (-).
performanceLevel String
The performance level of the ESSD used as the system disk. Valid Values: PL0, PL1, PL2, and PL3. Default to: PL0.
size Integer
Size of the system disk, measured in GB. Value range: [20, 500].
category string
The category of the system disk. System disk type. Valid values: all, cloud, ephemeral_ssd, cloud_essd, cloud_efficiency, cloud_ssd, local_disk.
deleteWithInstance boolean
Specifies whether to release the system disk when the instance is released. Default to true.
description string
System disk description. It cannot begin with http:// or https://.
encrypted boolean
Specifies whether the system disk is encrypted.
iops string
The Iops.
name 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 (-).
performanceLevel string
The performance level of the ESSD used as the system disk. Valid Values: PL0, PL1, PL2, and PL3. Default to: PL0.
size number
Size of the system disk, measured in GB. Value range: [20, 500].
category str
The category of the system disk. System disk type. Valid values: all, cloud, ephemeral_ssd, cloud_essd, cloud_efficiency, cloud_ssd, local_disk.
delete_with_instance bool
Specifies whether to release the system disk when the instance is released. Default to true.
description str
System disk description. It cannot begin with http:// or https://.
encrypted bool
Specifies whether the system disk is encrypted.
iops str
The Iops.
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 (-).
performance_level str
The performance level of the ESSD used as the system disk. Valid Values: PL0, PL1, PL2, and PL3. Default to: PL0.
size int
Size of the system disk, measured in GB. Value range: [20, 500].
category String
The category of the system disk. System disk type. Valid values: all, cloud, ephemeral_ssd, cloud_essd, cloud_efficiency, cloud_ssd, local_disk.
deleteWithInstance Boolean
Specifies whether to release the system disk when the instance is released. Default to true.
description String
System disk description. It cannot begin with http:// or https://.
encrypted Boolean
Specifies whether the system disk is encrypted.
iops String
The Iops.
name 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 (-).
performanceLevel String
The performance level of the ESSD used as the system disk. Valid Values: PL0, PL1, PL2, and PL3. Default to: PL0.
size Number
Size of the system disk, measured in GB. Value range: [20, 500].

Import

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

$ pulumi import alicloud:ecs/ecsLaunchTemplate:EcsLaunchTemplate example <id>
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.