tencentcloud.Instance
Explore with Pulumi AI
Provides a CVM instance resource.
NOTE: You can launch an CVM instance for a VPC network via specifying parameter
vpc_id
. One instance can only belong to one VPC.
NOTE: At present, ‘PREPAID’ instance cannot be deleted directly and must wait it to be outdated and released automatically.
Example Usage
Create a general POSTPAID_BY_HOUR CVM instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
const images = tencentcloud.getImages({
imageTypes: ["PUBLIC_IMAGE"],
imageNameRegex: "OpenCloudOS Server",
});
const types = tencentcloud.getInstanceTypes({
filters: [{
name: "instance-family",
values: [
"S1",
"S2",
"S3",
"S4",
"S5",
],
}],
cpuCoreCount: 2,
excludeSoldOut: true,
});
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
});
// create CVM instance
const example = new tencentcloud.Instance("example", {
instanceName: "tf-example",
availabilityZone: availabilityZone,
imageId: images.then(images => images.images?.[0]?.imageId),
instanceType: types.then(types => types.instanceTypes?.[0]?.instanceType),
systemDiskType: "CLOUD_PREMIUM",
systemDiskSize: 50,
hostname: "user",
projectId: 0,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
dataDisks: [{
dataDiskType: "CLOUD_PREMIUM",
dataDiskSize: 50,
encrypt: false,
}],
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
images = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
image_name_regex="OpenCloudOS Server")
types = tencentcloud.get_instance_types(filters=[{
"name": "instance-family",
"values": [
"S1",
"S2",
"S3",
"S4",
"S5",
],
}],
cpu_core_count=2,
exclude_sold_out=True)
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24")
# create CVM instance
example = tencentcloud.Instance("example",
instance_name="tf-example",
availability_zone=availability_zone,
image_id=images.images[0].image_id,
instance_type=types.instance_types[0].instance_type,
system_disk_type="CLOUD_PREMIUM",
system_disk_size=50,
hostname="user",
project_id=0,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
data_disks=[{
"data_disk_type": "CLOUD_PREMIUM",
"data_disk_size": 50,
"encrypt": False,
}],
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
images, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
ImageTypes: []string{
"PUBLIC_IMAGE",
},
ImageNameRegex: pulumi.StringRef("OpenCloudOS Server"),
}, nil)
if err != nil {
return err
}
types, err := tencentcloud.GetInstanceTypes(ctx, &tencentcloud.GetInstanceTypesArgs{
Filters: []tencentcloud.GetInstanceTypesFilter{
{
Name: "instance-family",
Values: []string{
"S1",
"S2",
"S3",
"S4",
"S5",
},
},
},
CpuCoreCount: pulumi.Float64Ref(2),
ExcludeSoldOut: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
// create CVM instance
_, err = tencentcloud.NewInstance(ctx, "example", &tencentcloud.InstanceArgs{
InstanceName: pulumi.String("tf-example"),
AvailabilityZone: pulumi.String(availabilityZone),
ImageId: pulumi.String(images.Images[0].ImageId),
InstanceType: pulumi.String(types.InstanceTypes[0].InstanceType),
SystemDiskType: pulumi.String("CLOUD_PREMIUM"),
SystemDiskSize: pulumi.Float64(50),
Hostname: pulumi.String("user"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
DataDisks: tencentcloud.InstanceDataDiskArray{
&tencentcloud.InstanceDataDiskArgs{
DataDiskType: pulumi.String("CLOUD_PREMIUM"),
DataDiskSize: pulumi.Float64(50),
Encrypt: pulumi.Bool(false),
},
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
var images = Tencentcloud.GetImages.Invoke(new()
{
ImageTypes = new[]
{
"PUBLIC_IMAGE",
},
ImageNameRegex = "OpenCloudOS Server",
});
var types = Tencentcloud.GetInstanceTypes.Invoke(new()
{
Filters = new[]
{
new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
{
Name = "instance-family",
Values = new[]
{
"S1",
"S2",
"S3",
"S4",
"S5",
},
},
},
CpuCoreCount = 2,
ExcludeSoldOut = true,
});
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
});
// create CVM instance
var example = new Tencentcloud.Instance("example", new()
{
InstanceName = "tf-example",
AvailabilityZone = availabilityZone,
ImageId = images.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
InstanceType = types.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.InstanceType),
SystemDiskType = "CLOUD_PREMIUM",
SystemDiskSize = 50,
Hostname = "user",
ProjectId = 0,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
DataDisks = new[]
{
new Tencentcloud.Inputs.InstanceDataDiskArgs
{
DataDiskType = "CLOUD_PREMIUM",
DataDiskSize = 50,
Encrypt = false,
},
},
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.inputs.GetInstanceTypesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Instance;
import com.pulumi.tencentcloud.InstanceArgs;
import com.pulumi.tencentcloud.inputs.InstanceDataDiskArgs;
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 config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
final var images = TencentcloudFunctions.getImages(GetImagesArgs.builder()
.imageTypes("PUBLIC_IMAGE")
.imageNameRegex("OpenCloudOS Server")
.build());
final var types = TencentcloudFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.filters(GetInstanceTypesFilterArgs.builder()
.name("instance-family")
.values(
"S1",
"S2",
"S3",
"S4",
"S5")
.build())
.cpuCoreCount(2)
.excludeSoldOut(true)
.build());
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.build());
// create CVM instance
var example = new Instance("example", InstanceArgs.builder()
.instanceName("tf-example")
.availabilityZone(availabilityZone)
.imageId(images.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
.instanceType(types.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].instanceType()))
.systemDiskType("CLOUD_PREMIUM")
.systemDiskSize(50)
.hostname("user")
.projectId(0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.dataDisks(InstanceDataDiskArgs.builder()
.dataDiskType("CLOUD_PREMIUM")
.dataDiskSize(50)
.encrypt(false)
.build())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
# create CVM instance
example:
type: tencentcloud:Instance
properties:
instanceName: tf-example
availabilityZone: ${availabilityZone}
imageId: ${images.images[0].imageId}
instanceType: ${types.instanceTypes[0].instanceType}
systemDiskType: CLOUD_PREMIUM
systemDiskSize: 50
hostname: user
projectId: 0
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
dataDisks:
- dataDiskType: CLOUD_PREMIUM
dataDiskSize: 50
encrypt: false
tags:
tagKey: tagValue
variables:
images:
fn::invoke:
function: tencentcloud:getImages
arguments:
imageTypes:
- PUBLIC_IMAGE
imageNameRegex: OpenCloudOS Server
types:
fn::invoke:
function: tencentcloud:getInstanceTypes
arguments:
filters:
- name: instance-family
values:
- S1
- S2
- S3
- S4
- S5
cpuCoreCount: 2
excludeSoldOut: true
Create a general PREPAID CVM instance
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.inputs.GetInstanceTypesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Instance;
import com.pulumi.tencentcloud.InstanceArgs;
import com.pulumi.tencentcloud.inputs.InstanceDataDiskArgs;
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 config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
final var images = TencentcloudFunctions.getImages(GetImagesArgs.builder()
.imageTypes("PUBLIC_IMAGE")
.imageNameRegex("OpenCloudOS Server")
.build());
final var types = TencentcloudFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.filters(GetInstanceTypesFilterArgs.builder()
.name("instance-family")
.values(
"S1",
"S2",
"S3",
"S4",
"S5")
.build())
.cpuCoreCount(2)
.excludeSoldOut(true)
.build());
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.build());
// create CVM instance
var example = new Instance("example", InstanceArgs.builder()
.instanceName("tf-example")
.availabilityZone(availabilityZone)
.imageId(images.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
.instanceType(types.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].instanceType()))
.systemDiskType("CLOUD_PREMIUM")
.systemDiskSize(50)
.hostname("user")
.projectId(0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.instanceChargeType("PREPAID")
.instanceChargeTypePrepaidPeriod(1)
.instanceChargeTypePrepaidRenewFlag("NOTIFY_AND_MANUAL_RENEW")
.forceDelete(true)
.dataDisks(InstanceDataDiskArgs.builder()
.dataDiskType("CLOUD_PREMIUM")
.dataDiskSize(50)
.encrypt(false)
.build())
.tags(Map.of("tagKey", "tagValue"))
.timeouts(InstanceTimeoutsArgs.builder()
.create("30m")
.build())
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
# create CVM instance
example:
type: tencentcloud:Instance
properties:
instanceName: tf-example
availabilityZone: ${availabilityZone}
imageId: ${images.images[0].imageId}
instanceType: ${types.instanceTypes[0].instanceType}
systemDiskType: CLOUD_PREMIUM
systemDiskSize: 50
hostname: user
projectId: 0
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
instanceChargeType: PREPAID
instanceChargeTypePrepaidPeriod: 1
instanceChargeTypePrepaidRenewFlag: NOTIFY_AND_MANUAL_RENEW
forceDelete: true
dataDisks:
- dataDiskType: CLOUD_PREMIUM
dataDiskSize: 50
encrypt: false
tags:
tagKey: tagValue
timeouts:
- create: 30m
variables:
images:
fn::invoke:
function: tencentcloud:getImages
arguments:
imageTypes:
- PUBLIC_IMAGE
imageNameRegex: OpenCloudOS Server
types:
fn::invoke:
function: tencentcloud:getInstanceTypes
arguments:
filters:
- name: instance-family
values:
- S1
- S2
- S3
- S4
- S5
cpuCoreCount: 2
excludeSoldOut: true
Create a dedicated cluster CVM instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
const images = tencentcloud.getImages({
imageTypes: ["PUBLIC_IMAGE"],
imageNameRegex: "OpenCloudOS Server",
});
const types = tencentcloud.getInstanceTypes({
filters: [{
name: "instance-family",
values: [
"S1",
"S2",
"S3",
"S4",
"S5",
],
}],
cpuCoreCount: 2,
excludeSoldOut: true,
});
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
cdcId: "cluster-262n63e8",
isMulticast: false,
});
// create CVM instance
const example = new tencentcloud.Instance("example", {
instanceName: "tf-example",
availabilityZone: availabilityZone,
imageId: images.then(images => images.images?.[0]?.imageId),
instanceType: types.then(types => types.instanceTypes?.[0]?.instanceType),
dedicatedClusterId: "cluster-262n63e8",
instanceChargeType: "CDCPAID",
systemDiskType: "CLOUD_SSD",
systemDiskSize: 50,
hostname: "user",
projectId: 0,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
dataDisks: [{
dataDiskType: "CLOUD_SSD",
dataDiskSize: 50,
encrypt: false,
}],
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
images = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
image_name_regex="OpenCloudOS Server")
types = tencentcloud.get_instance_types(filters=[{
"name": "instance-family",
"values": [
"S1",
"S2",
"S3",
"S4",
"S5",
],
}],
cpu_core_count=2,
exclude_sold_out=True)
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
cdc_id="cluster-262n63e8",
is_multicast=False)
# create CVM instance
example = tencentcloud.Instance("example",
instance_name="tf-example",
availability_zone=availability_zone,
image_id=images.images[0].image_id,
instance_type=types.instance_types[0].instance_type,
dedicated_cluster_id="cluster-262n63e8",
instance_charge_type="CDCPAID",
system_disk_type="CLOUD_SSD",
system_disk_size=50,
hostname="user",
project_id=0,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
data_disks=[{
"data_disk_type": "CLOUD_SSD",
"data_disk_size": 50,
"encrypt": False,
}],
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
images, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
ImageTypes: []string{
"PUBLIC_IMAGE",
},
ImageNameRegex: pulumi.StringRef("OpenCloudOS Server"),
}, nil)
if err != nil {
return err
}
types, err := tencentcloud.GetInstanceTypes(ctx, &tencentcloud.GetInstanceTypesArgs{
Filters: []tencentcloud.GetInstanceTypesFilter{
{
Name: "instance-family",
Values: []string{
"S1",
"S2",
"S3",
"S4",
"S5",
},
},
},
CpuCoreCount: pulumi.Float64Ref(2),
ExcludeSoldOut: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
CdcId: pulumi.String("cluster-262n63e8"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create CVM instance
_, err = tencentcloud.NewInstance(ctx, "example", &tencentcloud.InstanceArgs{
InstanceName: pulumi.String("tf-example"),
AvailabilityZone: pulumi.String(availabilityZone),
ImageId: pulumi.String(images.Images[0].ImageId),
InstanceType: pulumi.String(types.InstanceTypes[0].InstanceType),
DedicatedClusterId: pulumi.String("cluster-262n63e8"),
InstanceChargeType: pulumi.String("CDCPAID"),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(50),
Hostname: pulumi.String("user"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
DataDisks: tencentcloud.InstanceDataDiskArray{
&tencentcloud.InstanceDataDiskArgs{
DataDiskType: pulumi.String("CLOUD_SSD"),
DataDiskSize: pulumi.Float64(50),
Encrypt: pulumi.Bool(false),
},
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
var images = Tencentcloud.GetImages.Invoke(new()
{
ImageTypes = new[]
{
"PUBLIC_IMAGE",
},
ImageNameRegex = "OpenCloudOS Server",
});
var types = Tencentcloud.GetInstanceTypes.Invoke(new()
{
Filters = new[]
{
new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
{
Name = "instance-family",
Values = new[]
{
"S1",
"S2",
"S3",
"S4",
"S5",
},
},
},
CpuCoreCount = 2,
ExcludeSoldOut = true,
});
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
CdcId = "cluster-262n63e8",
IsMulticast = false,
});
// create CVM instance
var example = new Tencentcloud.Instance("example", new()
{
InstanceName = "tf-example",
AvailabilityZone = availabilityZone,
ImageId = images.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
InstanceType = types.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.InstanceType),
DedicatedClusterId = "cluster-262n63e8",
InstanceChargeType = "CDCPAID",
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 50,
Hostname = "user",
ProjectId = 0,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
DataDisks = new[]
{
new Tencentcloud.Inputs.InstanceDataDiskArgs
{
DataDiskType = "CLOUD_SSD",
DataDiskSize = 50,
Encrypt = false,
},
},
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.inputs.GetInstanceTypesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Instance;
import com.pulumi.tencentcloud.InstanceArgs;
import com.pulumi.tencentcloud.inputs.InstanceDataDiskArgs;
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 config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
final var images = TencentcloudFunctions.getImages(GetImagesArgs.builder()
.imageTypes("PUBLIC_IMAGE")
.imageNameRegex("OpenCloudOS Server")
.build());
final var types = TencentcloudFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.filters(GetInstanceTypesFilterArgs.builder()
.name("instance-family")
.values(
"S1",
"S2",
"S3",
"S4",
"S5")
.build())
.cpuCoreCount(2)
.excludeSoldOut(true)
.build());
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.cdcId("cluster-262n63e8")
.isMulticast(false)
.build());
// create CVM instance
var example = new Instance("example", InstanceArgs.builder()
.instanceName("tf-example")
.availabilityZone(availabilityZone)
.imageId(images.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
.instanceType(types.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].instanceType()))
.dedicatedClusterId("cluster-262n63e8")
.instanceChargeType("CDCPAID")
.systemDiskType("CLOUD_SSD")
.systemDiskSize(50)
.hostname("user")
.projectId(0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.dataDisks(InstanceDataDiskArgs.builder()
.dataDiskType("CLOUD_SSD")
.dataDiskSize(50)
.encrypt(false)
.build())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
cdcId: cluster-262n63e8
isMulticast: false
# create CVM instance
example:
type: tencentcloud:Instance
properties:
instanceName: tf-example
availabilityZone: ${availabilityZone}
imageId: ${images.images[0].imageId}
instanceType: ${types.instanceTypes[0].instanceType}
dedicatedClusterId: cluster-262n63e8
instanceChargeType: CDCPAID
systemDiskType: CLOUD_SSD
systemDiskSize: 50
hostname: user
projectId: 0
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
dataDisks:
- dataDiskType: CLOUD_SSD
dataDiskSize: 50
encrypt: false
tags:
tagKey: tagValue
variables:
images:
fn::invoke:
function: tencentcloud:getImages
arguments:
imageTypes:
- PUBLIC_IMAGE
imageNameRegex: OpenCloudOS Server
types:
fn::invoke:
function: tencentcloud:getInstanceTypes
arguments:
filters:
- name: instance-family
values:
- S1
- S2
- S3
- S4
- S5
cpuCoreCount: 2
excludeSoldOut: true
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,
internet_max_bandwidth_out: Optional[float] = None,
hpc_cluster_id: Optional[str] = None,
cdh_host_id: Optional[str] = None,
cdh_instance_type: Optional[str] = None,
data_disks: Optional[Sequence[InstanceDataDiskArgs]] = None,
dedicated_cluster_id: Optional[str] = None,
disable_api_termination: Optional[bool] = None,
disable_automation_service: Optional[bool] = None,
disable_monitor_service: Optional[bool] = None,
disable_security_service: Optional[bool] = None,
force_delete: Optional[bool] = None,
hostname: Optional[str] = None,
keep_image_login: Optional[bool] = None,
bandwidth_package_id: Optional[str] = None,
instance_charge_type: Optional[str] = None,
instance_charge_type_prepaid_period: Optional[float] = None,
instance_charge_type_prepaid_renew_flag: Optional[str] = None,
instance_count: Optional[float] = None,
instance_id: Optional[str] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
internet_charge_type: Optional[str] = None,
cam_role_name: Optional[str] = None,
allocate_public_ip: Optional[bool] = None,
running_flag: Optional[bool] = None,
key_name: Optional[str] = None,
orderly_security_groups: Optional[Sequence[str]] = None,
password: Optional[str] = None,
placement_group_id: Optional[str] = None,
private_ip: Optional[str] = None,
project_id: Optional[float] = None,
key_ids: Optional[Sequence[str]] = None,
security_groups: Optional[Sequence[str]] = None,
spot_instance_type: Optional[str] = None,
spot_max_price: Optional[str] = None,
stopped_mode: Optional[str] = None,
subnet_id: Optional[str] = None,
system_disk_id: Optional[str] = None,
system_disk_name: Optional[str] = None,
system_disk_resize_online: Optional[bool] = None,
system_disk_size: Optional[float] = None,
system_disk_type: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[InstanceTimeoutsArgs] = None,
user_data: Optional[str] = None,
user_data_raw: 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: tencentcloud: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.
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 - The available zone for the CVM instance.
- Image
Id string - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- Allocate
Public boolIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Cdh
Host stringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - Cdh
Instance stringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - Data
Disks List<InstanceData Disk> - Settings for data disks.
- Dedicated
Cluster stringId - Exclusive cluster id.
- Disable
Api boolTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - Disable
Automation boolService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Monitor boolService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Security boolService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Force
Delete bool - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - Hostname string
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- Hpc
Cluster stringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - Instance
Charge doubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Count double - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - Instance
Id string - ID of the resource.
- Instance
Name string - Instance
Type string - The type of the instance.
- Internet
Charge stringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - Internet
Max doubleBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - Keep
Image boolLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - Key
Ids List<string> - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Key
Name string - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Orderly
Security List<string>Groups - A list of orderly security group IDs to associate with.
- Password string
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- Placement
Group stringId - The ID of a placement group.
- Private
Ip string - The private IP to be assigned to this instance, must be in the provided subnet and available.
- Project
Id double - The project the instance belongs to, default to 0.
- Running
Flag bool - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- Security
Groups List<string> - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - Spot
Instance stringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - Spot
Max stringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - Stopped
Mode string - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - Subnet
Id string - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- System
Disk stringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - System
Disk stringName - Name of the system disk.
- System
Disk boolResize Online - Resize online.
- System
Disk doubleSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Dictionary<string, string>
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- Timeouts
Instance
Timeouts - User
Data string - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- User
Data stringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - Vpc
Id string - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- Availability
Zone string - The available zone for the CVM instance.
- Image
Id string - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- Allocate
Public boolIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Cdh
Host stringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - Cdh
Instance stringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - Data
Disks []InstanceData Disk Args - Settings for data disks.
- Dedicated
Cluster stringId - Exclusive cluster id.
- Disable
Api boolTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - Disable
Automation boolService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Monitor boolService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Security boolService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Force
Delete bool - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - Hostname string
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- Hpc
Cluster stringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - Instance
Charge float64Type Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Count float64 - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - Instance
Id string - ID of the resource.
- Instance
Name string - Instance
Type string - The type of the instance.
- Internet
Charge stringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - Internet
Max float64Bandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - Keep
Image boolLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - Key
Ids []string - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Key
Name string - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Orderly
Security []stringGroups - A list of orderly security group IDs to associate with.
- Password string
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- Placement
Group stringId - The ID of a placement group.
- Private
Ip string - The private IP to be assigned to this instance, must be in the provided subnet and available.
- Project
Id float64 - The project the instance belongs to, default to 0.
- Running
Flag bool - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- Security
Groups []string - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - Spot
Instance stringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - Spot
Max stringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - Stopped
Mode string - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - Subnet
Id string - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- System
Disk stringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - System
Disk stringName - Name of the system disk.
- System
Disk boolResize Online - Resize online.
- System
Disk float64Size - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - map[string]string
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- Timeouts
Instance
Timeouts Args - User
Data string - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- User
Data stringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - Vpc
Id string - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- availability
Zone String - The available zone for the CVM instance.
- image
Id String - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- allocate
Public BooleanIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- cdh
Host StringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh
Instance StringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - data
Disks List<InstanceData Disk> - Settings for data disks.
- dedicated
Cluster StringId - Exclusive cluster id.
- disable
Api BooleanTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable
Automation BooleanService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Monitor BooleanService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Security BooleanService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- force
Delete Boolean - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname String
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc
Cluster StringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance
Charge DoubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Count Double - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance
Id String - ID of the resource.
- instance
Name String - instance
Type String - The type of the instance.
- internet
Charge StringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet
Max DoubleBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep
Image BooleanLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key
Ids List<String> - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key
Name String - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - orderly
Security List<String>Groups - A list of orderly security group IDs to associate with.
- password String
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement
Group StringId - The ID of a placement group.
- private
Ip String - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project
Id Double - The project the instance belongs to, default to 0.
- running
Flag Boolean - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security
Groups List<String> - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot
Instance StringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot
Max StringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped
Mode String - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet
Id String - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system
Disk StringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system
Disk StringName - Name of the system disk.
- system
Disk BooleanResize Online - Resize online.
- system
Disk DoubleSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Map<String,String>
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts
Instance
Timeouts - user
Data String - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user
Data StringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - vpc
Id String - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- availability
Zone string - The available zone for the CVM instance.
- image
Id string - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- allocate
Public booleanIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role stringName - CAM role name authorized to access.
- cdh
Host stringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh
Instance stringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - data
Disks InstanceData Disk[] - Settings for data disks.
- dedicated
Cluster stringId - Exclusive cluster id.
- disable
Api booleanTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable
Automation booleanService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Monitor booleanService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Security booleanService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- force
Delete boolean - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname string
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc
Cluster stringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance
Charge numberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Count number - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance
Id string - ID of the resource.
- instance
Name string - instance
Type string - The type of the instance.
- internet
Charge stringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet
Max numberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep
Image booleanLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key
Ids string[] - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key
Name string - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - orderly
Security string[]Groups - A list of orderly security group IDs to associate with.
- password string
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement
Group stringId - The ID of a placement group.
- private
Ip string - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project
Id number - The project the instance belongs to, default to 0.
- running
Flag boolean - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security
Groups string[] - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot
Instance stringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot
Max stringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped
Mode string - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet
Id string - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system
Disk stringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system
Disk stringName - Name of the system disk.
- system
Disk booleanResize Online - Resize online.
- system
Disk numberSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - {[key: string]: string}
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts
Instance
Timeouts - user
Data string - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user
Data stringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - vpc
Id string - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- availability_
zone str - The available zone for the CVM instance.
- image_
id str - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- allocate_
public_ boolip - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- bandwidth_
package_ strid - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam_
role_ strname - CAM role name authorized to access.
- cdh_
host_ strid - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh_
instance_ strtype - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - data_
disks Sequence[InstanceData Disk Args] - Settings for data disks.
- dedicated_
cluster_ strid - Exclusive cluster id.
- disable_
api_ booltermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable_
automation_ boolservice - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable_
monitor_ boolservice - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable_
security_ boolservice - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- force_
delete bool - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname str
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc_
cluster_ strid - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- instance_
charge_ strtype - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance_
charge_ floattype_ prepaid_ period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance_
charge_ strtype_ prepaid_ renew_ flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance_
count float - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance_
id str - ID of the resource.
- instance_
name str - instance_
type str - The type of the instance.
- internet_
charge_ strtype - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet_
max_ floatbandwidth_ out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep_
image_ boollogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key_
ids Sequence[str] - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key_
name str - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - orderly_
security_ Sequence[str]groups - A list of orderly security group IDs to associate with.
- password str
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement_
group_ strid - The ID of a placement group.
- private_
ip str - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project_
id float - The project the instance belongs to, default to 0.
- running_
flag bool - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security_
groups Sequence[str] - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot_
instance_ strtype - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot_
max_ strprice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped_
mode str - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet_
id str - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system_
disk_ strid - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system_
disk_ strname - Name of the system disk.
- system_
disk_ boolresize_ online - Resize online.
- system_
disk_ floatsize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system_
disk_ strtype - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Mapping[str, str]
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts
Instance
Timeouts Args - user_
data str - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user_
data_ strraw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - vpc_
id str - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- availability
Zone String - The available zone for the CVM instance.
- image
Id String - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- allocate
Public BooleanIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- cdh
Host StringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh
Instance StringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - data
Disks List<Property Map> - Settings for data disks.
- dedicated
Cluster StringId - Exclusive cluster id.
- disable
Api BooleanTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable
Automation BooleanService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Monitor BooleanService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Security BooleanService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- force
Delete Boolean - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname String
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc
Cluster StringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance
Charge NumberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Count Number - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance
Id String - ID of the resource.
- instance
Name String - instance
Type String - The type of the instance.
- internet
Charge StringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet
Max NumberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep
Image BooleanLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key
Ids List<String> - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key
Name String - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - orderly
Security List<String>Groups - A list of orderly security group IDs to associate with.
- password String
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement
Group StringId - The ID of a placement group.
- private
Ip String - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project
Id Number - The project the instance belongs to, default to 0.
- running
Flag Boolean - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security
Groups List<String> - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot
Instance StringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot
Max StringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped
Mode String - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet
Id String - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system
Disk StringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system
Disk StringName - Name of the system disk.
- system
Disk BooleanResize Online - Resize online.
- system
Disk NumberSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Map<String>
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts Property Map
- user
Data String - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user
Data StringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - vpc
Id String - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Cpu double
- The number of CPU cores of the instance.
- Create
Time string - Create time of the instance.
- Expired
Time string - Expired time of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Status string - Current status of the instance.
- Memory double
- Instance memory capacity, unit in GB.
- Os
Name string - Instance os name.
- Public
Ip string - Public IP of the instance.
- Uuid string
- Globally unique ID of the instance.
- Cpu float64
- The number of CPU cores of the instance.
- Create
Time string - Create time of the instance.
- Expired
Time string - Expired time of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Status string - Current status of the instance.
- Memory float64
- Instance memory capacity, unit in GB.
- Os
Name string - Instance os name.
- Public
Ip string - Public IP of the instance.
- Uuid string
- Globally unique ID of the instance.
- cpu Double
- The number of CPU cores of the instance.
- create
Time String - Create time of the instance.
- expired
Time String - Expired time of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Status String - Current status of the instance.
- memory Double
- Instance memory capacity, unit in GB.
- os
Name String - Instance os name.
- public
Ip String - Public IP of the instance.
- uuid String
- Globally unique ID of the instance.
- cpu number
- The number of CPU cores of the instance.
- create
Time string - Create time of the instance.
- expired
Time string - Expired time of the instance.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Status string - Current status of the instance.
- memory number
- Instance memory capacity, unit in GB.
- os
Name string - Instance os name.
- public
Ip string - Public IP of the instance.
- uuid string
- Globally unique ID of the instance.
- cpu float
- The number of CPU cores of the instance.
- create_
time str - Create time of the instance.
- expired_
time str - Expired time of the instance.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
status str - Current status of the instance.
- memory float
- Instance memory capacity, unit in GB.
- os_
name str - Instance os name.
- public_
ip str - Public IP of the instance.
- uuid str
- Globally unique ID of the instance.
- cpu Number
- The number of CPU cores of the instance.
- create
Time String - Create time of the instance.
- expired
Time String - Expired time of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Status String - Current status of the instance.
- memory Number
- Instance memory capacity, unit in GB.
- os
Name String - Instance os name.
- public
Ip String - Public IP of the instance.
- uuid String
- Globally unique ID of the instance.
Look up Existing Instance Resource
Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocate_public_ip: Optional[bool] = None,
availability_zone: Optional[str] = None,
bandwidth_package_id: Optional[str] = None,
cam_role_name: Optional[str] = None,
cdh_host_id: Optional[str] = None,
cdh_instance_type: Optional[str] = None,
cpu: Optional[float] = None,
create_time: Optional[str] = None,
data_disks: Optional[Sequence[InstanceDataDiskArgs]] = None,
dedicated_cluster_id: Optional[str] = None,
disable_api_termination: Optional[bool] = None,
disable_automation_service: Optional[bool] = None,
disable_monitor_service: Optional[bool] = None,
disable_security_service: Optional[bool] = None,
expired_time: Optional[str] = None,
force_delete: Optional[bool] = None,
hostname: Optional[str] = None,
hpc_cluster_id: Optional[str] = None,
image_id: Optional[str] = None,
instance_charge_type: Optional[str] = None,
instance_charge_type_prepaid_period: Optional[float] = None,
instance_charge_type_prepaid_renew_flag: Optional[str] = None,
instance_count: Optional[float] = None,
instance_id: Optional[str] = None,
instance_name: Optional[str] = None,
instance_status: Optional[str] = None,
instance_type: Optional[str] = None,
internet_charge_type: Optional[str] = None,
internet_max_bandwidth_out: Optional[float] = None,
keep_image_login: Optional[bool] = None,
key_ids: Optional[Sequence[str]] = None,
key_name: Optional[str] = None,
memory: Optional[float] = None,
orderly_security_groups: Optional[Sequence[str]] = None,
os_name: Optional[str] = None,
password: Optional[str] = None,
placement_group_id: Optional[str] = None,
private_ip: Optional[str] = None,
project_id: Optional[float] = None,
public_ip: Optional[str] = None,
running_flag: Optional[bool] = None,
security_groups: Optional[Sequence[str]] = None,
spot_instance_type: Optional[str] = None,
spot_max_price: Optional[str] = None,
stopped_mode: Optional[str] = None,
subnet_id: Optional[str] = None,
system_disk_id: Optional[str] = None,
system_disk_name: Optional[str] = None,
system_disk_resize_online: Optional[bool] = None,
system_disk_size: Optional[float] = None,
system_disk_type: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[InstanceTimeoutsArgs] = None,
user_data: Optional[str] = None,
user_data_raw: Optional[str] = None,
uuid: 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: tencentcloud: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.
- Allocate
Public boolIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- Availability
Zone string - The available zone for the CVM instance.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Cdh
Host stringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - Cdh
Instance stringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - Cpu double
- The number of CPU cores of the instance.
- Create
Time string - Create time of the instance.
- Data
Disks List<InstanceData Disk> - Settings for data disks.
- Dedicated
Cluster stringId - Exclusive cluster id.
- Disable
Api boolTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - Disable
Automation boolService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Monitor boolService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Security boolService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Expired
Time string - Expired time of the instance.
- Force
Delete bool - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - Hostname string
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- Hpc
Cluster stringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- Image
Id string - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - Instance
Charge doubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Count double - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - Instance
Id string - ID of the resource.
- Instance
Name string - Instance
Status string - Current status of the instance.
- Instance
Type string - The type of the instance.
- Internet
Charge stringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - Internet
Max doubleBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - Keep
Image boolLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - Key
Ids List<string> - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Key
Name string - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Memory double
- Instance memory capacity, unit in GB.
- Orderly
Security List<string>Groups - A list of orderly security group IDs to associate with.
- Os
Name string - Instance os name.
- Password string
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- Placement
Group stringId - The ID of a placement group.
- Private
Ip string - The private IP to be assigned to this instance, must be in the provided subnet and available.
- Project
Id double - The project the instance belongs to, default to 0.
- Public
Ip string - Public IP of the instance.
- Running
Flag bool - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- Security
Groups List<string> - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - Spot
Instance stringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - Spot
Max stringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - Stopped
Mode string - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - Subnet
Id string - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- System
Disk stringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - System
Disk stringName - Name of the system disk.
- System
Disk boolResize Online - Resize online.
- System
Disk doubleSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Dictionary<string, string>
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- Timeouts
Instance
Timeouts - User
Data string - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- User
Data stringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - Uuid string
- Globally unique ID of the instance.
- Vpc
Id string - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- Allocate
Public boolIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- Availability
Zone string - The available zone for the CVM instance.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Cdh
Host stringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - Cdh
Instance stringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - Cpu float64
- The number of CPU cores of the instance.
- Create
Time string - Create time of the instance.
- Data
Disks []InstanceData Disk Args - Settings for data disks.
- Dedicated
Cluster stringId - Exclusive cluster id.
- Disable
Api boolTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - Disable
Automation boolService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Monitor boolService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Disable
Security boolService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- Expired
Time string - Expired time of the instance.
- Force
Delete bool - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - Hostname string
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- Hpc
Cluster stringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- Image
Id string - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - Instance
Charge float64Type Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Count float64 - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - Instance
Id string - ID of the resource.
- Instance
Name string - Instance
Status string - Current status of the instance.
- Instance
Type string - The type of the instance.
- Internet
Charge stringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - Internet
Max float64Bandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - Keep
Image boolLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - Key
Ids []string - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Key
Name string - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - Memory float64
- Instance memory capacity, unit in GB.
- Orderly
Security []stringGroups - A list of orderly security group IDs to associate with.
- Os
Name string - Instance os name.
- Password string
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- Placement
Group stringId - The ID of a placement group.
- Private
Ip string - The private IP to be assigned to this instance, must be in the provided subnet and available.
- Project
Id float64 - The project the instance belongs to, default to 0.
- Public
Ip string - Public IP of the instance.
- Running
Flag bool - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- Security
Groups []string - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - Spot
Instance stringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - Spot
Max stringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - Stopped
Mode string - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - Subnet
Id string - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- System
Disk stringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - System
Disk stringName - Name of the system disk.
- System
Disk boolResize Online - Resize online.
- System
Disk float64Size - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - map[string]string
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- Timeouts
Instance
Timeouts Args - User
Data string - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- User
Data stringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - Uuid string
- Globally unique ID of the instance.
- Vpc
Id string - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- allocate
Public BooleanIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- availability
Zone String - The available zone for the CVM instance.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- cdh
Host StringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh
Instance StringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - cpu Double
- The number of CPU cores of the instance.
- create
Time String - Create time of the instance.
- data
Disks List<InstanceData Disk> - Settings for data disks.
- dedicated
Cluster StringId - Exclusive cluster id.
- disable
Api BooleanTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable
Automation BooleanService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Monitor BooleanService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Security BooleanService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- expired
Time String - Expired time of the instance.
- force
Delete Boolean - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname String
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc
Cluster StringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- image
Id String - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance
Charge DoubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Count Double - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance
Id String - ID of the resource.
- instance
Name String - instance
Status String - Current status of the instance.
- instance
Type String - The type of the instance.
- internet
Charge StringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet
Max DoubleBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep
Image BooleanLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key
Ids List<String> - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key
Name String - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - memory Double
- Instance memory capacity, unit in GB.
- orderly
Security List<String>Groups - A list of orderly security group IDs to associate with.
- os
Name String - Instance os name.
- password String
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement
Group StringId - The ID of a placement group.
- private
Ip String - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project
Id Double - The project the instance belongs to, default to 0.
- public
Ip String - Public IP of the instance.
- running
Flag Boolean - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security
Groups List<String> - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot
Instance StringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot
Max StringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped
Mode String - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet
Id String - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system
Disk StringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system
Disk StringName - Name of the system disk.
- system
Disk BooleanResize Online - Resize online.
- system
Disk DoubleSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Map<String,String>
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts
Instance
Timeouts - user
Data String - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user
Data StringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - uuid String
- Globally unique ID of the instance.
- vpc
Id String - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- allocate
Public booleanIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- availability
Zone string - The available zone for the CVM instance.
- bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role stringName - CAM role name authorized to access.
- cdh
Host stringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh
Instance stringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - cpu number
- The number of CPU cores of the instance.
- create
Time string - Create time of the instance.
- data
Disks InstanceData Disk[] - Settings for data disks.
- dedicated
Cluster stringId - Exclusive cluster id.
- disable
Api booleanTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable
Automation booleanService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Monitor booleanService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Security booleanService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- expired
Time string - Expired time of the instance.
- force
Delete boolean - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname string
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc
Cluster stringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- image
Id string - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance
Charge numberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Count number - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance
Id string - ID of the resource.
- instance
Name string - instance
Status string - Current status of the instance.
- instance
Type string - The type of the instance.
- internet
Charge stringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet
Max numberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep
Image booleanLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key
Ids string[] - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key
Name string - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - memory number
- Instance memory capacity, unit in GB.
- orderly
Security string[]Groups - A list of orderly security group IDs to associate with.
- os
Name string - Instance os name.
- password string
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement
Group stringId - The ID of a placement group.
- private
Ip string - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project
Id number - The project the instance belongs to, default to 0.
- public
Ip string - Public IP of the instance.
- running
Flag boolean - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security
Groups string[] - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot
Instance stringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot
Max stringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped
Mode string - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet
Id string - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system
Disk stringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system
Disk stringName - Name of the system disk.
- system
Disk booleanResize Online - Resize online.
- system
Disk numberSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - {[key: string]: string}
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts
Instance
Timeouts - user
Data string - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user
Data stringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - uuid string
- Globally unique ID of the instance.
- vpc
Id string - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- allocate_
public_ boolip - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- availability_
zone str - The available zone for the CVM instance.
- bandwidth_
package_ strid - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam_
role_ strname - CAM role name authorized to access.
- cdh_
host_ strid - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh_
instance_ strtype - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - cpu float
- The number of CPU cores of the instance.
- create_
time str - Create time of the instance.
- data_
disks Sequence[InstanceData Disk Args] - Settings for data disks.
- dedicated_
cluster_ strid - Exclusive cluster id.
- disable_
api_ booltermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable_
automation_ boolservice - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable_
monitor_ boolservice - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable_
security_ boolservice - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- expired_
time str - Expired time of the instance.
- force_
delete bool - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname str
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc_
cluster_ strid - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- image_
id str - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- instance_
charge_ strtype - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance_
charge_ floattype_ prepaid_ period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance_
charge_ strtype_ prepaid_ renew_ flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance_
count float - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance_
id str - ID of the resource.
- instance_
name str - instance_
status str - Current status of the instance.
- instance_
type str - The type of the instance.
- internet_
charge_ strtype - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet_
max_ floatbandwidth_ out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep_
image_ boollogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key_
ids Sequence[str] - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key_
name str - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - memory float
- Instance memory capacity, unit in GB.
- orderly_
security_ Sequence[str]groups - A list of orderly security group IDs to associate with.
- os_
name str - Instance os name.
- password str
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement_
group_ strid - The ID of a placement group.
- private_
ip str - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project_
id float - The project the instance belongs to, default to 0.
- public_
ip str - Public IP of the instance.
- running_
flag bool - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security_
groups Sequence[str] - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot_
instance_ strtype - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot_
max_ strprice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped_
mode str - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet_
id str - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system_
disk_ strid - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system_
disk_ strname - Name of the system disk.
- system_
disk_ boolresize_ online - Resize online.
- system_
disk_ floatsize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system_
disk_ strtype - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Mapping[str, str]
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts
Instance
Timeouts Args - user_
data str - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user_
data_ strraw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - uuid str
- Globally unique ID of the instance.
- vpc_
id str - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
- allocate
Public BooleanIp - Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
- availability
Zone String - The available zone for the CVM instance.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- cdh
Host StringId - Id of cdh instance. Note: it only works when instance_charge_type is set to
CDHPAID
. - cdh
Instance StringType - Type of instance created on cdh, the value of this parameter is in the format of CDH_XCXG based on the number of CPU cores and memory capacity. Note: it only works when instance_charge_type is set to
CDHPAID
. - cpu Number
- The number of CPU cores of the instance.
- create
Time String - Create time of the instance.
- data
Disks List<Property Map> - Settings for data disks.
- dedicated
Cluster StringId - Exclusive cluster id.
- disable
Api BooleanTermination - Whether the termination protection is enabled. Default is
false
. If set true, which means that this instance can not be deleted by an API action. - disable
Automation BooleanService - Disable enhance service for automation, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Monitor BooleanService - Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- disable
Security BooleanService - Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed. Modifications may lead to the reinstallation of the instance's operating system.
- expired
Time String - Expired time of the instance.
- force
Delete Boolean - Indicate whether to force delete the instance. Default is
false
. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works forPREPAID
instance. - hostname String
- The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifications may lead to the reinstallation of the instance's operating system.
- hpc
Cluster StringId - High-performance computing cluster ID. If the instance created is a high-performance computing instance, you need to specify the cluster in which the instance is placed, otherwise it cannot be specified.
- image
Id String - The image to use for the instance. Modifications may lead to the reinstallation of the instance's operating system..
- instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
,POSTPAID_BY_HOUR
,SPOTPAID
,CDHPAID
andCDCPAID
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
andCDHPAID
.PREPAID
instance may not allow to delete before expired.SPOTPAID
instance must setspot_instance_type
andspot_max_price
at the same time.CDHPAID
instance must setcdh_instance_type
andcdh_host_id
. - instance
Charge NumberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
,48
,60
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Count Number - It has been deprecated from version 1.59.18. Use built-in
count
instead. The number of instances to be purchased. Value range:[1,100]; default value: 1. - instance
Id String - ID of the resource.
- instance
Name String - instance
Status String - Current status of the instance.
- instance
Type String - The type of the instance.
- internet
Charge StringType - Internet charge type of the instance, Valid values are
BANDWIDTH_PREPAID
,TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set whenallocate_public_ip
is false. - internet
Max NumberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when
allocate_public_ip
is false. - keep
Image BooleanLogin - Whether to keep image login or not, default is
false
. When the image type is private or shared or imported, this parameter can be settrue
. Modifications may lead to the reinstallation of the instance's operating system.. - key
Ids List<String> - The key pair to use for the instance, it looks like
skey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - key
Name String - Please use
key_ids
instead. The key pair to use for the instance, it looks likeskey-16jig7tx
. Modifications may lead to the reinstallation of the instance's operating system. - memory Number
- Instance memory capacity, unit in GB.
- orderly
Security List<String>Groups - A list of orderly security group IDs to associate with.
- os
Name String - Instance os name.
- password String
- Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifications may lead to the reinstallation of the instance's operating system.
- placement
Group StringId - The ID of a placement group.
- private
Ip String - The private IP to be assigned to this instance, must be in the provided subnet and available.
- project
Id Number - The project the instance belongs to, default to 0.
- public
Ip String - Public IP of the instance.
- running
Flag Boolean - Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
- security
Groups List<String> - It will be deprecated. Use
orderly_security_groups
instead. A list of security group IDs to associate with. - spot
Instance StringType - Type of spot instance, only support
ONE-TIME
now. Note: it only works when instance_charge_type is set toSPOTPAID
. - spot
Max StringPrice - Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to
SPOTPAID
. - stopped
Mode String - Billing method of a pay-as-you-go instance after shutdown. Available values:
KEEP_CHARGING
,STOP_CHARGING
. DefaultKEEP_CHARGING
. - subnet
Id String - The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
- system
Disk StringId - System disk snapshot ID used to initialize the system disk. When system disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - system
Disk StringName - Name of the system disk.
- system
Disk BooleanResize Online - Resize online.
- system
Disk NumberSize - Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
- system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_BASIC
: cloud disk,CLOUD_SSD
: cloud SSD disk,CLOUD_PREMIUM
: Premium Cloud Storage,CLOUD_BSSD
: Basic SSD,CLOUD_HSSD
: Enhanced SSD,CLOUD_TSSD
: Tremendous SSD. NOTE: If modified, the instance may force stop. - Map<String>
- A mapping of tags to assign to the resource. For tag limits, please refer to Use Limits.
- timeouts Property Map
- user
Data String - The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
- user
Data StringRaw - The user data to be injected into this instance, in plain text. Conflicts with
user_data
. Up to 16 KB after base64 encoded. - uuid String
- Globally unique ID of the instance.
- vpc
Id String - The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
Supporting Types
InstanceDataDisk, InstanceDataDiskArgs
- Data
Disk doubleSize - Size of the data disk, and unit is GB.
- Data
Disk stringType - Data disk type. For more information about limits on different data disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
- Data
Disk stringId - Data disk ID used to initialize the data disk. When data disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - Data
Disk stringName - Name of data disk.
- Data
Disk stringSnapshot Id - Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
- Delete
With boolInstance - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPOSTPAID_BY_HOUR
instance), default is true. - Delete
With boolInstance Prepaid - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPREPAID
instance), default is false. - Encrypt bool
- Decides whether the disk is encrypted. Default is
false
. - Throughput
Performance double - Add extra performance to the data disk. Only works when disk type is
CLOUD_TSSD
orCLOUD_HSSD
.
- Data
Disk float64Size - Size of the data disk, and unit is GB.
- Data
Disk stringType - Data disk type. For more information about limits on different data disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
- Data
Disk stringId - Data disk ID used to initialize the data disk. When data disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - Data
Disk stringName - Name of data disk.
- Data
Disk stringSnapshot Id - Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
- Delete
With boolInstance - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPOSTPAID_BY_HOUR
instance), default is true. - Delete
With boolInstance Prepaid - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPREPAID
instance), default is false. - Encrypt bool
- Decides whether the disk is encrypted. Default is
false
. - Throughput
Performance float64 - Add extra performance to the data disk. Only works when disk type is
CLOUD_TSSD
orCLOUD_HSSD
.
- data
Disk DoubleSize - Size of the data disk, and unit is GB.
- data
Disk StringType - Data disk type. For more information about limits on different data disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
- data
Disk StringId - Data disk ID used to initialize the data disk. When data disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - data
Disk StringName - Name of data disk.
- data
Disk StringSnapshot Id - Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
- delete
With BooleanInstance - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPOSTPAID_BY_HOUR
instance), default is true. - delete
With BooleanInstance Prepaid - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPREPAID
instance), default is false. - encrypt Boolean
- Decides whether the disk is encrypted. Default is
false
. - throughput
Performance Double - Add extra performance to the data disk. Only works when disk type is
CLOUD_TSSD
orCLOUD_HSSD
.
- data
Disk numberSize - Size of the data disk, and unit is GB.
- data
Disk stringType - Data disk type. For more information about limits on different data disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
- data
Disk stringId - Data disk ID used to initialize the data disk. When data disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - data
Disk stringName - Name of data disk.
- data
Disk stringSnapshot Id - Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
- delete
With booleanInstance - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPOSTPAID_BY_HOUR
instance), default is true. - delete
With booleanInstance Prepaid - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPREPAID
instance), default is false. - encrypt boolean
- Decides whether the disk is encrypted. Default is
false
. - throughput
Performance number - Add extra performance to the data disk. Only works when disk type is
CLOUD_TSSD
orCLOUD_HSSD
.
- data_
disk_ floatsize - Size of the data disk, and unit is GB.
- data_
disk_ strtype - Data disk type. For more information about limits on different data disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
- data_
disk_ strid - Data disk ID used to initialize the data disk. When data disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - data_
disk_ strname - Name of data disk.
- data_
disk_ strsnapshot_ id - Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
- delete_
with_ boolinstance - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPOSTPAID_BY_HOUR
instance), default is true. - delete_
with_ boolinstance_ prepaid - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPREPAID
instance), default is false. - encrypt bool
- Decides whether the disk is encrypted. Default is
false
. - throughput_
performance float - Add extra performance to the data disk. Only works when disk type is
CLOUD_TSSD
orCLOUD_HSSD
.
- data
Disk NumberSize - Size of the data disk, and unit is GB.
- data
Disk StringType - Data disk type. For more information about limits on different data disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
- data
Disk StringId - Data disk ID used to initialize the data disk. When data disk type is
LOCAL_BASIC
andLOCAL_SSD
, disk id is not supported. - data
Disk StringName - Name of data disk.
- data
Disk StringSnapshot Id - Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
- delete
With BooleanInstance - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPOSTPAID_BY_HOUR
instance), default is true. - delete
With BooleanInstance Prepaid - Decides whether the disk is deleted with instance(only applied to
CLOUD_BASIC
,CLOUD_SSD
andCLOUD_PREMIUM
disk withPREPAID
instance), default is false. - encrypt Boolean
- Decides whether the disk is encrypted. Default is
false
. - throughput
Performance Number - Add extra performance to the data disk. Only works when disk type is
CLOUD_TSSD
orCLOUD_HSSD
.
InstanceTimeouts, InstanceTimeoutsArgs
- Create string
- Create string
- create String
- create string
- create str
- create String
Import
CVM instance can be imported using the id, e.g.
$ pulumi import tencentcloud:index/instance:Instance example ins-2qol3a80
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.