volcengine.ecs.Instance
Explore with Pulumi AI
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=[{
"security_group_ids": ["string"],
"subnet_id": "string",
"primary_ip_address": "string",
}],
security_enhancement_strategy="string",
deployment_set_id="string",
spot_price_limit=0,
spot_strategy="string",
data_volumes=[{
"size": 0,
"volume_type": "string",
"delete_with_instance": False,
}],
cpu_options={
"numa_per_socket": 0,
"threads_per_core": 0,
},
auto_renew_period=0,
tags=[{
"key": "string",
"value": "string",
}],
user_data="string",
zone_id="string")
const instanceResource = new volcengine.ecs.Instance("instanceResource", {
imageId: "string",
systemVolumeType: "string",
systemVolumeSize: 0,
subnetId: "string",
securityGroupIds: ["string"],
instanceType: "string",
hpcClusterId: "string",
period: 0,
autoRenew: false,
eipId: "string",
includeDataVolumes: false,
instanceChargeType: "string",
instanceName: "string",
description: "string",
ipv6AddressCount: 0,
ipv6Addresses: ["string"],
keepImageCredential: false,
keyPairName: "string",
password: "string",
hostName: "string",
primaryIpAddress: "string",
projectName: "string",
secondaryNetworkInterfaces: [{
securityGroupIds: ["string"],
subnetId: "string",
primaryIpAddress: "string",
}],
securityEnhancementStrategy: "string",
deploymentSetId: "string",
spotPriceLimit: 0,
spotStrategy: "string",
dataVolumes: [{
size: 0,
volumeType: "string",
deleteWithInstance: false,
}],
cpuOptions: {
numaPerSocket: 0,
threadsPerCore: 0,
},
autoRenewPeriod: 0,
tags: [{
key: "string",
value: "string",
}],
userData: "string",
zoneId: "string",
});
type: volcengine:ecs:Instance
properties:
autoRenew: false
autoRenewPeriod: 0
cpuOptions:
numaPerSocket: 0
threadsPerCore: 0
dataVolumes:
- deleteWithInstance: false
size: 0
volumeType: string
deploymentSetId: string
description: string
eipId: string
hostName: string
hpcClusterId: string
imageId: string
includeDataVolumes: false
instanceChargeType: string
instanceName: string
instanceType: string
ipv6AddressCount: 0
ipv6Addresses:
- string
keepImageCredential: false
keyPairName: string
password: string
period: 0
primaryIpAddress: string
projectName: string
secondaryNetworkInterfaces:
- primaryIpAddress: string
securityGroupIds:
- string
subnetId: string
securityEnhancementStrategy: string
securityGroupIds:
- string
spotPriceLimit: 0
spotStrategy: string
subnetId: string
systemVolumeSize: 0
systemVolumeType: string
tags:
- key: string
value: string
userData: string
zoneId: string
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Instance resource accepts the following input properties:
- Image
Id string - The Image ID of ECS instance.
- Instance
Type string - The instance type of ECS instance.
- Security
Group List<string>Ids - The security group ID set of primary networkInterface.
- Subnet
Id string - The subnet ID of primary networkInterface.
- System
Volume intSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- System
Volume stringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - Auto
Renew bool - The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Auto
Renew intPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Cpu
Options InstanceCpu Options - The option of cpu,only support for ebm.
- Data
Volumes List<InstanceData Volume> - The data volumes collection of ECS instance.
- Deployment
Set stringId - The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- Eip
Id 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. - Host
Name string - The host name of ECS instance.
- Hpc
Cluster stringId - The hpc cluster ID of ECS instance.
- Include
Data boolVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- Instance
Charge stringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - Instance
Name string - The name of ECS instance.
- Ipv6Address
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.
- 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.
- Keep
Image boolCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Key
Pair stringName - 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.
- Primary
Ip stringAddress - The private ip address of primary networkInterface.
- Project
Name string - The ProjectName of the ecs instance.
- Secondary
Network List<InstanceInterfaces Secondary Network Interface> - The secondary networkInterface detail collection of ECS instance.
- Security
Enhancement stringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Spot
Price doubleLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- Spot
Strategy string - The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- List<Instance
Tag> - Tags.
- User
Data string - The user data of ECS instance, this field must be encrypted with base64.
- Zone
Id string - The available zone ID of ECS instance.
- Image
Id string - The Image ID of ECS instance.
- Instance
Type string - The instance type of ECS instance.
- Security
Group []stringIds - The security group ID set of primary networkInterface.
- Subnet
Id string - The subnet ID of primary networkInterface.
- System
Volume intSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- System
Volume stringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - Auto
Renew bool - The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Auto
Renew intPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Cpu
Options InstanceCpu Options Args - The option of cpu,only support for ebm.
- Data
Volumes []InstanceData Volume Args - The data volumes collection of ECS instance.
- Deployment
Set stringId - The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- Eip
Id 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. - Host
Name string - The host name of ECS instance.
- Hpc
Cluster stringId - The hpc cluster ID of ECS instance.
- Include
Data boolVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- Instance
Charge stringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - Instance
Name string - The name of ECS instance.
- Ipv6Address
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.
- 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.
- Keep
Image boolCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Key
Pair stringName - 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.
- Primary
Ip stringAddress - The private ip address of primary networkInterface.
- Project
Name string - The ProjectName of the ecs instance.
- Secondary
Network []InstanceInterfaces Secondary Network Interface Args - The secondary networkInterface detail collection of ECS instance.
- Security
Enhancement stringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Spot
Price float64Limit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- Spot
Strategy 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.
- []Instance
Tag Args - Tags.
- User
Data string - The user data of ECS instance, this field must be encrypted with base64.
- Zone
Id string - The available zone ID of ECS instance.
- image
Id String - The Image ID of ECS instance.
- instance
Type String - The instance type of ECS instance.
- security
Group List<String>Ids - The security group ID set of primary networkInterface.
- subnet
Id String - The subnet ID of primary networkInterface.
- system
Volume IntegerSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system
Volume StringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - auto
Renew 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.
- auto
Renew IntegerPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu
Options InstanceCpu Options - The option of cpu,only support for ebm.
- data
Volumes List<InstanceData Volume> - The data volumes collection of ECS instance.
- deployment
Set StringId - The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eip
Id 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. - host
Name String - The host name of ECS instance.
- hpc
Cluster StringId - The hpc cluster ID of ECS instance.
- include
Data BooleanVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance
Charge StringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance
Name String - The name of ECS instance.
- ipv6Address
Count 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.
- keep
Image BooleanCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key
Pair StringName - 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.
- primary
Ip StringAddress - The private ip address of primary networkInterface.
- project
Name String - The ProjectName of the ecs instance.
- secondary
Network List<InstanceInterfaces Secondary Network Interface> - The secondary networkInterface detail collection of ECS instance.
- security
Enhancement StringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spot
Price DoubleLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot
Strategy String - The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- List<Instance
Tag> - Tags.
- user
Data String - The user data of ECS instance, this field must be encrypted with base64.
- zone
Id String - The available zone ID of ECS instance.
- image
Id string - The Image ID of ECS instance.
- instance
Type string - The instance type of ECS instance.
- security
Group string[]Ids - The security group ID set of primary networkInterface.
- subnet
Id string - The subnet ID of primary networkInterface.
- system
Volume numberSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system
Volume stringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - auto
Renew 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.
- auto
Renew numberPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu
Options InstanceCpu Options - The option of cpu,only support for ebm.
- data
Volumes InstanceData Volume[] - The data volumes collection of ECS instance.
- deployment
Set stringId - The ID of Ecs Deployment Set.
- description string
- The description of ECS instance.
- eip
Id 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. - host
Name string - The host name of ECS instance.
- hpc
Cluster stringId - The hpc cluster ID of ECS instance.
- include
Data booleanVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance
Charge stringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance
Name string - The name of ECS instance.
- ipv6Address
Count 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.
- keep
Image booleanCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key
Pair stringName - 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.
- primary
Ip stringAddress - The private ip address of primary networkInterface.
- project
Name string - The ProjectName of the ecs instance.
- secondary
Network InstanceInterfaces Secondary Network Interface[] - The secondary networkInterface detail collection of ECS instance.
- security
Enhancement stringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spot
Price numberLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot
Strategy 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.
- Instance
Tag[] - Tags.
- user
Data string - The user data of ECS instance, this field must be encrypted with base64.
- zone
Id string - The available zone ID of ECS instance.
- image_
id str - The Image ID of ECS instance.
- instance_
type str - The instance type of ECS instance.
- security_
group_ Sequence[str]ids - The security group ID set of primary networkInterface.
- subnet_
id str - The subnet ID of primary networkInterface.
- system_
volume_ intsize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system_
volume_ strtype - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - auto_
renew bool - The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- auto_
renew_ intperiod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu_
options InstanceCpu Options Args - The option of cpu,only support for ebm.
- data_
volumes Sequence[InstanceData Volume Args] - The data volumes collection of ECS instance.
- deployment_
set_ strid - The ID of Ecs Deployment Set.
- description str
- The description of ECS instance.
- eip_
id str - The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use
volcengine.eip.Associate
resource to bind EIP. - host_
name str - The host name of ECS instance.
- hpc_
cluster_ strid - The hpc cluster ID of ECS instance.
- include_
data_ boolvolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance_
charge_ strtype - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance_
name str - The name of ECS instance.
- ipv6_
address_ intcount - The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6_
addresses Sequence[str] - One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- keep_
image_ boolcredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key_
pair_ strname - The ssh key name of ECS instance.
- password str
- The password of ECS instance.
- period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primary_
ip_ straddress - The private ip address of primary networkInterface.
- project_
name str - The ProjectName of the ecs instance.
- secondary_
network_ Sequence[Instanceinterfaces Secondary Network Interface Args] - The secondary networkInterface detail collection of ECS instance.
- security_
enhancement_ strstrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spot_
price_ floatlimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot_
strategy str - The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- Sequence[Instance
Tag Args] - Tags.
- user_
data str - The user data of ECS instance, this field must be encrypted with base64.
- zone_
id str - The available zone ID of ECS instance.
- image
Id String - The Image ID of ECS instance.
- instance
Type String - The instance type of ECS instance.
- security
Group List<String>Ids - The security group ID set of primary networkInterface.
- subnet
Id String - The subnet ID of primary networkInterface.
- system
Volume NumberSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system
Volume StringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - auto
Renew 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.
- auto
Renew NumberPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu
Options Property Map - The option of cpu,only support for ebm.
- data
Volumes List<Property Map> - The data volumes collection of ECS instance.
- deployment
Set StringId - The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eip
Id 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. - host
Name String - The host name of ECS instance.
- hpc
Cluster StringId - The hpc cluster ID of ECS instance.
- include
Data BooleanVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance
Charge StringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance
Name String - The name of ECS instance.
- ipv6Address
Count 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.
- keep
Image BooleanCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key
Pair StringName - 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.
- primary
Ip StringAddress - The private ip address of primary networkInterface.
- project
Name String - The ProjectName of the ecs instance.
- secondary
Network List<Property Map>Interfaces - The secondary networkInterface detail collection of ECS instance.
- security
Enhancement StringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- spot
Price NumberLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot
Strategy String - The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- List<Property Map>
- Tags.
- user
Data String - The user data of ECS instance, this field must be encrypted with base64.
- zone
Id 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.
- Created
At string - The create time of ECS instance.
- Gpu
Devices List<InstanceGpu Device> - The GPU device info of Instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of ECS instance.
- Is
Gpu bool - The Flag of GPU instance.If the instance is GPU,The flag is true.
- Key
Pair stringId - The ssh key ID of ECS instance.
- Memory
Size int - The memory size of ECS instance.
- Network
Interface stringId - The ID of primary networkInterface.
- Os
Name string - The os name of ECS instance.
- Os
Type string - The os type of ECS instance.
- Status string
- The status of ECS instance.
- Stopped
Mode string - The stop mode of ECS instance.
- System
Volume stringId - The ID of system volume.
- Updated
At string - The update time of ECS instance.
- Vpc
Id string - The VPC ID of ECS instance.
- Cpus int
- The number of ECS instance CPU cores.
- Created
At string - The create time of ECS instance.
- Gpu
Devices []InstanceGpu Device - The GPU device info of Instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of ECS instance.
- Is
Gpu bool - The Flag of GPU instance.If the instance is GPU,The flag is true.
- Key
Pair stringId - The ssh key ID of ECS instance.
- Memory
Size int - The memory size of ECS instance.
- Network
Interface stringId - The ID of primary networkInterface.
- Os
Name string - The os name of ECS instance.
- Os
Type string - The os type of ECS instance.
- Status string
- The status of ECS instance.
- Stopped
Mode string - The stop mode of ECS instance.
- System
Volume stringId - The ID of system volume.
- Updated
At string - The update time of ECS instance.
- Vpc
Id string - The VPC ID of ECS instance.
- cpus Integer
- The number of ECS instance CPU cores.
- created
At String - The create time of ECS instance.
- gpu
Devices List<InstanceGpu Device> - The GPU device info of Instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of ECS instance.
- is
Gpu Boolean - The Flag of GPU instance.If the instance is GPU,The flag is true.
- key
Pair StringId - The ssh key ID of ECS instance.
- memory
Size Integer - The memory size of ECS instance.
- network
Interface StringId - The ID of primary networkInterface.
- os
Name String - The os name of ECS instance.
- os
Type String - The os type of ECS instance.
- status String
- The status of ECS instance.
- stopped
Mode String - The stop mode of ECS instance.
- system
Volume StringId - The ID of system volume.
- updated
At String - The update time of ECS instance.
- vpc
Id String - The VPC ID of ECS instance.
- cpus number
- The number of ECS instance CPU cores.
- created
At string - The create time of ECS instance.
- gpu
Devices InstanceGpu Device[] - The GPU device info of Instance.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - The ID of ECS instance.
- is
Gpu boolean - The Flag of GPU instance.If the instance is GPU,The flag is true.
- key
Pair stringId - The ssh key ID of ECS instance.
- memory
Size number - The memory size of ECS instance.
- network
Interface stringId - The ID of primary networkInterface.
- os
Name string - The os name of ECS instance.
- os
Type string - The os type of ECS instance.
- status string
- The status of ECS instance.
- stopped
Mode string - The stop mode of ECS instance.
- system
Volume stringId - The ID of system volume.
- updated
At string - The update time of ECS instance.
- vpc
Id string - The VPC ID of ECS instance.
- cpus int
- The number of ECS instance CPU cores.
- created_
at str - The create time of ECS instance.
- gpu_
devices Sequence[InstanceGpu Device] - The GPU device info of Instance.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - The ID of ECS instance.
- is_
gpu bool - The Flag of GPU instance.If the instance is GPU,The flag is true.
- key_
pair_ strid - The ssh key ID of ECS instance.
- memory_
size int - The memory size of ECS instance.
- network_
interface_ strid - The ID of primary networkInterface.
- os_
name str - The os name of ECS instance.
- os_
type str - The os type of ECS instance.
- status str
- The status of ECS instance.
- stopped_
mode str - The stop mode of ECS instance.
- system_
volume_ strid - The ID of system volume.
- updated_
at str - The update time of ECS instance.
- vpc_
id str - The VPC ID of ECS instance.
- cpus Number
- The number of ECS instance CPU cores.
- created
At String - The create time of ECS instance.
- gpu
Devices List<Property Map> - The GPU device info of Instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of ECS instance.
- is
Gpu Boolean - The Flag of GPU instance.If the instance is GPU,The flag is true.
- key
Pair StringId - The ssh key ID of ECS instance.
- memory
Size Number - The memory size of ECS instance.
- network
Interface StringId - The ID of primary networkInterface.
- os
Name String - The os name of ECS instance.
- os
Type String - The os type of ECS instance.
- status String
- The status of ECS instance.
- stopped
Mode String - The stop mode of ECS instance.
- system
Volume StringId - The ID of system volume.
- updated
At String - The update time of ECS instance.
- vpc
Id 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.
- Auto
Renew bool - The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Auto
Renew intPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Cpu
Options InstanceCpu Options - The option of cpu,only support for ebm.
- Cpus int
- The number of ECS instance CPU cores.
- Created
At string - The create time of ECS instance.
- Data
Volumes List<InstanceData Volume> - The data volumes collection of ECS instance.
- Deployment
Set stringId - The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- Eip
Id 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. - Gpu
Devices List<InstanceGpu Device> - The GPU device info of Instance.
- Host
Name string - The host name of ECS instance.
- Hpc
Cluster stringId - The hpc cluster ID of ECS instance.
- Image
Id string - The Image ID of ECS instance.
- Include
Data boolVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- Instance
Charge stringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - Instance
Id string - The ID of ECS instance.
- Instance
Name string - The name of ECS instance.
- Instance
Type string - The instance type of ECS instance.
- Ipv6Address
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.
- 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.
- Is
Gpu bool - The Flag of GPU instance.If the instance is GPU,The flag is true.
- Keep
Image boolCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Key
Pair stringId - The ssh key ID of ECS instance.
- Key
Pair stringName - The ssh key name of ECS instance.
- Memory
Size int - The memory size of ECS instance.
- Network
Interface stringId - The ID of primary networkInterface.
- Os
Name string - The os name of ECS instance.
- Os
Type 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.
- Primary
Ip stringAddress - The private ip address of primary networkInterface.
- Project
Name string - The ProjectName of the ecs instance.
- Secondary
Network List<InstanceInterfaces Secondary Network Interface> - The secondary networkInterface detail collection of ECS instance.
- Security
Enhancement stringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Security
Group List<string>Ids - The security group ID set of primary networkInterface.
- Spot
Price doubleLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- Spot
Strategy 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.
- Stopped
Mode string - The stop mode of ECS instance.
- Subnet
Id string - The subnet ID of primary networkInterface.
- System
Volume stringId - The ID of system volume.
- System
Volume intSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- System
Volume stringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - List<Instance
Tag> - Tags.
- Updated
At string - The update time of ECS instance.
- User
Data string - The user data of ECS instance, this field must be encrypted with base64.
- Vpc
Id string - The VPC ID of ECS instance.
- Zone
Id string - The available zone ID of ECS instance.
- Auto
Renew bool - The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Auto
Renew intPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Cpu
Options InstanceCpu Options Args - The option of cpu,only support for ebm.
- Cpus int
- The number of ECS instance CPU cores.
- Created
At string - The create time of ECS instance.
- Data
Volumes []InstanceData Volume Args - The data volumes collection of ECS instance.
- Deployment
Set stringId - The ID of Ecs Deployment Set.
- Description string
- The description of ECS instance.
- Eip
Id 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. - Gpu
Devices []InstanceGpu Device Args - The GPU device info of Instance.
- Host
Name string - The host name of ECS instance.
- Hpc
Cluster stringId - The hpc cluster ID of ECS instance.
- Image
Id string - The Image ID of ECS instance.
- Include
Data boolVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- Instance
Charge stringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - Instance
Id string - The ID of ECS instance.
- Instance
Name string - The name of ECS instance.
- Instance
Type string - The instance type of ECS instance.
- Ipv6Address
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.
- 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.
- Is
Gpu bool - The Flag of GPU instance.If the instance is GPU,The flag is true.
- Keep
Image boolCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Key
Pair stringId - The ssh key ID of ECS instance.
- Key
Pair stringName - The ssh key name of ECS instance.
- Memory
Size int - The memory size of ECS instance.
- Network
Interface stringId - The ID of primary networkInterface.
- Os
Name string - The os name of ECS instance.
- Os
Type 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.
- Primary
Ip stringAddress - The private ip address of primary networkInterface.
- Project
Name string - The ProjectName of the ecs instance.
- Secondary
Network []InstanceInterfaces Secondary Network Interface Args - The secondary networkInterface detail collection of ECS instance.
- Security
Enhancement stringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Security
Group []stringIds - The security group ID set of primary networkInterface.
- Spot
Price float64Limit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- Spot
Strategy 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.
- Stopped
Mode string - The stop mode of ECS instance.
- Subnet
Id string - The subnet ID of primary networkInterface.
- System
Volume stringId - The ID of system volume.
- System
Volume intSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- System
Volume stringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - []Instance
Tag Args - Tags.
- Updated
At string - The update time of ECS instance.
- User
Data string - The user data of ECS instance, this field must be encrypted with base64.
- Vpc
Id string - The VPC ID of ECS instance.
- Zone
Id string - The available zone ID of ECS instance.
- auto
Renew 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.
- auto
Renew IntegerPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu
Options InstanceCpu Options - The option of cpu,only support for ebm.
- cpus Integer
- The number of ECS instance CPU cores.
- created
At String - The create time of ECS instance.
- data
Volumes List<InstanceData Volume> - The data volumes collection of ECS instance.
- deployment
Set StringId - The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eip
Id 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. - gpu
Devices List<InstanceGpu Device> - The GPU device info of Instance.
- host
Name String - The host name of ECS instance.
- hpc
Cluster StringId - The hpc cluster ID of ECS instance.
- image
Id String - The Image ID of ECS instance.
- include
Data BooleanVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance
Charge StringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance
Id String - The ID of ECS instance.
- instance
Name String - The name of ECS instance.
- instance
Type String - The instance type of ECS instance.
- ipv6Address
Count 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.
- is
Gpu Boolean - The Flag of GPU instance.If the instance is GPU,The flag is true.
- keep
Image BooleanCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key
Pair StringId - The ssh key ID of ECS instance.
- key
Pair StringName - The ssh key name of ECS instance.
- memory
Size Integer - The memory size of ECS instance.
- network
Interface StringId - The ID of primary networkInterface.
- os
Name String - The os name of ECS instance.
- os
Type 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.
- primary
Ip StringAddress - The private ip address of primary networkInterface.
- project
Name String - The ProjectName of the ecs instance.
- secondary
Network List<InstanceInterfaces Secondary Network Interface> - The secondary networkInterface detail collection of ECS instance.
- security
Enhancement StringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- security
Group List<String>Ids - The security group ID set of primary networkInterface.
- spot
Price DoubleLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot
Strategy 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.
- stopped
Mode String - The stop mode of ECS instance.
- subnet
Id String - The subnet ID of primary networkInterface.
- system
Volume StringId - The ID of system volume.
- system
Volume IntegerSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system
Volume StringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - List<Instance
Tag> - Tags.
- updated
At String - The update time of ECS instance.
- user
Data String - The user data of ECS instance, this field must be encrypted with base64.
- vpc
Id String - The VPC ID of ECS instance.
- zone
Id String - The available zone ID of ECS instance.
- auto
Renew 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.
- auto
Renew numberPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu
Options InstanceCpu Options - The option of cpu,only support for ebm.
- cpus number
- The number of ECS instance CPU cores.
- created
At string - The create time of ECS instance.
- data
Volumes InstanceData Volume[] - The data volumes collection of ECS instance.
- deployment
Set stringId - The ID of Ecs Deployment Set.
- description string
- The description of ECS instance.
- eip
Id 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. - gpu
Devices InstanceGpu Device[] - The GPU device info of Instance.
- host
Name string - The host name of ECS instance.
- hpc
Cluster stringId - The hpc cluster ID of ECS instance.
- image
Id string - The Image ID of ECS instance.
- include
Data booleanVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance
Charge stringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance
Id string - The ID of ECS instance.
- instance
Name string - The name of ECS instance.
- instance
Type string - The instance type of ECS instance.
- ipv6Address
Count 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.
- is
Gpu boolean - The Flag of GPU instance.If the instance is GPU,The flag is true.
- keep
Image booleanCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key
Pair stringId - The ssh key ID of ECS instance.
- key
Pair stringName - The ssh key name of ECS instance.
- memory
Size number - The memory size of ECS instance.
- network
Interface stringId - The ID of primary networkInterface.
- os
Name string - The os name of ECS instance.
- os
Type 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.
- primary
Ip stringAddress - The private ip address of primary networkInterface.
- project
Name string - The ProjectName of the ecs instance.
- secondary
Network InstanceInterfaces Secondary Network Interface[] - The secondary networkInterface detail collection of ECS instance.
- security
Enhancement stringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- security
Group string[]Ids - The security group ID set of primary networkInterface.
- spot
Price numberLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot
Strategy 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.
- stopped
Mode string - The stop mode of ECS instance.
- subnet
Id string - The subnet ID of primary networkInterface.
- system
Volume stringId - The ID of system volume.
- system
Volume numberSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system
Volume stringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - Instance
Tag[] - Tags.
- updated
At string - The update time of ECS instance.
- user
Data string - The user data of ECS instance, this field must be encrypted with base64.
- vpc
Id string - The VPC ID of ECS instance.
- zone
Id string - The available zone ID of ECS instance.
- auto_
renew bool - The auto renew flag of ECS instance.Only effective when instance_charge_type is PrePaid. Default is true.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- auto_
renew_ intperiod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu_
options InstanceCpu Options Args - The option of cpu,only support for ebm.
- cpus int
- The number of ECS instance CPU cores.
- created_
at str - The create time of ECS instance.
- data_
volumes Sequence[InstanceData Volume Args] - The data volumes collection of ECS instance.
- deployment_
set_ strid - The ID of Ecs Deployment Set.
- description str
- The description of ECS instance.
- eip_
id str - The id of an existing Available EIP which will be automatically assigned to this instance.
It is not recommended to use this field, it is recommended to use
volcengine.eip.Associate
resource to bind EIP. - gpu_
devices Sequence[InstanceGpu Device Args] - The GPU device info of Instance.
- host_
name str - The host name of ECS instance.
- hpc_
cluster_ strid - The hpc cluster ID of ECS instance.
- image_
id str - The Image ID of ECS instance.
- include_
data_ boolvolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance_
charge_ strtype - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance_
id str - The ID of ECS instance.
- instance_
name str - The name of ECS instance.
- instance_
type str - The instance type of ECS instance.
- ipv6_
address_ intcount - The number of IPv6 addresses to be automatically assigned from within the CIDR block of the subnet that hosts the ENI. Valid values: 1 to 10.
- ipv6_
addresses Sequence[str] - One or more IPv6 addresses selected from within the CIDR block of the subnet that hosts the ENI. Support up to 10. You cannot specify both the ipv6_addresses and ipv6_address_count parameters.
- is_
gpu bool - The Flag of GPU instance.If the instance is GPU,The flag is true.
- keep_
image_ boolcredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key_
pair_ strid - The ssh key ID of ECS instance.
- key_
pair_ strname - The ssh key name of ECS instance.
- memory_
size int - The memory size of ECS instance.
- network_
interface_ strid - The ID of primary networkInterface.
- os_
name str - The os name of ECS instance.
- os_
type str - The os type of ECS instance.
- password str
- The password of ECS instance.
- period int
- The period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 12. Unit is Month.
- primary_
ip_ straddress - The private ip address of primary networkInterface.
- project_
name str - The ProjectName of the ecs instance.
- secondary_
network_ Sequence[Instanceinterfaces Secondary Network Interface Args] - The secondary networkInterface detail collection of ECS instance.
- security_
enhancement_ strstrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- security_
group_ Sequence[str]ids - The security group ID set of primary networkInterface.
- spot_
price_ floatlimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot_
strategy str - The spot strategy will autoremove instance in some conditions.Please make sure you can maintain instance lifecycle before auto remove.The spot strategy of ECS instance, values: NoSpot (default): indicates creating a normal pay-as-you-go instance. SpotAsPriceGo: spot instance with system automatically bidding and following the current market price. SpotWithPriceLimit: spot instance with a set upper limit for bidding price.
- status str
- The status of ECS instance.
- stopped_
mode str - The stop mode of ECS instance.
- subnet_
id str - The subnet ID of primary networkInterface.
- system_
volume_ strid - The ID of system volume.
- system_
volume_ intsize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system_
volume_ strtype - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - Sequence[Instance
Tag Args] - Tags.
- updated_
at str - The update time of ECS instance.
- user_
data str - The user data of ECS instance, this field must be encrypted with base64.
- vpc_
id str - The VPC ID of ECS instance.
- zone_
id str - The available zone ID of ECS instance.
- auto
Renew 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.
- auto
Renew NumberPeriod - The auto renew period of ECS instance.Only effective when instance_charge_type is PrePaid. Default is 1.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- cpu
Options Property Map - The option of cpu,only support for ebm.
- cpus Number
- The number of ECS instance CPU cores.
- created
At String - The create time of ECS instance.
- data
Volumes List<Property Map> - The data volumes collection of ECS instance.
- deployment
Set StringId - The ID of Ecs Deployment Set.
- description String
- The description of ECS instance.
- eip
Id 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. - gpu
Devices List<Property Map> - The GPU device info of Instance.
- host
Name String - The host name of ECS instance.
- hpc
Cluster StringId - The hpc cluster ID of ECS instance.
- image
Id String - The Image ID of ECS instance.
- include
Data BooleanVolumes - The include data volumes flag of ECS instance.Only effective when change instance charge type.include_data_volumes.
- instance
Charge StringType - The charge type of ECS instance, the value can be
PrePaid
orPostPaid
. - instance
Id String - The ID of ECS instance.
- instance
Name String - The name of ECS instance.
- instance
Type String - The instance type of ECS instance.
- ipv6Address
Count 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.
- is
Gpu Boolean - The Flag of GPU instance.If the instance is GPU,The flag is true.
- keep
Image BooleanCredential - Whether to keep the mirror settings. Only custom images and shared images support this field. When the value of this field is true, the Password and KeyPairName cannot be specified. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- key
Pair StringId - The ssh key ID of ECS instance.
- key
Pair StringName - The ssh key name of ECS instance.
- memory
Size Number - The memory size of ECS instance.
- network
Interface StringId - The ID of primary networkInterface.
- os
Name String - The os name of ECS instance.
- os
Type 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.
- primary
Ip StringAddress - The private ip address of primary networkInterface.
- project
Name String - The ProjectName of the ecs instance.
- secondary
Network List<Property Map>Interfaces - The secondary networkInterface detail collection of ECS instance.
- security
Enhancement StringStrategy - The security enhancement strategy of ECS instance. The value can be Active or InActive. Default is Active.When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- security
Group List<String>Ids - The security group ID set of primary networkInterface.
- spot
Price NumberLimit - The maximum hourly price for spot instances supports up to three decimal places. This parameter only takes effect when SpotStrategy=SpotWithPriceLimit.
- spot
Strategy 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.
- stopped
Mode String - The stop mode of ECS instance.
- subnet
Id String - The subnet ID of primary networkInterface.
- system
Volume StringId - The ID of system volume.
- system
Volume NumberSize - The size of system volume. The value range of the system volume size is ESSD_PL0: 20~2048, ESSD_FlexPL: 20~2048, PTSSD: 10~500.
- system
Volume StringType - The type of system volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - List<Property Map>
- Tags.
- updated
At String - The update time of ECS instance.
- user
Data String - The user data of ECS instance, this field must be encrypted with base64.
- vpc
Id String - The VPC ID of ECS instance.
- zone
Id String - The available zone ID of ECS instance.
Supporting Types
InstanceCpuOptions, InstanceCpuOptionsArgs
- Numa
Per intSocket - 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 intCore - The per core of threads, only support for ebm.
1
indicates disabling hyper threading function.
- Numa
Per intSocket - 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 intCore - The per core of threads, only support for ebm.
1
indicates disabling hyper threading function.
- numa
Per IntegerSocket - 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 IntegerCore - The per core of threads, only support for ebm.
1
indicates disabling hyper threading function.
- numa
Per numberSocket - 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 numberCore - The per core of threads, only support for ebm.
1
indicates disabling hyper threading function.
- numa_
per_ intsocket - 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_ intcore - The per core of threads, only support for ebm.
1
indicates disabling hyper threading function.
- numa
Per NumberSocket - 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 NumberCore - 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.
- Volume
Type string - The type of volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - Delete
With boolInstance - The delete with instance flag of volume.
- Size int
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- Volume
Type string - The type of volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - Delete
With boolInstance - The delete with instance flag of volume.
- size Integer
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volume
Type String - The type of volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - delete
With BooleanInstance - The delete with instance flag of volume.
- size number
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volume
Type string - The type of volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - delete
With booleanInstance - The delete with instance flag of volume.
- size int
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volume_
type str - The type of volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - delete_
with_ boolinstance - The delete with instance flag of volume.
- size Number
- The size of volume. The value range of the data volume size is ESSD_PL0: 10~32768, ESSD_FlexPL: 10~32768, PTSSD: 20~8192.
- volume
Type String - The type of volume, the value is
PTSSD
orESSD_PL0
orESSD_PL1
orESSD_PL2
orESSD_FlexPL
. - delete
With BooleanInstance - The delete with instance flag of volume.
InstanceGpuDevice, InstanceGpuDeviceArgs
- Count int
- The Count of GPU device.
- Encrypted
Memory intSize - The Encrypted Memory Size of GPU device.
- Memory
Size int - The memory size of ECS instance.
- Product
Name string - The Product Name of GPU device.
- Count int
- The Count of GPU device.
- Encrypted
Memory intSize - The Encrypted Memory Size of GPU device.
- Memory
Size int - The memory size of ECS instance.
- Product
Name string - The Product Name of GPU device.
- count Integer
- The Count of GPU device.
- encrypted
Memory IntegerSize - The Encrypted Memory Size of GPU device.
- memory
Size Integer - The memory size of ECS instance.
- product
Name String - The Product Name of GPU device.
- count number
- The Count of GPU device.
- encrypted
Memory numberSize - The Encrypted Memory Size of GPU device.
- memory
Size number - The memory size of ECS instance.
- product
Name string - The Product Name of GPU device.
- count int
- The Count of GPU device.
- encrypted_
memory_ intsize - The Encrypted Memory Size of GPU device.
- memory_
size int - The memory size of ECS instance.
- product_
name str - The Product Name of GPU device.
- count Number
- The Count of GPU device.
- encrypted
Memory NumberSize - The Encrypted Memory Size of GPU device.
- memory
Size Number - The memory size of ECS instance.
- product
Name String - The Product Name of GPU device.
InstanceSecondaryNetworkInterface, InstanceSecondaryNetworkInterfaceArgs
- Security
Group List<string>Ids - The security group ID set of secondary networkInterface.
- Subnet
Id string - The subnet ID of secondary networkInterface.
- Primary
Ip stringAddress - The private ip address of primary networkInterface.
- Security
Group []stringIds - The security group ID set of secondary networkInterface.
- Subnet
Id string - The subnet ID of secondary networkInterface.
- Primary
Ip stringAddress - The private ip address of primary networkInterface.
- security
Group List<String>Ids - The security group ID set of secondary networkInterface.
- subnet
Id String - The subnet ID of secondary networkInterface.
- primary
Ip StringAddress - The private ip address of primary networkInterface.
- security
Group string[]Ids - The security group ID set of secondary networkInterface.
- subnet
Id string - The subnet ID of secondary networkInterface.
- primary
Ip stringAddress - The private ip address of primary networkInterface.
- security_
group_ Sequence[str]ids - The security group ID set of secondary networkInterface.
- subnet_
id str - The subnet ID of secondary networkInterface.
- primary_
ip_ straddress - The private ip address of primary networkInterface.
- security
Group List<String>Ids - The security group ID set of secondary networkInterface.
- subnet
Id String - The subnet ID of secondary networkInterface.
- primary
Ip StringAddress - The private ip address of primary networkInterface.
InstanceTag, InstanceTagArgs
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.