ucloud.Instance
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const _default = ucloud.getSecurityGroups({
type: "recommend_web",
});
const normalImages = ucloud.getImages({
availabilityZone: "cn-bj2-03",
nameRegex: "^CentOS 6.5 64",
imageType: "base",
});
// Create normal instance
const normalInstance = new ucloud.Instance("normalInstance", {
availabilityZone: "cn-bj2-03",
imageId: normalImages.then(normalImages => normalImages.images?.[0]?.id),
instanceType: "n-basic-2",
rootPassword: "wA1234567",
tag: "tf-example",
bootDiskType: "cloud_ssd",
securityGroup: _default.then(_default => _default.securityGroups?.[0]?.id),
dataDisks: {
size: 20,
type: "cloud_ssd",
},
deleteDisksWithInstance: true,
});
const outstandingImages = ucloud.getImages({
availabilityZone: "cn-bj2-03",
nameRegex: "^高内核CentOS 7.6 64",
imageType: "base",
});
// Create outstanding instance
const outstandingInstance = new ucloud.Instance("outstandingInstance", {
availabilityZone: "cn-bj2-03",
imageId: outstandingImages.then(outstandingImages => outstandingImages.images?.[0]?.id),
instanceType: "o-basic-4",
rootPassword: "wA1234567",
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
default = ucloud.get_security_groups(type="recommend_web")
normal_images = ucloud.get_images(availability_zone="cn-bj2-03",
name_regex="^CentOS 6.5 64",
image_type="base")
# Create normal instance
normal_instance = ucloud.Instance("normalInstance",
availability_zone="cn-bj2-03",
image_id=normal_images.images[0].id,
instance_type="n-basic-2",
root_password="wA1234567",
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)
outstanding_images = ucloud.get_images(availability_zone="cn-bj2-03",
name_regex="^高内核CentOS 7.6 64",
image_type="base")
# Create outstanding instance
outstanding_instance = ucloud.Instance("outstandingInstance",
availability_zone="cn-bj2-03",
image_id=outstanding_images.images[0].id,
instance_type="o-basic-4",
root_password="wA1234567",
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 {
_default, err := ucloud.GetSecurityGroups(ctx, &ucloud.GetSecurityGroupsArgs{
Type: pulumi.StringRef("recommend_web"),
}, nil)
if err != nil {
return err
}
normalImages, 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, "normalInstance", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-03"),
ImageId: pulumi.String(normalImages.Images[0].Id),
InstanceType: pulumi.String("n-basic-2"),
RootPassword: pulumi.String("wA1234567"),
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
}
outstandingImages, 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, "outstandingInstance", &ucloud.InstanceArgs{
AvailabilityZone: pulumi.String("cn-bj2-03"),
ImageId: pulumi.String(outstandingImages.Images[0].Id),
InstanceType: pulumi.String("o-basic-4"),
RootPassword: pulumi.String("wA1234567"),
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(() =>
{
var @default = Ucloud.GetSecurityGroups.Invoke(new()
{
Type = "recommend_web",
});
var normalImages = Ucloud.GetImages.Invoke(new()
{
AvailabilityZone = "cn-bj2-03",
NameRegex = "^CentOS 6.5 64",
ImageType = "base",
});
// Create normal instance
var normalInstance = new Ucloud.Instance("normalInstance", new()
{
AvailabilityZone = "cn-bj2-03",
ImageId = normalImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = "n-basic-2",
RootPassword = "wA1234567",
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,
});
var outstandingImages = Ucloud.GetImages.Invoke(new()
{
AvailabilityZone = "cn-bj2-03",
NameRegex = "^高内核CentOS 7.6 64",
ImageType = "base",
});
// Create outstanding instance
var outstandingInstance = new Ucloud.Instance("outstandingInstance", new()
{
AvailabilityZone = "cn-bj2-03",
ImageId = outstandingImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = "o-basic-4",
RootPassword = "wA1234567",
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 java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = UcloudFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
.type("recommend_web")
.build());
final var normalImages = 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(normalImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType("n-basic-2")
.rootPassword("wA1234567")
.tag("tf-example")
.bootDiskType("cloud_ssd")
.securityGroup(default_.securityGroups()[0].id())
.dataDisks(InstanceDataDisksArgs.builder()
.size(20)
.type("cloud_ssd")
.build())
.deleteDisksWithInstance(true)
.build());
final var outstandingImages = 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(outstandingImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType("o-basic-4")
.rootPassword("wA1234567")
.tag("tf-example")
.bootDiskType("cloud_rssd")
.securityGroup(default_.securityGroups()[0].id())
.dataDisks(InstanceDataDisksArgs.builder()
.size(20)
.type("cloud_rssd")
.build())
.deleteDisksWithInstance(true)
.build());
}
}
resources:
# Create normal instance
normalInstance:
type: ucloud:Instance
properties:
availabilityZone: cn-bj2-03
imageId: ${normalImages.images[0].id}
instanceType: n-basic-2
rootPassword: wA1234567
tag: tf-example
bootDiskType: cloud_ssd
# the default Web Security Group that UCloud recommend to users
securityGroup: ${default.securityGroups[0].id}
dataDisks:
size: 20
type: cloud_ssd
deleteDisksWithInstance: true
# Create outstanding instance
outstandingInstance:
type: ucloud:Instance
properties:
availabilityZone: cn-bj2-03
imageId: ${outstandingImages.images[0].id}
instanceType: o-basic-4
rootPassword: wA1234567
tag: tf-example
bootDiskType: cloud_rssd
# the default Web Security Group that UCloud recommend to users
securityGroup: ${default.securityGroups[0].id}
dataDisks:
size: 20
type: cloud_rssd
deleteDisksWithInstance: true
variables:
default:
fn::invoke:
function: ucloud:getSecurityGroups
arguments:
type: recommend_web
normalImages:
fn::invoke:
function: ucloud:getImages
arguments:
availabilityZone: cn-bj2-03
nameRegex: ^CentOS 6.5 64
imageType: base
outstandingImages:
fn::invoke:
function: ucloud:getImages
arguments:
availabilityZone: cn-bj2-03
nameRegex: ^高内核CentOS 7.6 64
imageType: base
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
image_id: Optional[str] = None,
availability_zone: Optional[str] = None,
instance_type: Optional[str] = None,
instance_id: Optional[str] = None,
isolation_group: 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,
duration: Optional[float] = None,
boot_disk_type: Optional[str] = None,
allow_stopping_for_update: Optional[bool] = None,
boot_disk_size: Optional[float] = None,
charge_type: Optional[str] = None,
min_cpu_platform: Optional[str] = None,
name: Optional[str] = None,
network_interface: Optional[InstanceNetworkInterfaceArgs] = None,
private_ip: Optional[str] = None,
remark: Optional[str] = None,
root_password: Optional[str] = None,
security_group: Optional[str] = None,
subnet_id: Optional[str] = None,
tag: Optional[str] = None,
timeouts: Optional[InstanceTimeoutsArgs] = 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.
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()
{
ImageId = "string",
AvailabilityZone = "string",
InstanceType = "string",
InstanceId = "string",
IsolationGroup = "string",
DataDiskSize = 0,
DataDiskType = "string",
DataDisks = new Ucloud.Inputs.InstanceDataDisksArgs
{
Size = 0,
Type = "string",
},
DeleteDisksWithInstance = false,
DeleteEipsWithInstance = false,
Duration = 0,
BootDiskType = "string",
AllowStoppingForUpdate = false,
BootDiskSize = 0,
ChargeType = "string",
MinCpuPlatform = "string",
Name = "string",
NetworkInterface = new Ucloud.Inputs.InstanceNetworkInterfaceArgs
{
EipBandwidth = 0,
EipChargeMode = "string",
EipInternetType = "string",
},
PrivateIp = "string",
Remark = "string",
RootPassword = "string",
SecurityGroup = "string",
SubnetId = "string",
Tag = "string",
Timeouts = new Ucloud.Inputs.InstanceTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
UserData = "string",
VpcId = "string",
});
example, err := ucloud.NewInstance(ctx, "instanceResource", &ucloud.InstanceArgs{
ImageId: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
InstanceType: pulumi.String("string"),
InstanceId: pulumi.String("string"),
IsolationGroup: 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),
Duration: pulumi.Float64(0),
BootDiskType: pulumi.String("string"),
AllowStoppingForUpdate: pulumi.Bool(false),
BootDiskSize: pulumi.Float64(0),
ChargeType: pulumi.String("string"),
MinCpuPlatform: pulumi.String("string"),
Name: 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"),
SecurityGroup: 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"),
},
UserData: pulumi.String("string"),
VpcId: pulumi.String("string"),
})
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
.imageId("string")
.availabilityZone("string")
.instanceType("string")
.instanceId("string")
.isolationGroup("string")
.dataDiskSize(0)
.dataDiskType("string")
.dataDisks(InstanceDataDisksArgs.builder()
.size(0)
.type("string")
.build())
.deleteDisksWithInstance(false)
.deleteEipsWithInstance(false)
.duration(0)
.bootDiskType("string")
.allowStoppingForUpdate(false)
.bootDiskSize(0)
.chargeType("string")
.minCpuPlatform("string")
.name("string")
.networkInterface(InstanceNetworkInterfaceArgs.builder()
.eipBandwidth(0)
.eipChargeMode("string")
.eipInternetType("string")
.build())
.privateIp("string")
.remark("string")
.rootPassword("string")
.securityGroup("string")
.subnetId("string")
.tag("string")
.timeouts(InstanceTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.userData("string")
.vpcId("string")
.build());
instance_resource = ucloud.Instance("instanceResource",
image_id="string",
availability_zone="string",
instance_type="string",
instance_id="string",
isolation_group="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,
duration=0,
boot_disk_type="string",
allow_stopping_for_update=False,
boot_disk_size=0,
charge_type="string",
min_cpu_platform="string",
name="string",
network_interface={
"eip_bandwidth": 0,
"eip_charge_mode": "string",
"eip_internet_type": "string",
},
private_ip="string",
remark="string",
root_password="string",
security_group="string",
subnet_id="string",
tag="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
user_data="string",
vpc_id="string")
const instanceResource = new ucloud.Instance("instanceResource", {
imageId: "string",
availabilityZone: "string",
instanceType: "string",
instanceId: "string",
isolationGroup: "string",
dataDiskSize: 0,
dataDiskType: "string",
dataDisks: {
size: 0,
type: "string",
},
deleteDisksWithInstance: false,
deleteEipsWithInstance: false,
duration: 0,
bootDiskType: "string",
allowStoppingForUpdate: false,
bootDiskSize: 0,
chargeType: "string",
minCpuPlatform: "string",
name: "string",
networkInterface: {
eipBandwidth: 0,
eipChargeMode: "string",
eipInternetType: "string",
},
privateIp: "string",
remark: "string",
rootPassword: "string",
securityGroup: "string",
subnetId: "string",
tag: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
userData: "string",
vpcId: "string",
});
type: ucloud:Instance
properties:
allowStoppingForUpdate: false
availabilityZone: string
bootDiskSize: 0
bootDiskType: string
chargeType: string
dataDiskSize: 0
dataDiskType: string
dataDisks:
size: 0
type: string
deleteDisksWithInstance: false
deleteEipsWithInstance: false
duration: 0
imageId: string
instanceId: string
instanceType: string
isolationGroup: string
minCpuPlatform: string
name: string
networkInterface:
eipBandwidth: 0
eipChargeMode: string
eipInternetType: string
privateIp: string
remark: string
rootPassword: string
securityGroup: string
subnetId: string
tag: string
timeouts:
create: string
delete: string
update: string
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_update
totrue
.- Allow
Stopping boolFor Update - 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - Data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - Duration double
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - Instance
Id string - The ID of disk.
- Isolation
Group string - The ID of the associated isolation group.
- 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
- 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 - Security
Group string - The ID of the associated security group.
- Subnet
Id string - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - User
Data string - The user data to customize the startup behaviors when launching the instance. 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_update
totrue
.- Allow
Stopping boolFor Update - 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - Data
Disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - Duration float64
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - Instance
Id string - The ID of disk.
- Isolation
Group string - The ID of the associated isolation group.
- 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
- 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 - Security
Group string - The ID of the associated security group.
- Subnet
Id string - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - User
Data string - The user data to customize the startup behaviors when launching the instance. 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_update
totrue
.- allow
Stopping BooleanFor Update - 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - duration Double
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - instance
Id String - The ID of disk.
- isolation
Group String - The ID of the associated isolation group.
- 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
- 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 - security
Group String - The ID of the associated security group.
- subnet
Id String - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - user
Data String - The user data to customize the startup behaviors when launching the instance. 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_update
totrue
.- allow
Stopping booleanFor Update - 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete
Disks booleanWith Instance - delete
Eips booleanWith Instance - duration number
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - instance
Id string - The ID of disk.
- isolation
Group string - The ID of the associated isolation group.
- 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
- 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 - security
Group string - The ID of the associated security group.
- subnet
Id string - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - user
Data string - The user data to customize the startup behaviors when launching the instance. 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_update
totrue
.- allow_
stopping_ boolfor_ update - 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data_
disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete_
disks_ boolwith_ instance - delete_
eips_ boolwith_ instance - duration float
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - instance_
id str - The ID of disk.
- isolation_
group str - The ID of the associated isolation group.
- 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
- 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 - security_
group str - The ID of the associated security group.
- subnet_
id str - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - user_
data str - The user data to customize the startup behaviors when launching the instance. 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_update
totrue
.- allow
Stopping BooleanFor Update - 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data
Disks Property Map - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - duration Number
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - instance
Id String - The ID of disk.
- isolation
Group String - The ID of the associated isolation group.
- 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
- 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 - security
Group String - The ID of the associated security group.
- subnet
Id String - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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
- user
Data String - The user data to customize the startup behaviors when launching the instance. 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 - 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
andRebooting
.
- 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 - 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
andRebooting
.
- 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 - 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
andRebooting
.
- 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 - 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
andRebooting
.
- 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 - 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
andRebooting
.
- 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 - 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
andRebooting
.
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,
allow_stopping_for_update: Optional[bool] = None,
auto_renew: 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,
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,
disk_sets: Optional[Sequence[InstanceDiskSetArgs]] = None,
duration: Optional[float] = None,
expire_time: Optional[str] = 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,
memory: Optional[float] = None,
min_cpu_platform: Optional[str] = None,
name: 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,
security_group: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tag: Optional[str] = None,
timeouts: Optional[InstanceTimeoutsArgs] = None,
user_data: Optional[str] = None,
vpc_id: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
resources: _: type: ucloud:Instance get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allow
Stopping boolFor Update - Auto
Renew bool - Whether to renew an instance automatically or not.
- 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - Cpu double
- The number of cores of virtual CPU, measured in core.
- Cpu
Platform string - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - Data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - 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
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - Expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- 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_update
totrue
.- Ip
Sets List<InstanceIp Set> - It is a nested type which documented below.
- Isolation
Group string - The ID of the associated isolation group.
- 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
- 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 - Security
Group string - The ID of the associated security group.
- Status string
- Instance current status. Possible values are
Initializing
,Starting
,Running
,Stopping
,Stopped
,Install Fail
,ResizeFail
andRebooting
. - Subnet
Id string - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - User
Data string - The user data to customize the startup behaviors when launching the instance. 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.
- Allow
Stopping boolFor Update - Auto
Renew bool - Whether to renew an instance automatically or not.
- 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - Cpu float64
- The number of cores of virtual CPU, measured in core.
- Cpu
Platform string - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - Data
Disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - Delete
Disks boolWith Instance - Delete
Eips boolWith Instance - 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
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - Expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- 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_update
totrue
.- Ip
Sets []InstanceIp Set Args - It is a nested type which documented below.
- Isolation
Group string - The ID of the associated isolation group.
- 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
- 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 - Security
Group string - The ID of the associated security group.
- Status string
- Instance current status. Possible values are
Initializing
,Starting
,Running
,Stopping
,Stopped
,Install Fail
,ResizeFail
andRebooting
. - Subnet
Id string - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - User
Data string - The user data to customize the startup behaviors when launching the instance. 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.
- allow
Stopping BooleanFor Update - auto
Renew Boolean - Whether to renew an instance automatically or not.
- 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - cpu Double
- The number of cores of virtual CPU, measured in core.
- cpu
Platform String - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - 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
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - expire
Time String - The expiration time for instance, formatted in RFC3339 time string.
- 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_update
totrue
.- ip
Sets List<InstanceIp Set> - It is a nested type which documented below.
- isolation
Group String - The ID of the associated isolation group.
- 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
- 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 - security
Group String - The ID of the associated security group.
- status String
- Instance current status. Possible values are
Initializing
,Starting
,Running
,Stopping
,Stopped
,Install Fail
,ResizeFail
andRebooting
. - subnet
Id String - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - user
Data String - The user data to customize the startup behaviors when launching the instance. 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.
- allow
Stopping booleanFor Update - auto
Renew boolean - Whether to renew an instance automatically or not.
- 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - cpu number
- The number of cores of virtual CPU, measured in core.
- cpu
Platform string - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data
Disks InstanceData Disks - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete
Disks booleanWith Instance - delete
Eips booleanWith Instance - disk
Sets InstanceDisk Set[] - It is a nested type which documented below.
- duration number
- The duration that you will buy the instance (Default:
1
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - expire
Time string - The expiration time for instance, formatted in RFC3339 time string.
- 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_update
totrue
.- ip
Sets InstanceIp Set[] - It is a nested type which documented below.
- isolation
Group string - The ID of the associated isolation group.
- 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
- 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 - security
Group string - The ID of the associated security group.
- status string
- Instance current status. Possible values are
Initializing
,Starting
,Running
,Stopping
,Stopped
,Install Fail
,ResizeFail
andRebooting
. - subnet
Id string - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - user
Data string - The user data to customize the startup behaviors when launching the instance. 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.
- allow_
stopping_ boolfor_ update - auto_
renew bool - Whether to renew an instance automatically or not.
- 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - cpu float
- The number of cores of virtual CPU, measured in core.
- cpu_
platform str - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data_
disks InstanceData Disks Args - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete_
disks_ boolwith_ instance - delete_
eips_ boolwith_ instance - 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
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - expire_
time str - The expiration time for instance, formatted in RFC3339 time string.
- 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_update
totrue
.- ip_
sets Sequence[InstanceIp Set Args] - It is a nested type which documented below.
- isolation_
group str - The ID of the associated isolation group.
- 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
- 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 - security_
group str - The ID of the associated security group.
- status str
- Instance current status. Possible values are
Initializing
,Starting
,Running
,Stopping
,Stopped
,Install Fail
,ResizeFail
andRebooting
. - subnet_
id str - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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 - user_
data str - The user data to customize the startup behaviors when launching the instance. 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.
- allow
Stopping BooleanFor Update - auto
Renew Boolean - Whether to renew an instance automatically or not.
- 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_update
totrue
. 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_normal
andlocal_ssd
for local boot disk,cloud_ssd
for cloud SSD boot disk,rssd_data_disk
as RDMA-SSD cloud disk. (Default:local_normal
). Thelocal_ssd
andcloud_ssd
are 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
,month
anddynamic
as pay by hour (specific permission required). (Default:month
). - cpu Number
- The number of cores of virtual CPU, measured in core.
- cpu
Platform String - 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_update
totrue
. 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_normal
andlocal_ssd
for local data disk. (Default:local_normal
). Thelocal_ssd
is not fully support by all regions as data disk type, please proceed to UCloud console for more details. In addition, thedata_disk_type
must be same asboot_disk_type
if specified. - data
Disks Property Map - Additional cloud data disks to attach to the instance.
data_disks
configurations only apply on resource creation. The count ofdata_disks
can only be one. See data_disks below for details on attributes. When setdata_disks
, the argumentdelete_disks_with_instance
must bet set. - delete
Disks BooleanWith Instance - delete
Eips BooleanWith Instance - 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
). The value is0
when pay by month and the instance will be valid till the last day of that month. It is not required whendynamic
(pay by hour). - expire
Time String - The expiration time for instance, formatted in RFC3339 time string.
- 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_update
totrue
.- ip
Sets List<Property Map> - It is a nested type which documented below.
- isolation
Group String - The ID of the associated isolation group.
- 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
- 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 - security
Group String - The ID of the associated security group.
- status String
- Instance current status. Possible values are
Initializing
,Starting
,Running
,Stopping
,Stopped
,Install Fail
,ResizeFail
andRebooting
. - subnet
Id String - The ID of subnet. If defined
vpc_id
, thesubnet_id
is Required. If not definedvpc_id
andsubnet_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
- user
Data String - The user data to customize the startup behaviors when launching the instance. 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:
International
as international BGP IP,BGP
as china BGP IP andPrivate
as private IP. - Ip string
- Elastic IP address.
- Internet
Type string - Type of Elastic IP routes. Possible values are:
International
as international BGP IP,BGP
as china BGP IP andPrivate
as private IP. - Ip string
- Elastic IP address.
- internet
Type String - Type of Elastic IP routes. Possible values are:
International
as international BGP IP,BGP
as china BGP IP andPrivate
as private IP. - ip String
- Elastic IP address.
- internet
Type string - Type of Elastic IP routes. Possible values are:
International
as international BGP IP,BGP
as china BGP IP andPrivate
as private IP. - ip string
- Elastic IP address.
- internet_
type str - Type of Elastic IP routes. Possible values are:
International
as international BGP IP,BGP
as china BGP IP andPrivate
as private IP. - ip str
- Elastic IP address.
- internet
Type String - Type of Elastic IP routes. Possible values are:
International
as international BGP IP,BGP
as china BGP IP andPrivate
as 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:
international
as international BGP IP andbgp
as 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:
international
as international BGP IP andbgp
as 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:
international
as international BGP IP andbgp
as 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:
international
as international BGP IP andbgp
as 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:
international
as international BGP IP andbgp
as 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:
international
as international BGP IP andbgp
as china mainland BGP IP.
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
ucloud
Terraform Provider.