1. Packages
  2. Volcengine
  3. API Docs
  4. ecs
  5. Instance
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.ecs.Instance

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    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
    

    Example Usage

    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 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
    	})
    }
    
    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());
    
        }
    }
    
    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",
        )])
    
    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",
        }],
    });
    
    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=[volcengine.ecs.InstanceSecondaryNetworkInterfaceArgs(
            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=[volcengine.ecs.InstanceDataVolumeArgs(
            size=0,
            volume_type="string",
            delete_with_instance=False,
        )],
        cpu_options=volcengine.ecs.InstanceCpuOptionsArgs(
            numa_per_socket=0,
            threads_per_core=0,
        ),
        auto_renew_period=0,
        tags=[volcengine.ecs.InstanceTagArgs(
            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

    The Instance resource accepts the following input properties:

    ImageId string
    The Image ID of ECS instance.
    InstanceType string
    The instance type of ECS instance.
    SecurityGroupIds List<string>
    The security group ID set of primary networkInterface.
    SubnetId string
    The subnet ID of primary networkInterface.
    SystemVolumeSize int
    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.
    SystemVolumeType string
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_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.
    AutoRenewPeriod int
    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 InstanceCpuOptions
    The option of cpu,only support for ebm.
    DataVolumes List<InstanceDataVolume>
    The data volumes collection of ECS instance.
    DeploymentSetId string
    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.Associate resource to bind EIP.
    HostName string
    The host name of ECS instance.
    HpcClusterId string
    The hpc cluster ID of ECS instance.
    IncludeDataVolumes bool
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    InstanceChargeType string
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    KeepImageCredential bool
    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.
    KeyPairName string
    The ssh key name 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.
    PrimaryIpAddress string
    The private ip address of primary networkInterface.
    ProjectName string
    The ProjectName of the ecs instance.
    SecondaryNetworkInterfaces List<InstanceSecondaryNetworkInterface>
    The secondary networkInterface detail collection of ECS instance.
    SecurityEnhancementStrategy string
    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.
    SpotPriceLimit double
    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.
    Tags 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.
    SecurityGroupIds []string
    The security group ID set of primary networkInterface.
    SubnetId string
    The subnet ID of primary networkInterface.
    SystemVolumeSize int
    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.
    SystemVolumeType string
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_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.
    AutoRenewPeriod int
    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 InstanceCpuOptionsArgs
    The option of cpu,only support for ebm.
    DataVolumes []InstanceDataVolumeArgs
    The data volumes collection of ECS instance.
    DeploymentSetId string
    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.Associate resource to bind EIP.
    HostName string
    The host name of ECS instance.
    HpcClusterId string
    The hpc cluster ID of ECS instance.
    IncludeDataVolumes bool
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    InstanceChargeType string
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    KeepImageCredential bool
    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.
    KeyPairName string
    The ssh key name 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.
    PrimaryIpAddress string
    The private ip address of primary networkInterface.
    ProjectName string
    The ProjectName of the ecs instance.
    SecondaryNetworkInterfaces []InstanceSecondaryNetworkInterfaceArgs
    The secondary networkInterface detail collection of ECS instance.
    SecurityEnhancementStrategy string
    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.
    SpotPriceLimit float64
    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.
    Tags []InstanceTagArgs
    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.
    securityGroupIds List<String>
    The security group ID set of primary networkInterface.
    subnetId String
    The subnet ID of primary networkInterface.
    systemVolumeSize Integer
    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.
    systemVolumeType String
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_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.
    autoRenewPeriod Integer
    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 InstanceCpuOptions
    The option of cpu,only support for ebm.
    dataVolumes List<InstanceDataVolume>
    The data volumes collection of ECS instance.
    deploymentSetId String
    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.Associate resource to bind EIP.
    hostName String
    The host name of ECS instance.
    hpcClusterId String
    The hpc cluster ID of ECS instance.
    includeDataVolumes Boolean
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instanceChargeType String
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    keepImageCredential Boolean
    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.
    keyPairName String
    The ssh key name 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.
    primaryIpAddress String
    The private ip address of primary networkInterface.
    projectName String
    The ProjectName of the ecs instance.
    secondaryNetworkInterfaces List<InstanceSecondaryNetworkInterface>
    The secondary networkInterface detail collection of ECS instance.
    securityEnhancementStrategy String
    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.
    spotPriceLimit Double
    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.
    tags 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.
    securityGroupIds string[]
    The security group ID set of primary networkInterface.
    subnetId string
    The subnet ID of primary networkInterface.
    systemVolumeSize number
    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.
    systemVolumeType string
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_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.
    autoRenewPeriod number
    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 InstanceCpuOptions
    The option of cpu,only support for ebm.
    dataVolumes InstanceDataVolume[]
    The data volumes collection of ECS instance.
    deploymentSetId string
    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.Associate resource to bind EIP.
    hostName string
    The host name of ECS instance.
    hpcClusterId string
    The hpc cluster ID of ECS instance.
    includeDataVolumes boolean
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instanceChargeType string
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    keepImageCredential boolean
    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.
    keyPairName string
    The ssh key name 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.
    primaryIpAddress string
    The private ip address of primary networkInterface.
    projectName string
    The ProjectName of the ecs instance.
    secondaryNetworkInterfaces InstanceSecondaryNetworkInterface[]
    The secondary networkInterface detail collection of ECS instance.
    securityEnhancementStrategy string
    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.
    spotPriceLimit number
    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.
    tags 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_ids Sequence[str]
    The security group ID set of primary networkInterface.
    subnet_id str
    The subnet ID of primary networkInterface.
    system_volume_size int
    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_type str
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_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_period int
    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 InstanceCpuOptionsArgs
    The option of cpu,only support for ebm.
    data_volumes Sequence[InstanceDataVolumeArgs]
    The data volumes collection of ECS instance.
    deployment_set_id str
    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.Associate resource to bind EIP.
    host_name str
    The host name of ECS instance.
    hpc_cluster_id str
    The hpc cluster ID of ECS instance.
    include_data_volumes bool
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instance_charge_type str
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    instance_name str
    The name of ECS instance.
    ipv6_address_count 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.
    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_credential bool
    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_name str
    The ssh key name 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_address str
    The private ip address of primary networkInterface.
    project_name str
    The ProjectName of the ecs instance.
    secondary_network_interfaces Sequence[InstanceSecondaryNetworkInterfaceArgs]
    The secondary networkInterface detail collection of ECS instance.
    security_enhancement_strategy str
    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_limit float
    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.
    tags Sequence[InstanceTagArgs]
    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.
    securityGroupIds List<String>
    The security group ID set of primary networkInterface.
    subnetId String
    The subnet ID of primary networkInterface.
    systemVolumeSize Number
    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.
    systemVolumeType String
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_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.
    autoRenewPeriod Number
    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.
    deploymentSetId String
    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.Associate resource to bind EIP.
    hostName String
    The host name of ECS instance.
    hpcClusterId String
    The hpc cluster ID of ECS instance.
    includeDataVolumes Boolean
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instanceChargeType String
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    keepImageCredential Boolean
    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.
    keyPairName String
    The ssh key name 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.
    primaryIpAddress String
    The private ip address of primary networkInterface.
    projectName String
    The ProjectName of the ecs instance.
    secondaryNetworkInterfaces List<Property Map>
    The secondary networkInterface detail collection of ECS instance.
    securityEnhancementStrategy String
    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.
    spotPriceLimit Number
    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.
    tags 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<InstanceGpuDevice>
    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.
    KeyPairId string
    The ssh key ID of ECS instance.
    MemorySize int
    The memory size of ECS instance.
    NetworkInterfaceId string
    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.
    SystemVolumeId string
    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 []InstanceGpuDevice
    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.
    KeyPairId string
    The ssh key ID of ECS instance.
    MemorySize int
    The memory size of ECS instance.
    NetworkInterfaceId string
    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.
    SystemVolumeId string
    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<InstanceGpuDevice>
    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.
    keyPairId String
    The ssh key ID of ECS instance.
    memorySize Integer
    The memory size of ECS instance.
    networkInterfaceId String
    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.
    systemVolumeId String
    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 InstanceGpuDevice[]
    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.
    keyPairId string
    The ssh key ID of ECS instance.
    memorySize number
    The memory size of ECS instance.
    networkInterfaceId string
    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.
    systemVolumeId string
    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[InstanceGpuDevice]
    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_id str
    The ssh key ID of ECS instance.
    memory_size int
    The memory size of ECS instance.
    network_interface_id str
    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_id str
    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.
    keyPairId String
    The ssh key ID of ECS instance.
    memorySize Number
    The memory size of ECS instance.
    networkInterfaceId String
    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.
    systemVolumeId String
    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) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    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.
    AutoRenewPeriod int
    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 InstanceCpuOptions
    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<InstanceDataVolume>
    The data volumes collection of ECS instance.
    DeploymentSetId string
    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.Associate resource to bind EIP.
    GpuDevices List<InstanceGpuDevice>
    The GPU device info of Instance.
    HostName string
    The host name of ECS instance.
    HpcClusterId string
    The hpc cluster ID of ECS instance.
    ImageId string
    The Image ID of ECS instance.
    IncludeDataVolumes bool
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    InstanceChargeType string
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    KeepImageCredential bool
    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.
    KeyPairId string
    The ssh key ID of ECS instance.
    KeyPairName string
    The ssh key name of ECS instance.
    MemorySize int
    The memory size of ECS instance.
    NetworkInterfaceId string
    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.
    PrimaryIpAddress string
    The private ip address of primary networkInterface.
    ProjectName string
    The ProjectName of the ecs instance.
    SecondaryNetworkInterfaces List<InstanceSecondaryNetworkInterface>
    The secondary networkInterface detail collection of ECS instance.
    SecurityEnhancementStrategy string
    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.
    SecurityGroupIds List<string>
    The security group ID set of primary networkInterface.
    SpotPriceLimit double
    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.
    SystemVolumeId string
    The ID of system volume.
    SystemVolumeSize int
    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.
    SystemVolumeType string
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    Tags 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.
    AutoRenewPeriod int
    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 InstanceCpuOptionsArgs
    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 []InstanceDataVolumeArgs
    The data volumes collection of ECS instance.
    DeploymentSetId string
    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.Associate resource to bind EIP.
    GpuDevices []InstanceGpuDeviceArgs
    The GPU device info of Instance.
    HostName string
    The host name of ECS instance.
    HpcClusterId string
    The hpc cluster ID of ECS instance.
    ImageId string
    The Image ID of ECS instance.
    IncludeDataVolumes bool
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    InstanceChargeType string
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    KeepImageCredential bool
    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.
    KeyPairId string
    The ssh key ID of ECS instance.
    KeyPairName string
    The ssh key name of ECS instance.
    MemorySize int
    The memory size of ECS instance.
    NetworkInterfaceId string
    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.
    PrimaryIpAddress string
    The private ip address of primary networkInterface.
    ProjectName string
    The ProjectName of the ecs instance.
    SecondaryNetworkInterfaces []InstanceSecondaryNetworkInterfaceArgs
    The secondary networkInterface detail collection of ECS instance.
    SecurityEnhancementStrategy string
    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.
    SecurityGroupIds []string
    The security group ID set of primary networkInterface.
    SpotPriceLimit float64
    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.
    SystemVolumeId string
    The ID of system volume.
    SystemVolumeSize int
    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.
    SystemVolumeType string
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    Tags []InstanceTagArgs
    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.
    autoRenewPeriod Integer
    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 InstanceCpuOptions
    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<InstanceDataVolume>
    The data volumes collection of ECS instance.
    deploymentSetId String
    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.Associate resource to bind EIP.
    gpuDevices List<InstanceGpuDevice>
    The GPU device info of Instance.
    hostName String
    The host name of ECS instance.
    hpcClusterId String
    The hpc cluster ID of ECS instance.
    imageId String
    The Image ID of ECS instance.
    includeDataVolumes Boolean
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instanceChargeType String
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    keepImageCredential Boolean
    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.
    keyPairId String
    The ssh key ID of ECS instance.
    keyPairName String
    The ssh key name of ECS instance.
    memorySize Integer
    The memory size of ECS instance.
    networkInterfaceId String
    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.
    primaryIpAddress String
    The private ip address of primary networkInterface.
    projectName String
    The ProjectName of the ecs instance.
    secondaryNetworkInterfaces List<InstanceSecondaryNetworkInterface>
    The secondary networkInterface detail collection of ECS instance.
    securityEnhancementStrategy String
    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.
    securityGroupIds List<String>
    The security group ID set of primary networkInterface.
    spotPriceLimit Double
    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.
    systemVolumeId String
    The ID of system volume.
    systemVolumeSize Integer
    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.
    systemVolumeType String
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    tags 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.
    autoRenewPeriod number
    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 InstanceCpuOptions
    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 InstanceDataVolume[]
    The data volumes collection of ECS instance.
    deploymentSetId string
    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.Associate resource to bind EIP.
    gpuDevices InstanceGpuDevice[]
    The GPU device info of Instance.
    hostName string
    The host name of ECS instance.
    hpcClusterId string
    The hpc cluster ID of ECS instance.
    imageId string
    The Image ID of ECS instance.
    includeDataVolumes boolean
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instanceChargeType string
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    keepImageCredential boolean
    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.
    keyPairId string
    The ssh key ID of ECS instance.
    keyPairName string
    The ssh key name of ECS instance.
    memorySize number
    The memory size of ECS instance.
    networkInterfaceId string
    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.
    primaryIpAddress string
    The private ip address of primary networkInterface.
    projectName string
    The ProjectName of the ecs instance.
    secondaryNetworkInterfaces InstanceSecondaryNetworkInterface[]
    The secondary networkInterface detail collection of ECS instance.
    securityEnhancementStrategy string
    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.
    securityGroupIds string[]
    The security group ID set of primary networkInterface.
    spotPriceLimit number
    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.
    systemVolumeId string
    The ID of system volume.
    systemVolumeSize number
    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.
    systemVolumeType string
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    tags 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_period int
    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 InstanceCpuOptionsArgs
    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[InstanceDataVolumeArgs]
    The data volumes collection of ECS instance.
    deployment_set_id str
    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.Associate resource to bind EIP.
    gpu_devices Sequence[InstanceGpuDeviceArgs]
    The GPU device info of Instance.
    host_name str
    The host name of ECS instance.
    hpc_cluster_id str
    The hpc cluster ID of ECS instance.
    image_id str
    The Image ID of ECS instance.
    include_data_volumes bool
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instance_charge_type str
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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_count 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.
    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_credential bool
    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_id str
    The ssh key ID of ECS instance.
    key_pair_name str
    The ssh key name of ECS instance.
    memory_size int
    The memory size of ECS instance.
    network_interface_id str
    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_address str
    The private ip address of primary networkInterface.
    project_name str
    The ProjectName of the ecs instance.
    secondary_network_interfaces Sequence[InstanceSecondaryNetworkInterfaceArgs]
    The secondary networkInterface detail collection of ECS instance.
    security_enhancement_strategy str
    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_ids Sequence[str]
    The security group ID set of primary networkInterface.
    spot_price_limit float
    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_id str
    The ID of system volume.
    system_volume_size int
    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_type str
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    tags Sequence[InstanceTagArgs]
    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.
    autoRenewPeriod Number
    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.
    deploymentSetId String
    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.Associate resource to bind EIP.
    gpuDevices List<Property Map>
    The GPU device info of Instance.
    hostName String
    The host name of ECS instance.
    hpcClusterId String
    The hpc cluster ID of ECS instance.
    imageId String
    The Image ID of ECS instance.
    includeDataVolumes Boolean
    The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
    instanceChargeType String
    The charge type of ECS instance, the value can be PrePaid or PostPaid.
    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.
    keepImageCredential Boolean
    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.
    keyPairId String
    The ssh key ID of ECS instance.
    keyPairName String
    The ssh key name of ECS instance.
    memorySize Number
    The memory size of ECS instance.
    networkInterfaceId String
    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.
    primaryIpAddress String
    The private ip address of primary networkInterface.
    projectName String
    The ProjectName of the ecs instance.
    secondaryNetworkInterfaces List<Property Map>
    The secondary networkInterface detail collection of ECS instance.
    securityEnhancementStrategy String
    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.
    securityGroupIds List<String>
    The security group ID set of primary networkInterface.
    spotPriceLimit Number
    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.
    systemVolumeId String
    The ID of system volume.
    systemVolumeSize Number
    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.
    systemVolumeType String
    The type of system volume, the value is PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    tags 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

    NumaPerSocket int
    The number of subnuma in socket, only support for ebm. 1 indicates 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.
    ThreadsPerCore int
    The per core of threads, only support for ebm. 1 indicates disabling hyper threading function.
    NumaPerSocket int
    The number of subnuma in socket, only support for ebm. 1 indicates 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.
    ThreadsPerCore int
    The per core of threads, only support for ebm. 1 indicates disabling hyper threading function.
    numaPerSocket Integer
    The number of subnuma in socket, only support for ebm. 1 indicates 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.
    threadsPerCore Integer
    The per core of threads, only support for ebm. 1 indicates disabling hyper threading function.
    numaPerSocket number
    The number of subnuma in socket, only support for ebm. 1 indicates 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.
    threadsPerCore number
    The per core of threads, only support for ebm. 1 indicates disabling hyper threading function.
    numa_per_socket int
    The number of subnuma in socket, only support for ebm. 1 indicates 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_core int
    The per core of threads, only support for ebm. 1 indicates disabling hyper threading function.
    numaPerSocket Number
    The number of subnuma in socket, only support for ebm. 1 indicates 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.
    threadsPerCore Number
    The per core of threads, only support for ebm. 1 indicates 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 PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    DeleteWithInstance bool
    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 PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    DeleteWithInstance bool
    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 PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    deleteWithInstance Boolean
    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 PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    deleteWithInstance boolean
    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 PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    delete_with_instance bool
    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 PTSSD or ESSD_PL0 or ESSD_PL1 or ESSD_PL2 or ESSD_FlexPL.
    deleteWithInstance Boolean
    The delete with instance flag of volume.

    InstanceGpuDevice, InstanceGpuDeviceArgs

    Count int
    The Count of GPU device.
    EncryptedMemorySize int
    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.
    EncryptedMemorySize int
    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.
    encryptedMemorySize Integer
    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.
    encryptedMemorySize number
    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_size int
    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.
    encryptedMemorySize Number
    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

    SecurityGroupIds List<string>
    The security group ID set of secondary networkInterface.
    SubnetId string
    The subnet ID of secondary networkInterface.
    PrimaryIpAddress string
    The private ip address of primary networkInterface.
    SecurityGroupIds []string
    The security group ID set of secondary networkInterface.
    SubnetId string
    The subnet ID of secondary networkInterface.
    PrimaryIpAddress string
    The private ip address of primary networkInterface.
    securityGroupIds List<String>
    The security group ID set of secondary networkInterface.
    subnetId String
    The subnet ID of secondary networkInterface.
    primaryIpAddress String
    The private ip address of primary networkInterface.
    securityGroupIds string[]
    The security group ID set of secondary networkInterface.
    subnetId string
    The subnet ID of secondary networkInterface.
    primaryIpAddress string
    The private ip address of primary networkInterface.
    security_group_ids Sequence[str]
    The security group ID set of secondary networkInterface.
    subnet_id str
    The subnet ID of secondary networkInterface.
    primary_ip_address str
    The private ip address of primary networkInterface.
    securityGroupIds List<String>
    The security group ID set of secondary networkInterface.
    subnetId String
    The subnet ID of secondary networkInterface.
    primaryIpAddress String
    The private ip address of primary networkInterface.

    InstanceTag, InstanceTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine