volcengine.ecs.Instance
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
    vpcName: "acc-test-vpc",
    cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
    subnetName: "acc-test-subnet",
    cidrBlock: "172.16.0.0/24",
    zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
    vpcId: fooVpc.id,
});
const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
    securityGroupName: "acc-test-security-group",
    vpcId: fooVpc.id,
});
const fooImages = volcengine.ecs.Images({
    osType: "Linux",
    visibility: "public",
    instanceTypeId: "ecs.g1.large",
});
const fooInstance = new volcengine.ecs.Instance("fooInstance", {
    instanceName: "acc-test-ecs",
    description: "acc-test",
    hostName: "tf-acc-test",
    imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId),
    instanceType: "ecs.g1.large",
    password: "93f0cb0614Aab12",
    instanceChargeType: "PostPaid",
    systemVolumeType: "ESSD_PL0",
    systemVolumeSize: 40,
    dataVolumes: [{
        volumeType: "ESSD_PL0",
        size: 50,
        deleteWithInstance: true,
    }],
    subnetId: fooSubnet.id,
    securityGroupIds: [fooSecurityGroup.id],
    projectName: "default",
    tags: [{
        key: "k1",
        value: "v1",
    }],
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
    vpc_name="acc-test-vpc",
    cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
    subnet_name="acc-test-subnet",
    cidr_block="172.16.0.0/24",
    zone_id=foo_zones.zones[0].id,
    vpc_id=foo_vpc.id)
foo_security_group = volcengine.vpc.SecurityGroup("fooSecurityGroup",
    security_group_name="acc-test-security-group",
    vpc_id=foo_vpc.id)
foo_images = volcengine.ecs.images(os_type="Linux",
    visibility="public",
    instance_type_id="ecs.g1.large")
foo_instance = volcengine.ecs.Instance("fooInstance",
    instance_name="acc-test-ecs",
    description="acc-test",
    host_name="tf-acc-test",
    image_id=foo_images.images[0].image_id,
    instance_type="ecs.g1.large",
    password="93f0cb0614Aab12",
    instance_charge_type="PostPaid",
    system_volume_type="ESSD_PL0",
    system_volume_size=40,
    data_volumes=[volcengine.ecs.InstanceDataVolumeArgs(
        volume_type="ESSD_PL0",
        size=50,
        delete_with_instance=True,
    )],
    subnet_id=foo_subnet.id,
    security_group_ids=[foo_security_group.id],
    project_name="default",
    tags=[volcengine.ecs.InstanceTagArgs(
        key="k1",
        value="v1",
    )])
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooZones, err := ecs.Zones(ctx, nil, nil)
		if err != nil {
			return err
		}
		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
			VpcName:   pulumi.String("acc-test-vpc"),
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
			SubnetName: pulumi.String("acc-test-subnet"),
			CidrBlock:  pulumi.String("172.16.0.0/24"),
			ZoneId:     pulumi.String(fooZones.Zones[0].Id),
			VpcId:      fooVpc.ID(),
		})
		if err != nil {
			return err
		}
		fooSecurityGroup, err := vpc.NewSecurityGroup(ctx, "fooSecurityGroup", &vpc.SecurityGroupArgs{
			SecurityGroupName: pulumi.String("acc-test-security-group"),
			VpcId:             fooVpc.ID(),
		})
		if err != nil {
			return err
		}
		fooImages, err := ecs.Images(ctx, &ecs.ImagesArgs{
			OsType:         pulumi.StringRef("Linux"),
			Visibility:     pulumi.StringRef("public"),
			InstanceTypeId: pulumi.StringRef("ecs.g1.large"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.NewInstance(ctx, "fooInstance", &ecs.InstanceArgs{
			InstanceName:       pulumi.String("acc-test-ecs"),
			Description:        pulumi.String("acc-test"),
			HostName:           pulumi.String("tf-acc-test"),
			ImageId:            pulumi.String(fooImages.Images[0].ImageId),
			InstanceType:       pulumi.String("ecs.g1.large"),
			Password:           pulumi.String("93f0cb0614Aab12"),
			InstanceChargeType: pulumi.String("PostPaid"),
			SystemVolumeType:   pulumi.String("ESSD_PL0"),
			SystemVolumeSize:   pulumi.Int(40),
			DataVolumes: ecs.InstanceDataVolumeArray{
				&ecs.InstanceDataVolumeArgs{
					VolumeType:         pulumi.String("ESSD_PL0"),
					Size:               pulumi.Int(50),
					DeleteWithInstance: pulumi.Bool(true),
				},
			},
			SubnetId: fooSubnet.ID(),
			SecurityGroupIds: pulumi.StringArray{
				fooSecurityGroup.ID(),
			},
			ProjectName: pulumi.String("default"),
			Tags: ecs.InstanceTagArray{
				&ecs.InstanceTagArgs{
					Key:   pulumi.String("k1"),
					Value: pulumi.String("v1"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var fooZones = Volcengine.Ecs.Zones.Invoke();
    var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
    {
        VpcName = "acc-test-vpc",
        CidrBlock = "172.16.0.0/16",
    });
    var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
    {
        SubnetName = "acc-test-subnet",
        CidrBlock = "172.16.0.0/24",
        ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
        VpcId = fooVpc.Id,
    });
    var fooSecurityGroup = new Volcengine.Vpc.SecurityGroup("fooSecurityGroup", new()
    {
        SecurityGroupName = "acc-test-security-group",
        VpcId = fooVpc.Id,
    });
    var fooImages = Volcengine.Ecs.Images.Invoke(new()
    {
        OsType = "Linux",
        Visibility = "public",
        InstanceTypeId = "ecs.g1.large",
    });
    var fooInstance = new Volcengine.Ecs.Instance("fooInstance", new()
    {
        InstanceName = "acc-test-ecs",
        Description = "acc-test",
        HostName = "tf-acc-test",
        ImageId = fooImages.Apply(imagesResult => imagesResult.Images[0]?.ImageId),
        InstanceType = "ecs.g1.large",
        Password = "93f0cb0614Aab12",
        InstanceChargeType = "PostPaid",
        SystemVolumeType = "ESSD_PL0",
        SystemVolumeSize = 40,
        DataVolumes = new[]
        {
            new Volcengine.Ecs.Inputs.InstanceDataVolumeArgs
            {
                VolumeType = "ESSD_PL0",
                Size = 50,
                DeleteWithInstance = true,
            },
        },
        SubnetId = fooSubnet.Id,
        SecurityGroupIds = new[]
        {
            fooSecurityGroup.Id,
        },
        ProjectName = "default",
        Tags = new[]
        {
            new Volcengine.Ecs.Inputs.InstanceTagArgs
            {
                Key = "k1",
                Value = "v1",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.vpc.SecurityGroup;
import com.pulumi.volcengine.vpc.SecurityGroupArgs;
import com.pulumi.volcengine.ecs.inputs.ImagesArgs;
import com.pulumi.volcengine.ecs.Instance;
import com.pulumi.volcengine.ecs.InstanceArgs;
import com.pulumi.volcengine.ecs.inputs.InstanceDataVolumeArgs;
import com.pulumi.volcengine.ecs.inputs.InstanceTagArgs;
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 fooZones = EcsFunctions.Zones();
        var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
            .vpcName("acc-test-vpc")
            .cidrBlock("172.16.0.0/16")
            .build());
        var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
            .subnetName("acc-test-subnet")
            .cidrBlock("172.16.0.0/24")
            .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
            .vpcId(fooVpc.id())
            .build());
        var fooSecurityGroup = new SecurityGroup("fooSecurityGroup", SecurityGroupArgs.builder()        
            .securityGroupName("acc-test-security-group")
            .vpcId(fooVpc.id())
            .build());
        final var fooImages = EcsFunctions.Images(ImagesArgs.builder()
            .osType("Linux")
            .visibility("public")
            .instanceTypeId("ecs.g1.large")
            .build());
        var fooInstance = new Instance("fooInstance", InstanceArgs.builder()        
            .instanceName("acc-test-ecs")
            .description("acc-test")
            .hostName("tf-acc-test")
            .imageId(fooImages.applyValue(imagesResult -> imagesResult.images()[0].imageId()))
            .instanceType("ecs.g1.large")
            .password("93f0cb0614Aab12")
            .instanceChargeType("PostPaid")
            .systemVolumeType("ESSD_PL0")
            .systemVolumeSize(40)
            .dataVolumes(InstanceDataVolumeArgs.builder()
                .volumeType("ESSD_PL0")
                .size(50)
                .deleteWithInstance(true)
                .build())
            .subnetId(fooSubnet.id())
            .securityGroupIds(fooSecurityGroup.id())
            .projectName("default")
            .tags(InstanceTagArgs.builder()
                .key("k1")
                .value("v1")
                .build())
            .build());
    }
}
resources:
  fooVpc:
    type: volcengine:vpc:Vpc
    properties:
      vpcName: acc-test-vpc
      cidrBlock: 172.16.0.0/16
  fooSubnet:
    type: volcengine:vpc:Subnet
    properties:
      subnetName: acc-test-subnet
      cidrBlock: 172.16.0.0/24
      zoneId: ${fooZones.zones[0].id}
      vpcId: ${fooVpc.id}
  fooSecurityGroup:
    type: volcengine:vpc:SecurityGroup
    properties:
      securityGroupName: acc-test-security-group
      vpcId: ${fooVpc.id}
  fooInstance:
    type: volcengine:ecs:Instance
    properties:
      instanceName: acc-test-ecs
      description: acc-test
      hostName: tf-acc-test
      imageId: ${fooImages.images[0].imageId}
      instanceType: ecs.g1.large
      password: 93f0cb0614Aab12
      instanceChargeType: PostPaid
      systemVolumeType: ESSD_PL0
      systemVolumeSize: 40
      dataVolumes:
        - volumeType: ESSD_PL0
          size: 50
          deleteWithInstance: true
      subnetId: ${fooSubnet.id}
      securityGroupIds: #  deployment_set_id = ""
      #   #  ipv6_address_count = 1
      #   #  secondary_network_interfaces {
      #   #    subnet_id = volcengine_subnet.foo.id
      #   #    security_group_ids = [volcengine_security_group.foo.id]
      #   #  }
        - ${fooSecurityGroup.id}
      projectName: default
      tags:
        - key: k1
          value: v1
variables:
  fooZones:
    fn::invoke:
      Function: volcengine:ecs:Zones
      Arguments: {}
  fooImages:
    fn::invoke:
      Function: volcengine:ecs:Images
      Arguments:
        osType: Linux
        visibility: public
        instanceTypeId: ecs.g1.large
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: InstanceArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             image_id: Optional[str] = None,
             system_volume_type: Optional[str] = None,
             system_volume_size: Optional[int] = None,
             subnet_id: Optional[str] = None,
             security_group_ids: Optional[Sequence[str]] = None,
             instance_type: Optional[str] = None,
             hpc_cluster_id: Optional[str] = None,
             period: Optional[int] = None,
             auto_renew: Optional[bool] = None,
             eip_id: Optional[str] = None,
             include_data_volumes: Optional[bool] = None,
             instance_charge_type: Optional[str] = None,
             instance_name: Optional[str] = None,
             description: Optional[str] = None,
             ipv6_address_count: Optional[int] = None,
             ipv6_addresses: Optional[Sequence[str]] = None,
             keep_image_credential: Optional[bool] = None,
             key_pair_name: Optional[str] = None,
             password: Optional[str] = None,
             host_name: Optional[str] = None,
             primary_ip_address: Optional[str] = None,
             project_name: Optional[str] = None,
             secondary_network_interfaces: Optional[Sequence[InstanceSecondaryNetworkInterfaceArgs]] = None,
             security_enhancement_strategy: Optional[str] = None,
             deployment_set_id: Optional[str] = None,
             spot_price_limit: Optional[float] = None,
             spot_strategy: Optional[str] = None,
             data_volumes: Optional[Sequence[InstanceDataVolumeArgs]] = None,
             cpu_options: Optional[InstanceCpuOptionsArgs] = None,
             auto_renew_period: Optional[int] = None,
             tags: Optional[Sequence[InstanceTagArgs]] = None,
             user_data: Optional[str] = None,
             zone_id: Optional[str] = None)func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: volcengine:ecs:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name 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 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 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 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 String
- The unique name of the resource.
- args 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 instanceResource = new Volcengine.Ecs.Instance("instanceResource", new()
{
    ImageId = "string",
    SystemVolumeType = "string",
    SystemVolumeSize = 0,
    SubnetId = "string",
    SecurityGroupIds = new[]
    {
        "string",
    },
    InstanceType = "string",
    HpcClusterId = "string",
    Period = 0,
    AutoRenew = false,
    EipId = "string",
    IncludeDataVolumes = false,
    InstanceChargeType = "string",
    InstanceName = "string",
    Description = "string",
    Ipv6AddressCount = 0,
    Ipv6Addresses = new[]
    {
        "string",
    },
    KeepImageCredential = false,
    KeyPairName = "string",
    Password = "string",
    HostName = "string",
    PrimaryIpAddress = "string",
    ProjectName = "string",
    SecondaryNetworkInterfaces = new[]
    {
        new Volcengine.Ecs.Inputs.InstanceSecondaryNetworkInterfaceArgs
        {
            SecurityGroupIds = new[]
            {
                "string",
            },
            SubnetId = "string",
            PrimaryIpAddress = "string",
        },
    },
    SecurityEnhancementStrategy = "string",
    DeploymentSetId = "string",
    SpotPriceLimit = 0,
    SpotStrategy = "string",
    DataVolumes = new[]
    {
        new Volcengine.Ecs.Inputs.InstanceDataVolumeArgs
        {
            Size = 0,
            VolumeType = "string",
            DeleteWithInstance = false,
        },
    },
    CpuOptions = new Volcengine.Ecs.Inputs.InstanceCpuOptionsArgs
    {
        NumaPerSocket = 0,
        ThreadsPerCore = 0,
    },
    AutoRenewPeriod = 0,
    Tags = new[]
    {
        new Volcengine.Ecs.Inputs.InstanceTagArgs
        {
            Key = "string",
            Value = "string",
        },
    },
    UserData = "string",
    ZoneId = "string",
});
example, err := ecs.NewInstance(ctx, "instanceResource", &ecs.InstanceArgs{
	ImageId:          pulumi.String("string"),
	SystemVolumeType: pulumi.String("string"),
	SystemVolumeSize: pulumi.Int(0),
	SubnetId:         pulumi.String("string"),
	SecurityGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	InstanceType:       pulumi.String("string"),
	HpcClusterId:       pulumi.String("string"),
	Period:             pulumi.Int(0),
	AutoRenew:          pulumi.Bool(false),
	EipId:              pulumi.String("string"),
	IncludeDataVolumes: pulumi.Bool(false),
	InstanceChargeType: pulumi.String("string"),
	InstanceName:       pulumi.String("string"),
	Description:        pulumi.String("string"),
	Ipv6AddressCount:   pulumi.Int(0),
	Ipv6Addresses: pulumi.StringArray{
		pulumi.String("string"),
	},
	KeepImageCredential: pulumi.Bool(false),
	KeyPairName:         pulumi.String("string"),
	Password:            pulumi.String("string"),
	HostName:            pulumi.String("string"),
	PrimaryIpAddress:    pulumi.String("string"),
	ProjectName:         pulumi.String("string"),
	SecondaryNetworkInterfaces: ecs.InstanceSecondaryNetworkInterfaceArray{
		&ecs.InstanceSecondaryNetworkInterfaceArgs{
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			SubnetId:         pulumi.String("string"),
			PrimaryIpAddress: pulumi.String("string"),
		},
	},
	SecurityEnhancementStrategy: pulumi.String("string"),
	DeploymentSetId:             pulumi.String("string"),
	SpotPriceLimit:              pulumi.Float64(0),
	SpotStrategy:                pulumi.String("string"),
	DataVolumes: ecs.InstanceDataVolumeArray{
		&ecs.InstanceDataVolumeArgs{
			Size:               pulumi.Int(0),
			VolumeType:         pulumi.String("string"),
			DeleteWithInstance: pulumi.Bool(false),
		},
	},
	CpuOptions: &ecs.InstanceCpuOptionsArgs{
		NumaPerSocket:  pulumi.Int(0),
		ThreadsPerCore: pulumi.Int(0),
	},
	AutoRenewPeriod: pulumi.Int(0),
	Tags: ecs.InstanceTagArray{
		&ecs.InstanceTagArgs{
			Key:   pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
	UserData: pulumi.String("string"),
	ZoneId:   pulumi.String("string"),
})
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
    .imageId("string")
    .systemVolumeType("string")
    .systemVolumeSize(0)
    .subnetId("string")
    .securityGroupIds("string")
    .instanceType("string")
    .hpcClusterId("string")
    .period(0)
    .autoRenew(false)
    .eipId("string")
    .includeDataVolumes(false)
    .instanceChargeType("string")
    .instanceName("string")
    .description("string")
    .ipv6AddressCount(0)
    .ipv6Addresses("string")
    .keepImageCredential(false)
    .keyPairName("string")
    .password("string")
    .hostName("string")
    .primaryIpAddress("string")
    .projectName("string")
    .secondaryNetworkInterfaces(InstanceSecondaryNetworkInterfaceArgs.builder()
        .securityGroupIds("string")
        .subnetId("string")
        .primaryIpAddress("string")
        .build())
    .securityEnhancementStrategy("string")
    .deploymentSetId("string")
    .spotPriceLimit(0)
    .spotStrategy("string")
    .dataVolumes(InstanceDataVolumeArgs.builder()
        .size(0)
        .volumeType("string")
        .deleteWithInstance(false)
        .build())
    .cpuOptions(InstanceCpuOptionsArgs.builder()
        .numaPerSocket(0)
        .threadsPerCore(0)
        .build())
    .autoRenewPeriod(0)
    .tags(InstanceTagArgs.builder()
        .key("string")
        .value("string")
        .build())
    .userData("string")
    .zoneId("string")
    .build());
instance_resource = volcengine.ecs.Instance("instanceResource",
    image_id="string",
    system_volume_type="string",
    system_volume_size=0,
    subnet_id="string",
    security_group_ids=["string"],
    instance_type="string",
    hpc_cluster_id="string",
    period=0,
    auto_renew=False,
    eip_id="string",
    include_data_volumes=False,
    instance_charge_type="string",
    instance_name="string",
    description="string",
    ipv6_address_count=0,
    ipv6_addresses=["string"],
    keep_image_credential=False,
    key_pair_name="string",
    password="string",
    host_name="string",
    primary_ip_address="string",
    project_name="string",
    secondary_network_interfaces=[{
        "security_group_ids": ["string"],
        "subnet_id": "string",
        "primary_ip_address": "string",
    }],
    security_enhancement_strategy="string",
    deployment_set_id="string",
    spot_price_limit=0,
    spot_strategy="string",
    data_volumes=[{
        "size": 0,
        "volume_type": "string",
        "delete_with_instance": False,
    }],
    cpu_options={
        "numa_per_socket": 0,
        "threads_per_core": 0,
    },
    auto_renew_period=0,
    tags=[{
        "key": "string",
        "value": "string",
    }],
    user_data="string",
    zone_id="string")
const instanceResource = new volcengine.ecs.Instance("instanceResource", {
    imageId: "string",
    systemVolumeType: "string",
    systemVolumeSize: 0,
    subnetId: "string",
    securityGroupIds: ["string"],
    instanceType: "string",
    hpcClusterId: "string",
    period: 0,
    autoRenew: false,
    eipId: "string",
    includeDataVolumes: false,
    instanceChargeType: "string",
    instanceName: "string",
    description: "string",
    ipv6AddressCount: 0,
    ipv6Addresses: ["string"],
    keepImageCredential: false,
    keyPairName: "string",
    password: "string",
    hostName: "string",
    primaryIpAddress: "string",
    projectName: "string",
    secondaryNetworkInterfaces: [{
        securityGroupIds: ["string"],
        subnetId: "string",
        primaryIpAddress: "string",
    }],
    securityEnhancementStrategy: "string",
    deploymentSetId: "string",
    spotPriceLimit: 0,
    spotStrategy: "string",
    dataVolumes: [{
        size: 0,
        volumeType: "string",
        deleteWithInstance: false,
    }],
    cpuOptions: {
        numaPerSocket: 0,
        threadsPerCore: 0,
    },
    autoRenewPeriod: 0,
    tags: [{
        key: "string",
        value: "string",
    }],
    userData: "string",
    zoneId: "string",
});
type: volcengine:ecs:Instance
properties:
    autoRenew: false
    autoRenewPeriod: 0
    cpuOptions:
        numaPerSocket: 0
        threadsPerCore: 0
    dataVolumes:
        - deleteWithInstance: false
          size: 0
          volumeType: string
    deploymentSetId: string
    description: string
    eipId: string
    hostName: string
    hpcClusterId: string
    imageId: string
    includeDataVolumes: false
    instanceChargeType: string
    instanceName: string
    instanceType: string
    ipv6AddressCount: 0
    ipv6Addresses:
        - string
    keepImageCredential: false
    keyPairName: string
    password: string
    period: 0
    primaryIpAddress: string
    projectName: string
    secondaryNetworkInterfaces:
        - primaryIpAddress: string
          securityGroupIds:
            - string
          subnetId: string
    securityEnhancementStrategy: string
    securityGroupIds:
        - string
    spotPriceLimit: 0
    spotStrategy: string
    subnetId: string
    systemVolumeSize: 0
    systemVolumeType: string
    tags:
        - key: string
          value: string
    userData: string
    zoneId: string
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:
- ImageId string
- The Image ID of ECS instance.
- InstanceType string
- The instance type of ECS instance.
- SecurityGroup List<string>Ids 
- The security group ID set of primary networkInterface.
- SubnetId string
- The subnet ID of primary networkInterface.
- SystemVolume intSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- SystemVolume stringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- AutoRenew bool
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- AutoRenew intPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- CpuOptions InstanceCpu Options 
- The option of cpu,only support for ebm.
- DataVolumes List<InstanceData Volume> 
- The data volumes collection of ECS instance.
- DeploymentSet stringId 
- The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- EipId string
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- HostName string
- The host name of ECS instance.
- HpcCluster stringId 
- The hpc cluster ID of ECS instance.
- IncludeData boolVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- InstanceCharge stringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- InstanceName string
- The name of ECS instance.
- Ipv6AddressCount int
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- Ipv6Addresses List<string>
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- KeepImage boolCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- KeyPair stringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- Password string
- The password of ECS instance.
- Period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- PrimaryIp stringAddress 
- The private ip address of primary networkInterface.
- ProjectName string
- The ProjectName of the ecs instance.
- SecondaryNetwork List<InstanceInterfaces Secondary Network Interface> 
- The secondary networkInterface detail collection of ECS instance.
- SecurityEnhancement stringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- SpotPrice doubleLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- SpotStrategy string
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- 
List<InstanceTag> 
- Tags.
- UserData string
- The user data of ECS instance, this field must be encrypted with base64.
- ZoneId string
- The available zone ID of ECS instance.
- ImageId string
- The Image ID of ECS instance.
- InstanceType string
- The instance type of ECS instance.
- SecurityGroup []stringIds 
- The security group ID set of primary networkInterface.
- SubnetId string
- The subnet ID of primary networkInterface.
- SystemVolume intSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- SystemVolume stringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- AutoRenew bool
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- AutoRenew intPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- CpuOptions InstanceCpu Options Args 
- The option of cpu,only support for ebm.
- DataVolumes []InstanceData Volume Args 
- The data volumes collection of ECS instance.
- DeploymentSet stringId 
- The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- EipId string
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- HostName string
- The host name of ECS instance.
- HpcCluster stringId 
- The hpc cluster ID of ECS instance.
- IncludeData boolVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- InstanceCharge stringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- InstanceName string
- The name of ECS instance.
- Ipv6AddressCount int
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- Ipv6Addresses []string
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- KeepImage boolCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- KeyPair stringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- Password string
- The password of ECS instance.
- Period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- PrimaryIp stringAddress 
- The private ip address of primary networkInterface.
- ProjectName string
- The ProjectName of the ecs instance.
- SecondaryNetwork []InstanceInterfaces Secondary Network Interface Args 
- The secondary networkInterface detail collection of ECS instance.
- SecurityEnhancement stringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- SpotPrice float64Limit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- SpotStrategy string
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- 
[]InstanceTag Args 
- Tags.
- UserData string
- The user data of ECS instance, this field must be encrypted with base64.
- ZoneId string
- The available zone ID of ECS instance.
- imageId String
- The Image ID of ECS instance.
- instanceType String
- The instance type of ECS instance.
- securityGroup List<String>Ids 
- The security group ID set of primary networkInterface.
- subnetId String
- The subnet ID of primary networkInterface.
- systemVolume IntegerSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- systemVolume StringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- autoRenew Boolean
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- autoRenew IntegerPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpuOptions InstanceCpu Options 
- The option of cpu,only support for ebm.
- dataVolumes List<InstanceData Volume> 
- The data volumes collection of ECS instance.
- deploymentSet StringId 
- The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eipId String
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- hostName String
- The host name of ECS instance.
- hpcCluster StringId 
- The hpc cluster ID of ECS instance.
- includeData BooleanVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instanceCharge StringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instanceName String
- The name of ECS instance.
- ipv6AddressCount Integer
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6Addresses List<String>
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- keepImage BooleanCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- keyPair StringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- password String
- The password of ECS instance.
- period Integer
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primaryIp StringAddress 
- The private ip address of primary networkInterface.
- projectName String
- The ProjectName of the ecs instance.
- secondaryNetwork List<InstanceInterfaces Secondary Network Interface> 
- The secondary networkInterface detail collection of ECS instance.
- securityEnhancement StringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spotPrice DoubleLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spotStrategy String
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- 
List<InstanceTag> 
- Tags.
- userData String
- The user data of ECS instance, this field must be encrypted with base64.
- zoneId String
- The available zone ID of ECS instance.
- imageId string
- The Image ID of ECS instance.
- instanceType string
- The instance type of ECS instance.
- securityGroup string[]Ids 
- The security group ID set of primary networkInterface.
- subnetId string
- The subnet ID of primary networkInterface.
- systemVolume numberSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- systemVolume stringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- autoRenew boolean
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- autoRenew numberPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpuOptions InstanceCpu Options 
- The option of cpu,only support for ebm.
- dataVolumes InstanceData Volume[] 
- The data volumes collection of ECS instance.
- deploymentSet stringId 
- The ID of Ecs Deployment Set.
- description string
- The description of ECS instance.
- eipId string
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- hostName string
- The host name of ECS instance.
- hpcCluster stringId 
- The hpc cluster ID of ECS instance.
- includeData booleanVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instanceCharge stringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instanceName string
- The name of ECS instance.
- ipv6AddressCount number
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6Addresses string[]
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- keepImage booleanCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- keyPair stringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- password string
- The password of ECS instance.
- period number
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primaryIp stringAddress 
- The private ip address of primary networkInterface.
- projectName string
- The ProjectName of the ecs instance.
- secondaryNetwork InstanceInterfaces Secondary Network Interface[] 
- The secondary networkInterface detail collection of ECS instance.
- securityEnhancement stringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spotPrice numberLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spotStrategy string
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- 
InstanceTag[] 
- Tags.
- userData string
- The user data of ECS instance, this field must be encrypted with base64.
- zoneId string
- The available zone ID of ECS instance.
- image_id str
- The Image ID of ECS instance.
- instance_type str
- The instance type of ECS instance.
- security_group_ Sequence[str]ids 
- The security group ID set of primary networkInterface.
- subnet_id str
- The subnet ID of primary networkInterface.
- system_volume_ intsize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system_volume_ strtype 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- auto_renew bool
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- auto_renew_ intperiod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu_options InstanceCpu Options Args 
- The option of cpu,only support for ebm.
- data_volumes Sequence[InstanceData Volume Args] 
- The data volumes collection of ECS instance.
- deployment_set_ strid 
- The ID of Ecs Deployment Set.
- description str
- The description of ECS instance.
- eip_id str
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- host_name str
- The host name of ECS instance.
- hpc_cluster_ strid 
- The hpc cluster ID of ECS instance.
- include_data_ boolvolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance_charge_ strtype 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instance_name str
- The name of ECS instance.
- ipv6_address_ intcount 
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6_addresses Sequence[str]
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- keep_image_ boolcredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key_pair_ strname 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- password str
- The password of ECS instance.
- period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primary_ip_ straddress 
- The private ip address of primary networkInterface.
- project_name str
- The ProjectName of the ecs instance.
- secondary_network_ Sequence[Instanceinterfaces Secondary Network Interface Args] 
- The secondary networkInterface detail collection of ECS instance.
- security_enhancement_ strstrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spot_price_ floatlimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot_strategy str
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- 
Sequence[InstanceTag Args] 
- Tags.
- user_data str
- The user data of ECS instance, this field must be encrypted with base64.
- zone_id str
- The available zone ID of ECS instance.
- imageId String
- The Image ID of ECS instance.
- instanceType String
- The instance type of ECS instance.
- securityGroup List<String>Ids 
- The security group ID set of primary networkInterface.
- subnetId String
- The subnet ID of primary networkInterface.
- systemVolume NumberSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- systemVolume StringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- autoRenew Boolean
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- autoRenew NumberPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpuOptions Property Map
- The option of cpu,only support for ebm.
- dataVolumes List<Property Map>
- The data volumes collection of ECS instance.
- deploymentSet StringId 
- The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eipId String
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- hostName String
- The host name of ECS instance.
- hpcCluster StringId 
- The hpc cluster ID of ECS instance.
- includeData BooleanVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instanceCharge StringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instanceName String
- The name of ECS instance.
- ipv6AddressCount Number
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6Addresses List<String>
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- keepImage BooleanCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- keyPair StringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- password String
- The password of ECS instance.
- period Number
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primaryIp StringAddress 
- The private ip address of primary networkInterface.
- projectName String
- The ProjectName of the ecs instance.
- secondaryNetwork List<Property Map>Interfaces 
- The secondary networkInterface detail collection of ECS instance.
- securityEnhancement StringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spotPrice NumberLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spotStrategy String
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- List<Property Map>
- Tags.
- userData String
- The user data of ECS instance, this field must be encrypted with base64.
- zoneId String
- The available zone ID of ECS instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Cpus int
- The number of ECS instance CPU cores.
- CreatedAt string
- The create time of ECS instance.
- GpuDevices List<InstanceGpu Device> 
- The GPU device info of Instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- InstanceId string
- The ID of ECS instance.
- IsGpu bool
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- KeyPair stringId 
- The ssh key ID of ECS instance.
- MemorySize int
- The memory size of ECS instance.
- NetworkInterface stringId 
- The ID of primary networkInterface.
- OsName string
- The os name of ECS instance.
- OsType string
- The os type of ECS instance.
- Status string
- The status of ECS instance.
- StoppedMode string
- The stop mode of ECS instance.
- SystemVolume stringId 
- The ID of system volume.
- UpdatedAt string
- The update time of ECS instance.
- VpcId string
- The VPC ID of ECS instance.
- Cpus int
- The number of ECS instance CPU cores.
- CreatedAt string
- The create time of ECS instance.
- GpuDevices []InstanceGpu Device 
- The GPU device info of Instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- InstanceId string
- The ID of ECS instance.
- IsGpu bool
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- KeyPair stringId 
- The ssh key ID of ECS instance.
- MemorySize int
- The memory size of ECS instance.
- NetworkInterface stringId 
- The ID of primary networkInterface.
- OsName string
- The os name of ECS instance.
- OsType string
- The os type of ECS instance.
- Status string
- The status of ECS instance.
- StoppedMode string
- The stop mode of ECS instance.
- SystemVolume stringId 
- The ID of system volume.
- UpdatedAt string
- The update time of ECS instance.
- VpcId string
- The VPC ID of ECS instance.
- cpus Integer
- The number of ECS instance CPU cores.
- createdAt String
- The create time of ECS instance.
- gpuDevices List<InstanceGpu Device> 
- The GPU device info of Instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instanceId String
- The ID of ECS instance.
- isGpu Boolean
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keyPair StringId 
- The ssh key ID of ECS instance.
- memorySize Integer
- The memory size of ECS instance.
- networkInterface StringId 
- The ID of primary networkInterface.
- osName String
- The os name of ECS instance.
- osType String
- The os type of ECS instance.
- status String
- The status of ECS instance.
- stoppedMode String
- The stop mode of ECS instance.
- systemVolume StringId 
- The ID of system volume.
- updatedAt String
- The update time of ECS instance.
- vpcId String
- The VPC ID of ECS instance.
- cpus number
- The number of ECS instance CPU cores.
- createdAt string
- The create time of ECS instance.
- gpuDevices InstanceGpu Device[] 
- The GPU device info of Instance.
- id string
- The provider-assigned unique ID for this managed resource.
- instanceId string
- The ID of ECS instance.
- isGpu boolean
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keyPair stringId 
- The ssh key ID of ECS instance.
- memorySize number
- The memory size of ECS instance.
- networkInterface stringId 
- The ID of primary networkInterface.
- osName string
- The os name of ECS instance.
- osType string
- The os type of ECS instance.
- status string
- The status of ECS instance.
- stoppedMode string
- The stop mode of ECS instance.
- systemVolume stringId 
- The ID of system volume.
- updatedAt string
- The update time of ECS instance.
- vpcId string
- The VPC ID of ECS instance.
- cpus int
- The number of ECS instance CPU cores.
- created_at str
- The create time of ECS instance.
- gpu_devices Sequence[InstanceGpu Device] 
- The GPU device info of Instance.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_id str
- The ID of ECS instance.
- is_gpu bool
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- key_pair_ strid 
- The ssh key ID of ECS instance.
- memory_size int
- The memory size of ECS instance.
- network_interface_ strid 
- The ID of primary networkInterface.
- os_name str
- The os name of ECS instance.
- os_type str
- The os type of ECS instance.
- status str
- The status of ECS instance.
- stopped_mode str
- The stop mode of ECS instance.
- system_volume_ strid 
- The ID of system volume.
- updated_at str
- The update time of ECS instance.
- vpc_id str
- The VPC ID of ECS instance.
- cpus Number
- The number of ECS instance CPU cores.
- createdAt String
- The create time of ECS instance.
- gpuDevices List<Property Map>
- The GPU device info of Instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instanceId String
- The ID of ECS instance.
- isGpu Boolean
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keyPair StringId 
- The ssh key ID of ECS instance.
- memorySize Number
- The memory size of ECS instance.
- networkInterface StringId 
- The ID of primary networkInterface.
- osName String
- The os name of ECS instance.
- osType String
- The os type of ECS instance.
- status String
- The status of ECS instance.
- stoppedMode String
- The stop mode of ECS instance.
- systemVolume StringId 
- The ID of system volume.
- updatedAt String
- The update time of ECS instance.
- vpcId String
- The VPC ID of ECS instance.
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,
        auto_renew: Optional[bool] = None,
        auto_renew_period: Optional[int] = None,
        cpu_options: Optional[InstanceCpuOptionsArgs] = None,
        cpus: Optional[int] = None,
        created_at: Optional[str] = None,
        data_volumes: Optional[Sequence[InstanceDataVolumeArgs]] = None,
        deployment_set_id: Optional[str] = None,
        description: Optional[str] = None,
        eip_id: Optional[str] = None,
        gpu_devices: Optional[Sequence[InstanceGpuDeviceArgs]] = None,
        host_name: Optional[str] = None,
        hpc_cluster_id: Optional[str] = None,
        image_id: Optional[str] = None,
        include_data_volumes: Optional[bool] = None,
        instance_charge_type: Optional[str] = None,
        instance_id: Optional[str] = None,
        instance_name: Optional[str] = None,
        instance_type: Optional[str] = None,
        ipv6_address_count: Optional[int] = None,
        ipv6_addresses: Optional[Sequence[str]] = None,
        is_gpu: Optional[bool] = None,
        keep_image_credential: Optional[bool] = None,
        key_pair_id: Optional[str] = None,
        key_pair_name: Optional[str] = None,
        memory_size: Optional[int] = None,
        network_interface_id: Optional[str] = None,
        os_name: Optional[str] = None,
        os_type: Optional[str] = None,
        password: Optional[str] = None,
        period: Optional[int] = None,
        primary_ip_address: Optional[str] = None,
        project_name: Optional[str] = None,
        secondary_network_interfaces: Optional[Sequence[InstanceSecondaryNetworkInterfaceArgs]] = None,
        security_enhancement_strategy: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        spot_price_limit: Optional[float] = None,
        spot_strategy: Optional[str] = None,
        status: Optional[str] = None,
        stopped_mode: Optional[str] = None,
        subnet_id: Optional[str] = None,
        system_volume_id: Optional[str] = None,
        system_volume_size: Optional[int] = None,
        system_volume_type: Optional[str] = None,
        tags: Optional[Sequence[InstanceTagArgs]] = None,
        updated_at: Optional[str] = None,
        user_data: Optional[str] = None,
        vpc_id: Optional[str] = None,
        zone_id: Optional[str] = None) -> Instancefunc 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: volcengine:ecs:Instance    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- AutoRenew bool
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- AutoRenew intPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- CpuOptions InstanceCpu Options 
- The option of cpu,only support for ebm.
- Cpus int
- The number of ECS instance CPU cores.
- CreatedAt string
- The create time of ECS instance.
- DataVolumes List<InstanceData Volume> 
- The data volumes collection of ECS instance.
- DeploymentSet stringId 
- The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- EipId string
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- GpuDevices List<InstanceGpu Device> 
- The GPU device info of Instance.
- HostName string
- The host name of ECS instance.
- HpcCluster stringId 
- The hpc cluster ID of ECS instance.
- ImageId string
- The Image ID of ECS instance.
- IncludeData boolVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- InstanceCharge stringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- InstanceId string
- The ID of ECS instance.
- InstanceName string
- The name of ECS instance.
- InstanceType string
- The instance type of ECS instance.
- Ipv6AddressCount int
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- Ipv6Addresses List<string>
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- IsGpu bool
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- KeepImage boolCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- KeyPair stringId 
- The ssh key ID of ECS instance.
- KeyPair stringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- MemorySize int
- The memory size of ECS instance.
- NetworkInterface stringId 
- The ID of primary networkInterface.
- OsName string
- The os name of ECS instance.
- OsType string
- The os type of ECS instance.
- Password string
- The password of ECS instance.
- Period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- PrimaryIp stringAddress 
- The private ip address of primary networkInterface.
- ProjectName string
- The ProjectName of the ecs instance.
- SecondaryNetwork List<InstanceInterfaces Secondary Network Interface> 
- The secondary networkInterface detail collection of ECS instance.
- SecurityEnhancement stringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- SecurityGroup List<string>Ids 
- The security group ID set of primary networkInterface.
- SpotPrice doubleLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- SpotStrategy string
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- Status string
- The status of ECS instance.
- StoppedMode string
- The stop mode of ECS instance.
- SubnetId string
- The subnet ID of primary networkInterface.
- SystemVolume stringId 
- The ID of system volume.
- SystemVolume intSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- SystemVolume stringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- 
List<InstanceTag> 
- Tags.
- UpdatedAt string
- The update time of ECS instance.
- UserData string
- The user data of ECS instance, this field must be encrypted with base64.
- VpcId string
- The VPC ID of ECS instance.
- ZoneId string
- The available zone ID of ECS instance.
- AutoRenew bool
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- AutoRenew intPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- CpuOptions InstanceCpu Options Args 
- The option of cpu,only support for ebm.
- Cpus int
- The number of ECS instance CPU cores.
- CreatedAt string
- The create time of ECS instance.
- DataVolumes []InstanceData Volume Args 
- The data volumes collection of ECS instance.
- DeploymentSet stringId 
- The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- EipId string
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- GpuDevices []InstanceGpu Device Args 
- The GPU device info of Instance.
- HostName string
- The host name of ECS instance.
- HpcCluster stringId 
- The hpc cluster ID of ECS instance.
- ImageId string
- The Image ID of ECS instance.
- IncludeData boolVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- InstanceCharge stringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- InstanceId string
- The ID of ECS instance.
- InstanceName string
- The name of ECS instance.
- InstanceType string
- The instance type of ECS instance.
- Ipv6AddressCount int
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- Ipv6Addresses []string
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- IsGpu bool
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- KeepImage boolCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- KeyPair stringId 
- The ssh key ID of ECS instance.
- KeyPair stringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- MemorySize int
- The memory size of ECS instance.
- NetworkInterface stringId 
- The ID of primary networkInterface.
- OsName string
- The os name of ECS instance.
- OsType string
- The os type of ECS instance.
- Password string
- The password of ECS instance.
- Period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- PrimaryIp stringAddress 
- The private ip address of primary networkInterface.
- ProjectName string
- The ProjectName of the ecs instance.
- SecondaryNetwork []InstanceInterfaces Secondary Network Interface Args 
- The secondary networkInterface detail collection of ECS instance.
- SecurityEnhancement stringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- SecurityGroup []stringIds 
- The security group ID set of primary networkInterface.
- SpotPrice float64Limit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- SpotStrategy string
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- Status string
- The status of ECS instance.
- StoppedMode string
- The stop mode of ECS instance.
- SubnetId string
- The subnet ID of primary networkInterface.
- SystemVolume stringId 
- The ID of system volume.
- SystemVolume intSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- SystemVolume stringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- 
[]InstanceTag Args 
- Tags.
- UpdatedAt string
- The update time of ECS instance.
- UserData string
- The user data of ECS instance, this field must be encrypted with base64.
- VpcId string
- The VPC ID of ECS instance.
- ZoneId string
- The available zone ID of ECS instance.
- autoRenew Boolean
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- autoRenew IntegerPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpuOptions InstanceCpu Options 
- The option of cpu,only support for ebm.
- cpus Integer
- The number of ECS instance CPU cores.
- createdAt String
- The create time of ECS instance.
- dataVolumes List<InstanceData Volume> 
- The data volumes collection of ECS instance.
- deploymentSet StringId 
- The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eipId String
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- gpuDevices List<InstanceGpu Device> 
- The GPU device info of Instance.
- hostName String
- The host name of ECS instance.
- hpcCluster StringId 
- The hpc cluster ID of ECS instance.
- imageId String
- The Image ID of ECS instance.
- includeData BooleanVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instanceCharge StringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instanceId String
- The ID of ECS instance.
- instanceName String
- The name of ECS instance.
- instanceType String
- The instance type of ECS instance.
- ipv6AddressCount Integer
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6Addresses List<String>
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- isGpu Boolean
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keepImage BooleanCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- keyPair StringId 
- The ssh key ID of ECS instance.
- keyPair StringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- memorySize Integer
- The memory size of ECS instance.
- networkInterface StringId 
- The ID of primary networkInterface.
- osName String
- The os name of ECS instance.
- osType String
- The os type of ECS instance.
- password String
- The password of ECS instance.
- period Integer
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primaryIp StringAddress 
- The private ip address of primary networkInterface.
- projectName String
- The ProjectName of the ecs instance.
- secondaryNetwork List<InstanceInterfaces Secondary Network Interface> 
- The secondary networkInterface detail collection of ECS instance.
- securityEnhancement StringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- securityGroup List<String>Ids 
- The security group ID set of primary networkInterface.
- spotPrice DoubleLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spotStrategy String
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- status String
- The status of ECS instance.
- stoppedMode String
- The stop mode of ECS instance.
- subnetId String
- The subnet ID of primary networkInterface.
- systemVolume StringId 
- The ID of system volume.
- systemVolume IntegerSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- systemVolume StringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- 
List<InstanceTag> 
- Tags.
- updatedAt String
- The update time of ECS instance.
- userData String
- The user data of ECS instance, this field must be encrypted with base64.
- vpcId String
- The VPC ID of ECS instance.
- zoneId String
- The available zone ID of ECS instance.
- autoRenew boolean
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- autoRenew numberPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpuOptions InstanceCpu Options 
- The option of cpu,only support for ebm.
- cpus number
- The number of ECS instance CPU cores.
- createdAt string
- The create time of ECS instance.
- dataVolumes InstanceData Volume[] 
- The data volumes collection of ECS instance.
- deploymentSet stringId 
- The ID of Ecs Deployment Set.
- description string
- The description of ECS instance.
- eipId string
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- gpuDevices InstanceGpu Device[] 
- The GPU device info of Instance.
- hostName string
- The host name of ECS instance.
- hpcCluster stringId 
- The hpc cluster ID of ECS instance.
- imageId string
- The Image ID of ECS instance.
- includeData booleanVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instanceCharge stringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instanceId string
- The ID of ECS instance.
- instanceName string
- The name of ECS instance.
- instanceType string
- The instance type of ECS instance.
- ipv6AddressCount number
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6Addresses string[]
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- isGpu boolean
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keepImage booleanCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- keyPair stringId 
- The ssh key ID of ECS instance.
- keyPair stringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- memorySize number
- The memory size of ECS instance.
- networkInterface stringId 
- The ID of primary networkInterface.
- osName string
- The os name of ECS instance.
- osType string
- The os type of ECS instance.
- password string
- The password of ECS instance.
- period number
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primaryIp stringAddress 
- The private ip address of primary networkInterface.
- projectName string
- The ProjectName of the ecs instance.
- secondaryNetwork InstanceInterfaces Secondary Network Interface[] 
- The secondary networkInterface detail collection of ECS instance.
- securityEnhancement stringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- securityGroup string[]Ids 
- The security group ID set of primary networkInterface.
- spotPrice numberLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spotStrategy string
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- status string
- The status of ECS instance.
- stoppedMode string
- The stop mode of ECS instance.
- subnetId string
- The subnet ID of primary networkInterface.
- systemVolume stringId 
- The ID of system volume.
- systemVolume numberSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- systemVolume stringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- 
InstanceTag[] 
- Tags.
- updatedAt string
- The update time of ECS instance.
- userData string
- The user data of ECS instance, this field must be encrypted with base64.
- vpcId string
- The VPC ID of ECS instance.
- zoneId string
- The available zone ID of ECS instance.
- auto_renew bool
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- auto_renew_ intperiod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu_options InstanceCpu Options Args 
- The option of cpu,only support for ebm.
- cpus int
- The number of ECS instance CPU cores.
- created_at str
- The create time of ECS instance.
- data_volumes Sequence[InstanceData Volume Args] 
- The data volumes collection of ECS instance.
- deployment_set_ strid 
- The ID of Ecs Deployment Set.
- description str
- The description of ECS instance.
- eip_id str
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- gpu_devices Sequence[InstanceGpu Device Args] 
- The GPU device info of Instance.
- host_name str
- The host name of ECS instance.
- hpc_cluster_ strid 
- The hpc cluster ID of ECS instance.
- image_id str
- The Image ID of ECS instance.
- include_data_ boolvolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance_charge_ strtype 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instance_id str
- The ID of ECS instance.
- instance_name str
- The name of ECS instance.
- instance_type str
- The instance type of ECS instance.
- ipv6_address_ intcount 
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6_addresses Sequence[str]
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- is_gpu bool
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keep_image_ boolcredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key_pair_ strid 
- The ssh key ID of ECS instance.
- key_pair_ strname 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- memory_size int
- The memory size of ECS instance.
- network_interface_ strid 
- The ID of primary networkInterface.
- os_name str
- The os name of ECS instance.
- os_type str
- The os type of ECS instance.
- password str
- The password of ECS instance.
- period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primary_ip_ straddress 
- The private ip address of primary networkInterface.
- project_name str
- The ProjectName of the ecs instance.
- secondary_network_ Sequence[Instanceinterfaces Secondary Network Interface Args] 
- The secondary networkInterface detail collection of ECS instance.
- security_enhancement_ strstrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- security_group_ Sequence[str]ids 
- The security group ID set of primary networkInterface.
- spot_price_ floatlimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot_strategy str
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- status str
- The status of ECS instance.
- stopped_mode str
- The stop mode of ECS instance.
- subnet_id str
- The subnet ID of primary networkInterface.
- system_volume_ strid 
- The ID of system volume.
- system_volume_ intsize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system_volume_ strtype 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- 
Sequence[InstanceTag Args] 
- Tags.
- updated_at str
- The update time of ECS instance.
- user_data str
- The user data of ECS instance, this field must be encrypted with base64.
- vpc_id str
- The VPC ID of ECS instance.
- zone_id str
- The available zone ID of ECS instance.
- autoRenew Boolean
- The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- autoRenew NumberPeriod 
- The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpuOptions Property Map
- The option of cpu,only support for ebm.
- cpus Number
- The number of ECS instance CPU cores.
- createdAt String
- The create time of ECS instance.
- dataVolumes List<Property Map>
- The data volumes collection of ECS instance.
- deploymentSet StringId 
- The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eipId String
- The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use volcengine.eip.Associateresource to bind EIP.
- gpuDevices List<Property Map>
- The GPU device info of Instance.
- hostName String
- The host name of ECS instance.
- hpcCluster StringId 
- The hpc cluster ID of ECS instance.
- imageId String
- The Image ID of ECS instance.
- includeData BooleanVolumes 
- The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instanceCharge StringType 
- The charge type of ECS instance, the value can be PrePaidorPostPaid.
- instanceId String
- The ID of ECS instance.
- instanceName String
- The name of ECS instance.
- instanceType String
- The instance type of ECS instance.
- ipv6AddressCount Number
- The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6Addresses List<String>
- One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- isGpu Boolean
- The Flag of GPU instance.If the instance is GPU,The flag is true.
- keepImage BooleanCredential 
- Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- keyPair StringId 
- The ssh key ID of ECS instance.
- keyPair StringName 
- The ssh key name of ECS instance. This field can be modified only when the image_idis modified.
- memorySize Number
- The memory size of ECS instance.
- networkInterface StringId 
- The ID of primary networkInterface.
- osName String
- The os name of ECS instance.
- osType String
- The os type of ECS instance.
- password String
- The password of ECS instance.
- period Number
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primaryIp StringAddress 
- The private ip address of primary networkInterface.
- projectName String
- The ProjectName of the ecs instance.
- secondaryNetwork List<Property Map>Interfaces 
- The secondary networkInterface detail collection of ECS instance.
- securityEnhancement StringStrategy 
- The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- securityGroup List<String>Ids 
- The security group ID set of primary networkInterface.
- spotPrice NumberLimit 
- The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spotStrategy String
- The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- status String
- The status of ECS instance.
- stoppedMode String
- The stop mode of ECS instance.
- subnetId String
- The subnet ID of primary networkInterface.
- systemVolume StringId 
- The ID of system volume.
- systemVolume NumberSize 
- The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- systemVolume StringType 
- The type of system volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- List<Property Map>
- Tags.
- updatedAt String
- The update time of ECS instance.
- userData String
- The user data of ECS instance, this field must be encrypted with base64.
- vpcId String
- The VPC ID of ECS instance.
- zoneId String
- The available zone ID of ECS instance.
Supporting Types
InstanceCpuOptions, InstanceCpuOptionsArgs      
- NumaPer intSocket 
- The number of subnuma in socket, only support for ebm. 1indicates disabling SNC/NPS function. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- ThreadsPer intCore 
- The per core of threads, only support for ebm. 1indicates disabling hyper threading function.
- NumaPer intSocket 
- The number of subnuma in socket, only support for ebm. 1indicates disabling SNC/NPS function. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- ThreadsPer intCore 
- The per core of threads, only support for ebm. 1indicates disabling hyper threading function.
- numaPer IntegerSocket 
- The number of subnuma in socket, only support for ebm. 1indicates disabling SNC/NPS function. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- threadsPer IntegerCore 
- The per core of threads, only support for ebm. 1indicates disabling hyper threading function.
- numaPer numberSocket 
- The number of subnuma in socket, only support for ebm. 1indicates disabling SNC/NPS function. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- threadsPer numberCore 
- The per core of threads, only support for ebm. 1indicates disabling hyper threading function.
- numa_per_ intsocket 
- The number of subnuma in socket, only support for ebm. 1indicates disabling SNC/NPS function. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- threads_per_ intcore 
- The per core of threads, only support for ebm. 1indicates disabling hyper threading function.
- numaPer NumberSocket 
- The number of subnuma in socket, only support for ebm. 1indicates disabling SNC/NPS function. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- threadsPer NumberCore 
- The per core of threads, only support for ebm. 1indicates disabling hyper threading function.
InstanceDataVolume, InstanceDataVolumeArgs      
- Size int
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- VolumeType string
- The type of volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- DeleteWith boolInstance 
- The delete with instance flag of volume.
- Size int
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- VolumeType string
- The type of volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- DeleteWith boolInstance 
- The delete with instance flag of volume.
- size Integer
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volumeType String
- The type of volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- deleteWith BooleanInstance 
- The delete with instance flag of volume.
- size number
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volumeType string
- The type of volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- deleteWith booleanInstance 
- The delete with instance flag of volume.
- size int
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volume_type str
- The type of volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- delete_with_ boolinstance 
- The delete with instance flag of volume.
- size Number
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volumeType String
- The type of volume, the value is PTSSDorESSD_PL0orESSD_PL1orESSD_PL2orESSD_FlexPL.
- deleteWith BooleanInstance 
- The delete with instance flag of volume.
InstanceGpuDevice, InstanceGpuDeviceArgs      
- Count int
- The Count of GPU device.
- EncryptedMemory intSize 
- The Encrypted Memory Size of GPU device.
- MemorySize int
- The memory size of ECS instance.
- ProductName string
- The Product Name of GPU device.
- Count int
- The Count of GPU device.
- EncryptedMemory intSize 
- The Encrypted Memory Size of GPU device.
- MemorySize int
- The memory size of ECS instance.
- ProductName string
- The Product Name of GPU device.
- count Integer
- The Count of GPU device.
- encryptedMemory IntegerSize 
- The Encrypted Memory Size of GPU device.
- memorySize Integer
- The memory size of ECS instance.
- productName String
- The Product Name of GPU device.
- count number
- The Count of GPU device.
- encryptedMemory numberSize 
- The Encrypted Memory Size of GPU device.
- memorySize number
- The memory size of ECS instance.
- productName string
- The Product Name of GPU device.
- count int
- The Count of GPU device.
- encrypted_memory_ intsize 
- The Encrypted Memory Size of GPU device.
- memory_size int
- The memory size of ECS instance.
- product_name str
- The Product Name of GPU device.
- count Number
- The Count of GPU device.
- encryptedMemory NumberSize 
- The Encrypted Memory Size of GPU device.
- memorySize Number
- The memory size of ECS instance.
- productName String
- The Product Name of GPU device.
InstanceSecondaryNetworkInterface, InstanceSecondaryNetworkInterfaceArgs        
- SecurityGroup List<string>Ids 
- The security group ID set of secondary networkInterface.
- SubnetId string
- The subnet ID of secondary networkInterface.
- PrimaryIp stringAddress 
- The private ip address of secondary networkInterface.
- SecurityGroup []stringIds 
- The security group ID set of secondary networkInterface.
- SubnetId string
- The subnet ID of secondary networkInterface.
- PrimaryIp stringAddress 
- The private ip address of secondary networkInterface.
- securityGroup List<String>Ids 
- The security group ID set of secondary networkInterface.
- subnetId String
- The subnet ID of secondary networkInterface.
- primaryIp StringAddress 
- The private ip address of secondary networkInterface.
- securityGroup string[]Ids 
- The security group ID set of secondary networkInterface.
- subnetId string
- The subnet ID of secondary networkInterface.
- primaryIp stringAddress 
- The private ip address of secondary networkInterface.
- security_group_ Sequence[str]ids 
- The security group ID set of secondary networkInterface.
- subnet_id str
- The subnet ID of secondary networkInterface.
- primary_ip_ straddress 
- The private ip address of secondary networkInterface.
- securityGroup List<String>Ids 
- The security group ID set of secondary networkInterface.
- subnetId String
- The subnet ID of secondary networkInterface.
- primaryIp StringAddress 
- The private ip address of secondary networkInterface.
InstanceTag, InstanceTagArgs    
Import
ECS Instance can be imported using the id, e.g. If Import,The data_volumes is sort by volume name
$ pulumi import volcengine:ecs/instance:Instance default i-mizl7m1kqccg5smt1bdpijuj
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.