published on Tuesday, Oct 27, 2026 by ucloud
published on Tuesday, Oct 27, 2026 by ucloud
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
// Query default security group
const _default = ucloud.getSecurityGroups({
type: "recommend_web",
});
// Query normal image
const normal = ucloud.getImages({
availabilityZone: "cn-bj2-03",
nameRegex: "^CentOS 6.5 64",
imageType: "base",
});
// Create normal instance
const normalInstance = new ucloud.Instance("normal", {
availabilityZone: "cn-bj2-03",
imageId: normal.then(normal => normal.images?.[0]?.id),
instanceType: "n-basic-2",
rootPassword: "wA1234567",
name: "tf-example-normal-instance",
tag: "tf-example",
bootDiskType: "cloud_ssd",
securityGroup: _default.then(_default => _default.securityGroups?.[0]?.id),
dataDisks: {
size: 20,
type: "cloud_ssd",
},
deleteDisksWithInstance: true,
});
// Create instance with key pair login
const keypair = new ucloud.Instance("keypair", {
availabilityZone: "cn-bj2-03",
imageId: normal.then(normal => normal.images?.[0]?.id),
instanceType: "n-basic-2",
name: "tf-example-keypair-instance",
tag: "tf-example",
bootDiskType: "cloud_ssd",
loginMode: "KeyPair",
keyPairId: "keypair-xxxxx",
securityGroup: _default.then(_default => _default.securityGroups?.[0]?.id),
});
// Create instance in SecGroup mode
const secgroup = new ucloud.Instance("secgroup", {
availabilityZone: "cn-bj2-03",
imageId: normal.then(normal => normal.images?.[0]?.id),
instanceType: "n-basic-2",
rootPassword: "wA1234567",
name: "tf-example-secgroup-instance",
tag: "tf-example",
bootDiskType: "cloud_ssd",
securityMode: "SecGroup",
secGroupIds: [{
id: "secgroup-xxxxx",
priority: 1,
}],
});
// Query outstanding image
const outstanding = ucloud.getImages({
availabilityZone: "cn-bj2-03",
nameRegex: "^高内核CentOS 7.6 64",
imageType: "base",
});
// Create outstanding instance
const outstandingInstance = new ucloud.Instance("outstanding", {
availabilityZone: "cn-bj2-03",
imageId: outstanding.then(outstanding => outstanding.images?.[0]?.id),
instanceType: "o-basic-4",
rootPassword: "wA1234567",
name: "tf-example-outstanding-instance",
tag: "tf-example",
bootDiskType: "cloud_rssd",
securityGroup: _default.then(_default => _default.securityGroups?.[0]?.id),
dataDisks: {
size: 20,
type: "cloud_rssd",
},
deleteDisksWithInstance: true,
});
import pulumi
import pulumi_ucloud as ucloud
# Query default security group
default = ucloud.get_security_groups(type="recommend_web")
# Query normal image
normal = ucloud.get_images(availability_zone="cn-bj2-03",
name_regex="^CentOS 6.5 64",
image_type="base")
# Create normal instance
normal_instance = ucloud.Instance("normal",
availability_zone="cn-bj2-03",
image_id=normal.images[0].id,
instance_type="n-basic-2",
root_password="wA1234567",
name="tf-example-normal-instance",
tag="tf-example",
boot_disk_type="cloud_ssd",
security_group=default.security_groups[0].id,
data_disks={
"size": 20,
"type": "cloud_ssd",
},
delete_disks_with_instance=True)
# Create instance with key pair login
keypair = ucloud.Instance("keypair",
availability_zone="cn-bj2-03",
image_id=normal.images[0].id,
instance_type="n-basic-2",
name="tf-example-keypair-instance",
tag="tf-example",
boot_disk_type="cloud_ssd",
login_mode="KeyPair",
key_pair_id="keypair-xxxxx",
security_group=default.security_groups[0].id)
# Create instance in SecGroup mode
secgroup = ucloud.Instance("secgroup",
availability_zone="cn-bj2-03",
image_id=normal.images[0].id,
instance_type="n-basic-2",
root_password="wA1234567",
name="tf-example-secgroup-instance",
tag="tf-example",
boot_disk_type="cloud_ssd",
security_mode="SecGroup",
sec_group_ids=[{
"id": "secgroup-xxxxx",
"priority": 1,
}])
# Query outstanding image
outstanding = ucloud.get_images(availability_zone="cn-bj2-03",
name_regex="^高内核CentOS 7.6 64",
image_type="base")
# Create outstanding instance
outstanding_instance = ucloud.Instance("outstanding",
availability_zone="cn-bj2-03",
image_id=outstanding.images[0].id,
instance_type="o-basic-4",
root_password="wA1234567",
name="tf-example-outstanding-instance",
tag="tf-example",
boot_disk_type="cloud_rssd",
security_group=default.security_groups[0].id,
data_disks={
"size": 20,
"type": "cloud_rssd",
},
delete_disks_with_instance=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Query default security group
_default, err := ucloud.GetSecurityGroups(ctx, &ucloud.GetSecurityGroupsArgs{
Type: pulumi.StringRef("recommend_web"),
}, nil)
if err != nil {
return err
}
// Query normal image
normal, err := ucloud.GetImages(ctx, &ucloud.GetImagesArgs{
AvailabilityZone: pulumi.StringRef("cn-bj2-03"),
NameRegex: pulumi.StringRef("^CentOS 6.5 64"),
ImageType: pulumi.StringRef("base"),
}, nil)
if err != nil {
return err
}
// Create normal instance
_, err = ucloud.NewInstance(ctx, "normal", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-03"),
ImageId: pulumi.String(normal.Images[0].Id),
InstanceType: pulumi.String("n-basic-2"),
RootPassword: pulumi.String("wA1234567"),
Name: pulumi.String("tf-example-normal-instance"),
Tag: pulumi.String("tf-example"),
BootDiskType: pulumi.String("cloud_ssd"),
SecurityGroup: pulumi.String(_default.SecurityGroups[0].Id),
DataDisks: &ucloud.InstanceDataDisksArgs{
Size: pulumi.Float64(20),
Type: pulumi.String("cloud_ssd"),
},
DeleteDisksWithInstance: pulumi.Bool(true),
})
if err != nil {
return err
}
// Create instance with key pair login
_, err = ucloud.NewInstance(ctx, "keypair", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-03"),
ImageId: pulumi.String(normal.Images[0].Id),
InstanceType: pulumi.String("n-basic-2"),
Name: pulumi.String("tf-example-keypair-instance"),
Tag: pulumi.String("tf-example"),
BootDiskType: pulumi.String("cloud_ssd"),
LoginMode: pulumi.String("KeyPair"),
KeyPairId: pulumi.String("keypair-xxxxx"),
SecurityGroup: pulumi.String(_default.SecurityGroups[0].Id),
})
if err != nil {
return err
}
// Create instance in SecGroup mode
_, err = ucloud.NewInstance(ctx, "secgroup", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-03"),
ImageId: pulumi.String(normal.Images[0].Id),
InstanceType: pulumi.String("n-basic-2"),
RootPassword: pulumi.String("wA1234567"),
Name: pulumi.String("tf-example-secgroup-instance"),
Tag: pulumi.String("tf-example"),
BootDiskType: pulumi.String("cloud_ssd"),
SecurityMode: pulumi.String("SecGroup"),
SecGroupIds: ucloud.InstanceSecGroupIdArray{
&ucloud.InstanceSecGroupIdArgs{
Id: pulumi.String("secgroup-xxxxx"),
Priority: pulumi.Float64(1),
},
},
})
if err != nil {
return err
}
// Query outstanding image
outstanding, err := ucloud.GetImages(ctx, &ucloud.GetImagesArgs{
AvailabilityZone: pulumi.StringRef("cn-bj2-03"),
NameRegex: pulumi.StringRef("^高内核CentOS 7.6 64"),
ImageType: pulumi.StringRef("base"),
}, nil)
if err != nil {
return err
}
// Create outstanding instance
_, err = ucloud.NewInstance(ctx, "outstanding", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-03"),
ImageId: pulumi.String(outstanding.Images[0].Id),
InstanceType: pulumi.String("o-basic-4"),
RootPassword: pulumi.String("wA1234567"),
Name: pulumi.String("tf-example-outstanding-instance"),
Tag: pulumi.String("tf-example"),
BootDiskType: pulumi.String("cloud_rssd"),
SecurityGroup: pulumi.String(_default.SecurityGroups[0].Id),
DataDisks: &ucloud.InstanceDataDisksArgs{
Size: pulumi.Float64(20),
Type: pulumi.String("cloud_rssd"),
},
DeleteDisksWithInstance: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
// Query default security group
var @default = Ucloud.GetSecurityGroups.Invoke(new()
{
Type = "recommend_web",
});
// Query normal image
var normal = Ucloud.GetImages.Invoke(new()
{
AvailabilityZone = "cn-bj2-03",
NameRegex = "^CentOS 6.5 64",
ImageType = "base",
});
// Create normal instance
var normalInstance = new Ucloud.Instance("normal", new()
{
AvailabilityZone = "cn-bj2-03",
ImageId = normal.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = "n-basic-2",
RootPassword = "wA1234567",
Name = "tf-example-normal-instance",
Tag = "tf-example",
BootDiskType = "cloud_ssd",
SecurityGroup = @default.Apply(@default => @default.Apply(getSecurityGroupsResult => getSecurityGroupsResult.SecurityGroups[0]?.Id)),
DataDisks = new Ucloud.Inputs.InstanceDataDisksArgs
{
Size = 20,
Type = "cloud_ssd",
},
DeleteDisksWithInstance = true,
});
// Create instance with key pair login
var keypair = new Ucloud.Instance("keypair", new()
{
AvailabilityZone = "cn-bj2-03",
ImageId = normal.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = "n-basic-2",
Name = "tf-example-keypair-instance",
Tag = "tf-example",
BootDiskType = "cloud_ssd",
LoginMode = "KeyPair",
KeyPairId = "keypair-xxxxx",
SecurityGroup = @default.Apply(@default => @default.Apply(getSecurityGroupsResult => getSecurityGroupsResult.SecurityGroups[0]?.Id)),
});
// Create instance in SecGroup mode
var secgroup = new Ucloud.Instance("secgroup", new()
{
AvailabilityZone = "cn-bj2-03",
ImageId = normal.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = "n-basic-2",
RootPassword = "wA1234567",
Name = "tf-example-secgroup-instance",
Tag = "tf-example",
BootDiskType = "cloud_ssd",
SecurityMode = "SecGroup",
SecGroupIds = new[]
{
new Ucloud.Inputs.InstanceSecGroupIdArgs
{
Id = "secgroup-xxxxx",
Priority = 1,
},
},
});
// Query outstanding image
var outstanding = Ucloud.GetImages.Invoke(new()
{
AvailabilityZone = "cn-bj2-03",
NameRegex = "^高内核CentOS 7.6 64",
ImageType = "base",
});
// Create outstanding instance
var outstandingInstance = new Ucloud.Instance("outstanding", new()
{
AvailabilityZone = "cn-bj2-03",
ImageId = outstanding.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = "o-basic-4",
RootPassword = "wA1234567",
Name = "tf-example-outstanding-instance",
Tag = "tf-example",
BootDiskType = "cloud_rssd",
SecurityGroup = @default.Apply(@default => @default.Apply(getSecurityGroupsResult => getSecurityGroupsResult.SecurityGroups[0]?.Id)),
DataDisks = new Ucloud.Inputs.InstanceDataDisksArgs
{
Size = 20,
Type = "cloud_rssd",
},
DeleteDisksWithInstance = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetSecurityGroupsArgs;
import com.pulumi.ucloud.inputs.GetImagesArgs;
import com.pulumi.ucloud.Instance;
import com.pulumi.ucloud.InstanceArgs;
import com.pulumi.ucloud.inputs.InstanceDataDisksArgs;
import com.pulumi.ucloud.inputs.InstanceSecGroupIdArgs;
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) {
// Query default security group
final var default = UcloudFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
.type("recommend_web")
.build());
// Query normal image
final var normal = UcloudFunctions.getImages(GetImagesArgs.builder()
.availabilityZone("cn-bj2-03")
.nameRegex("^CentOS 6.5 64")
.imageType("base")
.build());
// Create normal instance
var normalInstance = new Instance("normalInstance", InstanceArgs.builder()
.availabilityZone("cn-bj2-03")
.imageId(normal.images()[0].id())
.instanceType("n-basic-2")
.rootPassword("wA1234567")
.name("tf-example-normal-instance")
.tag("tf-example")
.bootDiskType("cloud_ssd")
.securityGroup(default_.securityGroups()[0].id())
.dataDisks(InstanceDataDisksArgs.builder()
.size(20.0)
.type("cloud_ssd")
.build())
.deleteDisksWithInstance(true)
.build());
// Create instance with key pair login
var keypair = new Instance("keypair", InstanceArgs.builder()
.availabilityZone("cn-bj2-03")
.imageId(normal.images()[0].id())
.instanceType("n-basic-2")
.name("tf-example-keypair-instance")
.tag("tf-example")
.bootDiskType("cloud_ssd")
.loginMode("KeyPair")
.keyPairId("keypair-xxxxx")
.securityGroup(default_.securityGroups()[0].id())
.build());
// Create instance in SecGroup mode
var secgroup = new Instance("secgroup", InstanceArgs.builder()
.availabilityZone("cn-bj2-03")
.imageId(normal.images()[0].id())
.instanceType("n-basic-2")
.rootPassword("wA1234567")
.name("tf-example-secgroup-instance")
.tag("tf-example")
.bootDiskType("cloud_ssd")
.securityMode("SecGroup")
.secGroupIds(InstanceSecGroupIdArgs.builder()
.id("secgroup-xxxxx")
.priority(1.0)
.build())
.build());
// Query outstanding image
final var outstanding = UcloudFunctions.getImages(GetImagesArgs.builder()
.availabilityZone("cn-bj2-03")
.nameRegex("^高内核CentOS 7.6 64")
.imageType("base")
.build());
// Create outstanding instance
var outstandingInstance = new Instance("outstandingInstance", InstanceArgs.builder()
.availabilityZone("cn-bj2-03")
.imageId(outstanding.images()[0].id())
.instanceType("o-basic-4")
.rootPassword("wA1234567")
.name("tf-example-outstanding-instance")
.tag("tf-example")
.bootDiskType("cloud_rssd")
.securityGroup(default_.securityGroups()[0].id())
.dataDisks(InstanceDataDisksArgs.builder()
.size(20.0)
.type("cloud_rssd")
.build())
.deleteDisksWithInstance(true)
.build());
}
}
resources:
# Create normal instance
normalInstance:
type: ucloud:Instance
name: normal
properties:
availabilityZone: cn-bj2-03
imageId: ${normal.images[0].id}
instanceType: n-basic-2
rootPassword: wA1234567
name: tf-example-normal-instance
tag: tf-example
bootDiskType: cloud_ssd
securityGroup: ${default.securityGroups[0].id}
dataDisks:
size: 20
type: cloud_ssd
deleteDisksWithInstance: true
# Create instance with key pair login
keypair:
type: ucloud:Instance
properties:
availabilityZone: cn-bj2-03
imageId: ${normal.images[0].id}
instanceType: n-basic-2
name: tf-example-keypair-instance
tag: tf-example
bootDiskType: cloud_ssd
loginMode: KeyPair
keyPairId: keypair-xxxxx
securityGroup: ${default.securityGroups[0].id}
# Create instance in SecGroup mode
secgroup:
type: ucloud:Instance
properties:
availabilityZone: cn-bj2-03
imageId: ${normal.images[0].id}
instanceType: n-basic-2
rootPassword: wA1234567
name: tf-example-secgroup-instance
tag: tf-example
bootDiskType: cloud_ssd
securityMode: SecGroup
secGroupIds:
- id: secgroup-xxxxx
priority: 1
# Create outstanding instance
outstandingInstance:
type: ucloud:Instance
name: outstanding
properties:
availabilityZone: cn-bj2-03
imageId: ${outstanding.images[0].id}
instanceType: o-basic-4
rootPassword: wA1234567
name: tf-example-outstanding-instance
tag: tf-example
bootDiskType: cloud_rssd
securityGroup: ${default.securityGroups[0].id}
dataDisks:
size: 20
type: cloud_rssd
deleteDisksWithInstance: true
variables:
# Query default security group
default:
fn::invoke:
function: ucloud:getSecurityGroups
arguments:
type: recommend_web
# Query normal image
normal:
fn::invoke:
function: ucloud:getImages
arguments:
availabilityZone: cn-bj2-03
nameRegex: ^CentOS 6.5 64
imageType: base
# Query outstanding image
outstanding:
fn::invoke:
function: ucloud:getImages
arguments:
availabilityZone: cn-bj2-03
nameRegex: ^高内核CentOS 7.6 64
imageType: base
Example coming soon!
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,
availability_zone: Optional[str] = None,
instance_type: Optional[str] = None,
image_id: Optional[str] = None,
instance_id: Optional[str] = None,
auto_start: Optional[bool] = None,
boot_disk_size: Optional[float] = None,
boot_disk_type: Optional[str] = None,
charge_type: Optional[str] = None,
coupon_id: Optional[str] = None,
data_disk_size: Optional[float] = None,
data_disk_type: Optional[str] = None,
data_disks: Optional[InstanceDataDisksArgs] = None,
delete_disks_with_instance: Optional[bool] = None,
delete_eips_with_instance: Optional[bool] = None,
deletion_protection: Optional[bool] = None,
disk_password: Optional[str] = None,
duration: Optional[float] = None,
gpu: Optional[float] = None,
gpu_type: Optional[str] = None,
host_binding: Optional[bool] = None,
hotplug_feature: Optional[bool] = None,
auto_data_disk_init: Optional[str] = None,
alarm_template_id: Optional[float] = None,
key_pair_id: Optional[str] = None,
allow_stopping_for_update: Optional[bool] = None,
isolation_group: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
login_mode: Optional[str] = None,
min_cpu_platform: Optional[str] = None,
name: Optional[str] = None,
net_capability: Optional[str] = None,
network_interface: Optional[InstanceNetworkInterfaceArgs] = None,
private_ip: Optional[str] = None,
remark: Optional[str] = None,
root_password: Optional[str] = None,
sec_group_ids: Optional[Sequence[InstanceSecGroupIdArgs]] = None,
security_group: Optional[str] = None,
security_mode: Optional[str] = None,
subnet_id: Optional[str] = None,
tag: Optional[str] = None,
timeouts: Optional[InstanceTimeoutsArgs] = None,
udhost_id: Optional[str] = None,
udset_id: Optional[str] = None,
uhost_family: Optional[str] = None,
uni_feature: Optional[bool] = None,
user_data: Optional[str] = None,
vpc_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: ucloud:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ucloud_instance" "name" {
# resource properties
}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 Ucloud.Instance("instanceResource", new()
{
AvailabilityZone = "string",
InstanceType = "string",
ImageId = "string",
InstanceId = "string",
AutoStart = false,
BootDiskSize = 0.0,
BootDiskType = "string",
ChargeType = "string",
CouponId = "string",
DataDiskSize = 0.0,
DataDiskType = "string",
DataDisks = new Ucloud.Inputs.InstanceDataDisksArgs
{
Size = 0.0,
Type = "string",
},
DeleteDisksWithInstance = false,
DeleteEipsWithInstance = false,
DeletionProtection = false,
DiskPassword = "string",
Duration = 0.0,
Gpu = 0.0,
GpuType = "string",
HostBinding = false,
HotplugFeature = false,
AutoDataDiskInit = "string",
AlarmTemplateId = 0.0,
KeyPairId = "string",
AllowStoppingForUpdate = false,
IsolationGroup = "string",
Labels =
{
{ "string", "string" },
},
LoginMode = "string",
MinCpuPlatform = "string",
Name = "string",
NetCapability = "string",
NetworkInterface = new Ucloud.Inputs.InstanceNetworkInterfaceArgs
{
EipBandwidth = 0.0,
EipChargeMode = "string",
EipInternetType = "string",
},
PrivateIp = "string",
Remark = "string",
RootPassword = "string",
SecGroupIds = new[]
{
new Ucloud.Inputs.InstanceSecGroupIdArgs
{
Id = "string",
Priority = 0.0,
},
},
SecurityGroup = "string",
SecurityMode = "string",
SubnetId = "string",
Tag = "string",
Timeouts = new Ucloud.Inputs.InstanceTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
UdhostId = "string",
UdsetId = "string",
UhostFamily = "string",
UniFeature = false,
UserData = "string",
VpcId = "string",
});
example, err := ucloud.NewInstance(ctx, "instanceResource", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("string"),
InstanceType: pulumi.String("string"),
ImageId: pulumi.String("string"),
InstanceId: pulumi.String("string"),
AutoStart: pulumi.Bool(false),
BootDiskSize: pulumi.Float64(0),
BootDiskType: pulumi.String("string"),
ChargeType: pulumi.String("string"),
CouponId: pulumi.String("string"),
DataDiskSize: pulumi.Float64(0),
DataDiskType: pulumi.String("string"),
DataDisks: &ucloud.InstanceDataDisksArgs{
Size: pulumi.Float64(0),
Type: pulumi.String("string"),
},
DeleteDisksWithInstance: pulumi.Bool(false),
DeleteEipsWithInstance: pulumi.Bool(false),
DeletionProtection: pulumi.Bool(false),
DiskPassword: pulumi.String("string"),
Duration: pulumi.Float64(0),
Gpu: pulumi.Float64(0),
GpuType: pulumi.String("string"),
HostBinding: pulumi.Bool(false),
HotplugFeature: pulumi.Bool(false),
AutoDataDiskInit: pulumi.String("string"),
AlarmTemplateId: pulumi.Float64(0),
KeyPairId: pulumi.String("string"),
AllowStoppingForUpdate: pulumi.Bool(false),
IsolationGroup: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
LoginMode: pulumi.String("string"),
MinCpuPlatform: pulumi.String("string"),
Name: pulumi.String("string"),
NetCapability: pulumi.String("string"),
NetworkInterface: &ucloud.InstanceNetworkInterfaceArgs{
EipBandwidth: pulumi.Float64(0),
EipChargeMode: pulumi.String("string"),
EipInternetType: pulumi.String("string"),
},
PrivateIp: pulumi.String("string"),
Remark: pulumi.String("string"),
RootPassword: pulumi.String("string"),
SecGroupIds: ucloud.InstanceSecGroupIdArray{
&ucloud.InstanceSecGroupIdArgs{
Id: pulumi.String("string"),
Priority: pulumi.Float64(0),
},
},
SecurityGroup: pulumi.String("string"),
SecurityMode: pulumi.String("string"),
SubnetId: pulumi.String("string"),
Tag: pulumi.String("string"),
Timeouts: &ucloud.InstanceTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
UdhostId: pulumi.String("string"),
UdsetId: pulumi.String("string"),
UhostFamily: pulumi.String("string"),
UniFeature: pulumi.Bool(false),
UserData: pulumi.String("string"),
VpcId: pulumi.String("string"),
})
resource "ucloud_instance" "instanceResource" {
lifecycle {
create_before_destroy = true
}
availability_zone = "string"
instance_type = "string"
image_id = "string"
instance_id = "string"
auto_start = false
boot_disk_size = 0
boot_disk_type = "string"
charge_type = "string"
coupon_id = "string"
data_disk_size = 0
data_disk_type = "string"
data_disks = {
size = 0
type = "string"
}
delete_disks_with_instance = false
delete_eips_with_instance = false
deletion_protection = false
disk_password = "string"
duration = 0
gpu = 0
gpu_type = "string"
host_binding = false
hotplug_feature = false
auto_data_disk_init = "string"
alarm_template_id = 0
key_pair_id = "string"
allow_stopping_for_update = false
isolation_group = "string"
labels = {
"string" = "string"
}
login_mode = "string"
min_cpu_platform = "string"
name = "string"
net_capability = "string"
network_interface = {
eip_bandwidth = 0
eip_charge_mode = "string"
eip_internet_type = "string"
}
private_ip = "string"
remark = "string"
root_password = "string"
sec_group_ids {
id = "string"
priority = 0
}
security_group = "string"
security_mode = "string"
subnet_id = "string"
tag = "string"
_ {
timeouts = {
create = "string"
delete = "string"
update = "string"
}
}
udhost_id = "string"
udset_id = "string"
uhost_family = "string"
uni_feature = false
user_data = "string"
vpc_id = "string"
}
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
.availabilityZone("string")
.instanceType("string")
.imageId("string")
.instanceId("string")
.autoStart(false)
.bootDiskSize(0.0)
.bootDiskType("string")
.chargeType("string")
.couponId("string")
.dataDiskSize(0.0)
.dataDiskType("string")
.dataDisks(InstanceDataDisksArgs.builder()
.size(0.0)
.type("string")
.build())
.deleteDisksWithInstance(false)
.deleteEipsWithInstance(false)
.deletionProtection(false)
.diskPassword("string")
.duration(0.0)
.gpu(0.0)
.gpuType("string")
.hostBinding(false)
.hotplugFeature(false)
.autoDataDiskInit("string")
.alarmTemplateId(0.0)
.keyPairId("string")
.allowStoppingForUpdate(false)
.isolationGroup("string")
.labels(Map.of("string", "string"))
.loginMode("string")
.minCpuPlatform("string")
.name("string")
.netCapability("string")
.networkInterface(InstanceNetworkInterfaceArgs.builder()
.eipBandwidth(0.0)
.eipChargeMode("string")
.eipInternetType("string")
.build())
.privateIp("string")
.remark("string")
.rootPassword("string")
.secGroupIds(InstanceSecGroupIdArgs.builder()
.id("string")
.priority(0.0)
.build())
.securityGroup("string")
.securityMode("string")
.subnetId("string")
.tag("string")
.timeouts(InstanceTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.udhostId("string")
.udsetId("string")
.uhostFamily("string")
.uniFeature(false)
.userData("string")
.vpcId("string")
.build());
instance_resource = ucloud.Instance("instanceResource",
availability_zone="string",
instance_type="string",
image_id="string",
instance_id="string",
auto_start=False,
boot_disk_size=float(0),
boot_disk_type="string",
charge_type="string",
coupon_id="string",
data_disk_size=float(0),
data_disk_type="string",
data_disks={
"size": float(0),
"type": "string",
},
delete_disks_with_instance=False,
delete_eips_with_instance=False,
deletion_protection=False,
disk_password="string",
duration=float(0),
gpu=float(0),
gpu_type="string",
host_binding=False,
hotplug_feature=False,
auto_data_disk_init="string",
alarm_template_id=float(0),
key_pair_id="string",
allow_stopping_for_update=False,
isolation_group="string",
labels={
"string": "string",
},
login_mode="string",
min_cpu_platform="string",
name="string",
net_capability="string",
network_interface={
"eip_bandwidth": float(0),
"eip_charge_mode": "string",
"eip_internet_type": "string",
},
private_ip="string",
remark="string",
root_password="string",
sec_group_ids=[{
"id": "string",
"priority": float(0),
}],
security_group="string",
security_mode="string",
subnet_id="string",
tag="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
udhost_id="string",
udset_id="string",
uhost_family="string",
uni_feature=False,
user_data="string",
vpc_id="string")
const instanceResource = new ucloud.Instance("instanceResource", {
availabilityZone: "string",
instanceType: "string",
imageId: "string",
instanceId: "string",
autoStart: false,
bootDiskSize: 0,
bootDiskType: "string",
chargeType: "string",
couponId: "string",
dataDiskSize: 0,
dataDiskType: "string",
dataDisks: {
size: 0,
type: "string",
},
deleteDisksWithInstance: false,
deleteEipsWithInstance: false,
deletionProtection: false,
diskPassword: "string",
duration: 0,
gpu: 0,
gpuType: "string",
hostBinding: false,
hotplugFeature: false,
autoDataDiskInit: "string",
alarmTemplateId: 0,
keyPairId: "string",
allowStoppingForUpdate: false,
isolationGroup: "string",
labels: {
string: "string",
},
loginMode: "string",
minCpuPlatform: "string",
name: "string",
netCapability: "string",
networkInterface: {
eipBandwidth: 0,
eipChargeMode: "string",
eipInternetType: "string",
},
privateIp: "string",
remark: "string",
rootPassword: "string",
secGroupIds: [{
id: "string",
priority: 0,
}],
securityGroup: "string",
securityMode: "string",
subnetId: "string",
tag: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
udhostId: "string",
udsetId: "string",
uhostFamily: "string",
uniFeature: false,
userData: "string",
vpcId: "string",
});
type: ucloud:Instance
properties:
alarmTemplateId: 0
allowStoppingForUpdate: false
autoDataDiskInit: string
autoStart: false
availabilityZone: string
bootDiskSize: 0
bootDiskType: string
chargeType: string
couponId: string
dataDiskSize: 0
dataDiskType: string
dataDisks:
size: 0
type: string
deleteDisksWithInstance: false
deleteEipsWithInstance: false
deletionProtection: false
diskPassword: string
duration: 0
gpu: 0
gpuType: string
hostBinding: false
hotplugFeature: false
imageId: string
instanceId: string
instanceType: string
isolationGroup: string
keyPairId: string
labels:
string: string
loginMode: string
minCpuPlatform: string
name: string
netCapability: string
networkInterface:
eipBandwidth: 0
eipChargeMode: string
eipInternetType: string
privateIp: string
remark: string
rootPassword: string
secGroupIds:
- id: string
priority: 0
securityGroup: string
securityMode: string
subnetId: string
tag: string
timeouts:
create: string
delete: string
update: string
udhostId: string
udsetId: string
uhostFamily: string
uniFeature: false
userData: string
vpcId: 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:
- Availability
Zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - Image
Id string - The ID for the image to use for the instance.
- Instance
Type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- Alarm
Template doubleId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- Allow
Stopping boolFor Update - Auto
Data stringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - Auto
Start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - Boot
Disk doubleSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Boot
Disk stringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - Charge
Type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - Coupon
Id string - The ID of the host coupon to use for payment.
- Data
Disk doubleSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Data
Disk stringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - Data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - Deletion
Protection bool - Disk
Password string - Duration double
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - Gpu double
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- Gpu
Type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - Host
Binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - Hotplug
Feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - Instance
Id string - The ID of disk.
- Isolation
Group string - The ID of the associated isolation group.
- Key
Pair stringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - Labels Dictionary<string, string>
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - Login
Mode string - Min
Cpu stringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - Name string
- Net
Capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - Network
Interface InstanceNetwork Interface - Private
Ip string - The private IP address assigned to the instance.
- Remark string
- The remarks of instance. (Default:
""). - Root
Password string - Sec
Group List<InstanceIds Sec Group Id> - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - Security
Group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - Security
Mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - Subnet
Id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - Tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - Timeouts
Instance
Timeouts - Udhost
Id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - Udset
Id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- Uhost
Family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - Uni
Feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - User
Data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - Vpc
Id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- Availability
Zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - Image
Id string - The ID for the image to use for the instance.
- Instance
Type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- Alarm
Template float64Id - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- Allow
Stopping boolFor Update - Auto
Data stringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - Auto
Start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - Boot
Disk float64Size The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Boot
Disk stringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - Charge
Type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - Coupon
Id string - The ID of the host coupon to use for payment.
- Data
Disk float64Size The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Data
Disk stringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - Data
Disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - Deletion
Protection bool - Disk
Password string - Duration float64
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - Gpu float64
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- Gpu
Type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - Host
Binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - Hotplug
Feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - Instance
Id string - The ID of disk.
- Isolation
Group string - The ID of the associated isolation group.
- Key
Pair stringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - Labels map[string]string
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - Login
Mode string - Min
Cpu stringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - Name string
- Net
Capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - Network
Interface InstanceNetwork Interface Args - Private
Ip string - The private IP address assigned to the instance.
- Remark string
- The remarks of instance. (Default:
""). - Root
Password string - Sec
Group []InstanceIds Sec Group Id Args - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - Security
Group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - Security
Mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - Subnet
Id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - Tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - Timeouts
Instance
Timeouts Args - Udhost
Id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - Udset
Id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- Uhost
Family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - Uni
Feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - User
Data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - Vpc
Id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- availability_
zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - image_
id string - The ID for the image to use for the instance.
- instance_
type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- alarm_
template_ numberid - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow_
stopping_ boolfor_ update - auto_
data_ stringdisk_ init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto_
start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - boot_
disk_ numbersize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot_
disk_ stringtype - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge_
type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon_
id string - The ID of the host coupon to use for payment.
- data_
disk_ numbersize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data_
disk_ stringtype - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data_
disks object - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete_
disks_ boolwith_ instance - delete_
eips_ boolwith_ instance - deletion_
protection bool - disk_
password string - duration number
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - gpu number
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu_
type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host_
binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug_
feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - instance_
id string - The ID of disk.
- isolation_
group string - The ID of the associated isolation group.
- key_
pair_ stringid - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels map(string)
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login_
mode string - min_
cpu_ stringplatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name string
- net_
capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network_
interface object - private_
ip string - The private IP address assigned to the instance.
- remark string
- The remarks of instance. (Default:
""). - root_
password string - sec_
group_ list(object)ids - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security_
group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security_
mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - subnet_
id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts object
- udhost_
id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset_
id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost_
family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni_
feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - user_
data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc_
id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- availability
Zone String - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - image
Id String - The ID for the image to use for the instance.
- instance
Type String The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- alarm
Template DoubleId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow
Stopping BooleanFor Update - auto
Data StringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto
Start Boolean - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - boot
Disk DoubleSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot
Disk StringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge
Type String - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon
Id String - The ID of the host coupon to use for payment.
- data
Disk DoubleSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data
Disk StringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - deletion
Protection Boolean - disk
Password String - duration Double
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - gpu Double
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu
Type String - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host
Binding Boolean - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug
Feature Boolean - Enable the hot upgrade feature of the instance. (Default:
false). - instance
Id String - The ID of disk.
- isolation
Group String - The ID of the associated isolation group.
- key
Pair StringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels Map<String,String>
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login
Mode String - min
Cpu StringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name String
- net
Capability String - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network
Interface InstanceNetwork Interface - private
Ip String - The private IP address assigned to the instance.
- remark String
- The remarks of instance. (Default:
""). - root
Password String - sec
Group List<InstanceIds Sec Group Id> - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security
Group String - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security
Mode String - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - subnet
Id String - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag String
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts
Instance
Timeouts - udhost
Id String - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset
Id String - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost
Family String - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni
Feature Boolean - Enable the elastic network interface feature of the instance. (Default:
false). - user
Data String - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc
Id String - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- availability
Zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - image
Id string - The ID for the image to use for the instance.
- instance
Type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- alarm
Template numberId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow
Stopping booleanFor Update - auto
Data stringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto
Start boolean - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - boot
Disk numberSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot
Disk stringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge
Type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon
Id string - The ID of the host coupon to use for payment.
- data
Disk numberSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data
Disk stringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete
Disks booleanWith Instance - delete
Eips booleanWith Instance - deletion
Protection boolean - disk
Password string - duration number
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - gpu number
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu
Type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host
Binding boolean - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug
Feature boolean - Enable the hot upgrade feature of the instance. (Default:
false). - instance
Id string - The ID of disk.
- isolation
Group string - The ID of the associated isolation group.
- key
Pair stringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels {[key: string]: string}
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login
Mode string - min
Cpu stringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name string
- net
Capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network
Interface InstanceNetwork Interface - private
Ip string - The private IP address assigned to the instance.
- remark string
- The remarks of instance. (Default:
""). - root
Password string - sec
Group InstanceIds Sec Group Id[] - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security
Group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security
Mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - subnet
Id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts
Instance
Timeouts - udhost
Id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset
Id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost
Family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni
Feature boolean - Enable the elastic network interface feature of the instance. (Default:
false). - user
Data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc
Id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- availability_
zone str - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - image_
id str - The ID for the image to use for the instance.
- instance_
type str The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- alarm_
template_ floatid - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow_
stopping_ boolfor_ update - auto_
data_ strdisk_ init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto_
start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - boot_
disk_ floatsize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot_
disk_ strtype - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge_
type str - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon_
id str - The ID of the host coupon to use for payment.
- data_
disk_ floatsize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data_
disk_ strtype - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data_
disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete_
disks_ boolwith_ instance - delete_
eips_ boolwith_ instance - deletion_
protection bool - disk_
password str - duration float
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - gpu float
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu_
type str - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host_
binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug_
feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - instance_
id str - The ID of disk.
- isolation_
group str - The ID of the associated isolation group.
- key_
pair_ strid - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels Mapping[str, str]
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login_
mode str - min_
cpu_ strplatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name str
- net_
capability str - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network_
interface InstanceNetwork Interface Args - private_
ip str - The private IP address assigned to the instance.
- remark str
- The remarks of instance. (Default:
""). - root_
password str - sec_
group_ Sequence[Instanceids Sec Group Id Args] - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security_
group str - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security_
mode str - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - subnet_
id str - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag str
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts
Instance
Timeouts Args - udhost_
id str - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset_
id str - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost_
family str - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni_
feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - user_
data str - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc_
id str - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- availability
Zone String - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - image
Id String - The ID for the image to use for the instance.
- instance
Type String The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- alarm
Template NumberId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow
Stopping BooleanFor Update - auto
Data StringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto
Start Boolean - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - boot
Disk NumberSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot
Disk StringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge
Type String - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon
Id String - The ID of the host coupon to use for payment.
- data
Disk NumberSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data
Disk StringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data
Disks Property Map - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - deletion
Protection Boolean - disk
Password String - duration Number
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - gpu Number
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu
Type String - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host
Binding Boolean - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug
Feature Boolean - Enable the hot upgrade feature of the instance. (Default:
false). - instance
Id String - The ID of disk.
- isolation
Group String - The ID of the associated isolation group.
- key
Pair StringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels Map<String>
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login
Mode String - min
Cpu StringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name String
- net
Capability String - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network
Interface Property Map - private
Ip String - The private IP address assigned to the instance.
- remark String
- The remarks of instance. (Default:
""). - root
Password String - sec
Group List<Property Map>Ids - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security
Group String - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security
Mode String - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - subnet
Id String - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag String
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts Property Map
- udhost
Id String - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset
Id String - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost
Family String - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni
Feature Boolean - Enable the elastic network interface feature of the instance. (Default:
false). - user
Data String - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc
Id String - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Auto
Renew bool - Whether to renew an instance automatically or not.
- Cpu double
- The number of cores of virtual CPU, measured in core.
- Cpu
Platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - Create
Time string - The time of creation for instance, formatted in RFC3339 time string.
- Disk
Sets List<InstanceDisk Set> - It is a nested type which documented below.
- Expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Sets List<InstanceIp Set> - It is a nested type which documented below.
- Memory double
- The size of memory, measured in GB(Gigabyte).
- Rdma
Cluster stringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - Status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
- Auto
Renew bool - Whether to renew an instance automatically or not.
- Cpu float64
- The number of cores of virtual CPU, measured in core.
- Cpu
Platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - Create
Time string - The time of creation for instance, formatted in RFC3339 time string.
- Disk
Sets []InstanceDisk Set - It is a nested type which documented below.
- Expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Sets []InstanceIp Set - It is a nested type which documented below.
- Memory float64
- The size of memory, measured in GB(Gigabyte).
- Rdma
Cluster stringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - Status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
- auto_
renew bool - Whether to renew an instance automatically or not.
- cpu number
- The number of cores of virtual CPU, measured in core.
- cpu_
platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create_
time string - The time of creation for instance, formatted in RFC3339 time string.
- disk_
sets list(object) - It is a nested type which documented below.
- expire_
time string - The expiration time for instance, formatted in RFC3339 time string.
- id string
- The provider-assigned unique ID for this managed resource.
- ip_
sets list(object) - It is a nested type which documented below.
- memory number
- The size of memory, measured in GB(Gigabyte).
- rdma_
cluster_ stringid - The RDMA Cluster ID of instance. This is only available when machine type is
O. - status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
- auto
Renew Boolean - Whether to renew an instance automatically or not.
- cpu Double
- The number of cores of virtual CPU, measured in core.
- cpu
Platform String - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create
Time String - The time of creation for instance, formatted in RFC3339 time string.
- disk
Sets List<InstanceDisk Set> - It is a nested type which documented below.
- expire
Time String - The expiration time for instance, formatted in RFC3339 time string.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Sets List<InstanceIp Set> - It is a nested type which documented below.
- memory Double
- The size of memory, measured in GB(Gigabyte).
- rdma
Cluster StringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - status String
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
- auto
Renew boolean - Whether to renew an instance automatically or not.
- cpu number
- The number of cores of virtual CPU, measured in core.
- cpu
Platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create
Time string - The time of creation for instance, formatted in RFC3339 time string.
- disk
Sets InstanceDisk Set[] - It is a nested type which documented below.
- expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Sets InstanceIp Set[] - It is a nested type which documented below.
- memory number
- The size of memory, measured in GB(Gigabyte).
- rdma
Cluster stringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
- auto_
renew bool - Whether to renew an instance automatically or not.
- cpu float
- The number of cores of virtual CPU, measured in core.
- cpu_
platform str - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create_
time str - The time of creation for instance, formatted in RFC3339 time string.
- disk_
sets Sequence[InstanceDisk Set] - It is a nested type which documented below.
- expire_
time str - The expiration time for instance, formatted in RFC3339 time string.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
sets Sequence[InstanceIp Set] - It is a nested type which documented below.
- memory float
- The size of memory, measured in GB(Gigabyte).
- rdma_
cluster_ strid - The RDMA Cluster ID of instance. This is only available when machine type is
O. - status str
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
- auto
Renew Boolean - Whether to renew an instance automatically or not.
- cpu Number
- The number of cores of virtual CPU, measured in core.
- cpu
Platform String - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create
Time String - The time of creation for instance, formatted in RFC3339 time string.
- disk
Sets List<Property Map> - It is a nested type which documented below.
- expire
Time String - The expiration time for instance, formatted in RFC3339 time string.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Sets List<Property Map> - It is a nested type which documented below.
- memory Number
- The size of memory, measured in GB(Gigabyte).
- rdma
Cluster StringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - status String
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching.
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,
alarm_template_id: Optional[float] = None,
allow_stopping_for_update: Optional[bool] = None,
auto_data_disk_init: Optional[str] = None,
auto_renew: Optional[bool] = None,
auto_start: Optional[bool] = None,
availability_zone: Optional[str] = None,
boot_disk_size: Optional[float] = None,
boot_disk_type: Optional[str] = None,
charge_type: Optional[str] = None,
coupon_id: Optional[str] = None,
cpu: Optional[float] = None,
cpu_platform: Optional[str] = None,
create_time: Optional[str] = None,
data_disk_size: Optional[float] = None,
data_disk_type: Optional[str] = None,
data_disks: Optional[InstanceDataDisksArgs] = None,
delete_disks_with_instance: Optional[bool] = None,
delete_eips_with_instance: Optional[bool] = None,
deletion_protection: Optional[bool] = None,
disk_password: Optional[str] = None,
disk_sets: Optional[Sequence[InstanceDiskSetArgs]] = None,
duration: Optional[float] = None,
expire_time: Optional[str] = None,
gpu: Optional[float] = None,
gpu_type: Optional[str] = None,
host_binding: Optional[bool] = None,
hotplug_feature: Optional[bool] = None,
image_id: Optional[str] = None,
instance_id: Optional[str] = None,
instance_type: Optional[str] = None,
ip_sets: Optional[Sequence[InstanceIpSetArgs]] = None,
isolation_group: Optional[str] = None,
key_pair_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
login_mode: Optional[str] = None,
memory: Optional[float] = None,
min_cpu_platform: Optional[str] = None,
name: Optional[str] = None,
net_capability: Optional[str] = None,
network_interface: Optional[InstanceNetworkInterfaceArgs] = None,
private_ip: Optional[str] = None,
rdma_cluster_id: Optional[str] = None,
remark: Optional[str] = None,
root_password: Optional[str] = None,
sec_group_ids: Optional[Sequence[InstanceSecGroupIdArgs]] = None,
security_group: Optional[str] = None,
security_mode: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tag: Optional[str] = None,
timeouts: Optional[InstanceTimeoutsArgs] = None,
udhost_id: Optional[str] = None,
udset_id: Optional[str] = None,
uhost_family: Optional[str] = None,
uni_feature: Optional[bool] = None,
user_data: Optional[str] = None,
vpc_id: Optional[str] = None) -> Instancefunc GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)resources: _: type: ucloud:Instance get: id: ${id}import {
to = ucloud_instance.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alarm
Template doubleId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- Allow
Stopping boolFor Update - Auto
Data stringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - Auto
Renew bool - Whether to renew an instance automatically or not.
- Auto
Start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - Availability
Zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - Boot
Disk doubleSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Boot
Disk stringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - Charge
Type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - Coupon
Id string - The ID of the host coupon to use for payment.
- Cpu double
- The number of cores of virtual CPU, measured in core.
- Cpu
Platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - Create
Time string - The time of creation for instance, formatted in RFC3339 time string.
- Data
Disk doubleSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Data
Disk stringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - Data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - Deletion
Protection bool - Disk
Password string - Disk
Sets List<InstanceDisk Set> - It is a nested type which documented below.
- Duration double
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - Expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- Gpu double
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- Gpu
Type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - Host
Binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - Hotplug
Feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - Image
Id string - The ID for the image to use for the instance.
- Instance
Id string - The ID of disk.
- Instance
Type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- Ip
Sets List<InstanceIp Set> - It is a nested type which documented below.
- Isolation
Group string - The ID of the associated isolation group.
- Key
Pair stringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - Labels Dictionary<string, string>
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - Login
Mode string - Memory double
- The size of memory, measured in GB(Gigabyte).
- Min
Cpu stringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - Name string
- Net
Capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - Network
Interface InstanceNetwork Interface - Private
Ip string - The private IP address assigned to the instance.
- Rdma
Cluster stringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - Remark string
- The remarks of instance. (Default:
""). - Root
Password string - Sec
Group List<InstanceIds Sec Group Id> - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - Security
Group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - Security
Mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - Status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - Subnet
Id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - Tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - Timeouts
Instance
Timeouts - Udhost
Id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - Udset
Id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- Uhost
Family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - Uni
Feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - User
Data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - Vpc
Id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- Alarm
Template float64Id - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- Allow
Stopping boolFor Update - Auto
Data stringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - Auto
Renew bool - Whether to renew an instance automatically or not.
- Auto
Start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - Availability
Zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - Boot
Disk float64Size The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Boot
Disk stringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - Charge
Type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - Coupon
Id string - The ID of the host coupon to use for payment.
- Cpu float64
- The number of cores of virtual CPU, measured in core.
- Cpu
Platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - Create
Time string - The time of creation for instance, formatted in RFC3339 time string.
- Data
Disk float64Size The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- Data
Disk stringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - Data
Disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - Deletion
Protection bool - Disk
Password string - Disk
Sets []InstanceDisk Set Args - It is a nested type which documented below.
- Duration float64
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - Expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- Gpu float64
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- Gpu
Type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - Host
Binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - Hotplug
Feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - Image
Id string - The ID for the image to use for the instance.
- Instance
Id string - The ID of disk.
- Instance
Type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- Ip
Sets []InstanceIp Set Args - It is a nested type which documented below.
- Isolation
Group string - The ID of the associated isolation group.
- Key
Pair stringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - Labels map[string]string
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - Login
Mode string - Memory float64
- The size of memory, measured in GB(Gigabyte).
- Min
Cpu stringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - Name string
- Net
Capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - Network
Interface InstanceNetwork Interface Args - Private
Ip string - The private IP address assigned to the instance.
- Rdma
Cluster stringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - Remark string
- The remarks of instance. (Default:
""). - Root
Password string - Sec
Group []InstanceIds Sec Group Id Args - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - Security
Group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - Security
Mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - Status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - Subnet
Id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - Tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - Timeouts
Instance
Timeouts Args - Udhost
Id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - Udset
Id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- Uhost
Family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - Uni
Feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - User
Data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - Vpc
Id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- alarm_
template_ numberid - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow_
stopping_ boolfor_ update - auto_
data_ stringdisk_ init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto_
renew bool - Whether to renew an instance automatically or not.
- auto_
start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - availability_
zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - boot_
disk_ numbersize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot_
disk_ stringtype - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge_
type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon_
id string - The ID of the host coupon to use for payment.
- cpu number
- The number of cores of virtual CPU, measured in core.
- cpu_
platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create_
time string - The time of creation for instance, formatted in RFC3339 time string.
- data_
disk_ numbersize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data_
disk_ stringtype - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data_
disks object - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete_
disks_ boolwith_ instance - delete_
eips_ boolwith_ instance - deletion_
protection bool - disk_
password string - disk_
sets list(object) - It is a nested type which documented below.
- duration number
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - expire_
time string - The expiration time for instance, formatted in RFC3339 time string.
- gpu number
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu_
type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host_
binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug_
feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - image_
id string - The ID for the image to use for the instance.
- instance_
id string - The ID of disk.
- instance_
type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- ip_
sets list(object) - It is a nested type which documented below.
- isolation_
group string - The ID of the associated isolation group.
- key_
pair_ stringid - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels map(string)
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login_
mode string - memory number
- The size of memory, measured in GB(Gigabyte).
- min_
cpu_ stringplatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name string
- net_
capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network_
interface object - private_
ip string - The private IP address assigned to the instance.
- rdma_
cluster_ stringid - The RDMA Cluster ID of instance. This is only available when machine type is
O. - remark string
- The remarks of instance. (Default:
""). - root_
password string - sec_
group_ list(object)ids - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security_
group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security_
mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - subnet_
id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts object
- udhost_
id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset_
id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost_
family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni_
feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - user_
data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc_
id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- alarm
Template DoubleId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow
Stopping BooleanFor Update - auto
Data StringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto
Renew Boolean - Whether to renew an instance automatically or not.
- auto
Start Boolean - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - availability
Zone String - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - boot
Disk DoubleSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot
Disk StringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge
Type String - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon
Id String - The ID of the host coupon to use for payment.
- cpu Double
- The number of cores of virtual CPU, measured in core.
- cpu
Platform String - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create
Time String - The time of creation for instance, formatted in RFC3339 time string.
- data
Disk DoubleSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data
Disk StringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - deletion
Protection Boolean - disk
Password String - disk
Sets List<InstanceDisk Set> - It is a nested type which documented below.
- duration Double
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - expire
Time String - The expiration time for instance, formatted in RFC3339 time string.
- gpu Double
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu
Type String - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host
Binding Boolean - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug
Feature Boolean - Enable the hot upgrade feature of the instance. (Default:
false). - image
Id String - The ID for the image to use for the instance.
- instance
Id String - The ID of disk.
- instance
Type String The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- ip
Sets List<InstanceIp Set> - It is a nested type which documented below.
- isolation
Group String - The ID of the associated isolation group.
- key
Pair StringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels Map<String,String>
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login
Mode String - memory Double
- The size of memory, measured in GB(Gigabyte).
- min
Cpu StringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name String
- net
Capability String - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network
Interface InstanceNetwork Interface - private
Ip String - The private IP address assigned to the instance.
- rdma
Cluster StringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - remark String
- The remarks of instance. (Default:
""). - root
Password String - sec
Group List<InstanceIds Sec Group Id> - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security
Group String - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security
Mode String - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - status String
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - subnet
Id String - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag String
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts
Instance
Timeouts - udhost
Id String - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset
Id String - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost
Family String - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni
Feature Boolean - Enable the elastic network interface feature of the instance. (Default:
false). - user
Data String - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc
Id String - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- alarm
Template numberId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow
Stopping booleanFor Update - auto
Data stringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto
Renew boolean - Whether to renew an instance automatically or not.
- auto
Start boolean - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - availability
Zone string - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - boot
Disk numberSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot
Disk stringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge
Type string - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon
Id string - The ID of the host coupon to use for payment.
- cpu number
- The number of cores of virtual CPU, measured in core.
- cpu
Platform string - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create
Time string - The time of creation for instance, formatted in RFC3339 time string.
- data
Disk numberSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data
Disk stringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete
Disks booleanWith Instance - delete
Eips booleanWith Instance - deletion
Protection boolean - disk
Password string - disk
Sets InstanceDisk Set[] - It is a nested type which documented below.
- duration number
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- gpu number
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu
Type string - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host
Binding boolean - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug
Feature boolean - Enable the hot upgrade feature of the instance. (Default:
false). - image
Id string - The ID for the image to use for the instance.
- instance
Id string - The ID of disk.
- instance
Type string The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- ip
Sets InstanceIp Set[] - It is a nested type which documented below.
- isolation
Group string - The ID of the associated isolation group.
- key
Pair stringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels {[key: string]: string}
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login
Mode string - memory number
- The size of memory, measured in GB(Gigabyte).
- min
Cpu stringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name string
- net
Capability string - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network
Interface InstanceNetwork Interface - private
Ip string - The private IP address assigned to the instance.
- rdma
Cluster stringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - remark string
- The remarks of instance. (Default:
""). - root
Password string - sec
Group InstanceIds Sec Group Id[] - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security
Group string - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security
Mode string - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - status string
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - subnet
Id string - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag string
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts
Instance
Timeouts - udhost
Id string - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset
Id string - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost
Family string - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni
Feature boolean - Enable the elastic network interface feature of the instance. (Default:
false). - user
Data string - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc
Id string - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- alarm_
template_ floatid - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow_
stopping_ boolfor_ update - auto_
data_ strdisk_ init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto_
renew bool - Whether to renew an instance automatically or not.
- auto_
start bool - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - availability_
zone str - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - boot_
disk_ floatsize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot_
disk_ strtype - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge_
type str - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon_
id str - The ID of the host coupon to use for payment.
- cpu float
- The number of cores of virtual CPU, measured in core.
- cpu_
platform str - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create_
time str - The time of creation for instance, formatted in RFC3339 time string.
- data_
disk_ floatsize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data_
disk_ strtype - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data_
disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete_
disks_ boolwith_ instance - delete_
eips_ boolwith_ instance - deletion_
protection bool - disk_
password str - disk_
sets Sequence[InstanceDisk Set Args] - It is a nested type which documented below.
- duration float
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - expire_
time str - The expiration time for instance, formatted in RFC3339 time string.
- gpu float
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu_
type str - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host_
binding bool - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug_
feature bool - Enable the hot upgrade feature of the instance. (Default:
false). - image_
id str - The ID for the image to use for the instance.
- instance_
id str - The ID of disk.
- instance_
type str The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- ip_
sets Sequence[InstanceIp Set Args] - It is a nested type which documented below.
- isolation_
group str - The ID of the associated isolation group.
- key_
pair_ strid - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels Mapping[str, str]
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login_
mode str - memory float
- The size of memory, measured in GB(Gigabyte).
- min_
cpu_ strplatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name str
- net_
capability str - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network_
interface InstanceNetwork Interface Args - private_
ip str - The private IP address assigned to the instance.
- rdma_
cluster_ strid - The RDMA Cluster ID of instance. This is only available when machine type is
O. - remark str
- The remarks of instance. (Default:
""). - root_
password str - sec_
group_ Sequence[Instanceids Sec Group Id Args] - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security_
group str - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security_
mode str - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - status str
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - subnet_
id str - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag str
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts
Instance
Timeouts Args - udhost_
id str - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset_
id str - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost_
family str - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni_
feature bool - Enable the elastic network interface feature of the instance. (Default:
false). - user_
data str - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc_
id str - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
- alarm
Template NumberId - The ID of the alarm template to bind to the instance. Binding failure does not affect instance creation. The value is an integer alarm template ID (range: 1-2147483647).
- allow
Stopping BooleanFor Update - auto
Data StringDisk Init - Whether to automatically partition and mount the data disks when the image supports Cloud-init. Possible values are:
Onfor auto mount (default),Offfor no auto mount. - auto
Renew Boolean - Whether to renew an instance automatically or not.
- auto
Start Boolean - Whether to start the instance immediately after resetting its password or resizing the instance is completed, default is
false. It takes effect only when updatingroot_password,login_mode,key_pair_id,instance_typeornet_capability, and is not supported fordynamic(pay by hour) and preemptible instances. - availability
Zone String - Availability zone where instance is located. such as:
cn-bj2-02. You may refer to list of availability zone - boot
Disk NumberSize The size of the boot disk, measured in GB (GigaByte). Range: 20-500. The value set of disk size must be larger or equal to
20(default:20) for Linux and40(default:40) for Windows. The responsive time is a bit longer if the value set is larger than default for local boot disk, and further settings may be required on host instance if the value set is larger than default for cloud boot disk. The disk volume adjustment must be a multiple of 10 GB. In addition, any reduction of boot disk size is not supported.Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- boot
Disk StringType - The type of boot disk. Possible values are:
local_normalandlocal_ssdfor local boot disk,cloud_ssdfor cloud SSD boot disk,cloud_rssdas RDMA-SSD cloud disk. (Default:local_normal). Thelocal_ssdandcloud_ssdare not fully support by all regions as boot disk type, please proceed to UCloud console for more details. - charge
Type String - The charge type of instance, possible values are:
year,monthanddynamicas pay by hour (specific permission required). (Default:month). - coupon
Id String - The ID of the host coupon to use for payment.
- cpu Number
- The number of cores of virtual CPU, measured in core.
- cpu
Platform String - The CPU platform of the instance, e.g.
Intel/Cascadelake. - create
Time String - The time of creation for instance, formatted in RFC3339 time string.
- data
Disk NumberSize The size of local data disk, measured in GB (GigaByte), 20-2000 for local sata disk and 20-1000 for local ssd disk (all the GPU type instances are included). The volume adjustment must be a multiple of 10 GB. In addition, any reduction of data disk size is not supported.
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue. In addition, when it is changed, you need to go to the instance for configuration.- data
Disk StringType - The type of local data disk. Possible values are:
local_normalandlocal_ssdfor local data disk. (Default:local_normal). Thelocal_ssdis not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_typemust be same asboot_disk_typeif specified. - data
Disks Property Map - Additional cloud data disks to attach to the instance.
data_disksconfigurations only apply on resource creation. The count ofdata_diskscan only be one. See data_disks below for details on attributes. When setdata_disks, the argumentdelete_disks_with_instancemust bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - deletion
Protection Boolean - disk
Password String - disk
Sets List<Property Map> - It is a nested type which documented below.
- duration Number
- The duration that you will buy the instance (Default:
1, range: 0-9). The value is0when pay by month and the instance will be valid till the last day of that month, and it is invalid whencharge_typeisyearordynamic. It is not required whendynamic(pay by hour). - expire
Time String - The expiration time for instance, formatted in RFC3339 time string.
- gpu Number
- The count of GPU cores, range: 1-8, only supported by GPU machine types.
- gpu
Type String - The type of GPU, required when the machine type is
G. Possible values are:K80,P40,V100,V100S,T4,T4A,T4S,2080,2080Ti,2080Ti-4C,2080TiS,2080TiPro,1080Ti,3080Ti,3090,4090,4090Pro,4090_48G,4090LD,5090,5090Pro,BR104P,MR-V100,A100,A800,H20,H800. - host
Binding Boolean - Whether to bind the dedicated zone instance to the dedicated host. It requires
udset_idto be set. (Default:false). - hotplug
Feature Boolean - Enable the hot upgrade feature of the instance. (Default:
false). - image
Id String - The ID for the image to use for the instance.
- instance
Id String - The ID of disk.
- instance
Type String The type of instance, please visit the instance type table
Note If you want to update this value, you must set
allow_stopping_for_updatetotrue.- ip
Sets List<Property Map> - It is a nested type which documented below.
- isolation
Group String - The ID of the associated isolation group.
- key
Pair StringId - The ID of the key pair used when
login_modeisKeyPair. This argument is required whenlogin_modeisKeyPair, and cannot be used whenlogin_modeisPassword. - labels Map<String>
- User resource labels to attach to the instance on creation, given as a key/value map. The label key and value should comply with the label specification. Changing labels after creation is not supported here; use the
ucloud.LabelAttachmentresource to manage labels of an existing instance. - login
Mode String - memory Number
- The size of memory, measured in GB(Gigabyte).
- min
Cpu StringPlatform - Specifies a minimum CPU platform for the the VM instance. (Default:
Intel/Auto). You may refer to product documentation and API documentation. - name String
- net
Capability String - The network enhancement feature of the instance. Possible values are:
normalfor no enhancement,superfor network enhancement 1.0,ultrafor network enhancement 2.0,extremefor network enhancement 3.0. (Default:normal). It can only be changed betweennormaland an enhancement level in place (upgrade or downgrade throughResizeUHostInstance); switching between enhancement levels requires rebuilding the instance. Updating it to a value other thannormalrequires stopping the instance, please setallow_stopping_for_updatetotrueto acknowledge it, and the instance is restarted automatically after the update whenauto_startistrue. - network
Interface Property Map - private
Ip String - The private IP address assigned to the instance.
- rdma
Cluster StringId - The RDMA Cluster ID of instance. This is only available when machine type is
O. - remark String
- The remarks of instance. (Default:
""). - root
Password String - sec
Group List<Property Map>Ids - A list of security group bindings, up to 5. Only takes effect when
security_modeisSecGroup, and it is required whensecurity_modeisSecGroup; at least one binding must be kept when updating. Each item supportsid(security group ID) andpriority(binding priority, range: 1-5). - security
Group String - The ID of the associated security group (firewall). Only takes effect when
security_modeis not set or set toFirewall. - security
Mode String - The security mode of instance. Possible values are:
FirewallandSecGroup. If not set, the instance will useFirewallmode by default for backward compatibility. - status String
- Instance current status. Possible values are
Initializing,Starting,Running,Stopping,Stopped,Install Fail,ResizeFail,RebootingandNetworkModeSwitching. - subnet
Id String - The ID of subnet. If defined
vpc_id, thesubnet_idis Required. If not definedvpc_idandsubnet_id, the instance will use the default subnet in the current region. - tag String
- A tag assigned to instance, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default). - timeouts Property Map
- udhost
Id String - The ID of the dedicated host (UDHost) inside the private dedicated zone on which the instance is created. It requires
udset_idto be set. - udset
Id String - The ID of the private dedicated zone (UDSet) in which the instance is created. It is required by other dedicated zone arguments, and cannot be changed once the instance is created.
- uhost
Family String - The instance family, composed of the machine type code and CPU platform. Possible values for machine type
O:o1i(O1, Intel),o1a(O1, AMD),o1r(O1, ARM),o1h,o2i(O2, Intel),o2a; for machine typeOM:om1i,om1a,om2i; for performance-optimized machine types:opro1a,opro2a,oprog1i,oprog2i,oprog1a. The family must match the machine type, otherwise the request is rejected. - uni
Feature Boolean - Enable the elastic network interface feature of the instance. (Default:
false). - user
Data String - The user data to customize the startup behaviors when launching the instance, up to 16384 characters. The image must support the
CloudInitfeature, otherwise instance creation fails. You may refer to user_data_document - vpc
Id String - The ID of VPC linked to the instance. If not defined
vpc_id, the instance will use the default VPC in the current region.
Supporting Types
InstanceDataDisks, InstanceDataDisksArgs
InstanceDiskSet, InstanceDiskSetArgs
InstanceIpSet, InstanceIpSetArgs
- Internet
Type string - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - Ip string
- Elastic IP address.
- Internet
Type string - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - Ip string
- Elastic IP address.
- internet_
type string - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - ip string
- Elastic IP address.
- internet
Type String - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - ip String
- Elastic IP address.
- internet
Type string - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - ip string
- Elastic IP address.
- internet_
type str - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - ip str
- Elastic IP address.
- internet
Type String - Type of Elastic IP routes. Possible values are:
Internationalas international BGP IP,BGPas china BGP IP andPrivateas private IP. - ip String
- Elastic IP address.
InstanceNetworkInterface, InstanceNetworkInterfaceArgs
- Eip
Bandwidth double - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- Eip
Charge stringMode - Eip
Internet stringType - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
- Eip
Bandwidth float64 - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- Eip
Charge stringMode - Eip
Internet stringType - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
- eip_
bandwidth number - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- eip_
charge_ stringmode - eip_
internet_ stringtype - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
- eip
Bandwidth Double - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- eip
Charge StringMode - eip
Internet StringType - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
- eip
Bandwidth number - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- eip
Charge stringMode - eip
Internet stringType - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
- eip_
bandwidth float - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- eip_
charge_ strmode - eip_
internet_ strtype - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
- eip
Bandwidth Number - Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). The ranges for bandwidth are: 1-200 for pay by traffic, 1-800 for pay by bandwidth.
- eip
Charge StringMode - eip
Internet StringType - Type of Elastic IP routes. Possible values are:
internationalas international BGP IP andbgpas china mainland BGP IP.
InstanceSecGroupId, InstanceSecGroupIdArgs
InstanceTimeouts, InstanceTimeoutsArgs
Import
Instance can be imported using the id, e.g.
$ pulumi import ucloud:index/instance:Instance example uhost-abcdefg
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.
published on Tuesday, Oct 27, 2026 by ucloud