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

alicloud.ecs.Instance

Explore with Pulumi AI

Provides a ECS instance resource.

NOTE: Available since v1.0.0

NOTE: From version v1.213.0, you can specify launch_template_id and launch_template_version to use a launch template. This eliminates the need to configure a large number of parameters every time you create instances.

Example Usage

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

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const instanceType = config.get("instanceType") || "ecs.n4.large";
const imageId = config.get("imageId") || "ubuntu_18_04_64_20G_alibase_20190624.vhd";
// Create a new ECS instance for VPC
const vpc = new alicloud.vpc.Network("vpc", {
    vpcName: name,
    cidrBlock: "172.16.0.0/16",
});
// Create a new ECS instance for a VPC
const group = new alicloud.ecs.SecurityGroup("group", {
    securityGroupName: name,
    description: "foo",
    vpcId: vpc.id,
});
const key = new alicloud.kms.Key("key", {
    description: "Hello KMS",
    pendingWindowInDays: 7,
    status: "Enabled",
});
const _default = alicloud.getZones({
    availableDiskCategory: "cloud_efficiency",
    availableResourceCreation: "VSwitch",
    availableInstanceType: instanceType,
});
const vswitch = new alicloud.vpc.Switch("vswitch", {
    vpcId: vpc.id,
    cidrBlock: "172.16.0.0/24",
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
    vswitchName: name,
});
const instance = new alicloud.ecs.Instance("instance", {
    availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
    securityGroups: [group].map(__item => __item.id),
    instanceType: instanceType,
    systemDiskCategory: "cloud_efficiency",
    systemDiskName: name,
    systemDiskDescription: "test_foo_system_disk_description",
    imageId: imageId,
    instanceName: name,
    vswitchId: vswitch.id,
    internetMaxBandwidthOut: 10,
    dataDisks: [{
        name: "disk2",
        size: 20,
        category: "cloud_efficiency",
        description: "disk2",
        encrypted: true,
        kmsKeyId: key.id,
    }],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
instance_type = config.get("instanceType")
if instance_type is None:
    instance_type = "ecs.n4.large"
image_id = config.get("imageId")
if image_id is None:
    image_id = "ubuntu_18_04_64_20G_alibase_20190624.vhd"
# Create a new ECS instance for VPC
vpc = alicloud.vpc.Network("vpc",
    vpc_name=name,
    cidr_block="172.16.0.0/16")
# Create a new ECS instance for a VPC
group = alicloud.ecs.SecurityGroup("group",
    security_group_name=name,
    description="foo",
    vpc_id=vpc.id)
key = alicloud.kms.Key("key",
    description="Hello KMS",
    pending_window_in_days=7,
    status="Enabled")
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
    available_resource_creation="VSwitch",
    available_instance_type=instance_type)
vswitch = alicloud.vpc.Switch("vswitch",
    vpc_id=vpc.id,
    cidr_block="172.16.0.0/24",
    zone_id=default.zones[0].id,
    vswitch_name=name)
instance = alicloud.ecs.Instance("instance",
    availability_zone=default.zones[0].id,
    security_groups=[__item.id for __item in [group]],
    instance_type=instance_type,
    system_disk_category="cloud_efficiency",
    system_disk_name=name,
    system_disk_description="test_foo_system_disk_description",
    image_id=image_id,
    instance_name=name,
    vswitch_id=vswitch.id,
    internet_max_bandwidth_out=10,
    data_disks=[{
        "name": "disk2",
        "size": 20,
        "category": "cloud_efficiency",
        "description": "disk2",
        "encrypted": True,
        "kms_key_id": key.id,
    }])
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/kms"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example";
if param := cfg.Get("name"); param != ""{
name = param
}
instanceType := "ecs.n4.large";
if param := cfg.Get("instanceType"); param != ""{
instanceType = param
}
imageId := "ubuntu_18_04_64_20G_alibase_20190624.vhd";
if param := cfg.Get("imageId"); param != ""{
imageId = param
}
// Create a new ECS instance for VPC
vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
// Create a new ECS instance for a VPC
group, err := ecs.NewSecurityGroup(ctx, "group", &ecs.SecurityGroupArgs{
SecurityGroupName: pulumi.String(name),
Description: pulumi.String("foo"),
VpcId: vpc.ID(),
})
if err != nil {
return err
}
key, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
Description: pulumi.String("Hello KMS"),
PendingWindowInDays: pulumi.Int(7),
Status: pulumi.String("Enabled"),
})
if err != nil {
return err
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
AvailableInstanceType: pulumi.StringRef(instanceType),
}, nil);
if err != nil {
return err
}
vswitch, err := vpc.NewSwitch(ctx, "vswitch", &vpc.SwitchArgs{
VpcId: vpc.ID(),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(_default.Zones[0].Id),
VswitchName: pulumi.String(name),
})
if err != nil {
return err
}
var splat0 pulumi.StringArray
for _, val0 := range %!v(PANIC=Format method: fatal: An assertion has failed: tok: ) {
splat0 = append(splat0, val0.ID())
}
_, err = ecs.NewInstance(ctx, "instance", &ecs.InstanceArgs{
AvailabilityZone: pulumi.String(_default.Zones[0].Id),
SecurityGroups: splat0,
InstanceType: pulumi.String(instanceType),
SystemDiskCategory: pulumi.String("cloud_efficiency"),
SystemDiskName: pulumi.String(name),
SystemDiskDescription: pulumi.String("test_foo_system_disk_description"),
ImageId: pulumi.String(imageId),
InstanceName: pulumi.String(name),
VswitchId: vswitch.ID(),
InternetMaxBandwidthOut: pulumi.Int(10),
DataDisks: ecs.InstanceDataDiskArray{
&ecs.InstanceDataDiskArgs{
Name: pulumi.String("disk2"),
Size: pulumi.Int(20),
Category: pulumi.String("cloud_efficiency"),
Description: pulumi.String("disk2"),
Encrypted: pulumi.Bool(true),
KmsKeyId: key.ID(),
},
},
})
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 config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var instanceType = config.Get("instanceType") ?? "ecs.n4.large";
    var imageId = config.Get("imageId") ?? "ubuntu_18_04_64_20G_alibase_20190624.vhd";
    // Create a new ECS instance for VPC
    var vpc = new AliCloud.Vpc.Network("vpc", new()
    {
        VpcName = name,
        CidrBlock = "172.16.0.0/16",
    });

    // Create a new ECS instance for a VPC
    var @group = new AliCloud.Ecs.SecurityGroup("group", new()
    {
        SecurityGroupName = name,
        Description = "foo",
        VpcId = vpc.Id,
    });

    var key = new AliCloud.Kms.Key("key", new()
    {
        Description = "Hello KMS",
        PendingWindowInDays = 7,
        Status = "Enabled",
    });

    var @default = AliCloud.GetZones.Invoke(new()
    {
        AvailableDiskCategory = "cloud_efficiency",
        AvailableResourceCreation = "VSwitch",
        AvailableInstanceType = instanceType,
    });

    var vswitch = new AliCloud.Vpc.Switch("vswitch", new()
    {
        VpcId = vpc.Id,
        CidrBlock = "172.16.0.0/24",
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        VswitchName = name,
    });

    var instance = new AliCloud.Ecs.Instance("instance", new()
    {
        AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        SecurityGroups = new[]
        {
            @group,
        }.Select(__item => __item.Id).ToList(),
        InstanceType = instanceType,
        SystemDiskCategory = "cloud_efficiency",
        SystemDiskName = name,
        SystemDiskDescription = "test_foo_system_disk_description",
        ImageId = imageId,
        InstanceName = name,
        VswitchId = vswitch.Id,
        InternetMaxBandwidthOut = 10,
        DataDisks = new[]
        {
            new AliCloud.Ecs.Inputs.InstanceDataDiskArgs
            {
                Name = "disk2",
                Size = 20,
                Category = "cloud_efficiency",
                Description = "disk2",
                Encrypted = true,
                KmsKeyId = key.Id,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.kms.Key;
import com.pulumi.alicloud.kms.KeyArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.ecs.inputs.InstanceDataDiskArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var instanceType = config.get("instanceType").orElse("ecs.n4.large");
        final var imageId = config.get("imageId").orElse("ubuntu_18_04_64_20G_alibase_20190624.vhd");
        // Create a new ECS instance for VPC
        var vpc = new Network("vpc", NetworkArgs.builder()
            .vpcName(name)
            .cidrBlock("172.16.0.0/16")
            .build());

        // Create a new ECS instance for a VPC
        var group = new SecurityGroup("group", SecurityGroupArgs.builder()
            .securityGroupName(name)
            .description("foo")
            .vpcId(vpc.id())
            .build());

        var key = new Key("key", KeyArgs.builder()
            .description("Hello KMS")
            .pendingWindowInDays("7")
            .status("Enabled")
            .build());

        final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableDiskCategory("cloud_efficiency")
            .availableResourceCreation("VSwitch")
            .availableInstanceType(instanceType)
            .build());

        var vswitch = new Switch("vswitch", SwitchArgs.builder()
            .vpcId(vpc.id())
            .cidrBlock("172.16.0.0/24")
            .zoneId(default_.zones()[0].id())
            .vswitchName(name)
            .build());

        var instance = new Instance("instance", InstanceArgs.builder()
            .availabilityZone(default_.zones()[0].id())
            .securityGroups(group.stream().map(element -> element.id()).collect(toList()))
            .instanceType(instanceType)
            .systemDiskCategory("cloud_efficiency")
            .systemDiskName(name)
            .systemDiskDescription("test_foo_system_disk_description")
            .imageId(imageId)
            .instanceName(name)
            .vswitchId(vswitch.id())
            .internetMaxBandwidthOut(10)
            .dataDisks(InstanceDataDiskArgs.builder()
                .name("disk2")
                .size(20)
                .category("cloud_efficiency")
                .description("disk2")
                .encrypted(true)
                .kmsKeyId(key.id())
                .build())
            .build());

    }
}
Copy
Coming soon!

Module Support

You can use the existing ecs-instance module to create several ECS instances one-click.

Create Instance Resource

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

Constructor syntax

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

@overload
def Instance(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             allocate_public_ip: Optional[bool] = None,
             auto_release_time: Optional[str] = None,
             auto_renew_period: Optional[int] = None,
             availability_zone: Optional[str] = None,
             credit_specification: Optional[str] = None,
             data_disks: Optional[Sequence[InstanceDataDiskArgs]] = None,
             dedicated_host_id: Optional[str] = None,
             deletion_protection: Optional[bool] = None,
             deployment_set_id: Optional[str] = None,
             description: Optional[str] = None,
             dry_run: Optional[bool] = None,
             enable_jumbo_frame: Optional[bool] = None,
             force_delete: Optional[bool] = None,
             host_name: Optional[str] = None,
             hpc_cluster_id: 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_options: Optional[InstanceImageOptionsArgs] = None,
             include_data_disks: Optional[bool] = 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,
             ipv6_address_count: Optional[int] = None,
             ipv6_addresses: Optional[Sequence[str]] = None,
             is_outdated: Optional[bool] = None,
             key_name: Optional[str] = None,
             kms_encrypted_password: Optional[str] = None,
             kms_encryption_context: Optional[Mapping[str, str]] = None,
             launch_template_id: Optional[str] = None,
             launch_template_name: Optional[str] = None,
             launch_template_version: Optional[str] = None,
             maintenance_action: Optional[str] = None,
             maintenance_notify: Optional[bool] = None,
             maintenance_time: Optional[InstanceMaintenanceTimeArgs] = None,
             network_card_index: Optional[int] = None,
             network_interface_traffic_mode: Optional[str] = None,
             network_interfaces: Optional[InstanceNetworkInterfacesArgs] = None,
             operator_type: Optional[str] = None,
             password: Optional[str] = None,
             password_inherit: Optional[bool] = None,
             period: Optional[int] = None,
             period_unit: Optional[str] = None,
             private_ip: Optional[str] = None,
             queue_pair_number: Optional[int] = None,
             renewal_status: Optional[str] = None,
             resource_group_id: Optional[str] = None,
             role_name: Optional[str] = None,
             secondary_private_ip_address_count: Optional[int] = None,
             secondary_private_ips: Optional[Sequence[str]] = None,
             security_enhancement_strategy: Optional[str] = None,
             security_groups: Optional[Sequence[str]] = None,
             spot_duration: Optional[int] = None,
             spot_price_limit: Optional[float] = None,
             spot_strategy: Optional[str] = None,
             status: Optional[str] = None,
             stopped_mode: Optional[str] = None,
             system_disk_auto_snapshot_policy_id: Optional[str] = None,
             system_disk_category: Optional[str] = None,
             system_disk_description: Optional[str] = None,
             system_disk_encrypt_algorithm: Optional[str] = None,
             system_disk_encrypted: Optional[bool] = None,
             system_disk_kms_key_id: Optional[str] = None,
             system_disk_name: Optional[str] = None,
             system_disk_performance_level: Optional[str] = None,
             system_disk_size: Optional[int] = None,
             system_disk_storage_cluster_id: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None,
             user_data: Optional[str] = None,
             volume_tags: Optional[Mapping[str, str]] = None,
             vpc_id: Optional[str] = None,
             vswitch_id: Optional[str] = None)
func NewInstance(ctx *Context, name string, args *InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs? args = null, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: alicloud:ecs:Instance
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 InstanceArgs
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 InstanceArgs
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 InstanceArgs
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 InstanceArgs
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. InstanceArgs
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 exampleinstanceResourceResourceFromEcsinstance = new AliCloud.Ecs.Instance("exampleinstanceResourceResourceFromEcsinstance", new()
{
    AutoReleaseTime = "string",
    AutoRenewPeriod = 0,
    AvailabilityZone = "string",
    CreditSpecification = "string",
    DataDisks = new[]
    {
        new AliCloud.Ecs.Inputs.InstanceDataDiskArgs
        {
            Size = 0,
            AutoSnapshotPolicyId = "string",
            Category = "string",
            DeleteWithInstance = false,
            Description = "string",
            Device = "string",
            Encrypted = false,
            KmsKeyId = "string",
            Name = "string",
            PerformanceLevel = "string",
            SnapshotId = "string",
        },
    },
    DedicatedHostId = "string",
    DeletionProtection = false,
    DeploymentSetId = "string",
    Description = "string",
    DryRun = false,
    EnableJumboFrame = false,
    ForceDelete = false,
    HostName = "string",
    HpcClusterId = "string",
    HttpEndpoint = "string",
    HttpPutResponseHopLimit = 0,
    HttpTokens = "string",
    ImageId = "string",
    ImageOptions = new AliCloud.Ecs.Inputs.InstanceImageOptionsArgs
    {
        LoginAsNonRoot = false,
    },
    IncludeDataDisks = false,
    InstanceChargeType = "string",
    InstanceName = "string",
    InstanceType = "string",
    InternetChargeType = "string",
    InternetMaxBandwidthOut = 0,
    Ipv6AddressCount = 0,
    Ipv6Addresses = new[]
    {
        "string",
    },
    IsOutdated = false,
    KeyName = "string",
    KmsEncryptedPassword = "string",
    KmsEncryptionContext = 
    {
        { "string", "string" },
    },
    LaunchTemplateId = "string",
    LaunchTemplateName = "string",
    LaunchTemplateVersion = "string",
    MaintenanceAction = "string",
    MaintenanceNotify = false,
    MaintenanceTime = new AliCloud.Ecs.Inputs.InstanceMaintenanceTimeArgs
    {
        EndTime = "string",
        StartTime = "string",
    },
    NetworkCardIndex = 0,
    NetworkInterfaceTrafficMode = "string",
    NetworkInterfaces = new AliCloud.Ecs.Inputs.InstanceNetworkInterfacesArgs
    {
        NetworkCardIndex = 0,
        NetworkInterfaceId = "string",
        NetworkInterfaceTrafficMode = "string",
        QueuePairNumber = 0,
        SecurityGroupIds = new[]
        {
            "string",
        },
        VswitchId = "string",
    },
    OperatorType = "string",
    Password = "string",
    PasswordInherit = false,
    Period = 0,
    PeriodUnit = "string",
    PrivateIp = "string",
    QueuePairNumber = 0,
    RenewalStatus = "string",
    ResourceGroupId = "string",
    RoleName = "string",
    SecondaryPrivateIpAddressCount = 0,
    SecondaryPrivateIps = new[]
    {
        "string",
    },
    SecurityEnhancementStrategy = "string",
    SecurityGroups = new[]
    {
        "string",
    },
    SpotDuration = 0,
    SpotPriceLimit = 0,
    SpotStrategy = "string",
    Status = "string",
    StoppedMode = "string",
    SystemDiskAutoSnapshotPolicyId = "string",
    SystemDiskCategory = "string",
    SystemDiskDescription = "string",
    SystemDiskEncryptAlgorithm = "string",
    SystemDiskEncrypted = false,
    SystemDiskKmsKeyId = "string",
    SystemDiskName = "string",
    SystemDiskPerformanceLevel = "string",
    SystemDiskSize = 0,
    SystemDiskStorageClusterId = "string",
    Tags = 
    {
        { "string", "string" },
    },
    UserData = "string",
    VolumeTags = 
    {
        { "string", "string" },
    },
    VpcId = "string",
    VswitchId = "string",
});
Copy
example, err := ecs.NewInstance(ctx, "exampleinstanceResourceResourceFromEcsinstance", &ecs.InstanceArgs{
	AutoReleaseTime:     pulumi.String("string"),
	AutoRenewPeriod:     pulumi.Int(0),
	AvailabilityZone:    pulumi.String("string"),
	CreditSpecification: pulumi.String("string"),
	DataDisks: ecs.InstanceDataDiskArray{
		&ecs.InstanceDataDiskArgs{
			Size:                 pulumi.Int(0),
			AutoSnapshotPolicyId: pulumi.String("string"),
			Category:             pulumi.String("string"),
			DeleteWithInstance:   pulumi.Bool(false),
			Description:          pulumi.String("string"),
			Device:               pulumi.String("string"),
			Encrypted:            pulumi.Bool(false),
			KmsKeyId:             pulumi.String("string"),
			Name:                 pulumi.String("string"),
			PerformanceLevel:     pulumi.String("string"),
			SnapshotId:           pulumi.String("string"),
		},
	},
	DedicatedHostId:         pulumi.String("string"),
	DeletionProtection:      pulumi.Bool(false),
	DeploymentSetId:         pulumi.String("string"),
	Description:             pulumi.String("string"),
	DryRun:                  pulumi.Bool(false),
	EnableJumboFrame:        pulumi.Bool(false),
	ForceDelete:             pulumi.Bool(false),
	HostName:                pulumi.String("string"),
	HpcClusterId:            pulumi.String("string"),
	HttpEndpoint:            pulumi.String("string"),
	HttpPutResponseHopLimit: pulumi.Int(0),
	HttpTokens:              pulumi.String("string"),
	ImageId:                 pulumi.String("string"),
	ImageOptions: &ecs.InstanceImageOptionsArgs{
		LoginAsNonRoot: pulumi.Bool(false),
	},
	IncludeDataDisks:        pulumi.Bool(false),
	InstanceChargeType:      pulumi.String("string"),
	InstanceName:            pulumi.String("string"),
	InstanceType:            pulumi.String("string"),
	InternetChargeType:      pulumi.String("string"),
	InternetMaxBandwidthOut: pulumi.Int(0),
	Ipv6AddressCount:        pulumi.Int(0),
	Ipv6Addresses: pulumi.StringArray{
		pulumi.String("string"),
	},
	IsOutdated:           pulumi.Bool(false),
	KeyName:              pulumi.String("string"),
	KmsEncryptedPassword: pulumi.String("string"),
	KmsEncryptionContext: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	LaunchTemplateId:      pulumi.String("string"),
	LaunchTemplateName:    pulumi.String("string"),
	LaunchTemplateVersion: pulumi.String("string"),
	MaintenanceAction:     pulumi.String("string"),
	MaintenanceNotify:     pulumi.Bool(false),
	MaintenanceTime: &ecs.InstanceMaintenanceTimeArgs{
		EndTime:   pulumi.String("string"),
		StartTime: pulumi.String("string"),
	},
	NetworkCardIndex:            pulumi.Int(0),
	NetworkInterfaceTrafficMode: pulumi.String("string"),
	NetworkInterfaces: &ecs.InstanceNetworkInterfacesArgs{
		NetworkCardIndex:            pulumi.Int(0),
		NetworkInterfaceId:          pulumi.String("string"),
		NetworkInterfaceTrafficMode: pulumi.String("string"),
		QueuePairNumber:             pulumi.Int(0),
		SecurityGroupIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		VswitchId: pulumi.String("string"),
	},
	OperatorType:                   pulumi.String("string"),
	Password:                       pulumi.String("string"),
	PasswordInherit:                pulumi.Bool(false),
	Period:                         pulumi.Int(0),
	PeriodUnit:                     pulumi.String("string"),
	PrivateIp:                      pulumi.String("string"),
	QueuePairNumber:                pulumi.Int(0),
	RenewalStatus:                  pulumi.String("string"),
	ResourceGroupId:                pulumi.String("string"),
	RoleName:                       pulumi.String("string"),
	SecondaryPrivateIpAddressCount: pulumi.Int(0),
	SecondaryPrivateIps: pulumi.StringArray{
		pulumi.String("string"),
	},
	SecurityEnhancementStrategy: pulumi.String("string"),
	SecurityGroups: pulumi.StringArray{
		pulumi.String("string"),
	},
	SpotDuration:                   pulumi.Int(0),
	SpotPriceLimit:                 pulumi.Float64(0),
	SpotStrategy:                   pulumi.String("string"),
	Status:                         pulumi.String("string"),
	StoppedMode:                    pulumi.String("string"),
	SystemDiskAutoSnapshotPolicyId: pulumi.String("string"),
	SystemDiskCategory:             pulumi.String("string"),
	SystemDiskDescription:          pulumi.String("string"),
	SystemDiskEncryptAlgorithm:     pulumi.String("string"),
	SystemDiskEncrypted:            pulumi.Bool(false),
	SystemDiskKmsKeyId:             pulumi.String("string"),
	SystemDiskName:                 pulumi.String("string"),
	SystemDiskPerformanceLevel:     pulumi.String("string"),
	SystemDiskSize:                 pulumi.Int(0),
	SystemDiskStorageClusterId:     pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	UserData: pulumi.String("string"),
	VolumeTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VpcId:     pulumi.String("string"),
	VswitchId: pulumi.String("string"),
})
Copy
var exampleinstanceResourceResourceFromEcsinstance = new Instance("exampleinstanceResourceResourceFromEcsinstance", InstanceArgs.builder()
    .autoReleaseTime("string")
    .autoRenewPeriod(0)
    .availabilityZone("string")
    .creditSpecification("string")
    .dataDisks(InstanceDataDiskArgs.builder()
        .size(0)
        .autoSnapshotPolicyId("string")
        .category("string")
        .deleteWithInstance(false)
        .description("string")
        .device("string")
        .encrypted(false)
        .kmsKeyId("string")
        .name("string")
        .performanceLevel("string")
        .snapshotId("string")
        .build())
    .dedicatedHostId("string")
    .deletionProtection(false)
    .deploymentSetId("string")
    .description("string")
    .dryRun(false)
    .enableJumboFrame(false)
    .forceDelete(false)
    .hostName("string")
    .hpcClusterId("string")
    .httpEndpoint("string")
    .httpPutResponseHopLimit(0)
    .httpTokens("string")
    .imageId("string")
    .imageOptions(InstanceImageOptionsArgs.builder()
        .loginAsNonRoot(false)
        .build())
    .includeDataDisks(false)
    .instanceChargeType("string")
    .instanceName("string")
    .instanceType("string")
    .internetChargeType("string")
    .internetMaxBandwidthOut(0)
    .ipv6AddressCount(0)
    .ipv6Addresses("string")
    .isOutdated(false)
    .keyName("string")
    .kmsEncryptedPassword("string")
    .kmsEncryptionContext(Map.of("string", "string"))
    .launchTemplateId("string")
    .launchTemplateName("string")
    .launchTemplateVersion("string")
    .maintenanceAction("string")
    .maintenanceNotify(false)
    .maintenanceTime(InstanceMaintenanceTimeArgs.builder()
        .endTime("string")
        .startTime("string")
        .build())
    .networkCardIndex(0)
    .networkInterfaceTrafficMode("string")
    .networkInterfaces(InstanceNetworkInterfacesArgs.builder()
        .networkCardIndex(0)
        .networkInterfaceId("string")
        .networkInterfaceTrafficMode("string")
        .queuePairNumber(0)
        .securityGroupIds("string")
        .vswitchId("string")
        .build())
    .operatorType("string")
    .password("string")
    .passwordInherit(false)
    .period(0)
    .periodUnit("string")
    .privateIp("string")
    .queuePairNumber(0)
    .renewalStatus("string")
    .resourceGroupId("string")
    .roleName("string")
    .secondaryPrivateIpAddressCount(0)
    .secondaryPrivateIps("string")
    .securityEnhancementStrategy("string")
    .securityGroups("string")
    .spotDuration(0)
    .spotPriceLimit(0)
    .spotStrategy("string")
    .status("string")
    .stoppedMode("string")
    .systemDiskAutoSnapshotPolicyId("string")
    .systemDiskCategory("string")
    .systemDiskDescription("string")
    .systemDiskEncryptAlgorithm("string")
    .systemDiskEncrypted(false)
    .systemDiskKmsKeyId("string")
    .systemDiskName("string")
    .systemDiskPerformanceLevel("string")
    .systemDiskSize(0)
    .systemDiskStorageClusterId("string")
    .tags(Map.of("string", "string"))
    .userData("string")
    .volumeTags(Map.of("string", "string"))
    .vpcId("string")
    .vswitchId("string")
    .build());
Copy
exampleinstance_resource_resource_from_ecsinstance = alicloud.ecs.Instance("exampleinstanceResourceResourceFromEcsinstance",
    auto_release_time="string",
    auto_renew_period=0,
    availability_zone="string",
    credit_specification="string",
    data_disks=[{
        "size": 0,
        "auto_snapshot_policy_id": "string",
        "category": "string",
        "delete_with_instance": False,
        "description": "string",
        "device": "string",
        "encrypted": False,
        "kms_key_id": "string",
        "name": "string",
        "performance_level": "string",
        "snapshot_id": "string",
    }],
    dedicated_host_id="string",
    deletion_protection=False,
    deployment_set_id="string",
    description="string",
    dry_run=False,
    enable_jumbo_frame=False,
    force_delete=False,
    host_name="string",
    hpc_cluster_id="string",
    http_endpoint="string",
    http_put_response_hop_limit=0,
    http_tokens="string",
    image_id="string",
    image_options={
        "login_as_non_root": False,
    },
    include_data_disks=False,
    instance_charge_type="string",
    instance_name="string",
    instance_type="string",
    internet_charge_type="string",
    internet_max_bandwidth_out=0,
    ipv6_address_count=0,
    ipv6_addresses=["string"],
    is_outdated=False,
    key_name="string",
    kms_encrypted_password="string",
    kms_encryption_context={
        "string": "string",
    },
    launch_template_id="string",
    launch_template_name="string",
    launch_template_version="string",
    maintenance_action="string",
    maintenance_notify=False,
    maintenance_time={
        "end_time": "string",
        "start_time": "string",
    },
    network_card_index=0,
    network_interface_traffic_mode="string",
    network_interfaces={
        "network_card_index": 0,
        "network_interface_id": "string",
        "network_interface_traffic_mode": "string",
        "queue_pair_number": 0,
        "security_group_ids": ["string"],
        "vswitch_id": "string",
    },
    operator_type="string",
    password="string",
    password_inherit=False,
    period=0,
    period_unit="string",
    private_ip="string",
    queue_pair_number=0,
    renewal_status="string",
    resource_group_id="string",
    role_name="string",
    secondary_private_ip_address_count=0,
    secondary_private_ips=["string"],
    security_enhancement_strategy="string",
    security_groups=["string"],
    spot_duration=0,
    spot_price_limit=0,
    spot_strategy="string",
    status="string",
    stopped_mode="string",
    system_disk_auto_snapshot_policy_id="string",
    system_disk_category="string",
    system_disk_description="string",
    system_disk_encrypt_algorithm="string",
    system_disk_encrypted=False,
    system_disk_kms_key_id="string",
    system_disk_name="string",
    system_disk_performance_level="string",
    system_disk_size=0,
    system_disk_storage_cluster_id="string",
    tags={
        "string": "string",
    },
    user_data="string",
    volume_tags={
        "string": "string",
    },
    vpc_id="string",
    vswitch_id="string")
Copy
const exampleinstanceResourceResourceFromEcsinstance = new alicloud.ecs.Instance("exampleinstanceResourceResourceFromEcsinstance", {
    autoReleaseTime: "string",
    autoRenewPeriod: 0,
    availabilityZone: "string",
    creditSpecification: "string",
    dataDisks: [{
        size: 0,
        autoSnapshotPolicyId: "string",
        category: "string",
        deleteWithInstance: false,
        description: "string",
        device: "string",
        encrypted: false,
        kmsKeyId: "string",
        name: "string",
        performanceLevel: "string",
        snapshotId: "string",
    }],
    dedicatedHostId: "string",
    deletionProtection: false,
    deploymentSetId: "string",
    description: "string",
    dryRun: false,
    enableJumboFrame: false,
    forceDelete: false,
    hostName: "string",
    hpcClusterId: "string",
    httpEndpoint: "string",
    httpPutResponseHopLimit: 0,
    httpTokens: "string",
    imageId: "string",
    imageOptions: {
        loginAsNonRoot: false,
    },
    includeDataDisks: false,
    instanceChargeType: "string",
    instanceName: "string",
    instanceType: "string",
    internetChargeType: "string",
    internetMaxBandwidthOut: 0,
    ipv6AddressCount: 0,
    ipv6Addresses: ["string"],
    isOutdated: false,
    keyName: "string",
    kmsEncryptedPassword: "string",
    kmsEncryptionContext: {
        string: "string",
    },
    launchTemplateId: "string",
    launchTemplateName: "string",
    launchTemplateVersion: "string",
    maintenanceAction: "string",
    maintenanceNotify: false,
    maintenanceTime: {
        endTime: "string",
        startTime: "string",
    },
    networkCardIndex: 0,
    networkInterfaceTrafficMode: "string",
    networkInterfaces: {
        networkCardIndex: 0,
        networkInterfaceId: "string",
        networkInterfaceTrafficMode: "string",
        queuePairNumber: 0,
        securityGroupIds: ["string"],
        vswitchId: "string",
    },
    operatorType: "string",
    password: "string",
    passwordInherit: false,
    period: 0,
    periodUnit: "string",
    privateIp: "string",
    queuePairNumber: 0,
    renewalStatus: "string",
    resourceGroupId: "string",
    roleName: "string",
    secondaryPrivateIpAddressCount: 0,
    secondaryPrivateIps: ["string"],
    securityEnhancementStrategy: "string",
    securityGroups: ["string"],
    spotDuration: 0,
    spotPriceLimit: 0,
    spotStrategy: "string",
    status: "string",
    stoppedMode: "string",
    systemDiskAutoSnapshotPolicyId: "string",
    systemDiskCategory: "string",
    systemDiskDescription: "string",
    systemDiskEncryptAlgorithm: "string",
    systemDiskEncrypted: false,
    systemDiskKmsKeyId: "string",
    systemDiskName: "string",
    systemDiskPerformanceLevel: "string",
    systemDiskSize: 0,
    systemDiskStorageClusterId: "string",
    tags: {
        string: "string",
    },
    userData: "string",
    volumeTags: {
        string: "string",
    },
    vpcId: "string",
    vswitchId: "string",
});
Copy
type: alicloud:ecs:Instance
properties:
    autoReleaseTime: string
    autoRenewPeriod: 0
    availabilityZone: string
    creditSpecification: string
    dataDisks:
        - autoSnapshotPolicyId: string
          category: string
          deleteWithInstance: false
          description: string
          device: string
          encrypted: false
          kmsKeyId: string
          name: string
          performanceLevel: string
          size: 0
          snapshotId: string
    dedicatedHostId: string
    deletionProtection: false
    deploymentSetId: string
    description: string
    dryRun: false
    enableJumboFrame: false
    forceDelete: false
    hostName: string
    hpcClusterId: string
    httpEndpoint: string
    httpPutResponseHopLimit: 0
    httpTokens: string
    imageId: string
    imageOptions:
        loginAsNonRoot: false
    includeDataDisks: false
    instanceChargeType: string
    instanceName: string
    instanceType: string
    internetChargeType: string
    internetMaxBandwidthOut: 0
    ipv6AddressCount: 0
    ipv6Addresses:
        - string
    isOutdated: false
    keyName: string
    kmsEncryptedPassword: string
    kmsEncryptionContext:
        string: string
    launchTemplateId: string
    launchTemplateName: string
    launchTemplateVersion: string
    maintenanceAction: string
    maintenanceNotify: false
    maintenanceTime:
        endTime: string
        startTime: string
    networkCardIndex: 0
    networkInterfaceTrafficMode: string
    networkInterfaces:
        networkCardIndex: 0
        networkInterfaceId: string
        networkInterfaceTrafficMode: string
        queuePairNumber: 0
        securityGroupIds:
            - string
        vswitchId: string
    operatorType: string
    password: string
    passwordInherit: false
    period: 0
    periodUnit: string
    privateIp: string
    queuePairNumber: 0
    renewalStatus: string
    resourceGroupId: string
    roleName: string
    secondaryPrivateIpAddressCount: 0
    secondaryPrivateIps:
        - string
    securityEnhancementStrategy: string
    securityGroups:
        - string
    spotDuration: 0
    spotPriceLimit: 0
    spotStrategy: string
    status: string
    stoppedMode: string
    systemDiskAutoSnapshotPolicyId: string
    systemDiskCategory: string
    systemDiskDescription: string
    systemDiskEncryptAlgorithm: string
    systemDiskEncrypted: false
    systemDiskKmsKeyId: string
    systemDiskName: string
    systemDiskPerformanceLevel: string
    systemDiskSize: 0
    systemDiskStorageClusterId: string
    tags:
        string: string
    userData: string
    volumeTags:
        string: string
    vpcId: string
    vswitchId: string
Copy

Instance 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 Instance resource accepts the following input properties:

AllocatePublicIp bool
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
AutoRenewPeriod int
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
AvailabilityZone Changes to this property will trigger replacement. string
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
CreditSpecification string
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
DataDisks List<Pulumi.AliCloud.Ecs.Inputs.InstanceDataDisk>
The list of data disks created with instance. See data_disks below.
DedicatedHostId Changes to this property will trigger replacement. string
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
DeletionProtection bool
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
DeploymentSetId string
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
Description string
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
DryRun bool
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
EnableJumboFrame bool
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
ForceDelete bool
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
HostName string
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
HpcClusterId Changes to this property will trigger replacement. string
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
HttpEndpoint string
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
HttpTokens string
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
ImageId string
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
ImageOptions Pulumi.AliCloud.Ecs.Inputs.InstanceImageOptions

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

IncludeDataDisks bool
Whether to change instance disks charge type when changing instance charge type.
InstanceChargeType string
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
InstanceName string
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
InstanceType string
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
InternetChargeType string
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
InternetMaxBandwidthIn int
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

InternetMaxBandwidthOut int
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
Ipv6AddressCount Changes to this property will trigger replacement. int
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
Ipv6Addresses List<string>
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
IsOutdated bool
Whether to use outdated instance type.
KeyName Changes to this property will trigger replacement. string
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
KmsEncryptedPassword string
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
KmsEncryptionContext Dictionary<string, string>
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
LaunchTemplateId Changes to this property will trigger replacement. string
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
LaunchTemplateVersion Changes to this property will trigger replacement. string
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
MaintenanceAction string
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
MaintenanceNotify bool
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
MaintenanceTime Pulumi.AliCloud.Ecs.Inputs.InstanceMaintenanceTime
The time of maintenance. See maintenance_time below.
NetworkCardIndex Changes to this property will trigger replacement. int
The index of the network card for Primary ENI.
NetworkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
NetworkInterfaces Pulumi.AliCloud.Ecs.Inputs.InstanceNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
OperatorType string
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
Password string
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
PasswordInherit bool
Specifies whether to use the password preset in the image. Default value: false. Valid values:
Period int

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PeriodUnit string
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
PrivateIp string
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
QueuePairNumber Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
RenewalStatus string
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
ResourceGroupId string
The Id of resource group which the instance belongs.
RoleName Changes to this property will trigger replacement. string
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
SecondaryPrivateIpAddressCount int
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
SecondaryPrivateIps List<string>
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
SecurityEnhancementStrategy Changes to this property will trigger replacement. string
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
SecurityGroups List<string>
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
SpotDuration int
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
SpotPriceLimit Changes to this property will trigger replacement. double
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
SpotStrategy Changes to this property will trigger replacement. string

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

Status string
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
StoppedMode string
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
SystemDiskAutoSnapshotPolicyId string
The ID of the automatic snapshot policy applied to the system disk.
SystemDiskCategory Changes to this property will trigger replacement. string
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
SystemDiskDescription string
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
SystemDiskEncryptAlgorithm Changes to this property will trigger replacement. string
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
SystemDiskEncrypted Changes to this property will trigger replacement. bool
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
SystemDiskKmsKeyId Changes to this property will trigger replacement. string
The ID of the Key Management Service (KMS) key to be used for the system disk.
SystemDiskName string
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
SystemDiskPerformanceLevel string
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
SystemDiskSize int
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
SystemDiskStorageClusterId Changes to this property will trigger replacement. string
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
UserData string
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
VolumeTags Dictionary<string, string>
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
VpcId string
The ID of the VPC.
VswitchId string
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
AllocatePublicIp bool
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
AutoRenewPeriod int
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
AvailabilityZone Changes to this property will trigger replacement. string
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
CreditSpecification string
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
DataDisks []InstanceDataDiskArgs
The list of data disks created with instance. See data_disks below.
DedicatedHostId Changes to this property will trigger replacement. string
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
DeletionProtection bool
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
DeploymentSetId string
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
Description string
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
DryRun bool
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
EnableJumboFrame bool
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
ForceDelete bool
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
HostName string
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
HpcClusterId Changes to this property will trigger replacement. string
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
HttpEndpoint string
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
HttpTokens string
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
ImageId string
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
ImageOptions InstanceImageOptionsArgs

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

IncludeDataDisks bool
Whether to change instance disks charge type when changing instance charge type.
InstanceChargeType string
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
InstanceName string
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
InstanceType string
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
InternetChargeType string
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
InternetMaxBandwidthIn int
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

InternetMaxBandwidthOut int
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
Ipv6AddressCount Changes to this property will trigger replacement. int
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
Ipv6Addresses []string
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
IsOutdated bool
Whether to use outdated instance type.
KeyName Changes to this property will trigger replacement. string
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
KmsEncryptedPassword string
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
KmsEncryptionContext map[string]string
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
LaunchTemplateId Changes to this property will trigger replacement. string
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
LaunchTemplateVersion Changes to this property will trigger replacement. string
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
MaintenanceAction string
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
MaintenanceNotify bool
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
MaintenanceTime InstanceMaintenanceTimeArgs
The time of maintenance. See maintenance_time below.
NetworkCardIndex Changes to this property will trigger replacement. int
The index of the network card for Primary ENI.
NetworkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
NetworkInterfaces InstanceNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
OperatorType string
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
Password string
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
PasswordInherit bool
Specifies whether to use the password preset in the image. Default value: false. Valid values:
Period int

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PeriodUnit string
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
PrivateIp string
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
QueuePairNumber Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
RenewalStatus string
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
ResourceGroupId string
The Id of resource group which the instance belongs.
RoleName Changes to this property will trigger replacement. string
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
SecondaryPrivateIpAddressCount int
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
SecondaryPrivateIps []string
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
SecurityEnhancementStrategy Changes to this property will trigger replacement. string
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
SecurityGroups []string
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
SpotDuration int
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
SpotPriceLimit Changes to this property will trigger replacement. float64
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
SpotStrategy Changes to this property will trigger replacement. string

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

Status string
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
StoppedMode string
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
SystemDiskAutoSnapshotPolicyId string
The ID of the automatic snapshot policy applied to the system disk.
SystemDiskCategory Changes to this property will trigger replacement. string
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
SystemDiskDescription string
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
SystemDiskEncryptAlgorithm Changes to this property will trigger replacement. string
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
SystemDiskEncrypted Changes to this property will trigger replacement. bool
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
SystemDiskKmsKeyId Changes to this property will trigger replacement. string
The ID of the Key Management Service (KMS) key to be used for the system disk.
SystemDiskName string
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
SystemDiskPerformanceLevel string
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
SystemDiskSize int
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
SystemDiskStorageClusterId Changes to this property will trigger replacement. string
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
Tags map[string]string
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
UserData string
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
VolumeTags map[string]string
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
VpcId string
The ID of the VPC.
VswitchId string
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocatePublicIp Boolean
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime String
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
autoRenewPeriod Integer
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availabilityZone Changes to this property will trigger replacement. String
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
creditSpecification String
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
dataDisks List<InstanceDataDisk>
The list of data disks created with instance. See data_disks below.
dedicatedHostId Changes to this property will trigger replacement. String
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletionProtection Boolean
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deploymentSetId String
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description String
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dryRun Boolean
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enableJumboFrame Boolean
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
forceDelete Boolean
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
hostName String
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpcClusterId Changes to this property will trigger replacement. String
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
httpEndpoint String
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Integer
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
httpTokens String
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
imageId String
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
imageOptions InstanceImageOptions

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

includeDataDisks Boolean
Whether to change instance disks charge type when changing instance charge type.
instanceChargeType String
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instanceName String
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instanceType String
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internetChargeType String
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internetMaxBandwidthIn Integer
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internetMaxBandwidthOut Integer
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6AddressCount Changes to this property will trigger replacement. Integer
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6Addresses List<String>
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
isOutdated Boolean
Whether to use outdated instance type.
keyName Changes to this property will trigger replacement. String
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kmsEncryptedPassword String
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kmsEncryptionContext Map<String,String>
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launchTemplateId Changes to this property will trigger replacement. String
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launchTemplateName Changes to this property will trigger replacement. String
The name of the launch template.
launchTemplateVersion Changes to this property will trigger replacement. String
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenanceAction String
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenanceNotify Boolean
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenanceTime InstanceMaintenanceTime
The time of maintenance. See maintenance_time below.
networkCardIndex Changes to this property will trigger replacement. Integer
The index of the network card for Primary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. String
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
networkInterfaces InstanceNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
operatorType String
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
password String
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
passwordInherit Boolean
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period Integer

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

periodUnit String
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
privateIp String
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
queuePairNumber Changes to this property will trigger replacement. Integer
The number of queues supported by the ERI.
renewalStatus String
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resourceGroupId String
The Id of resource group which the instance belongs.
roleName Changes to this property will trigger replacement. String
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondaryPrivateIpAddressCount Integer
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondaryPrivateIps List<String>
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
securityEnhancementStrategy Changes to this property will trigger replacement. String
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
securityGroups List<String>
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spotDuration Integer
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spotPriceLimit Changes to this property will trigger replacement. Double
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spotStrategy Changes to this property will trigger replacement. String

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

status String
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stoppedMode String
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
systemDiskAutoSnapshotPolicyId String
The ID of the automatic snapshot policy applied to the system disk.
systemDiskCategory Changes to this property will trigger replacement. String
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
systemDiskDescription String
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
systemDiskEncryptAlgorithm Changes to this property will trigger replacement. String
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
systemDiskEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
systemDiskKmsKeyId Changes to this property will trigger replacement. String
The ID of the Key Management Service (KMS) key to be used for the system disk.
systemDiskName String
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
systemDiskPerformanceLevel String
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
systemDiskSize Integer
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
systemDiskStorageClusterId Changes to this property will trigger replacement. String
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags Map<String,String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
userData String
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volumeTags Map<String,String>
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpcId String
The ID of the VPC.
vswitchId String
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocatePublicIp boolean
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime string
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
autoRenewPeriod number
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availabilityZone Changes to this property will trigger replacement. string
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
creditSpecification string
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
dataDisks InstanceDataDisk[]
The list of data disks created with instance. See data_disks below.
dedicatedHostId Changes to this property will trigger replacement. string
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletionProtection boolean
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deploymentSetId string
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description string
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dryRun boolean
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enableJumboFrame boolean
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
forceDelete boolean
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
hostName string
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpcClusterId Changes to this property will trigger replacement. string
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
httpEndpoint string
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. number
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
httpTokens string
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
imageId string
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
imageOptions InstanceImageOptions

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

includeDataDisks boolean
Whether to change instance disks charge type when changing instance charge type.
instanceChargeType string
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instanceName string
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instanceType string
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internetChargeType string
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internetMaxBandwidthIn number
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internetMaxBandwidthOut number
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6AddressCount Changes to this property will trigger replacement. number
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6Addresses string[]
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
isOutdated boolean
Whether to use outdated instance type.
keyName Changes to this property will trigger replacement. string
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kmsEncryptedPassword string
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kmsEncryptionContext {[key: string]: string}
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launchTemplateId Changes to this property will trigger replacement. string
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
launchTemplateVersion Changes to this property will trigger replacement. string
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenanceAction string
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenanceNotify boolean
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenanceTime InstanceMaintenanceTime
The time of maintenance. See maintenance_time below.
networkCardIndex Changes to this property will trigger replacement. number
The index of the network card for Primary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
networkInterfaces InstanceNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
operatorType string
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
password string
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
passwordInherit boolean
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period number

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

periodUnit string
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
privateIp string
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
queuePairNumber Changes to this property will trigger replacement. number
The number of queues supported by the ERI.
renewalStatus string
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resourceGroupId string
The Id of resource group which the instance belongs.
roleName Changes to this property will trigger replacement. string
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondaryPrivateIpAddressCount number
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondaryPrivateIps string[]
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
securityEnhancementStrategy Changes to this property will trigger replacement. string
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
securityGroups string[]
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spotDuration number
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spotPriceLimit Changes to this property will trigger replacement. number
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spotStrategy Changes to this property will trigger replacement. string

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

status string
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stoppedMode string
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
systemDiskAutoSnapshotPolicyId string
The ID of the automatic snapshot policy applied to the system disk.
systemDiskCategory Changes to this property will trigger replacement. string
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
systemDiskDescription string
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
systemDiskEncryptAlgorithm Changes to this property will trigger replacement. string
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
systemDiskEncrypted Changes to this property will trigger replacement. boolean
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
systemDiskKmsKeyId Changes to this property will trigger replacement. string
The ID of the Key Management Service (KMS) key to be used for the system disk.
systemDiskName string
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
systemDiskPerformanceLevel string
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
systemDiskSize number
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
systemDiskStorageClusterId Changes to this property will trigger replacement. string
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags {[key: string]: string}
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
userData string
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volumeTags {[key: string]: string}
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpcId string
The ID of the VPC.
vswitchId string
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocate_public_ip bool
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

auto_release_time str
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
auto_renew_period int
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availability_zone Changes to this property will trigger replacement. str
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
credit_specification str
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
data_disks Sequence[InstanceDataDiskArgs]
The list of data disks created with instance. See data_disks below.
dedicated_host_id Changes to this property will trigger replacement. str
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletion_protection bool
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deployment_set_id str
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description str
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dry_run bool
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enable_jumbo_frame bool
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
force_delete bool
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
host_name str
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpc_cluster_id Changes to this property will trigger replacement. str
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
http_endpoint str
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
http_put_response_hop_limit Changes to this property will trigger replacement. int
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
http_tokens str
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
image_id str
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
image_options InstanceImageOptionsArgs

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

include_data_disks bool
Whether to change instance disks charge type when changing instance charge type.
instance_charge_type str
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instance_name str
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instance_type str
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internet_charge_type str
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internet_max_bandwidth_in int
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internet_max_bandwidth_out int
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6_address_count Changes to this property will trigger replacement. int
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6_addresses Sequence[str]
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
is_outdated bool
Whether to use outdated instance type.
key_name Changes to this property will trigger replacement. str
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kms_encrypted_password str
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kms_encryption_context Mapping[str, str]
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launch_template_id Changes to this property will trigger replacement. str
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launch_template_name Changes to this property will trigger replacement. str
The name of the launch template.
launch_template_version Changes to this property will trigger replacement. str
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenance_action str
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenance_notify bool
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenance_time InstanceMaintenanceTimeArgs
The time of maintenance. See maintenance_time below.
network_card_index Changes to this property will trigger replacement. int
The index of the network card for Primary ENI.
network_interface_traffic_mode Changes to this property will trigger replacement. str
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
network_interfaces InstanceNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
operator_type str
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
password str
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
password_inherit bool
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period int

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

period_unit str
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
private_ip str
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
queue_pair_number Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
renewal_status str
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resource_group_id str
The Id of resource group which the instance belongs.
role_name Changes to this property will trigger replacement. str
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondary_private_ip_address_count int
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondary_private_ips Sequence[str]
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
security_enhancement_strategy Changes to this property will trigger replacement. str
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
security_groups Sequence[str]
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spot_duration int
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spot_price_limit Changes to this property will trigger replacement. float
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spot_strategy Changes to this property will trigger replacement. str

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

status str
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stopped_mode str
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
system_disk_auto_snapshot_policy_id str
The ID of the automatic snapshot policy applied to the system disk.
system_disk_category Changes to this property will trigger replacement. str
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
system_disk_description str
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
system_disk_encrypt_algorithm Changes to this property will trigger replacement. str
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
system_disk_encrypted Changes to this property will trigger replacement. bool
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
system_disk_kms_key_id Changes to this property will trigger replacement. str
The ID of the Key Management Service (KMS) key to be used for the system disk.
system_disk_name str
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
system_disk_performance_level str
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
system_disk_size int
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
system_disk_storage_cluster_id Changes to this property will trigger replacement. str
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags Mapping[str, str]
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
user_data str
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volume_tags Mapping[str, str]
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpc_id str
The ID of the VPC.
vswitch_id str
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocatePublicIp Boolean
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime String
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
autoRenewPeriod Number
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availabilityZone Changes to this property will trigger replacement. String
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
creditSpecification String
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
dataDisks List<Property Map>
The list of data disks created with instance. See data_disks below.
dedicatedHostId Changes to this property will trigger replacement. String
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletionProtection Boolean
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deploymentSetId String
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description String
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dryRun Boolean
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enableJumboFrame Boolean
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
forceDelete Boolean
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
hostName String
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpcClusterId Changes to this property will trigger replacement. String
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
httpEndpoint String
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Number
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
httpTokens String
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
imageId String
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
imageOptions Property Map

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

includeDataDisks Boolean
Whether to change instance disks charge type when changing instance charge type.
instanceChargeType String
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instanceName String
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instanceType String
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internetChargeType String
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internetMaxBandwidthIn Number
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internetMaxBandwidthOut Number
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6AddressCount Changes to this property will trigger replacement. Number
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6Addresses List<String>
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
isOutdated Boolean
Whether to use outdated instance type.
keyName Changes to this property will trigger replacement. String
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kmsEncryptedPassword String
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kmsEncryptionContext Map<String>
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launchTemplateId Changes to this property will trigger replacement. String
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launchTemplateName Changes to this property will trigger replacement. String
The name of the launch template.
launchTemplateVersion Changes to this property will trigger replacement. String
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenanceAction String
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenanceNotify Boolean
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenanceTime Property Map
The time of maintenance. See maintenance_time below.
networkCardIndex Changes to this property will trigger replacement. Number
The index of the network card for Primary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. String
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
networkInterfaces Property Map
The list of network interfaces created with instance. See network_interfaces below.
operatorType String
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
password String
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
passwordInherit Boolean
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period Number

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

periodUnit String
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
privateIp String
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
queuePairNumber Changes to this property will trigger replacement. Number
The number of queues supported by the ERI.
renewalStatus String
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resourceGroupId String
The Id of resource group which the instance belongs.
roleName Changes to this property will trigger replacement. String
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondaryPrivateIpAddressCount Number
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondaryPrivateIps List<String>
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
securityEnhancementStrategy Changes to this property will trigger replacement. String
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
securityGroups List<String>
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spotDuration Number
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spotPriceLimit Changes to this property will trigger replacement. Number
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spotStrategy Changes to this property will trigger replacement. String

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

status String
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stoppedMode String
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
systemDiskAutoSnapshotPolicyId String
The ID of the automatic snapshot policy applied to the system disk.
systemDiskCategory Changes to this property will trigger replacement. String
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
systemDiskDescription String
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
systemDiskEncryptAlgorithm Changes to this property will trigger replacement. String
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
systemDiskEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
systemDiskKmsKeyId Changes to this property will trigger replacement. String
The ID of the Key Management Service (KMS) key to be used for the system disk.
systemDiskName String
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
systemDiskPerformanceLevel String
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
systemDiskSize Number
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
systemDiskStorageClusterId Changes to this property will trigger replacement. String
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags Map<String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
userData String
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volumeTags Map<String>
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpcId String
The ID of the VPC.
vswitchId String
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.

Outputs

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

Cpu int
The number of vCPUs.
CreateTime string
(Available since v1.232.0) The time when the instance was created.
DeploymentSetGroupNo string
The group number of the instance in a deployment set when the deployment set is use.
ExpiredTime string
(Available since v1.232.0) The expiration time of the instance.
Id string
The provider-assigned unique ID for this managed resource.
Memory int
The memory size of the instance. Unit: MiB.
NetworkInterfaceId string
The ID of the Primary ENI.
OsName string
The name of the operating system of the instance.
OsType string
The type of the operating system of the instance.
PrimaryIpAddress string
The primary private IP address of the ENI.
PublicIp string
The instance public ip.
StartTime string
(Available since v1.232.0) The time when the instance was last started.
SystemDiskId string
(Available since v1.210.0) The ID of system disk.
Cpu int
The number of vCPUs.
CreateTime string
(Available since v1.232.0) The time when the instance was created.
DeploymentSetGroupNo string
The group number of the instance in a deployment set when the deployment set is use.
ExpiredTime string
(Available since v1.232.0) The expiration time of the instance.
Id string
The provider-assigned unique ID for this managed resource.
Memory int
The memory size of the instance. Unit: MiB.
NetworkInterfaceId string
The ID of the Primary ENI.
OsName string
The name of the operating system of the instance.
OsType string
The type of the operating system of the instance.
PrimaryIpAddress string
The primary private IP address of the ENI.
PublicIp string
The instance public ip.
StartTime string
(Available since v1.232.0) The time when the instance was last started.
SystemDiskId string
(Available since v1.210.0) The ID of system disk.
cpu Integer
The number of vCPUs.
createTime String
(Available since v1.232.0) The time when the instance was created.
deploymentSetGroupNo String
The group number of the instance in a deployment set when the deployment set is use.
expiredTime String
(Available since v1.232.0) The expiration time of the instance.
id String
The provider-assigned unique ID for this managed resource.
memory Integer
The memory size of the instance. Unit: MiB.
networkInterfaceId String
The ID of the Primary ENI.
osName String
The name of the operating system of the instance.
osType String
The type of the operating system of the instance.
primaryIpAddress String
The primary private IP address of the ENI.
publicIp String
The instance public ip.
startTime String
(Available since v1.232.0) The time when the instance was last started.
systemDiskId String
(Available since v1.210.0) The ID of system disk.
cpu number
The number of vCPUs.
createTime string
(Available since v1.232.0) The time when the instance was created.
deploymentSetGroupNo string
The group number of the instance in a deployment set when the deployment set is use.
expiredTime string
(Available since v1.232.0) The expiration time of the instance.
id string
The provider-assigned unique ID for this managed resource.
memory number
The memory size of the instance. Unit: MiB.
networkInterfaceId string
The ID of the Primary ENI.
osName string
The name of the operating system of the instance.
osType string
The type of the operating system of the instance.
primaryIpAddress string
The primary private IP address of the ENI.
publicIp string
The instance public ip.
startTime string
(Available since v1.232.0) The time when the instance was last started.
systemDiskId string
(Available since v1.210.0) The ID of system disk.
cpu int
The number of vCPUs.
create_time str
(Available since v1.232.0) The time when the instance was created.
deployment_set_group_no str
The group number of the instance in a deployment set when the deployment set is use.
expired_time str
(Available since v1.232.0) The expiration time of the instance.
id str
The provider-assigned unique ID for this managed resource.
memory int
The memory size of the instance. Unit: MiB.
network_interface_id str
The ID of the Primary ENI.
os_name str
The name of the operating system of the instance.
os_type str
The type of the operating system of the instance.
primary_ip_address str
The primary private IP address of the ENI.
public_ip str
The instance public ip.
start_time str
(Available since v1.232.0) The time when the instance was last started.
system_disk_id str
(Available since v1.210.0) The ID of system disk.
cpu Number
The number of vCPUs.
createTime String
(Available since v1.232.0) The time when the instance was created.
deploymentSetGroupNo String
The group number of the instance in a deployment set when the deployment set is use.
expiredTime String
(Available since v1.232.0) The expiration time of the instance.
id String
The provider-assigned unique ID for this managed resource.
memory Number
The memory size of the instance. Unit: MiB.
networkInterfaceId String
The ID of the Primary ENI.
osName String
The name of the operating system of the instance.
osType String
The type of the operating system of the instance.
primaryIpAddress String
The primary private IP address of the ENI.
publicIp String
The instance public ip.
startTime String
(Available since v1.232.0) The time when the instance was last started.
systemDiskId String
(Available since v1.210.0) The ID of system disk.

Look up Existing Instance Resource

Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allocate_public_ip: Optional[bool] = None,
        auto_release_time: Optional[str] = None,
        auto_renew_period: Optional[int] = None,
        availability_zone: Optional[str] = None,
        cpu: Optional[int] = None,
        create_time: Optional[str] = None,
        credit_specification: Optional[str] = None,
        data_disks: Optional[Sequence[InstanceDataDiskArgs]] = None,
        dedicated_host_id: Optional[str] = None,
        deletion_protection: Optional[bool] = None,
        deployment_set_group_no: Optional[str] = None,
        deployment_set_id: Optional[str] = None,
        description: Optional[str] = None,
        dry_run: Optional[bool] = None,
        enable_jumbo_frame: Optional[bool] = None,
        expired_time: Optional[str] = None,
        force_delete: Optional[bool] = None,
        host_name: Optional[str] = None,
        hpc_cluster_id: 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_options: Optional[InstanceImageOptionsArgs] = None,
        include_data_disks: Optional[bool] = 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,
        ipv6_address_count: Optional[int] = None,
        ipv6_addresses: Optional[Sequence[str]] = None,
        is_outdated: Optional[bool] = None,
        key_name: Optional[str] = None,
        kms_encrypted_password: Optional[str] = None,
        kms_encryption_context: Optional[Mapping[str, str]] = None,
        launch_template_id: Optional[str] = None,
        launch_template_name: Optional[str] = None,
        launch_template_version: Optional[str] = None,
        maintenance_action: Optional[str] = None,
        maintenance_notify: Optional[bool] = None,
        maintenance_time: Optional[InstanceMaintenanceTimeArgs] = None,
        memory: Optional[int] = None,
        network_card_index: Optional[int] = None,
        network_interface_id: Optional[str] = None,
        network_interface_traffic_mode: Optional[str] = None,
        network_interfaces: Optional[InstanceNetworkInterfacesArgs] = None,
        operator_type: Optional[str] = None,
        os_name: Optional[str] = None,
        os_type: Optional[str] = None,
        password: Optional[str] = None,
        password_inherit: Optional[bool] = None,
        period: Optional[int] = None,
        period_unit: Optional[str] = None,
        primary_ip_address: Optional[str] = None,
        private_ip: Optional[str] = None,
        public_ip: Optional[str] = None,
        queue_pair_number: Optional[int] = None,
        renewal_status: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        role_name: Optional[str] = None,
        secondary_private_ip_address_count: Optional[int] = None,
        secondary_private_ips: Optional[Sequence[str]] = None,
        security_enhancement_strategy: Optional[str] = None,
        security_groups: Optional[Sequence[str]] = None,
        spot_duration: Optional[int] = None,
        spot_price_limit: Optional[float] = None,
        spot_strategy: Optional[str] = None,
        start_time: Optional[str] = None,
        status: Optional[str] = None,
        stopped_mode: Optional[str] = None,
        system_disk_auto_snapshot_policy_id: Optional[str] = None,
        system_disk_category: Optional[str] = None,
        system_disk_description: Optional[str] = None,
        system_disk_encrypt_algorithm: Optional[str] = None,
        system_disk_encrypted: Optional[bool] = None,
        system_disk_id: Optional[str] = None,
        system_disk_kms_key_id: Optional[str] = None,
        system_disk_name: Optional[str] = None,
        system_disk_performance_level: Optional[str] = None,
        system_disk_size: Optional[int] = None,
        system_disk_storage_cluster_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        user_data: Optional[str] = None,
        volume_tags: Optional[Mapping[str, str]] = None,
        vpc_id: Optional[str] = None,
        vswitch_id: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ecs:Instance    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:
AllocatePublicIp bool
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
AutoRenewPeriod int
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
AvailabilityZone Changes to this property will trigger replacement. string
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
Cpu int
The number of vCPUs.
CreateTime string
(Available since v1.232.0) The time when the instance was created.
CreditSpecification string
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
DataDisks List<Pulumi.AliCloud.Ecs.Inputs.InstanceDataDisk>
The list of data disks created with instance. See data_disks below.
DedicatedHostId Changes to this property will trigger replacement. string
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
DeletionProtection bool
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
DeploymentSetGroupNo string
The group number of the instance in a deployment set when the deployment set is use.
DeploymentSetId string
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
Description string
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
DryRun bool
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
EnableJumboFrame bool
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
ExpiredTime string
(Available since v1.232.0) The expiration time of the instance.
ForceDelete bool
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
HostName string
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
HpcClusterId Changes to this property will trigger replacement. string
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
HttpEndpoint string
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
HttpTokens string
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
ImageId string
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
ImageOptions Pulumi.AliCloud.Ecs.Inputs.InstanceImageOptions

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

IncludeDataDisks bool
Whether to change instance disks charge type when changing instance charge type.
InstanceChargeType string
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
InstanceName string
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
InstanceType string
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
InternetChargeType string
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
InternetMaxBandwidthIn int
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

InternetMaxBandwidthOut int
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
Ipv6AddressCount Changes to this property will trigger replacement. int
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
Ipv6Addresses List<string>
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
IsOutdated bool
Whether to use outdated instance type.
KeyName Changes to this property will trigger replacement. string
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
KmsEncryptedPassword string
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
KmsEncryptionContext Dictionary<string, string>
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
LaunchTemplateId Changes to this property will trigger replacement. string
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
LaunchTemplateVersion Changes to this property will trigger replacement. string
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
MaintenanceAction string
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
MaintenanceNotify bool
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
MaintenanceTime Pulumi.AliCloud.Ecs.Inputs.InstanceMaintenanceTime
The time of maintenance. See maintenance_time below.
Memory int
The memory size of the instance. Unit: MiB.
NetworkCardIndex Changes to this property will trigger replacement. int
The index of the network card for Primary ENI.
NetworkInterfaceId string
The ID of the Primary ENI.
NetworkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
NetworkInterfaces Pulumi.AliCloud.Ecs.Inputs.InstanceNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
OperatorType string
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
OsName string
The name of the operating system of the instance.
OsType string
The type of the operating system of the instance.
Password string
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
PasswordInherit bool
Specifies whether to use the password preset in the image. Default value: false. Valid values:
Period int

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PeriodUnit string
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
PrimaryIpAddress string
The primary private IP address of the ENI.
PrivateIp string
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
PublicIp string
The instance public ip.
QueuePairNumber Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
RenewalStatus string
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
ResourceGroupId string
The Id of resource group which the instance belongs.
RoleName Changes to this property will trigger replacement. string
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
SecondaryPrivateIpAddressCount int
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
SecondaryPrivateIps List<string>
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
SecurityEnhancementStrategy Changes to this property will trigger replacement. string
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
SecurityGroups List<string>
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
SpotDuration int
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
SpotPriceLimit Changes to this property will trigger replacement. double
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
SpotStrategy Changes to this property will trigger replacement. string

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

StartTime string
(Available since v1.232.0) The time when the instance was last started.
Status string
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
StoppedMode string
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
SystemDiskAutoSnapshotPolicyId string
The ID of the automatic snapshot policy applied to the system disk.
SystemDiskCategory Changes to this property will trigger replacement. string
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
SystemDiskDescription string
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
SystemDiskEncryptAlgorithm Changes to this property will trigger replacement. string
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
SystemDiskEncrypted Changes to this property will trigger replacement. bool
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
SystemDiskId string
(Available since v1.210.0) The ID of system disk.
SystemDiskKmsKeyId Changes to this property will trigger replacement. string
The ID of the Key Management Service (KMS) key to be used for the system disk.
SystemDiskName string
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
SystemDiskPerformanceLevel string
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
SystemDiskSize int
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
SystemDiskStorageClusterId Changes to this property will trigger replacement. string
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
UserData string
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
VolumeTags Dictionary<string, string>
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
VpcId string
The ID of the VPC.
VswitchId string
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
AllocatePublicIp bool
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
AutoRenewPeriod int
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
AvailabilityZone Changes to this property will trigger replacement. string
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
Cpu int
The number of vCPUs.
CreateTime string
(Available since v1.232.0) The time when the instance was created.
CreditSpecification string
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
DataDisks []InstanceDataDiskArgs
The list of data disks created with instance. See data_disks below.
DedicatedHostId Changes to this property will trigger replacement. string
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
DeletionProtection bool
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
DeploymentSetGroupNo string
The group number of the instance in a deployment set when the deployment set is use.
DeploymentSetId string
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
Description string
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
DryRun bool
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
EnableJumboFrame bool
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
ExpiredTime string
(Available since v1.232.0) The expiration time of the instance.
ForceDelete bool
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
HostName string
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
HpcClusterId Changes to this property will trigger replacement. string
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
HttpEndpoint string
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
HttpPutResponseHopLimit Changes to this property will trigger replacement. int
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
HttpTokens string
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
ImageId string
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
ImageOptions InstanceImageOptionsArgs

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

IncludeDataDisks bool
Whether to change instance disks charge type when changing instance charge type.
InstanceChargeType string
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
InstanceName string
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
InstanceType string
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
InternetChargeType string
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
InternetMaxBandwidthIn int
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

InternetMaxBandwidthOut int
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
Ipv6AddressCount Changes to this property will trigger replacement. int
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
Ipv6Addresses []string
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
IsOutdated bool
Whether to use outdated instance type.
KeyName Changes to this property will trigger replacement. string
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
KmsEncryptedPassword string
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
KmsEncryptionContext map[string]string
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
LaunchTemplateId Changes to this property will trigger replacement. string
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
LaunchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
LaunchTemplateVersion Changes to this property will trigger replacement. string
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
MaintenanceAction string
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
MaintenanceNotify bool
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
MaintenanceTime InstanceMaintenanceTimeArgs
The time of maintenance. See maintenance_time below.
Memory int
The memory size of the instance. Unit: MiB.
NetworkCardIndex Changes to this property will trigger replacement. int
The index of the network card for Primary ENI.
NetworkInterfaceId string
The ID of the Primary ENI.
NetworkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
NetworkInterfaces InstanceNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
OperatorType string
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
OsName string
The name of the operating system of the instance.
OsType string
The type of the operating system of the instance.
Password string
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
PasswordInherit bool
Specifies whether to use the password preset in the image. Default value: false. Valid values:
Period int

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

PeriodUnit string
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
PrimaryIpAddress string
The primary private IP address of the ENI.
PrivateIp string
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
PublicIp string
The instance public ip.
QueuePairNumber Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
RenewalStatus string
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
ResourceGroupId string
The Id of resource group which the instance belongs.
RoleName Changes to this property will trigger replacement. string
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
SecondaryPrivateIpAddressCount int
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
SecondaryPrivateIps []string
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
SecurityEnhancementStrategy Changes to this property will trigger replacement. string
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
SecurityGroups []string
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
SpotDuration int
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
SpotPriceLimit Changes to this property will trigger replacement. float64
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
SpotStrategy Changes to this property will trigger replacement. string

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

StartTime string
(Available since v1.232.0) The time when the instance was last started.
Status string
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
StoppedMode string
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
SystemDiskAutoSnapshotPolicyId string
The ID of the automatic snapshot policy applied to the system disk.
SystemDiskCategory Changes to this property will trigger replacement. string
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
SystemDiskDescription string
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
SystemDiskEncryptAlgorithm Changes to this property will trigger replacement. string
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
SystemDiskEncrypted Changes to this property will trigger replacement. bool
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
SystemDiskId string
(Available since v1.210.0) The ID of system disk.
SystemDiskKmsKeyId Changes to this property will trigger replacement. string
The ID of the Key Management Service (KMS) key to be used for the system disk.
SystemDiskName string
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
SystemDiskPerformanceLevel string
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
SystemDiskSize int
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
SystemDiskStorageClusterId Changes to this property will trigger replacement. string
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
Tags map[string]string
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
UserData string
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
VolumeTags map[string]string
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
VpcId string
The ID of the VPC.
VswitchId string
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocatePublicIp Boolean
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime String
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
autoRenewPeriod Integer
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availabilityZone Changes to this property will trigger replacement. String
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
cpu Integer
The number of vCPUs.
createTime String
(Available since v1.232.0) The time when the instance was created.
creditSpecification String
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
dataDisks List<InstanceDataDisk>
The list of data disks created with instance. See data_disks below.
dedicatedHostId Changes to this property will trigger replacement. String
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletionProtection Boolean
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deploymentSetGroupNo String
The group number of the instance in a deployment set when the deployment set is use.
deploymentSetId String
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description String
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dryRun Boolean
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enableJumboFrame Boolean
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
expiredTime String
(Available since v1.232.0) The expiration time of the instance.
forceDelete Boolean
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
hostName String
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpcClusterId Changes to this property will trigger replacement. String
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
httpEndpoint String
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Integer
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
httpTokens String
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
imageId String
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
imageOptions InstanceImageOptions

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

includeDataDisks Boolean
Whether to change instance disks charge type when changing instance charge type.
instanceChargeType String
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instanceName String
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instanceType String
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internetChargeType String
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internetMaxBandwidthIn Integer
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internetMaxBandwidthOut Integer
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6AddressCount Changes to this property will trigger replacement. Integer
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6Addresses List<String>
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
isOutdated Boolean
Whether to use outdated instance type.
keyName Changes to this property will trigger replacement. String
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kmsEncryptedPassword String
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kmsEncryptionContext Map<String,String>
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launchTemplateId Changes to this property will trigger replacement. String
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launchTemplateName Changes to this property will trigger replacement. String
The name of the launch template.
launchTemplateVersion Changes to this property will trigger replacement. String
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenanceAction String
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenanceNotify Boolean
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenanceTime InstanceMaintenanceTime
The time of maintenance. See maintenance_time below.
memory Integer
The memory size of the instance. Unit: MiB.
networkCardIndex Changes to this property will trigger replacement. Integer
The index of the network card for Primary ENI.
networkInterfaceId String
The ID of the Primary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. String
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
networkInterfaces InstanceNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
operatorType String
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
osName String
The name of the operating system of the instance.
osType String
The type of the operating system of the instance.
password String
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
passwordInherit Boolean
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period Integer

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

periodUnit String
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
primaryIpAddress String
The primary private IP address of the ENI.
privateIp String
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
publicIp String
The instance public ip.
queuePairNumber Changes to this property will trigger replacement. Integer
The number of queues supported by the ERI.
renewalStatus String
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resourceGroupId String
The Id of resource group which the instance belongs.
roleName Changes to this property will trigger replacement. String
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondaryPrivateIpAddressCount Integer
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondaryPrivateIps List<String>
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
securityEnhancementStrategy Changes to this property will trigger replacement. String
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
securityGroups List<String>
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spotDuration Integer
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spotPriceLimit Changes to this property will trigger replacement. Double
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spotStrategy Changes to this property will trigger replacement. String

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

startTime String
(Available since v1.232.0) The time when the instance was last started.
status String
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stoppedMode String
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
systemDiskAutoSnapshotPolicyId String
The ID of the automatic snapshot policy applied to the system disk.
systemDiskCategory Changes to this property will trigger replacement. String
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
systemDiskDescription String
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
systemDiskEncryptAlgorithm Changes to this property will trigger replacement. String
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
systemDiskEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
systemDiskId String
(Available since v1.210.0) The ID of system disk.
systemDiskKmsKeyId Changes to this property will trigger replacement. String
The ID of the Key Management Service (KMS) key to be used for the system disk.
systemDiskName String
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
systemDiskPerformanceLevel String
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
systemDiskSize Integer
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
systemDiskStorageClusterId Changes to this property will trigger replacement. String
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags Map<String,String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
userData String
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volumeTags Map<String,String>
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpcId String
The ID of the VPC.
vswitchId String
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocatePublicIp boolean
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime string
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
autoRenewPeriod number
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availabilityZone Changes to this property will trigger replacement. string
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
cpu number
The number of vCPUs.
createTime string
(Available since v1.232.0) The time when the instance was created.
creditSpecification string
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
dataDisks InstanceDataDisk[]
The list of data disks created with instance. See data_disks below.
dedicatedHostId Changes to this property will trigger replacement. string
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletionProtection boolean
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deploymentSetGroupNo string
The group number of the instance in a deployment set when the deployment set is use.
deploymentSetId string
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description string
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dryRun boolean
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enableJumboFrame boolean
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
expiredTime string
(Available since v1.232.0) The expiration time of the instance.
forceDelete boolean
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
hostName string
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpcClusterId Changes to this property will trigger replacement. string
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
httpEndpoint string
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. number
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
httpTokens string
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
imageId string
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
imageOptions InstanceImageOptions

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

includeDataDisks boolean
Whether to change instance disks charge type when changing instance charge type.
instanceChargeType string
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instanceName string
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instanceType string
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internetChargeType string
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internetMaxBandwidthIn number
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internetMaxBandwidthOut number
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6AddressCount Changes to this property will trigger replacement. number
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6Addresses string[]
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
isOutdated boolean
Whether to use outdated instance type.
keyName Changes to this property will trigger replacement. string
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kmsEncryptedPassword string
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kmsEncryptionContext {[key: string]: string}
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launchTemplateId Changes to this property will trigger replacement. string
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launchTemplateName Changes to this property will trigger replacement. string
The name of the launch template.
launchTemplateVersion Changes to this property will trigger replacement. string
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenanceAction string
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenanceNotify boolean
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenanceTime InstanceMaintenanceTime
The time of maintenance. See maintenance_time below.
memory number
The memory size of the instance. Unit: MiB.
networkCardIndex Changes to this property will trigger replacement. number
The index of the network card for Primary ENI.
networkInterfaceId string
The ID of the Primary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
networkInterfaces InstanceNetworkInterfaces
The list of network interfaces created with instance. See network_interfaces below.
operatorType string
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
osName string
The name of the operating system of the instance.
osType string
The type of the operating system of the instance.
password string
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
passwordInherit boolean
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period number

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

periodUnit string
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
primaryIpAddress string
The primary private IP address of the ENI.
privateIp string
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
publicIp string
The instance public ip.
queuePairNumber Changes to this property will trigger replacement. number
The number of queues supported by the ERI.
renewalStatus string
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resourceGroupId string
The Id of resource group which the instance belongs.
roleName Changes to this property will trigger replacement. string
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondaryPrivateIpAddressCount number
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondaryPrivateIps string[]
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
securityEnhancementStrategy Changes to this property will trigger replacement. string
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
securityGroups string[]
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spotDuration number
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spotPriceLimit Changes to this property will trigger replacement. number
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spotStrategy Changes to this property will trigger replacement. string

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

startTime string
(Available since v1.232.0) The time when the instance was last started.
status string
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stoppedMode string
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
systemDiskAutoSnapshotPolicyId string
The ID of the automatic snapshot policy applied to the system disk.
systemDiskCategory Changes to this property will trigger replacement. string
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
systemDiskDescription string
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
systemDiskEncryptAlgorithm Changes to this property will trigger replacement. string
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
systemDiskEncrypted Changes to this property will trigger replacement. boolean
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
systemDiskId string
(Available since v1.210.0) The ID of system disk.
systemDiskKmsKeyId Changes to this property will trigger replacement. string
The ID of the Key Management Service (KMS) key to be used for the system disk.
systemDiskName string
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
systemDiskPerformanceLevel string
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
systemDiskSize number
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
systemDiskStorageClusterId Changes to this property will trigger replacement. string
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags {[key: string]: string}
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
userData string
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volumeTags {[key: string]: string}
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpcId string
The ID of the VPC.
vswitchId string
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocate_public_ip bool
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

auto_release_time str
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
auto_renew_period int
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availability_zone Changes to this property will trigger replacement. str
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
cpu int
The number of vCPUs.
create_time str
(Available since v1.232.0) The time when the instance was created.
credit_specification str
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
data_disks Sequence[InstanceDataDiskArgs]
The list of data disks created with instance. See data_disks below.
dedicated_host_id Changes to this property will trigger replacement. str
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletion_protection bool
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deployment_set_group_no str
The group number of the instance in a deployment set when the deployment set is use.
deployment_set_id str
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description str
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dry_run bool
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enable_jumbo_frame bool
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
expired_time str
(Available since v1.232.0) The expiration time of the instance.
force_delete bool
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
host_name str
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpc_cluster_id Changes to this property will trigger replacement. str
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
http_endpoint str
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
http_put_response_hop_limit Changes to this property will trigger replacement. int
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
http_tokens str
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
image_id str
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
image_options InstanceImageOptionsArgs

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

include_data_disks bool
Whether to change instance disks charge type when changing instance charge type.
instance_charge_type str
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instance_name str
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instance_type str
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internet_charge_type str
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internet_max_bandwidth_in int
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internet_max_bandwidth_out int
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6_address_count Changes to this property will trigger replacement. int
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6_addresses Sequence[str]
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
is_outdated bool
Whether to use outdated instance type.
key_name Changes to this property will trigger replacement. str
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kms_encrypted_password str
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kms_encryption_context Mapping[str, str]
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launch_template_id Changes to this property will trigger replacement. str
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launch_template_name Changes to this property will trigger replacement. str
The name of the launch template.
launch_template_version Changes to this property will trigger replacement. str
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenance_action str
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenance_notify bool
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenance_time InstanceMaintenanceTimeArgs
The time of maintenance. See maintenance_time below.
memory int
The memory size of the instance. Unit: MiB.
network_card_index Changes to this property will trigger replacement. int
The index of the network card for Primary ENI.
network_interface_id str
The ID of the Primary ENI.
network_interface_traffic_mode Changes to this property will trigger replacement. str
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
network_interfaces InstanceNetworkInterfacesArgs
The list of network interfaces created with instance. See network_interfaces below.
operator_type str
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
os_name str
The name of the operating system of the instance.
os_type str
The type of the operating system of the instance.
password str
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
password_inherit bool
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period int

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

period_unit str
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
primary_ip_address str
The primary private IP address of the ENI.
private_ip str
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
public_ip str
The instance public ip.
queue_pair_number Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
renewal_status str
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resource_group_id str
The Id of resource group which the instance belongs.
role_name Changes to this property will trigger replacement. str
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondary_private_ip_address_count int
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondary_private_ips Sequence[str]
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
security_enhancement_strategy Changes to this property will trigger replacement. str
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
security_groups Sequence[str]
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spot_duration int
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spot_price_limit Changes to this property will trigger replacement. float
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spot_strategy Changes to this property will trigger replacement. str

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

start_time str
(Available since v1.232.0) The time when the instance was last started.
status str
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stopped_mode str
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
system_disk_auto_snapshot_policy_id str
The ID of the automatic snapshot policy applied to the system disk.
system_disk_category Changes to this property will trigger replacement. str
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
system_disk_description str
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
system_disk_encrypt_algorithm Changes to this property will trigger replacement. str
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
system_disk_encrypted Changes to this property will trigger replacement. bool
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
system_disk_id str
(Available since v1.210.0) The ID of system disk.
system_disk_kms_key_id Changes to this property will trigger replacement. str
The ID of the Key Management Service (KMS) key to be used for the system disk.
system_disk_name str
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
system_disk_performance_level str
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
system_disk_size int
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
system_disk_storage_cluster_id Changes to this property will trigger replacement. str
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags Mapping[str, str]
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
user_data str
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volume_tags Mapping[str, str]
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpc_id str
The ID of the VPC.
vswitch_id str
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
allocatePublicIp Boolean
It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime String
The automatic release time of the PostPaid instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically.
autoRenewPeriod Number
Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
availabilityZone Changes to this property will trigger replacement. String
The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.
cpu Number
The number of vCPUs.
createTime String
(Available since v1.232.0) The time when the instance was created.
creditSpecification String
Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
dataDisks List<Property Map>
The list of data disks created with instance. See data_disks below.
dedicatedHostId Changes to this property will trigger replacement. String
The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the spot_strategy and spot_price_limit parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts.
deletionProtection Boolean
Whether enable the deletion protection or not. It does not work when the instance is spot. Default value: false.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
deploymentSetGroupNo String
The group number of the instance in a deployment set when the deployment set is use.
deploymentSetId String
The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
description String
Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
dryRun Boolean
Specifies whether to send a dry-run request. Default to false.

  • true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the DryRunOperation error code is returned.
  • false: A request is sent. If the validation succeeds, the instance is created.
enableJumboFrame Boolean
Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: true, false.
expiredTime String
(Available since v1.232.0) The expiration time of the instance.
forceDelete Boolean
If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
hostName String
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
hpcClusterId Changes to this property will trigger replacement. String
The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
httpEndpoint String
Specifies whether to enable the access channel for instance metadata. Valid values: enabled, disabled. Default value: enabled.
httpPutResponseHopLimit Changes to this property will trigger replacement. Number
NOTE:: This parameter is not available for use yet. The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
httpTokens String
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:

  • optional: does not forcefully use the security-enhanced mode (IMDSv2).
  • required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
imageId String
The Image to use for the instance. ECS instance's image can be replaced via changing image_id. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify image_id.
imageOptions Property Map

The options of images. See image_options below.

NOTE: System disk category cloud has been outdated and it only can be used none I/O Optimized ECS instances. Recommend cloud_efficiency and cloud_ssd disk.

NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying period and period_unit, but it is irreversible.

NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.

NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.

NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".

NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.

includeDataDisks Boolean
Whether to change instance disks charge type when changing instance charge type.
instanceChargeType String
Valid values are PrePaid, PostPaid. NOTE: From version 1.243.0, the default value PostPaid will be removed. NOTE: Since 1.9.6, it can be changed each other between PostPaid and PrePaid. However, since some limitation about CPU core count in one month, there strongly recommends that Don't change instance_charge_type frequentlly in one month.
instanceName String
The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. NOTE: From version 1.243.0, the default value ECS-Instance will be removed.
instanceType String
The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify instance_type.
internetChargeType String
Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". NOTE: From version 1.243.0, the default value PayByTraffic will be removed.
internetMaxBandwidthIn Number
Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.

Deprecated: The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2.

internetMaxBandwidthOut Number
Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. NOTE: From version 1.243.0, the default value 0 will be removed.
ipv6AddressCount Changes to this property will trigger replacement. Number
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
ipv6Addresses List<String>
A list of IPv6 address to be assigned to the primary ENI. Support up to 10. NOTE: From version 1.241.0, ipv6_addresses can be modified.
isOutdated Boolean
Whether to use outdated instance type.
keyName Changes to this property will trigger replacement. String
The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kmsEncryptedPassword String
An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kmsEncryptionContext Map<String>
An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.
launchTemplateId Changes to this property will trigger replacement. String
The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the launch_template_id or launch_template_name parameter to specify the launch template.
launchTemplateName Changes to this property will trigger replacement. String
The name of the launch template.
launchTemplateVersion Changes to this property will trigger replacement. String
The version of the launch template. If you set launch_template_id or launch_template_name parameter but do not set the version number of the launch template, the default template version is used.
maintenanceAction String
The maintenance action. Valid values: Stop, AutoRecover and AutoRedeploy.

  • Stop : stops the instance.
  • AutoRecover : automatically recovers the instance.
  • AutoRedeploy : fails the instance over, which may cause damage to the data disks attached to the instance.
maintenanceNotify Boolean
Specifies whether to send an event notification before instance shutdown. Valid values: true, false. Default value: false.
maintenanceTime Property Map
The time of maintenance. See maintenance_time below.
memory Number
The memory size of the instance. Unit: MiB.
networkCardIndex Changes to this property will trigger replacement. Number
The index of the network card for Primary ENI.
networkInterfaceId String
The ID of the Primary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. String
The communication mode of the Primary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
networkInterfaces Property Map
The list of network interfaces created with instance. See network_interfaces below.
operatorType String
The operation type. It is valid when instance_charge_type is PrePaid. Default value: upgrade. Valid values: upgrade, downgrade. NOTE: When the new instance type specified by the instance_type parameter has lower specifications than the current instance type, you must set operator_type to downgrade.
osName String
The name of the operating system of the instance.
osType String
The type of the operating system of the instance.
password String
Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
passwordInherit Boolean
Specifies whether to use the password preset in the image. Default value: false. Valid values:
period Number

The duration that you will buy the resource, in month. It is valid and required when instance_charge_type is PrePaid. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"

NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

periodUnit String
The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".
primaryIpAddress String
The primary private IP address of the ENI.
privateIp String
Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.
publicIp String
The instance public ip.
queuePairNumber Changes to this property will trigger replacement. Number
The number of queues supported by the ERI.
renewalStatus String
Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. Default to "Normal". Valid values:

  • AutoRenewal: Enable auto renewal.
  • Normal: Disable auto renewal.
  • NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resourceGroupId String
The Id of resource group which the instance belongs.
roleName Changes to this property will trigger replacement. String
Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.
secondaryPrivateIpAddressCount Number
The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify secondary_private_ips or secondary_private_ip_address_count but not both.
secondaryPrivateIps List<String>
A list of Secondary private IP addresses which is selected from within the CIDR block of the vSwitch.
securityEnhancementStrategy Changes to this property will trigger replacement. String
The security enhancement strategy.

  • Active: Enable security enhancement strategy, it only works on system images.
  • Deactive: Disable security enhancement strategy, it works on all images.
securityGroups List<String>
A list of security group ids to associate with. If you do not use launch_template_id or launch_template_name to specify a launch template, you must specify security_groups.
spotDuration Number
The retention time of the preemptive instance in hours. Valid values: 0, 1, 2, 3, 4, 5, 6. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is 0, the mode is no protection period. Default value is 1.
spotPriceLimit Changes to this property will trigger replacement. Number
The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
spotStrategy Changes to this property will trigger replacement. String

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is 'PostPaid'. Value range:

  • NoSpot: A regular Pay-As-You-Go instance.
  • SpotWithPriceLimit: A price threshold for a spot instance
  • SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance

Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.

startTime String
(Available since v1.232.0) The time when the instance was last started.
status String
The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to Running.
stoppedMode String
The stop mode of the pay-as-you-go instance. Valid values: StopCharging,KeepCharging, Not-applicable. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is StopCharging. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value is KeepCharging. Note: Not-applicable: Economical mode is not applicable to the instance.`

  • KeepCharging: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.
  • StopCharging: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
systemDiskAutoSnapshotPolicyId String
The ID of the automatic snapshot policy applied to the system disk.
systemDiskCategory Changes to this property will trigger replacement. String
Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud, cloud_auto, cloud_essd_entry. only is used to some none I/O optimized instance. Valid values cloud_auto Available since v1.184.0.
systemDiskDescription String
The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
systemDiskEncryptAlgorithm Changes to this property will trigger replacement. String
The algorithm to be used to encrypt the system disk. Valid values are aes-256, sm4-128. Default value is aes-256.
systemDiskEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether to encrypt the system disk. Valid values: true,false. Default value: false.
systemDiskId String
(Available since v1.210.0) The ID of system disk.
systemDiskKmsKeyId Changes to this property will trigger replacement. String
The ID of the Key Management Service (KMS) key to be used for the system disk.
systemDiskName String
The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
systemDiskPerformanceLevel String
The performance level of the ESSD used as the system disk, Valid values: PL0, PL1, PL2, PL3, Default to PL1;For more information about ESSD, See Encryption Context.
systemDiskSize Number
Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
systemDiskStorageClusterId Changes to this property will trigger replacement. String
The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
tags Map<String>
A mapping of tags to assign to the resource.

  • Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
  • Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
userData String
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
volumeTags Map<String>
A mapping of tags to assign to the devices created by the instance at launch time.

  • 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.
vpcId String
The ID of the VPC.
vswitchId String
The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.

Supporting Types

InstanceDataDisk
, InstanceDataDiskArgs

Size
This property is required.
Changes to this property will trigger replacement.
int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
AutoSnapshotPolicyId Changes to this property will trigger replacement. string
The ID of the automatic snapshot policy applied to the system disk.
Category Changes to this property will trigger replacement. string
The category of the disk:
DeleteWithInstance Changes to this property will trigger replacement. bool
Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: true.
Description Changes to this property will trigger replacement. string
The description of the data disk.
Device Changes to this property will trigger replacement. string
The mount point of the data disk.
Encrypted Changes to this property will trigger replacement. bool
Encrypted the data in this disk. Default value: false.
KmsKeyId string
The KMS key ID corresponding to the Nth data disk.
Name Changes to this property will trigger replacement. string
The name of the data disk.
PerformanceLevel string
The performance level of the ESSD used as data disk:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to PL1.
SnapshotId Changes to this property will trigger replacement. 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.
Size
This property is required.
Changes to this property will trigger replacement.
int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
AutoSnapshotPolicyId Changes to this property will trigger replacement. string
The ID of the automatic snapshot policy applied to the system disk.
Category Changes to this property will trigger replacement. string
The category of the disk:
DeleteWithInstance Changes to this property will trigger replacement. bool
Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: true.
Description Changes to this property will trigger replacement. string
The description of the data disk.
Device Changes to this property will trigger replacement. string
The mount point of the data disk.
Encrypted Changes to this property will trigger replacement. bool
Encrypted the data in this disk. Default value: false.
KmsKeyId string
The KMS key ID corresponding to the Nth data disk.
Name Changes to this property will trigger replacement. string
The name of the data disk.
PerformanceLevel string
The performance level of the ESSD used as data disk:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to PL1.
SnapshotId Changes to this property will trigger replacement. 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.
size
This property is required.
Changes to this property will trigger replacement.
Integer
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
autoSnapshotPolicyId Changes to this property will trigger replacement. String
The ID of the automatic snapshot policy applied to the system disk.
category Changes to this property will trigger replacement. String
The category of the disk:
deleteWithInstance Changes to this property will trigger replacement. Boolean
Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: true.
description Changes to this property will trigger replacement. String
The description of the data disk.
device Changes to this property will trigger replacement. String
The mount point of the data disk.
encrypted Changes to this property will trigger replacement. Boolean
Encrypted the data in this disk. Default value: false.
kmsKeyId String
The KMS key ID corresponding to the Nth data disk.
name Changes to this property will trigger replacement. String
The name of the data disk.
performanceLevel String
The performance level of the ESSD used as data disk:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to PL1.
snapshotId Changes to this property will trigger replacement. 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.
size
This property is required.
Changes to this property will trigger replacement.
number
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
autoSnapshotPolicyId Changes to this property will trigger replacement. string
The ID of the automatic snapshot policy applied to the system disk.
category Changes to this property will trigger replacement. string
The category of the disk:
deleteWithInstance Changes to this property will trigger replacement. boolean
Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: true.
description Changes to this property will trigger replacement. string
The description of the data disk.
device Changes to this property will trigger replacement. string
The mount point of the data disk.
encrypted Changes to this property will trigger replacement. boolean
Encrypted the data in this disk. Default value: false.
kmsKeyId string
The KMS key ID corresponding to the Nth data disk.
name Changes to this property will trigger replacement. string
The name of the data disk.
performanceLevel string
The performance level of the ESSD used as data disk:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to PL1.
snapshotId Changes to this property will trigger replacement. 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.
size
This property is required.
Changes to this property will trigger replacement.
int
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
auto_snapshot_policy_id Changes to this property will trigger replacement. str
The ID of the automatic snapshot policy applied to the system disk.
category Changes to this property will trigger replacement. str
The category of the disk:
delete_with_instance Changes to this property will trigger replacement. bool
Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: true.
description Changes to this property will trigger replacement. str
The description of the data disk.
device Changes to this property will trigger replacement. str
The mount point of the data disk.
encrypted Changes to this property will trigger replacement. bool
Encrypted the data in this disk. Default value: false.
kms_key_id str
The KMS key ID corresponding to the Nth data disk.
name Changes to this property will trigger replacement. str
The name of the data disk.
performance_level str
The performance level of the ESSD used as data disk:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to PL1.
snapshot_id Changes to this property will trigger replacement. 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.
size
This property is required.
Changes to this property will trigger replacement.
Number
The size of the data disk.

  • cloud:[5, 2000]
  • cloud_efficiency:[20, 32768]
  • cloud_ssd:[20, 32768]
  • cloud_essd:[20, 32768]
  • ephemeral_ssd: [5, 800]
autoSnapshotPolicyId Changes to this property will trigger replacement. String
The ID of the automatic snapshot policy applied to the system disk.
category Changes to this property will trigger replacement. String
The category of the disk:
deleteWithInstance Changes to this property will trigger replacement. Boolean
Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value: true.
description Changes to this property will trigger replacement. String
The description of the data disk.
device Changes to this property will trigger replacement. String
The mount point of the data disk.
encrypted Changes to this property will trigger replacement. Boolean
Encrypted the data in this disk. Default value: false.
kmsKeyId String
The KMS key ID corresponding to the Nth data disk.
name Changes to this property will trigger replacement. String
The name of the data disk.
performanceLevel String
The performance level of the ESSD used as data disk:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default to PL1.
snapshotId Changes to this property will trigger replacement. 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.

InstanceImageOptions
, InstanceImageOptionsArgs

LoginAsNonRoot Changes to this property will trigger replacement. bool
Whether to allow the instance logging in with the ecs-user user.
LoginAsNonRoot Changes to this property will trigger replacement. bool
Whether to allow the instance logging in with the ecs-user user.
loginAsNonRoot Changes to this property will trigger replacement. Boolean
Whether to allow the instance logging in with the ecs-user user.
loginAsNonRoot Changes to this property will trigger replacement. boolean
Whether to allow the instance logging in with the ecs-user user.
login_as_non_root Changes to this property will trigger replacement. bool
Whether to allow the instance logging in with the ecs-user user.
loginAsNonRoot Changes to this property will trigger replacement. Boolean
Whether to allow the instance logging in with the ecs-user user.

InstanceMaintenanceTime
, InstanceMaintenanceTimeArgs

EndTime string
The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
StartTime string
The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
EndTime string
The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
StartTime string
The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
endTime String
The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
startTime String
The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
endTime string
The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
startTime string
The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
end_time str
The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
start_time str
The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
endTime String
The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
startTime String
The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The start_time and end_time parameters must be specified at the same time. The end_time value must be 1 to 23 hours later than the start_time value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.

InstanceNetworkInterfaces
, InstanceNetworkInterfacesArgs

NetworkCardIndex Changes to this property will trigger replacement. int
The index of the network card for Secondary ENI.
NetworkInterfaceId Changes to this property will trigger replacement. string
The ID of the Secondary ENI.
NetworkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Secondary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
QueuePairNumber Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
SecurityGroupIds Changes to this property will trigger replacement. List<string>
The ID of security group N to which to assign Secondary ENI N.
VswitchId Changes to this property will trigger replacement. string
The ID of the vSwitch to which to connect Secondary ENI N.
NetworkCardIndex Changes to this property will trigger replacement. int
The index of the network card for Secondary ENI.
NetworkInterfaceId Changes to this property will trigger replacement. string
The ID of the Secondary ENI.
NetworkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Secondary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
QueuePairNumber Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
SecurityGroupIds Changes to this property will trigger replacement. []string
The ID of security group N to which to assign Secondary ENI N.
VswitchId Changes to this property will trigger replacement. string
The ID of the vSwitch to which to connect Secondary ENI N.
networkCardIndex Changes to this property will trigger replacement. Integer
The index of the network card for Secondary ENI.
networkInterfaceId Changes to this property will trigger replacement. String
The ID of the Secondary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. String
The communication mode of the Secondary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
queuePairNumber Changes to this property will trigger replacement. Integer
The number of queues supported by the ERI.
securityGroupIds Changes to this property will trigger replacement. List<String>
The ID of security group N to which to assign Secondary ENI N.
vswitchId Changes to this property will trigger replacement. String
The ID of the vSwitch to which to connect Secondary ENI N.
networkCardIndex Changes to this property will trigger replacement. number
The index of the network card for Secondary ENI.
networkInterfaceId Changes to this property will trigger replacement. string
The ID of the Secondary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. string
The communication mode of the Secondary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
queuePairNumber Changes to this property will trigger replacement. number
The number of queues supported by the ERI.
securityGroupIds Changes to this property will trigger replacement. string[]
The ID of security group N to which to assign Secondary ENI N.
vswitchId Changes to this property will trigger replacement. string
The ID of the vSwitch to which to connect Secondary ENI N.
network_card_index Changes to this property will trigger replacement. int
The index of the network card for Secondary ENI.
network_interface_id Changes to this property will trigger replacement. str
The ID of the Secondary ENI.
network_interface_traffic_mode Changes to this property will trigger replacement. str
The communication mode of the Secondary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
queue_pair_number Changes to this property will trigger replacement. int
The number of queues supported by the ERI.
security_group_ids Changes to this property will trigger replacement. Sequence[str]
The ID of security group N to which to assign Secondary ENI N.
vswitch_id Changes to this property will trigger replacement. str
The ID of the vSwitch to which to connect Secondary ENI N.
networkCardIndex Changes to this property will trigger replacement. Number
The index of the network card for Secondary ENI.
networkInterfaceId Changes to this property will trigger replacement. String
The ID of the Secondary ENI.
networkInterfaceTrafficMode Changes to this property will trigger replacement. String
The communication mode of the Secondary ENI. Default value: Standard. Valid values:

  • Standard: Uses the TCP communication mode.
  • HighPerformance: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
queuePairNumber Changes to this property will trigger replacement. Number
The number of queues supported by the ERI.
securityGroupIds Changes to this property will trigger replacement. List<String>
The ID of security group N to which to assign Secondary ENI N.
vswitchId Changes to this property will trigger replacement. String
The ID of the vSwitch to which to connect Secondary ENI N.

Import

Instance can be imported using the id, e.g.

$ pulumi import alicloud:ecs/instance:Instance example i-abc12345678
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.