alicloud.ecs.Instance
Explore with Pulumi AI
Provides a ECS instance resource.
NOTE: Available since v1.0.0
NOTE: From version v1.213.0, you can specify
launch_template_id
andlaunch_template_version
to use a launch template. This eliminates the need to configure a large number of parameters every time you create instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const instanceType = config.get("instanceType") || "ecs.n4.large";
const imageId = config.get("imageId") || "ubuntu_18_04_64_20G_alibase_20190624.vhd";
// Create a new ECS instance for VPC
const vpc = new alicloud.vpc.Network("vpc", {
vpcName: name,
cidrBlock: "172.16.0.0/16",
});
// Create a new ECS instance for a VPC
const group = new alicloud.ecs.SecurityGroup("group", {
name: name,
description: "foo",
vpcId: vpc.id,
});
const key = new alicloud.kms.Key("key", {
description: "Hello KMS",
pendingWindowInDays: 7,
status: "Enabled",
});
const default = alicloud.getZones({
availableDiskCategory: "cloud_efficiency",
availableResourceCreation: "VSwitch",
availableInstanceType: instanceType,
});
const vswitch = new alicloud.vpc.Switch("vswitch", {
vpcId: vpc.id,
cidrBlock: "172.16.0.0/24",
zoneId: _default.then(_default => _default.zones?.[0]?.id),
vswitchName: name,
});
const instance = new alicloud.ecs.Instance("instance", {
availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
securityGroups: [group].map(__item => __item.id),
instanceType: instanceType,
systemDiskCategory: "cloud_efficiency",
systemDiskName: name,
systemDiskDescription: "test_foo_system_disk_description",
imageId: imageId,
instanceName: name,
vswitchId: vswitch.id,
internetMaxBandwidthOut: 10,
dataDisks: [{
name: "disk2",
size: 20,
category: "cloud_efficiency",
description: "disk2",
encrypted: true,
kmsKeyId: key.id,
}],
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
instance_type = config.get("instanceType")
if instance_type is None:
instance_type = "ecs.n4.large"
image_id = config.get("imageId")
if image_id is None:
image_id = "ubuntu_18_04_64_20G_alibase_20190624.vhd"
# Create a new ECS instance for VPC
vpc = alicloud.vpc.Network("vpc",
vpc_name=name,
cidr_block="172.16.0.0/16")
# Create a new ECS instance for a VPC
group = alicloud.ecs.SecurityGroup("group",
name=name,
description="foo",
vpc_id=vpc.id)
key = alicloud.kms.Key("key",
description="Hello KMS",
pending_window_in_days=7,
status="Enabled")
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
available_resource_creation="VSwitch",
available_instance_type=instance_type)
vswitch = alicloud.vpc.Switch("vswitch",
vpc_id=vpc.id,
cidr_block="172.16.0.0/24",
zone_id=default.zones[0].id,
vswitch_name=name)
instance = alicloud.ecs.Instance("instance",
availability_zone=default.zones[0].id,
security_groups=[__item.id for __item in [group]],
instance_type=instance_type,
system_disk_category="cloud_efficiency",
system_disk_name=name,
system_disk_description="test_foo_system_disk_description",
image_id=image_id,
instance_name=name,
vswitch_id=vswitch.id,
internet_max_bandwidth_out=10,
data_disks=[alicloud.ecs.InstanceDataDiskArgs(
name="disk2",
size=20,
category="cloud_efficiency",
description="disk2",
encrypted=True,
kms_key_id=key.id,
)])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"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, "")
name := "terraform-example";
if param := cfg.Get("name"); param != ""{
name = param
}
instanceType := "ecs.n4.large";
if param := cfg.Get("instanceType"); param != ""{
instanceType = param
}
imageId := "ubuntu_18_04_64_20G_alibase_20190624.vhd";
if param := cfg.Get("imageId"); param != ""{
imageId = param
}
// Create a new ECS instance for VPC
vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
// Create a new ECS instance for a VPC
group, err := ecs.NewSecurityGroup(ctx, "group", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
Description: pulumi.String("foo"),
VpcId: vpc.ID(),
})
if err != nil {
return err
}
key, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
Description: pulumi.String("Hello KMS"),
PendingWindowInDays: pulumi.Int(7),
Status: pulumi.String("Enabled"),
})
if err != nil {
return err
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
AvailableInstanceType: pulumi.StringRef(instanceType),
}, nil);
if err != nil {
return err
}
vswitch, err := vpc.NewSwitch(ctx, "vswitch", &vpc.SwitchArgs{
VpcId: vpc.ID(),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(_default.Zones[0].Id),
VswitchName: pulumi.String(name),
})
if err != nil {
return err
}
var splat0 pulumi.StringArray
for _, val0 := range %!v(PANIC=Format method: fatal: An assertion has failed: tok: ) {
splat0 = append(splat0, val0.ID())
}
_, err = ecs.NewInstance(ctx, "instance", &ecs.InstanceArgs{
AvailabilityZone: pulumi.String(_default.Zones[0].Id),
SecurityGroups: splat0,
InstanceType: pulumi.String(instanceType),
SystemDiskCategory: pulumi.String("cloud_efficiency"),
SystemDiskName: pulumi.String(name),
SystemDiskDescription: pulumi.String("test_foo_system_disk_description"),
ImageId: pulumi.String(imageId),
InstanceName: pulumi.String(name),
VswitchId: vswitch.ID(),
InternetMaxBandwidthOut: pulumi.Int(10),
DataDisks: ecs.InstanceDataDiskArray{
&ecs.InstanceDataDiskArgs{
Name: pulumi.String("disk2"),
Size: pulumi.Int(20),
Category: pulumi.String("cloud_efficiency"),
Description: pulumi.String("disk2"),
Encrypted: pulumi.Bool(true),
KmsKeyId: key.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var instanceType = config.Get("instanceType") ?? "ecs.n4.large";
var imageId = config.Get("imageId") ?? "ubuntu_18_04_64_20G_alibase_20190624.vhd";
// Create a new ECS instance for VPC
var vpc = new AliCloud.Vpc.Network("vpc", new()
{
VpcName = name,
CidrBlock = "172.16.0.0/16",
});
// Create a new ECS instance for a VPC
var @group = new AliCloud.Ecs.SecurityGroup("group", new()
{
Name = name,
Description = "foo",
VpcId = vpc.Id,
});
var key = new AliCloud.Kms.Key("key", new()
{
Description = "Hello KMS",
PendingWindowInDays = 7,
Status = "Enabled",
});
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableDiskCategory = "cloud_efficiency",
AvailableResourceCreation = "VSwitch",
AvailableInstanceType = instanceType,
});
var vswitch = new AliCloud.Vpc.Switch("vswitch", new()
{
VpcId = vpc.Id,
CidrBlock = "172.16.0.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
VswitchName = name,
});
var instance = new AliCloud.Ecs.Instance("instance", new()
{
AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
SecurityGroups = new[]
{
@group,
}.Select(__item => __item.Id).ToList(),
InstanceType = instanceType,
SystemDiskCategory = "cloud_efficiency",
SystemDiskName = name,
SystemDiskDescription = "test_foo_system_disk_description",
ImageId = imageId,
InstanceName = name,
VswitchId = vswitch.Id,
InternetMaxBandwidthOut = 10,
DataDisks = new[]
{
new AliCloud.Ecs.Inputs.InstanceDataDiskArgs
{
Name = "disk2",
Size = 20,
Category = "cloud_efficiency",
Description = "disk2",
Encrypted = true,
KmsKeyId = key.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.kms.Key;
import com.pulumi.alicloud.kms.KeyArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.ecs.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 name = config.get("name").orElse("terraform-example");
final var instanceType = config.get("instanceType").orElse("ecs.n4.large");
final var imageId = config.get("imageId").orElse("ubuntu_18_04_64_20G_alibase_20190624.vhd");
// Create a new ECS instance for VPC
var vpc = new Network("vpc", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
// Create a new ECS instance for a VPC
var group = new SecurityGroup("group", SecurityGroupArgs.builder()
.name(name)
.description("foo")
.vpcId(vpc.id())
.build());
var key = new Key("key", KeyArgs.builder()
.description("Hello KMS")
.pendingWindowInDays("7")
.status("Enabled")
.build());
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableDiskCategory("cloud_efficiency")
.availableResourceCreation("VSwitch")
.availableInstanceType(instanceType)
.build());
var vswitch = new Switch("vswitch", SwitchArgs.builder()
.vpcId(vpc.id())
.cidrBlock("172.16.0.0/24")
.zoneId(default_.zones()[0].id())
.vswitchName(name)
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.availabilityZone(default_.zones()[0].id())
.securityGroups(group.stream().map(element -> element.id()).collect(toList()))
.instanceType(instanceType)
.systemDiskCategory("cloud_efficiency")
.systemDiskName(name)
.systemDiskDescription("test_foo_system_disk_description")
.imageId(imageId)
.instanceName(name)
.vswitchId(vswitch.id())
.internetMaxBandwidthOut(10)
.dataDisks(InstanceDataDiskArgs.builder()
.name("disk2")
.size(20)
.category("cloud_efficiency")
.description("disk2")
.encrypted(true)
.kmsKeyId(key.id())
.build())
.build());
}
}
Coming soon!
Module Support
You can use the existing ecs-instance module to create several ECS instances one-click.
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: Optional[InstanceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
allocate_public_ip: Optional[bool] = None,
auto_release_time: Optional[str] = None,
auto_renew_period: Optional[int] = None,
availability_zone: Optional[str] = None,
credit_specification: Optional[str] = None,
data_disks: Optional[Sequence[InstanceDataDiskArgs]] = None,
dedicated_host_id: Optional[str] = None,
deletion_protection: Optional[bool] = None,
deployment_set_id: Optional[str] = None,
description: Optional[str] = None,
dry_run: Optional[bool] = None,
enable_jumbo_frame: Optional[bool] = None,
force_delete: Optional[bool] = None,
host_name: Optional[str] = None,
hpc_cluster_id: Optional[str] = None,
http_endpoint: Optional[str] = None,
http_put_response_hop_limit: Optional[int] = None,
http_tokens: Optional[str] = None,
image_id: Optional[str] = None,
include_data_disks: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
internet_charge_type: Optional[str] = None,
internet_max_bandwidth_in: Optional[int] = None,
internet_max_bandwidth_out: Optional[int] = None,
ipv6_address_count: Optional[int] = None,
ipv6_addresses: Optional[Sequence[str]] = None,
is_outdated: Optional[bool] = None,
key_name: Optional[str] = None,
kms_encrypted_password: Optional[str] = None,
kms_encryption_context: Optional[Mapping[str, Any]] = None,
launch_template_id: Optional[str] = None,
launch_template_name: Optional[str] = None,
launch_template_version: Optional[str] = None,
maintenance_action: Optional[str] = None,
maintenance_notify: Optional[bool] = None,
maintenance_time: Optional[InstanceMaintenanceTimeArgs] = None,
network_interfaces: Optional[InstanceNetworkInterfacesArgs] = None,
operator_type: Optional[str] = None,
password: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
private_ip: Optional[str] = None,
renewal_status: Optional[str] = None,
resource_group_id: Optional[str] = None,
role_name: Optional[str] = None,
secondary_private_ip_address_count: Optional[int] = None,
secondary_private_ips: Optional[Sequence[str]] = None,
security_enhancement_strategy: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
spot_duration: Optional[int] = None,
spot_price_limit: Optional[float] = None,
spot_strategy: Optional[str] = None,
status: Optional[str] = None,
stopped_mode: Optional[str] = None,
system_disk_auto_snapshot_policy_id: Optional[str] = None,
system_disk_category: Optional[str] = None,
system_disk_description: Optional[str] = None,
system_disk_encrypt_algorithm: Optional[str] = None,
system_disk_encrypted: Optional[bool] = None,
system_disk_kms_key_id: Optional[str] = None,
system_disk_name: Optional[str] = None,
system_disk_performance_level: Optional[str] = None,
system_disk_size: Optional[int] = None,
system_disk_storage_cluster_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
user_data: Optional[str] = None,
volume_tags: Optional[Mapping[str, Any]] = None,
vswitch_id: Optional[str] = None)
func NewInstance(ctx *Context, name string, args *InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs? args = null, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: alicloud:ecs:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleinstanceResourceResourceFromEcsinstance = new AliCloud.Ecs.Instance("exampleinstanceResourceResourceFromEcsinstance", new()
{
AutoReleaseTime = "string",
AutoRenewPeriod = 0,
AvailabilityZone = "string",
CreditSpecification = "string",
DataDisks = new[]
{
new AliCloud.Ecs.Inputs.InstanceDataDiskArgs
{
Size = 0,
AutoSnapshotPolicyId = "string",
Category = "string",
DeleteWithInstance = false,
Description = "string",
Device = "string",
Encrypted = false,
KmsKeyId = "string",
Name = "string",
PerformanceLevel = "string",
SnapshotId = "string",
},
},
DedicatedHostId = "string",
DeletionProtection = false,
DeploymentSetId = "string",
Description = "string",
DryRun = false,
EnableJumboFrame = false,
ForceDelete = false,
HostName = "string",
HpcClusterId = "string",
HttpEndpoint = "string",
HttpPutResponseHopLimit = 0,
HttpTokens = "string",
ImageId = "string",
IncludeDataDisks = false,
InstanceChargeType = "string",
InstanceName = "string",
InstanceType = "string",
InternetChargeType = "string",
InternetMaxBandwidthOut = 0,
Ipv6AddressCount = 0,
Ipv6Addresses = new[]
{
"string",
},
IsOutdated = false,
KeyName = "string",
KmsEncryptedPassword = "string",
KmsEncryptionContext =
{
{ "string", "any" },
},
LaunchTemplateId = "string",
LaunchTemplateName = "string",
LaunchTemplateVersion = "string",
MaintenanceAction = "string",
MaintenanceNotify = false,
MaintenanceTime = new AliCloud.Ecs.Inputs.InstanceMaintenanceTimeArgs
{
EndTime = "string",
StartTime = "string",
},
NetworkInterfaces = new AliCloud.Ecs.Inputs.InstanceNetworkInterfacesArgs
{
NetworkInterfaceId = "string",
NetworkInterfaceTrafficMode = "string",
SecurityGroupIds = new[]
{
"string",
},
VswitchId = "string",
},
OperatorType = "string",
Password = "string",
Period = 0,
PeriodUnit = "string",
PrivateIp = "string",
RenewalStatus = "string",
ResourceGroupId = "string",
RoleName = "string",
SecondaryPrivateIpAddressCount = 0,
SecondaryPrivateIps = new[]
{
"string",
},
SecurityEnhancementStrategy = "string",
SecurityGroups = new[]
{
"string",
},
SpotDuration = 0,
SpotPriceLimit = 0,
SpotStrategy = "string",
Status = "string",
StoppedMode = "string",
SystemDiskAutoSnapshotPolicyId = "string",
SystemDiskCategory = "string",
SystemDiskDescription = "string",
SystemDiskEncryptAlgorithm = "string",
SystemDiskEncrypted = false,
SystemDiskKmsKeyId = "string",
SystemDiskName = "string",
SystemDiskPerformanceLevel = "string",
SystemDiskSize = 0,
SystemDiskStorageClusterId = "string",
Tags =
{
{ "string", "string" },
},
UserData = "string",
VolumeTags =
{
{ "string", "any" },
},
VswitchId = "string",
});
example, err := ecs.NewInstance(ctx, "exampleinstanceResourceResourceFromEcsinstance", &ecs.InstanceArgs{
AutoReleaseTime: pulumi.String("string"),
AutoRenewPeriod: pulumi.Int(0),
AvailabilityZone: pulumi.String("string"),
CreditSpecification: pulumi.String("string"),
DataDisks: ecs.InstanceDataDiskArray{
&ecs.InstanceDataDiskArgs{
Size: pulumi.Int(0),
AutoSnapshotPolicyId: pulumi.String("string"),
Category: pulumi.String("string"),
DeleteWithInstance: pulumi.Bool(false),
Description: pulumi.String("string"),
Device: pulumi.String("string"),
Encrypted: pulumi.Bool(false),
KmsKeyId: pulumi.String("string"),
Name: pulumi.String("string"),
PerformanceLevel: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
},
},
DedicatedHostId: pulumi.String("string"),
DeletionProtection: pulumi.Bool(false),
DeploymentSetId: pulumi.String("string"),
Description: pulumi.String("string"),
DryRun: pulumi.Bool(false),
EnableJumboFrame: pulumi.Bool(false),
ForceDelete: pulumi.Bool(false),
HostName: pulumi.String("string"),
HpcClusterId: pulumi.String("string"),
HttpEndpoint: pulumi.String("string"),
HttpPutResponseHopLimit: pulumi.Int(0),
HttpTokens: pulumi.String("string"),
ImageId: pulumi.String("string"),
IncludeDataDisks: pulumi.Bool(false),
InstanceChargeType: pulumi.String("string"),
InstanceName: pulumi.String("string"),
InstanceType: pulumi.String("string"),
InternetChargeType: pulumi.String("string"),
InternetMaxBandwidthOut: pulumi.Int(0),
Ipv6AddressCount: pulumi.Int(0),
Ipv6Addresses: pulumi.StringArray{
pulumi.String("string"),
},
IsOutdated: pulumi.Bool(false),
KeyName: pulumi.String("string"),
KmsEncryptedPassword: pulumi.String("string"),
KmsEncryptionContext: pulumi.Map{
"string": pulumi.Any("any"),
},
LaunchTemplateId: pulumi.String("string"),
LaunchTemplateName: pulumi.String("string"),
LaunchTemplateVersion: pulumi.String("string"),
MaintenanceAction: pulumi.String("string"),
MaintenanceNotify: pulumi.Bool(false),
MaintenanceTime: &ecs.InstanceMaintenanceTimeArgs{
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
NetworkInterfaces: &ecs.InstanceNetworkInterfacesArgs{
NetworkInterfaceId: pulumi.String("string"),
NetworkInterfaceTrafficMode: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
VswitchId: pulumi.String("string"),
},
OperatorType: pulumi.String("string"),
Password: pulumi.String("string"),
Period: pulumi.Int(0),
PeriodUnit: pulumi.String("string"),
PrivateIp: pulumi.String("string"),
RenewalStatus: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
RoleName: pulumi.String("string"),
SecondaryPrivateIpAddressCount: pulumi.Int(0),
SecondaryPrivateIps: pulumi.StringArray{
pulumi.String("string"),
},
SecurityEnhancementStrategy: pulumi.String("string"),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
SpotDuration: pulumi.Int(0),
SpotPriceLimit: pulumi.Float64(0),
SpotStrategy: pulumi.String("string"),
Status: pulumi.String("string"),
StoppedMode: pulumi.String("string"),
SystemDiskAutoSnapshotPolicyId: pulumi.String("string"),
SystemDiskCategory: pulumi.String("string"),
SystemDiskDescription: pulumi.String("string"),
SystemDiskEncryptAlgorithm: pulumi.String("string"),
SystemDiskEncrypted: pulumi.Bool(false),
SystemDiskKmsKeyId: pulumi.String("string"),
SystemDiskName: pulumi.String("string"),
SystemDiskPerformanceLevel: pulumi.String("string"),
SystemDiskSize: pulumi.Int(0),
SystemDiskStorageClusterId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
UserData: pulumi.String("string"),
VolumeTags: pulumi.Map{
"string": pulumi.Any("any"),
},
VswitchId: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromEcsinstance = new Instance("exampleinstanceResourceResourceFromEcsinstance", InstanceArgs.builder()
.autoReleaseTime("string")
.autoRenewPeriod(0)
.availabilityZone("string")
.creditSpecification("string")
.dataDisks(InstanceDataDiskArgs.builder()
.size(0)
.autoSnapshotPolicyId("string")
.category("string")
.deleteWithInstance(false)
.description("string")
.device("string")
.encrypted(false)
.kmsKeyId("string")
.name("string")
.performanceLevel("string")
.snapshotId("string")
.build())
.dedicatedHostId("string")
.deletionProtection(false)
.deploymentSetId("string")
.description("string")
.dryRun(false)
.enableJumboFrame(false)
.forceDelete(false)
.hostName("string")
.hpcClusterId("string")
.httpEndpoint("string")
.httpPutResponseHopLimit(0)
.httpTokens("string")
.imageId("string")
.includeDataDisks(false)
.instanceChargeType("string")
.instanceName("string")
.instanceType("string")
.internetChargeType("string")
.internetMaxBandwidthOut(0)
.ipv6AddressCount(0)
.ipv6Addresses("string")
.isOutdated(false)
.keyName("string")
.kmsEncryptedPassword("string")
.kmsEncryptionContext(Map.of("string", "any"))
.launchTemplateId("string")
.launchTemplateName("string")
.launchTemplateVersion("string")
.maintenanceAction("string")
.maintenanceNotify(false)
.maintenanceTime(InstanceMaintenanceTimeArgs.builder()
.endTime("string")
.startTime("string")
.build())
.networkInterfaces(InstanceNetworkInterfacesArgs.builder()
.networkInterfaceId("string")
.networkInterfaceTrafficMode("string")
.securityGroupIds("string")
.vswitchId("string")
.build())
.operatorType("string")
.password("string")
.period(0)
.periodUnit("string")
.privateIp("string")
.renewalStatus("string")
.resourceGroupId("string")
.roleName("string")
.secondaryPrivateIpAddressCount(0)
.secondaryPrivateIps("string")
.securityEnhancementStrategy("string")
.securityGroups("string")
.spotDuration(0)
.spotPriceLimit(0)
.spotStrategy("string")
.status("string")
.stoppedMode("string")
.systemDiskAutoSnapshotPolicyId("string")
.systemDiskCategory("string")
.systemDiskDescription("string")
.systemDiskEncryptAlgorithm("string")
.systemDiskEncrypted(false)
.systemDiskKmsKeyId("string")
.systemDiskName("string")
.systemDiskPerformanceLevel("string")
.systemDiskSize(0)
.systemDiskStorageClusterId("string")
.tags(Map.of("string", "string"))
.userData("string")
.volumeTags(Map.of("string", "any"))
.vswitchId("string")
.build());
exampleinstance_resource_resource_from_ecsinstance = alicloud.ecs.Instance("exampleinstanceResourceResourceFromEcsinstance",
auto_release_time="string",
auto_renew_period=0,
availability_zone="string",
credit_specification="string",
data_disks=[alicloud.ecs.InstanceDataDiskArgs(
size=0,
auto_snapshot_policy_id="string",
category="string",
delete_with_instance=False,
description="string",
device="string",
encrypted=False,
kms_key_id="string",
name="string",
performance_level="string",
snapshot_id="string",
)],
dedicated_host_id="string",
deletion_protection=False,
deployment_set_id="string",
description="string",
dry_run=False,
enable_jumbo_frame=False,
force_delete=False,
host_name="string",
hpc_cluster_id="string",
http_endpoint="string",
http_put_response_hop_limit=0,
http_tokens="string",
image_id="string",
include_data_disks=False,
instance_charge_type="string",
instance_name="string",
instance_type="string",
internet_charge_type="string",
internet_max_bandwidth_out=0,
ipv6_address_count=0,
ipv6_addresses=["string"],
is_outdated=False,
key_name="string",
kms_encrypted_password="string",
kms_encryption_context={
"string": "any",
},
launch_template_id="string",
launch_template_name="string",
launch_template_version="string",
maintenance_action="string",
maintenance_notify=False,
maintenance_time=alicloud.ecs.InstanceMaintenanceTimeArgs(
end_time="string",
start_time="string",
),
network_interfaces=alicloud.ecs.InstanceNetworkInterfacesArgs(
network_interface_id="string",
network_interface_traffic_mode="string",
security_group_ids=["string"],
vswitch_id="string",
),
operator_type="string",
password="string",
period=0,
period_unit="string",
private_ip="string",
renewal_status="string",
resource_group_id="string",
role_name="string",
secondary_private_ip_address_count=0,
secondary_private_ips=["string"],
security_enhancement_strategy="string",
security_groups=["string"],
spot_duration=0,
spot_price_limit=0,
spot_strategy="string",
status="string",
stopped_mode="string",
system_disk_auto_snapshot_policy_id="string",
system_disk_category="string",
system_disk_description="string",
system_disk_encrypt_algorithm="string",
system_disk_encrypted=False,
system_disk_kms_key_id="string",
system_disk_name="string",
system_disk_performance_level="string",
system_disk_size=0,
system_disk_storage_cluster_id="string",
tags={
"string": "string",
},
user_data="string",
volume_tags={
"string": "any",
},
vswitch_id="string")
const exampleinstanceResourceResourceFromEcsinstance = new alicloud.ecs.Instance("exampleinstanceResourceResourceFromEcsinstance", {
autoReleaseTime: "string",
autoRenewPeriod: 0,
availabilityZone: "string",
creditSpecification: "string",
dataDisks: [{
size: 0,
autoSnapshotPolicyId: "string",
category: "string",
deleteWithInstance: false,
description: "string",
device: "string",
encrypted: false,
kmsKeyId: "string",
name: "string",
performanceLevel: "string",
snapshotId: "string",
}],
dedicatedHostId: "string",
deletionProtection: false,
deploymentSetId: "string",
description: "string",
dryRun: false,
enableJumboFrame: false,
forceDelete: false,
hostName: "string",
hpcClusterId: "string",
httpEndpoint: "string",
httpPutResponseHopLimit: 0,
httpTokens: "string",
imageId: "string",
includeDataDisks: false,
instanceChargeType: "string",
instanceName: "string",
instanceType: "string",
internetChargeType: "string",
internetMaxBandwidthOut: 0,
ipv6AddressCount: 0,
ipv6Addresses: ["string"],
isOutdated: false,
keyName: "string",
kmsEncryptedPassword: "string",
kmsEncryptionContext: {
string: "any",
},
launchTemplateId: "string",
launchTemplateName: "string",
launchTemplateVersion: "string",
maintenanceAction: "string",
maintenanceNotify: false,
maintenanceTime: {
endTime: "string",
startTime: "string",
},
networkInterfaces: {
networkInterfaceId: "string",
networkInterfaceTrafficMode: "string",
securityGroupIds: ["string"],
vswitchId: "string",
},
operatorType: "string",
password: "string",
period: 0,
periodUnit: "string",
privateIp: "string",
renewalStatus: "string",
resourceGroupId: "string",
roleName: "string",
secondaryPrivateIpAddressCount: 0,
secondaryPrivateIps: ["string"],
securityEnhancementStrategy: "string",
securityGroups: ["string"],
spotDuration: 0,
spotPriceLimit: 0,
spotStrategy: "string",
status: "string",
stoppedMode: "string",
systemDiskAutoSnapshotPolicyId: "string",
systemDiskCategory: "string",
systemDiskDescription: "string",
systemDiskEncryptAlgorithm: "string",
systemDiskEncrypted: false,
systemDiskKmsKeyId: "string",
systemDiskName: "string",
systemDiskPerformanceLevel: "string",
systemDiskSize: 0,
systemDiskStorageClusterId: "string",
tags: {
string: "string",
},
userData: "string",
volumeTags: {
string: "any",
},
vswitchId: "string",
});
type: alicloud:ecs:Instance
properties:
autoReleaseTime: string
autoRenewPeriod: 0
availabilityZone: string
creditSpecification: string
dataDisks:
- autoSnapshotPolicyId: string
category: string
deleteWithInstance: false
description: string
device: string
encrypted: false
kmsKeyId: string
name: string
performanceLevel: string
size: 0
snapshotId: string
dedicatedHostId: string
deletionProtection: false
deploymentSetId: string
description: string
dryRun: false
enableJumboFrame: false
forceDelete: false
hostName: string
hpcClusterId: string
httpEndpoint: string
httpPutResponseHopLimit: 0
httpTokens: string
imageId: string
includeDataDisks: false
instanceChargeType: string
instanceName: string
instanceType: string
internetChargeType: string
internetMaxBandwidthOut: 0
ipv6AddressCount: 0
ipv6Addresses:
- string
isOutdated: false
keyName: string
kmsEncryptedPassword: string
kmsEncryptionContext:
string: any
launchTemplateId: string
launchTemplateName: string
launchTemplateVersion: string
maintenanceAction: string
maintenanceNotify: false
maintenanceTime:
endTime: string
startTime: string
networkInterfaces:
networkInterfaceId: string
networkInterfaceTrafficMode: string
securityGroupIds:
- string
vswitchId: string
operatorType: string
password: string
period: 0
periodUnit: string
privateIp: string
renewalStatus: string
resourceGroupId: string
roleName: string
secondaryPrivateIpAddressCount: 0
secondaryPrivateIps:
- string
securityEnhancementStrategy: string
securityGroups:
- string
spotDuration: 0
spotPriceLimit: 0
spotStrategy: string
status: string
stoppedMode: string
systemDiskAutoSnapshotPolicyId: string
systemDiskCategory: string
systemDiskDescription: string
systemDiskEncryptAlgorithm: string
systemDiskEncrypted: false
systemDiskKmsKeyId: string
systemDiskName: string
systemDiskPerformanceLevel: string
systemDiskSize: 0
systemDiskStorageClusterId: string
tags:
string: string
userData: string
volumeTags:
string: any
vswitchId: string
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Instance resource accepts the following input properties:
- Allocate
Public boolIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- Auto
Release stringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - Auto
Renew intPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- Availability
Zone string - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - Credit
Specification string - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- Data
Disks List<Pulumi.Ali Cloud. Ecs. Inputs. Instance Data Disk> - The list of data disks created with instance. See
data_disks
below. - Dedicated
Host stringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - Deletion
Protection bool - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- Deployment
Set stringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- Description string
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Dry
Run bool - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- Enable
Jumbo boolFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- Force
Delete bool - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- Host
Name string - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- Hpc
Cluster stringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- Http
Endpoint string - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - Http
Put intResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- Http
Tokens string - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- Image
Id string - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - Include
Data boolDisks - Whether to change instance disks charge type when changing instance charge type.
- Instance
Charge stringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - Instance
Name string - Instance
Type string - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - Internet
Charge stringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - Internet
Max intBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- Internet
Max intBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses List<string>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Is
Outdated bool - Whether to use outdated instance type. Default to false.
- Key
Name string - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- Kms
Encrypted stringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - Kms
Encryption Dictionary<string, object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - Launch
Template stringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - Launch
Template stringName - The name of the launch template.
- Launch
Template stringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - Maintenance
Action string - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- Maintenance
Notify bool - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - Maintenance
Time Pulumi.Ali Cloud. Ecs. Inputs. Instance Maintenance Time - The time of maintenance. See
maintenance_time
below. - Network
Interfaces Pulumi.Ali Cloud. Ecs. Inputs. Instance Network Interfaces - The list of network interfaces created with instance. See
network_interfaces
below. - Operator
Type string - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - Password string
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- Period int
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- Period
Unit string - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - Private
Ip string - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - Renewal
Status string - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- Resource
Group stringId - The Id of resource group which the instance belongs.
- Role
Name string - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - Secondary
Private intIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - Secondary
Private List<string>Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- Security
Enhancement stringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- Security
Groups List<string> - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - Spot
Duration int - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - Spot
Price doubleLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- Spot
Strategy string The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- Status string
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - Stopped
Mode string - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- System
Disk stringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- System
Disk stringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - System
Disk stringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- System
Disk stringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - System
Disk boolEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - System
Disk stringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- System
Disk stringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- System
Disk stringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - System
Disk intSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- System
Disk stringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- User
Data string - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Dictionary<string, object>
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- Allocate
Public boolIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- Auto
Release stringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - Auto
Renew intPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- Availability
Zone string - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - Credit
Specification string - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- Data
Disks []InstanceData Disk Args - The list of data disks created with instance. See
data_disks
below. - Dedicated
Host stringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - Deletion
Protection bool - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- Deployment
Set stringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- Description string
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Dry
Run bool - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- Enable
Jumbo boolFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- Force
Delete bool - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- Host
Name string - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- Hpc
Cluster stringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- Http
Endpoint string - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - Http
Put intResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- Http
Tokens string - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- Image
Id string - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - Include
Data boolDisks - Whether to change instance disks charge type when changing instance charge type.
- Instance
Charge stringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - Instance
Name string - Instance
Type string - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - Internet
Charge stringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - Internet
Max intBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- Internet
Max intBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses []string
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Is
Outdated bool - Whether to use outdated instance type. Default to false.
- Key
Name string - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- Kms
Encrypted stringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - Kms
Encryption map[string]interface{}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - Launch
Template stringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - Launch
Template stringName - The name of the launch template.
- Launch
Template stringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - Maintenance
Action string - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- Maintenance
Notify bool - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - Maintenance
Time InstanceMaintenance Time Args - The time of maintenance. See
maintenance_time
below. - Network
Interfaces InstanceNetwork Interfaces Args - The list of network interfaces created with instance. See
network_interfaces
below. - Operator
Type string - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - Password string
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- Period int
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- Period
Unit string - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - Private
Ip string - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - Renewal
Status string - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- Resource
Group stringId - The Id of resource group which the instance belongs.
- Role
Name string - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - Secondary
Private intIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - Secondary
Private []stringIps - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- Security
Enhancement stringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- Security
Groups []string - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - Spot
Duration int - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - Spot
Price float64Limit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- Spot
Strategy string The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- Status string
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - Stopped
Mode string - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- System
Disk stringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- System
Disk stringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - System
Disk stringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- System
Disk stringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - System
Disk boolEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - System
Disk stringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- System
Disk stringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- System
Disk stringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - System
Disk intSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- System
Disk stringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- map[string]string
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- User
Data string - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- map[string]interface{}
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate
Public BooleanIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto
Release StringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto
Renew IntegerPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability
Zone String - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - credit
Specification String - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data
Disks List<InstanceData Disk> - The list of data disks created with instance. See
data_disks
below. - dedicated
Host StringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion
Protection Boolean - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment
Set StringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description String
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry
Run Boolean - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable
Jumbo BooleanFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force
Delete Boolean - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host
Name String - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc
Cluster StringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http
Endpoint String - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http
Put IntegerResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http
Tokens String - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image
Id String - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include
Data BooleanDisks - Whether to change instance disks charge type when changing instance charge type.
- instance
Charge StringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance
Name String - instance
Type String - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet
Charge StringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet
Max IntegerBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet
Max IntegerBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6Address
Count Integer - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is
Outdated Boolean - Whether to use outdated instance type. Default to false.
- key
Name String - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms
Encrypted StringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms
Encryption Map<String,Object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch
Template StringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch
Template StringName - The name of the launch template.
- launch
Template StringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance
Action String - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance
Notify Boolean - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance
Time InstanceMaintenance Time - The time of maintenance. See
maintenance_time
below. - network
Interfaces InstanceNetwork Interfaces - The list of network interfaces created with instance. See
network_interfaces
below. - operator
Type String - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - password String
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period Integer
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period
Unit String - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - private
Ip String - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - renewal
Status String - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource
Group StringId - The Id of resource group which the instance belongs.
- role
Name String - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary
Private IntegerIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary
Private List<String>Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security
Enhancement StringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security
Groups List<String> - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot
Duration Integer - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot
Price DoubleLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot
Strategy String The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status String
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped
Mode String - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system
Disk StringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- system
Disk StringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system
Disk StringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system
Disk StringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system
Disk BooleanEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system
Disk StringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system
Disk StringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system
Disk StringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system
Disk IntegerSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system
Disk StringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Map<String,String>
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user
Data String - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Map<String,Object>
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate
Public booleanIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto
Release stringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto
Renew numberPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability
Zone string - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - credit
Specification string - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data
Disks InstanceData Disk[] - The list of data disks created with instance. See
data_disks
below. - dedicated
Host stringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion
Protection boolean - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment
Set stringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description string
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry
Run boolean - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable
Jumbo booleanFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force
Delete boolean - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host
Name string - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc
Cluster stringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http
Endpoint string - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http
Put numberResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http
Tokens string - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image
Id string - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include
Data booleanDisks - Whether to change instance disks charge type when changing instance charge type.
- instance
Charge stringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance
Name string - instance
Type string - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet
Charge stringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet
Max numberBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet
Max numberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6Address
Count number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses string[]
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is
Outdated boolean - Whether to use outdated instance type. Default to false.
- key
Name string - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms
Encrypted stringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms
Encryption {[key: string]: any}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch
Template stringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch
Template stringName - The name of the launch template.
- launch
Template stringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance
Action string - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance
Notify boolean - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance
Time InstanceMaintenance Time - The time of maintenance. See
maintenance_time
below. - network
Interfaces InstanceNetwork Interfaces - The list of network interfaces created with instance. See
network_interfaces
below. - operator
Type string - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - password string
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period number
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period
Unit string - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - private
Ip string - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - renewal
Status string - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource
Group stringId - The Id of resource group which the instance belongs.
- role
Name string - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary
Private numberIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary
Private string[]Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security
Enhancement stringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security
Groups string[] - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot
Duration number - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot
Price numberLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot
Strategy string The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status string
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped
Mode string - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system
Disk stringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- system
Disk stringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system
Disk stringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system
Disk stringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system
Disk booleanEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system
Disk stringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system
Disk stringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system
Disk stringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system
Disk numberSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system
Disk stringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user
Data string - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- {[key: string]: any}
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id string - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate_
public_ boolip - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto_
release_ strtime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto_
renew_ intperiod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability_
zone str - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - credit_
specification str - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data_
disks Sequence[InstanceData Disk Args] - The list of data disks created with instance. See
data_disks
below. - dedicated_
host_ strid - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion_
protection bool - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment_
set_ strid - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description str
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry_
run bool - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable_
jumbo_ boolframe Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force_
delete bool - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host_
name str - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc_
cluster_ strid - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http_
endpoint str - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http_
put_ intresponse_ hop_ limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http_
tokens str - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image_
id str - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include_
data_ booldisks - Whether to change instance disks charge type when changing instance charge type.
- instance_
charge_ strtype - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance_
name str - instance_
type str - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet_
charge_ strtype - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet_
max_ intbandwidth_ in - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet_
max_ intbandwidth_ out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6_
address_ intcount - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6_
addresses Sequence[str] - A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is_
outdated bool - Whether to use outdated instance type. Default to false.
- key_
name str - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms_
encrypted_ strpassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms_
encryption_ Mapping[str, Any]context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch_
template_ strid - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch_
template_ strname - The name of the launch template.
- launch_
template_ strversion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance_
action str - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance_
notify bool - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance_
time InstanceMaintenance Time Args - The time of maintenance. See
maintenance_time
below. - network_
interfaces InstanceNetwork Interfaces Args - The list of network interfaces created with instance. See
network_interfaces
below. - operator_
type str - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - password str
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period int
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period_
unit str - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - private_
ip str - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - renewal_
status str - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource_
group_ strid - The Id of resource group which the instance belongs.
- role_
name str - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary_
private_ intip_ address_ count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary_
private_ Sequence[str]ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security_
enhancement_ strstrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security_
groups Sequence[str] - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot_
duration int - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot_
price_ floatlimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot_
strategy str The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status str
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped_
mode str - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system_
disk_ strauto_ snapshot_ policy_ id - The ID of the automatic snapshot policy applied to the system disk.
- system_
disk_ strcategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system_
disk_ strdescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system_
disk_ strencrypt_ algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system_
disk_ boolencrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system_
disk_ strkms_ key_ id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system_
disk_ strname - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system_
disk_ strperformance_ level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system_
disk_ intsize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system_
disk_ strstorage_ cluster_ id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user_
data str - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Mapping[str, Any]
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch_
id str - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate
Public BooleanIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto
Release StringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto
Renew NumberPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability
Zone String - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - credit
Specification String - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data
Disks List<Property Map> - The list of data disks created with instance. See
data_disks
below. - dedicated
Host StringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion
Protection Boolean - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment
Set StringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description String
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry
Run Boolean - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable
Jumbo BooleanFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force
Delete Boolean - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host
Name String - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc
Cluster StringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http
Endpoint String - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http
Put NumberResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http
Tokens String - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image
Id String - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include
Data BooleanDisks - Whether to change instance disks charge type when changing instance charge type.
- instance
Charge StringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance
Name String - instance
Type String - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet
Charge StringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet
Max NumberBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet
Max NumberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6Address
Count Number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is
Outdated Boolean - Whether to use outdated instance type. Default to false.
- key
Name String - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms
Encrypted StringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms
Encryption Map<Any>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch
Template StringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch
Template StringName - The name of the launch template.
- launch
Template StringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance
Action String - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance
Notify Boolean - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance
Time Property Map - The time of maintenance. See
maintenance_time
below. - network
Interfaces Property Map - The list of network interfaces created with instance. See
network_interfaces
below. - operator
Type String - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - password String
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period Number
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period
Unit String - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - private
Ip String - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - renewal
Status String - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource
Group StringId - The Id of resource group which the instance belongs.
- role
Name String - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary
Private NumberIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary
Private List<String>Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security
Enhancement StringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security
Groups List<String> - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot
Duration Number - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot
Price NumberLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot
Strategy String The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status String
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped
Mode String - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system
Disk StringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- system
Disk StringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system
Disk StringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system
Disk StringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system
Disk BooleanEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system
Disk StringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system
Disk StringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system
Disk StringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system
Disk NumberSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system
Disk StringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Map<String>
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user
Data String - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Map<Any>
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Cpu int
- The number of vCPUs.
- Deployment
Set stringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory int
- The memory size of the instance. Unit: MiB.
- Network
Interface stringId - The ID of the ENI.
- Os
Name string - The name of the operating system of the instance.
- Os
Type string - The type of the operating system of the instance.
- Primary
Ip stringAddress - The primary private IP address of the ENI.
- Public
Ip string - The instance public ip.
- System
Disk stringId - (Available since v1.210.0) The ID of system disk.
- Cpu int
- The number of vCPUs.
- Deployment
Set stringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory int
- The memory size of the instance. Unit: MiB.
- Network
Interface stringId - The ID of the ENI.
- Os
Name string - The name of the operating system of the instance.
- Os
Type string - The type of the operating system of the instance.
- Primary
Ip stringAddress - The primary private IP address of the ENI.
- Public
Ip string - The instance public ip.
- System
Disk stringId - (Available since v1.210.0) The ID of system disk.
- cpu Integer
- The number of vCPUs.
- deployment
Set StringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- id String
- The provider-assigned unique ID for this managed resource.
- memory Integer
- The memory size of the instance. Unit: MiB.
- network
Interface StringId - The ID of the ENI.
- os
Name String - The name of the operating system of the instance.
- os
Type String - The type of the operating system of the instance.
- primary
Ip StringAddress - The primary private IP address of the ENI.
- public
Ip String - The instance public ip.
- system
Disk StringId - (Available since v1.210.0) The ID of system disk.
- cpu number
- The number of vCPUs.
- deployment
Set stringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- id string
- The provider-assigned unique ID for this managed resource.
- memory number
- The memory size of the instance. Unit: MiB.
- network
Interface stringId - The ID of the ENI.
- os
Name string - The name of the operating system of the instance.
- os
Type string - The type of the operating system of the instance.
- primary
Ip stringAddress - The primary private IP address of the ENI.
- public
Ip string - The instance public ip.
- system
Disk stringId - (Available since v1.210.0) The ID of system disk.
- cpu int
- The number of vCPUs.
- deployment_
set_ strgroup_ no - The group number of the instance in a deployment set when the deployment set is use.
- id str
- The provider-assigned unique ID for this managed resource.
- memory int
- The memory size of the instance. Unit: MiB.
- network_
interface_ strid - The ID of the ENI.
- os_
name str - The name of the operating system of the instance.
- os_
type str - The type of the operating system of the instance.
- primary_
ip_ straddress - The primary private IP address of the ENI.
- public_
ip str - The instance public ip.
- system_
disk_ strid - (Available since v1.210.0) The ID of system disk.
- cpu Number
- The number of vCPUs.
- deployment
Set StringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- id String
- The provider-assigned unique ID for this managed resource.
- memory Number
- The memory size of the instance. Unit: MiB.
- network
Interface StringId - The ID of the ENI.
- os
Name String - The name of the operating system of the instance.
- os
Type String - The type of the operating system of the instance.
- primary
Ip StringAddress - The primary private IP address of the ENI.
- public
Ip String - The instance public ip.
- system
Disk StringId - (Available since v1.210.0) The ID of system disk.
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,
auto_release_time: Optional[str] = None,
auto_renew_period: Optional[int] = None,
availability_zone: Optional[str] = None,
cpu: Optional[int] = None,
credit_specification: Optional[str] = None,
data_disks: Optional[Sequence[InstanceDataDiskArgs]] = None,
dedicated_host_id: Optional[str] = None,
deletion_protection: Optional[bool] = None,
deployment_set_group_no: Optional[str] = None,
deployment_set_id: Optional[str] = None,
description: Optional[str] = None,
dry_run: Optional[bool] = None,
enable_jumbo_frame: Optional[bool] = None,
force_delete: Optional[bool] = None,
host_name: Optional[str] = None,
hpc_cluster_id: Optional[str] = None,
http_endpoint: Optional[str] = None,
http_put_response_hop_limit: Optional[int] = None,
http_tokens: Optional[str] = None,
image_id: Optional[str] = None,
include_data_disks: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
internet_charge_type: Optional[str] = None,
internet_max_bandwidth_in: Optional[int] = None,
internet_max_bandwidth_out: Optional[int] = None,
ipv6_address_count: Optional[int] = None,
ipv6_addresses: Optional[Sequence[str]] = None,
is_outdated: Optional[bool] = None,
key_name: Optional[str] = None,
kms_encrypted_password: Optional[str] = None,
kms_encryption_context: Optional[Mapping[str, Any]] = None,
launch_template_id: Optional[str] = None,
launch_template_name: Optional[str] = None,
launch_template_version: Optional[str] = None,
maintenance_action: Optional[str] = None,
maintenance_notify: Optional[bool] = None,
maintenance_time: Optional[InstanceMaintenanceTimeArgs] = None,
memory: Optional[int] = None,
network_interface_id: Optional[str] = None,
network_interfaces: Optional[InstanceNetworkInterfacesArgs] = None,
operator_type: Optional[str] = None,
os_name: Optional[str] = None,
os_type: Optional[str] = None,
password: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
primary_ip_address: Optional[str] = None,
private_ip: Optional[str] = None,
public_ip: Optional[str] = None,
renewal_status: Optional[str] = None,
resource_group_id: Optional[str] = None,
role_name: Optional[str] = None,
secondary_private_ip_address_count: Optional[int] = None,
secondary_private_ips: Optional[Sequence[str]] = None,
security_enhancement_strategy: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
spot_duration: Optional[int] = None,
spot_price_limit: Optional[float] = None,
spot_strategy: Optional[str] = None,
status: Optional[str] = None,
stopped_mode: Optional[str] = None,
system_disk_auto_snapshot_policy_id: Optional[str] = None,
system_disk_category: Optional[str] = None,
system_disk_description: Optional[str] = None,
system_disk_encrypt_algorithm: Optional[str] = None,
system_disk_encrypted: Optional[bool] = None,
system_disk_id: Optional[str] = None,
system_disk_kms_key_id: Optional[str] = None,
system_disk_name: Optional[str] = None,
system_disk_performance_level: Optional[str] = None,
system_disk_size: Optional[int] = None,
system_disk_storage_cluster_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
user_data: Optional[str] = None,
volume_tags: Optional[Mapping[str, Any]] = None,
vswitch_id: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allocate
Public boolIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- Auto
Release stringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - Auto
Renew intPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- Availability
Zone string - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - Cpu int
- The number of vCPUs.
- Credit
Specification string - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- Data
Disks List<Pulumi.Ali Cloud. Ecs. Inputs. Instance Data Disk> - The list of data disks created with instance. See
data_disks
below. - Dedicated
Host stringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - Deletion
Protection bool - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- Deployment
Set stringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- Deployment
Set stringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- Description string
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Dry
Run bool - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- Enable
Jumbo boolFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- Force
Delete bool - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- Host
Name string - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- Hpc
Cluster stringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- Http
Endpoint string - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - Http
Put intResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- Http
Tokens string - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- Image
Id string - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - Include
Data boolDisks - Whether to change instance disks charge type when changing instance charge type.
- Instance
Charge stringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - Instance
Name string - Instance
Type string - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - Internet
Charge stringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - Internet
Max intBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- Internet
Max intBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses List<string>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Is
Outdated bool - Whether to use outdated instance type. Default to false.
- Key
Name string - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- Kms
Encrypted stringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - Kms
Encryption Dictionary<string, object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - Launch
Template stringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - Launch
Template stringName - The name of the launch template.
- Launch
Template stringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - Maintenance
Action string - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- Maintenance
Notify bool - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - Maintenance
Time Pulumi.Ali Cloud. Ecs. Inputs. Instance Maintenance Time - The time of maintenance. See
maintenance_time
below. - Memory int
- The memory size of the instance. Unit: MiB.
- Network
Interface stringId - The ID of the ENI.
- Network
Interfaces Pulumi.Ali Cloud. Ecs. Inputs. Instance Network Interfaces - The list of network interfaces created with instance. See
network_interfaces
below. - Operator
Type string - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - Os
Name string - The name of the operating system of the instance.
- Os
Type string - The type of the operating system of the instance.
- Password string
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- Period int
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- Period
Unit string - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - Primary
Ip stringAddress - The primary private IP address of the ENI.
- Private
Ip string - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - Public
Ip string - The instance public ip.
- Renewal
Status string - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- Resource
Group stringId - The Id of resource group which the instance belongs.
- Role
Name string - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - Secondary
Private intIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - Secondary
Private List<string>Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- Security
Enhancement stringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- Security
Groups List<string> - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - Spot
Duration int - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - Spot
Price doubleLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- Spot
Strategy string The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- Status string
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - Stopped
Mode string - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- System
Disk stringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- System
Disk stringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - System
Disk stringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- System
Disk stringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - System
Disk boolEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - System
Disk stringId - (Available since v1.210.0) The ID of system disk.
- System
Disk stringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- System
Disk stringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- System
Disk stringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - System
Disk intSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- System
Disk stringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- User
Data string - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Dictionary<string, object>
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- Allocate
Public boolIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- Auto
Release stringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - Auto
Renew intPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- Availability
Zone string - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - Cpu int
- The number of vCPUs.
- Credit
Specification string - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- Data
Disks []InstanceData Disk Args - The list of data disks created with instance. See
data_disks
below. - Dedicated
Host stringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - Deletion
Protection bool - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- Deployment
Set stringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- Deployment
Set stringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- Description string
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Dry
Run bool - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- Enable
Jumbo boolFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- Force
Delete bool - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- Host
Name string - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- Hpc
Cluster stringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- Http
Endpoint string - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - Http
Put intResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- Http
Tokens string - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- Image
Id string - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - Include
Data boolDisks - Whether to change instance disks charge type when changing instance charge type.
- Instance
Charge stringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - Instance
Name string - Instance
Type string - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - Internet
Charge stringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - Internet
Max intBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- Internet
Max intBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- Ipv6Address
Count int - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - Ipv6Addresses []string
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- Is
Outdated bool - Whether to use outdated instance type. Default to false.
- Key
Name string - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- Kms
Encrypted stringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - Kms
Encryption map[string]interface{}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - Launch
Template stringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - Launch
Template stringName - The name of the launch template.
- Launch
Template stringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - Maintenance
Action string - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- Maintenance
Notify bool - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - Maintenance
Time InstanceMaintenance Time Args - The time of maintenance. See
maintenance_time
below. - Memory int
- The memory size of the instance. Unit: MiB.
- Network
Interface stringId - The ID of the ENI.
- Network
Interfaces InstanceNetwork Interfaces Args - The list of network interfaces created with instance. See
network_interfaces
below. - Operator
Type string - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - Os
Name string - The name of the operating system of the instance.
- Os
Type string - The type of the operating system of the instance.
- Password string
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- Period int
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- Period
Unit string - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - Primary
Ip stringAddress - The primary private IP address of the ENI.
- Private
Ip string - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - Public
Ip string - The instance public ip.
- Renewal
Status string - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- Resource
Group stringId - The Id of resource group which the instance belongs.
- Role
Name string - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - Secondary
Private intIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - Secondary
Private []stringIps - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- Security
Enhancement stringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- Security
Groups []string - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - Spot
Duration int - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - Spot
Price float64Limit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- Spot
Strategy string The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- Status string
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - Stopped
Mode string - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- System
Disk stringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- System
Disk stringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - System
Disk stringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- System
Disk stringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - System
Disk boolEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - System
Disk stringId - (Available since v1.210.0) The ID of system disk.
- System
Disk stringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- System
Disk stringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- System
Disk stringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - System
Disk intSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- System
Disk stringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- map[string]string
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- User
Data string - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- map[string]interface{}
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate
Public BooleanIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto
Release StringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto
Renew IntegerPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability
Zone String - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - cpu Integer
- The number of vCPUs.
- credit
Specification String - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data
Disks List<InstanceData Disk> - The list of data disks created with instance. See
data_disks
below. - dedicated
Host StringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion
Protection Boolean - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment
Set StringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- deployment
Set StringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description String
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry
Run Boolean - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable
Jumbo BooleanFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force
Delete Boolean - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host
Name String - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc
Cluster StringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http
Endpoint String - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http
Put IntegerResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http
Tokens String - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image
Id String - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include
Data BooleanDisks - Whether to change instance disks charge type when changing instance charge type.
- instance
Charge StringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance
Name String - instance
Type String - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet
Charge StringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet
Max IntegerBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet
Max IntegerBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6Address
Count Integer - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is
Outdated Boolean - Whether to use outdated instance type. Default to false.
- key
Name String - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms
Encrypted StringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms
Encryption Map<String,Object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch
Template StringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch
Template StringName - The name of the launch template.
- launch
Template StringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance
Action String - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance
Notify Boolean - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance
Time InstanceMaintenance Time - The time of maintenance. See
maintenance_time
below. - memory Integer
- The memory size of the instance. Unit: MiB.
- network
Interface StringId - The ID of the ENI.
- network
Interfaces InstanceNetwork Interfaces - The list of network interfaces created with instance. See
network_interfaces
below. - operator
Type String - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - os
Name String - The name of the operating system of the instance.
- os
Type String - The type of the operating system of the instance.
- password String
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period Integer
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period
Unit String - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - primary
Ip StringAddress - The primary private IP address of the ENI.
- private
Ip String - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - public
Ip String - The instance public ip.
- renewal
Status String - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource
Group StringId - The Id of resource group which the instance belongs.
- role
Name String - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary
Private IntegerIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary
Private List<String>Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security
Enhancement StringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security
Groups List<String> - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot
Duration Integer - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot
Price DoubleLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot
Strategy String The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status String
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped
Mode String - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system
Disk StringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- system
Disk StringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system
Disk StringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system
Disk StringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system
Disk BooleanEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system
Disk StringId - (Available since v1.210.0) The ID of system disk.
- system
Disk StringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system
Disk StringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system
Disk StringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system
Disk IntegerSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system
Disk StringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Map<String,String>
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user
Data String - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Map<String,Object>
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate
Public booleanIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto
Release stringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto
Renew numberPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability
Zone string - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - cpu number
- The number of vCPUs.
- credit
Specification string - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data
Disks InstanceData Disk[] - The list of data disks created with instance. See
data_disks
below. - dedicated
Host stringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion
Protection boolean - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment
Set stringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- deployment
Set stringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description string
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry
Run boolean - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable
Jumbo booleanFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force
Delete boolean - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host
Name string - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc
Cluster stringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http
Endpoint string - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http
Put numberResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http
Tokens string - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image
Id string - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include
Data booleanDisks - Whether to change instance disks charge type when changing instance charge type.
- instance
Charge stringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance
Name string - instance
Type string - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet
Charge stringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet
Max numberBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet
Max numberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6Address
Count number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses string[]
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is
Outdated boolean - Whether to use outdated instance type. Default to false.
- key
Name string - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms
Encrypted stringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms
Encryption {[key: string]: any}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch
Template stringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch
Template stringName - The name of the launch template.
- launch
Template stringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance
Action string - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance
Notify boolean - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance
Time InstanceMaintenance Time - The time of maintenance. See
maintenance_time
below. - memory number
- The memory size of the instance. Unit: MiB.
- network
Interface stringId - The ID of the ENI.
- network
Interfaces InstanceNetwork Interfaces - The list of network interfaces created with instance. See
network_interfaces
below. - operator
Type string - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - os
Name string - The name of the operating system of the instance.
- os
Type string - The type of the operating system of the instance.
- password string
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period number
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period
Unit string - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - primary
Ip stringAddress - The primary private IP address of the ENI.
- private
Ip string - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - public
Ip string - The instance public ip.
- renewal
Status string - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource
Group stringId - The Id of resource group which the instance belongs.
- role
Name string - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary
Private numberIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary
Private string[]Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security
Enhancement stringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security
Groups string[] - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot
Duration number - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot
Price numberLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot
Strategy string The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status string
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped
Mode string - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system
Disk stringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- system
Disk stringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system
Disk stringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system
Disk stringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system
Disk booleanEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system
Disk stringId - (Available since v1.210.0) The ID of system disk.
- system
Disk stringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system
Disk stringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system
Disk stringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system
Disk numberSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system
Disk stringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user
Data string - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- {[key: string]: any}
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id string - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate_
public_ boolip - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto_
release_ strtime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto_
renew_ intperiod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability_
zone str - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - cpu int
- The number of vCPUs.
- credit_
specification str - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data_
disks Sequence[InstanceData Disk Args] - The list of data disks created with instance. See
data_disks
below. - dedicated_
host_ strid - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion_
protection bool - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment_
set_ strgroup_ no - The group number of the instance in a deployment set when the deployment set is use.
- deployment_
set_ strid - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description str
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry_
run bool - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable_
jumbo_ boolframe Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force_
delete bool - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host_
name str - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc_
cluster_ strid - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http_
endpoint str - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http_
put_ intresponse_ hop_ limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http_
tokens str - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image_
id str - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include_
data_ booldisks - Whether to change instance disks charge type when changing instance charge type.
- instance_
charge_ strtype - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance_
name str - instance_
type str - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet_
charge_ strtype - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet_
max_ intbandwidth_ in - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet_
max_ intbandwidth_ out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6_
address_ intcount - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6_
addresses Sequence[str] - A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is_
outdated bool - Whether to use outdated instance type. Default to false.
- key_
name str - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms_
encrypted_ strpassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms_
encryption_ Mapping[str, Any]context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch_
template_ strid - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch_
template_ strname - The name of the launch template.
- launch_
template_ strversion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance_
action str - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance_
notify bool - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance_
time InstanceMaintenance Time Args - The time of maintenance. See
maintenance_time
below. - memory int
- The memory size of the instance. Unit: MiB.
- network_
interface_ strid - The ID of the ENI.
- network_
interfaces InstanceNetwork Interfaces Args - The list of network interfaces created with instance. See
network_interfaces
below. - operator_
type str - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - os_
name str - The name of the operating system of the instance.
- os_
type str - The type of the operating system of the instance.
- password str
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period int
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period_
unit str - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - primary_
ip_ straddress - The primary private IP address of the ENI.
- private_
ip str - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - public_
ip str - The instance public ip.
- renewal_
status str - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource_
group_ strid - The Id of resource group which the instance belongs.
- role_
name str - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary_
private_ intip_ address_ count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary_
private_ Sequence[str]ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security_
enhancement_ strstrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security_
groups Sequence[str] - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot_
duration int - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot_
price_ floatlimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot_
strategy str The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status str
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped_
mode str - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system_
disk_ strauto_ snapshot_ policy_ id - The ID of the automatic snapshot policy applied to the system disk.
- system_
disk_ strcategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system_
disk_ strdescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system_
disk_ strencrypt_ algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system_
disk_ boolencrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system_
disk_ strid - (Available since v1.210.0) The ID of system disk.
- system_
disk_ strkms_ key_ id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system_
disk_ strname - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system_
disk_ strperformance_ level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system_
disk_ intsize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system_
disk_ strstorage_ cluster_ id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user_
data str - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Mapping[str, Any]
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch_
id str - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- allocate
Public BooleanIp - It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
- auto
Release StringTime - The automatic release time of the
PostPaid
instance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. - auto
Renew NumberPeriod - Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_type
isPrePaid
. Default to 1. Valid value:- [1, 2, 3, 6, 12] when
period_unit
in "Month" - [1, 2, 3] when
period_unit
in "Week"
- [1, 2, 3, 6, 12] when
- availability
Zone String - The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id
. - cpu Number
- The number of vCPUs.
- credit
Specification String - Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
- data
Disks List<Property Map> - The list of data disks created with instance. See
data_disks
below. - dedicated
Host StringId - The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the
spot_strategy
andspot_price_limit
parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. - deletion
Protection Boolean - Whether enable the deletion protection or not. It does not work when the instance is spot. Default value:
false
.- true: Enable deletion protection.
- false: Disable deletion protection.
- deployment
Set StringGroup No - The group number of the instance in a deployment set when the deployment set is use.
- deployment
Set StringId - The ID of the deployment set to which to deploy the instance. NOTE: From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "".
- description String
- Description of the instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- dry
Run Boolean - Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperation
error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
- enable
Jumbo BooleanFrame Specifies whether to enable the Jumbo Frames feature for the instance. Valid values:
true
,false
.NOTE: System disk category
cloud
has been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiency
andcloud_ssd
disk.NOTE: From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying
period
andperiod_unit
, but it is irreversible.NOTE: From version 1.5.0, instance's private IP address can be specified when creating VPC network instance.
NOTE: From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect.
NOTE: From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth".
NOTE: From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect.
- force
Delete Boolean - If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month".
- host
Name String - Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
- hpc
Cluster StringId - The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
- http
Endpoint String - Specifies whether to enable the access channel for instance metadata. Valid values:
enabled
,disabled
. Default value:enabled
. - http
Put NumberResponse Hop Limit - The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
- http
Tokens String - Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
- image
Id String - The Image to use for the instance. ECS instance's image can be replaced via changing
image_id
. When it is changed, the instance will reboot to make the change take effect. If you do not uselaunch_template_id
orlaunch_template_name
to specify a launch template, you must specifyimage_id
. - include
Data BooleanDisks - Whether to change instance disks charge type when changing instance charge type.
- instance
Charge StringType - Valid values are
PrePaid
,PostPaid
, The default isPostPaid
. NOTE: Since 1.9.6, it can be changed each other betweenPostPaid
andPrePaid
. However, since some limitation about CPU core count in one month, there strongly recommends thatDon't change instance_charge_type frequentlly in one month
. - instance
Name String - instance
Type String - The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifyinstance_type
. - internet
Charge StringType - Internet charge type of the instance, Valid values are
PayByBandwidth
,PayByTraffic
. Default isPayByTraffic
. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". - internet
Max NumberBandwidth In - Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
- internet
Max NumberBandwidth Out - Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
- ipv6Address
Count Number - The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. NOTE: You cannot specify both the
ipv6_addresses
andipv6_address_count
parameters. - ipv6Addresses List<String>
- A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
- is
Outdated Boolean - Whether to use outdated instance type. Default to false.
- key
Name String - The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
- kms
Encrypted StringPassword - An KMS encrypts password used to an instance. If the
password
is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. - kms
Encryption Map<Any>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating an instance withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. When it is changed, the instance will reboot to make the change take effect. - launch
Template StringId - The ID of the launch template. For more information, see DescribeLaunchTemplates.To use a launch template to create an instance, you must use the
launch_template_id
orlaunch_template_name
parameter to specify the launch template. - launch
Template StringName - The name of the launch template.
- launch
Template StringVersion - The version of the launch template. If you set
launch_template_id
orlaunch_template_name
parameter but do not set the version number of the launch template, the default template version is used. - maintenance
Action String - The maintenance action. Valid values:
Stop
,AutoRecover
andAutoRedeploy
.Stop
: stops the instance.AutoRecover
: automatically recovers the instance.AutoRedeploy
: fails the instance over, which may cause damage to the data disks attached to the instance.
- maintenance
Notify Boolean - Specifies whether to send an event notification before instance shutdown. Valid values:
true
,false
. Default value:false
. - maintenance
Time Property Map - The time of maintenance. See
maintenance_time
below. - memory Number
- The memory size of the instance. Unit: MiB.
- network
Interface StringId - The ID of the ENI.
- network
Interfaces Property Map - The list of network interfaces created with instance. See
network_interfaces
below. - operator
Type String - The operation type. It is valid when
instance_charge_type
isPrePaid
. Default value:upgrade
. Valid values:upgrade
,downgrade
. NOTE: When the new instance type specified by theinstance_type
parameter has lower specifications than the current instance type, you must setoperator_type
todowngrade
. - os
Name String - The name of the operating system of the instance.
- os
Type String - The type of the operating system of the instance.
- password String
- Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
- period Number
The duration that you will buy the resource, in month. It is valid and required when
instance_charge_type
isPrePaid
. Valid values:- [1-9, 12, 24, 36, 48, 60] when
period_unit
in "Month" - [1-3] when
period_unit
in "Week"
NOTE: The attribute
period
is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningpulumi up
will not effect the resource.- [1-9, 12, 24, 36, 48, 60] when
- period
Unit String - The duration unit that you will buy the resource. It is valid when
instance_charge_type
is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". - primary
Ip StringAddress - The primary private IP address of the ENI.
- private
Ip String - Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_id
is specified. When it is changed, the instance will reboot to make the change take effect. - public
Ip String - The instance public ip.
- renewal
Status String - Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_type
isPrePaid
. Default to "Normal". Valid values:AutoRenewal
: Enable auto renewal.Normal
: Disable auto renewal.NotRenewal
: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- resource
Group StringId - The Id of resource group which the instance belongs.
- role
Name String - Instance RAM role name. The name is provided and maintained by RAM. You can use
alicloud.ram.Role
to create a new one. - secondary
Private NumberIp Address Count - The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. NOTE: To assign secondary private IP addresses, you must specify
secondary_private_ips
orsecondary_private_ip_address_count
but not both. - secondary
Private List<String>Ips - A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch.
- security
Enhancement StringStrategy - The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images.
- Deactive: Disable security enhancement strategy, it works on all images.
- security
Groups List<String> - A list of security group ids to associate with. If you do not use
launch_template_id
orlaunch_template_name
to specify a launch template, you must specifysecurity_groups
. - spot
Duration Number - The retention time of the preemptive instance in hours. Valid values:
0
,1
,2
,3
,4
,5
,6
. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is0
, the mode is no protection period. Default value is1
. - spot
Price NumberLimit - The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.
- spot
Strategy String The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_type
is 'PostPaid'. Value range:- NoSpot: A regular Pay-As-You-Go instance.
- SpotWithPriceLimit: A price threshold for a spot instance
- SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
Default to NoSpot. Note: Currently, the spot instance only supports domestic site account.
- status String
- The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to
Running
. - stopped
Mode String - The stop mode of the pay-as-you-go instance. Valid values:
StopCharging
,KeepCharging
,Not-applicable
. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value isStopCharging
. For more information, see "Enable the economical mode" in Economical mode. Otherwise, the default value isKeepCharging
. Note:Not-applicable
: Economical mode is not applicable to the instance.`KeepCharging
: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance.StopCharging
: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region.
- system
Disk StringAuto Snapshot Policy Id - The ID of the automatic snapshot policy applied to the system disk.
- system
Disk StringCategory - Valid values are
ephemeral_ssd
,cloud_efficiency
,cloud_ssd
,cloud_essd
,cloud
,cloud_auto
,cloud_essd_entry
. only is used to some none I/O optimized instance. Valid valuescloud_auto
Available since v1.184.0. - system
Disk StringDescription - The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
- system
Disk StringEncrypt Algorithm - The algorithm to be used to encrypt the system disk. Valid values are
aes-256
,sm4-128
. Default value isaes-256
. - system
Disk BooleanEncrypted - Specifies whether to encrypt the system disk. Valid values:
true
,false
. Default value:false
. - system
Disk StringId - (Available since v1.210.0) The ID of system disk.
- system
Disk StringKms Key Id - The ID of the Key Management Service (KMS) key to be used for the system disk.
- system
Disk StringName - The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
- system
Disk StringPerformance Level - The performance level of the ESSD used as the system disk, Valid values:
PL0
,PL1
,PL2
,PL3
, Default toPL1
;For more information about ESSD, See Encryption Context. - system
Disk NumberSize - Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
- system
Disk StringStorage Cluster Id - The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters.
- Map<String>
- A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- user
Data String - User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. It supports to setting a base64-encoded value, and it is the recommended usage. From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. Note: Not all changes will take effect, and it depends on cloud-init module type.
- Map<Any>
- A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String - The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
Supporting Types
InstanceDataDisk, InstanceDataDiskArgs
- Size int
- The size of the data disk.
- cloud:[5, 2000]
- cloud_efficiency:[20, 32768]
- cloud_ssd:[20, 32768]
- cloud_essd:[20, 32768]
- ephemeral_ssd: [5, 800]
- Auto
Snapshot stringPolicy Id - The ID of the automatic snapshot policy applied to the system disk.
- Category string
- The category of the disk:
- Delete
With boolInstance - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value:
true
. - Description string
- The description of the data disk.
- Device string
- The mount point of the data disk.
- Encrypted bool
- Encrypted the data in this disk. Default value:
false
. - Kms
Key stringId - The KMS key ID corresponding to the Nth data disk.
- Name string
- The name of the data disk.
- Performance
Level string - The performance level of the ESSD used as data disk:
PL0
: A single ESSD can deliver up to 10,000 random read/write IOPS.PL1
: A single ESSD can deliver up to 50,000 random read/write IOPS.PL2
: A single ESSD can deliver up to 100,000 random read/write IOPS.PL3
: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default toPL1
.
- Snapshot
Id string - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
- Size int
- The size of the data disk.
- cloud:[5, 2000]
- cloud_efficiency:[20, 32768]
- cloud_ssd:[20, 32768]
- cloud_essd:[20, 32768]
- ephemeral_ssd: [5, 800]
- Auto
Snapshot stringPolicy Id - The ID of the automatic snapshot policy applied to the system disk.
- Category string
- The category of the disk:
- Delete
With boolInstance - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value:
true
. - Description string
- The description of the data disk.
- Device string
- The mount point of the data disk.
- Encrypted bool
- Encrypted the data in this disk. Default value:
false
. - Kms
Key stringId - The KMS key ID corresponding to the Nth data disk.
- Name string
- The name of the data disk.
- Performance
Level string - The performance level of the ESSD used as data disk:
PL0
: A single ESSD can deliver up to 10,000 random read/write IOPS.PL1
: A single ESSD can deliver up to 50,000 random read/write IOPS.PL2
: A single ESSD can deliver up to 100,000 random read/write IOPS.PL3
: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default toPL1
.
- Snapshot
Id string - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
- size Integer
- The size of the data disk.
- cloud:[5, 2000]
- cloud_efficiency:[20, 32768]
- cloud_ssd:[20, 32768]
- cloud_essd:[20, 32768]
- ephemeral_ssd: [5, 800]
- auto
Snapshot StringPolicy Id - The ID of the automatic snapshot policy applied to the system disk.
- category String
- The category of the disk:
- delete
With BooleanInstance - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value:
true
. - description String
- The description of the data disk.
- device String
- The mount point of the data disk.
- encrypted Boolean
- Encrypted the data in this disk. Default value:
false
. - kms
Key StringId - The KMS key ID corresponding to the Nth data disk.
- name String
- The name of the data disk.
- performance
Level String - The performance level of the ESSD used as data disk:
PL0
: A single ESSD can deliver up to 10,000 random read/write IOPS.PL1
: A single ESSD can deliver up to 50,000 random read/write IOPS.PL2
: A single ESSD can deliver up to 100,000 random read/write IOPS.PL3
: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default toPL1
.
- snapshot
Id String - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
- size number
- The size of the data disk.
- cloud:[5, 2000]
- cloud_efficiency:[20, 32768]
- cloud_ssd:[20, 32768]
- cloud_essd:[20, 32768]
- ephemeral_ssd: [5, 800]
- auto
Snapshot stringPolicy Id - The ID of the automatic snapshot policy applied to the system disk.
- category string
- The category of the disk:
- delete
With booleanInstance - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value:
true
. - description string
- The description of the data disk.
- device string
- The mount point of the data disk.
- encrypted boolean
- Encrypted the data in this disk. Default value:
false
. - kms
Key stringId - The KMS key ID corresponding to the Nth data disk.
- name string
- The name of the data disk.
- performance
Level string - The performance level of the ESSD used as data disk:
PL0
: A single ESSD can deliver up to 10,000 random read/write IOPS.PL1
: A single ESSD can deliver up to 50,000 random read/write IOPS.PL2
: A single ESSD can deliver up to 100,000 random read/write IOPS.PL3
: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default toPL1
.
- snapshot
Id string - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
- size int
- The size of the data disk.
- cloud:[5, 2000]
- cloud_efficiency:[20, 32768]
- cloud_ssd:[20, 32768]
- cloud_essd:[20, 32768]
- ephemeral_ssd: [5, 800]
- auto_
snapshot_ strpolicy_ id - The ID of the automatic snapshot policy applied to the system disk.
- category str
- The category of the disk:
- delete_
with_ boolinstance - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value:
true
. - description str
- The description of the data disk.
- device str
- The mount point of the data disk.
- encrypted bool
- Encrypted the data in this disk. Default value:
false
. - kms_
key_ strid - The KMS key ID corresponding to the Nth data disk.
- name str
- The name of the data disk.
- performance_
level str - The performance level of the ESSD used as data disk:
PL0
: A single ESSD can deliver up to 10,000 random read/write IOPS.PL1
: A single ESSD can deliver up to 50,000 random read/write IOPS.PL2
: A single ESSD can deliver up to 100,000 random read/write IOPS.PL3
: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default toPL1
.
- snapshot_
id str - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
- size Number
- The size of the data disk.
- cloud:[5, 2000]
- cloud_efficiency:[20, 32768]
- cloud_ssd:[20, 32768]
- cloud_essd:[20, 32768]
- ephemeral_ssd: [5, 800]
- auto
Snapshot StringPolicy Id - The ID of the automatic snapshot policy applied to the system disk.
- category String
- The category of the disk:
- delete
With BooleanInstance - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don't set this param. Default value:
true
. - description String
- The description of the data disk.
- device String
- The mount point of the data disk.
- encrypted Boolean
- Encrypted the data in this disk. Default value:
false
. - kms
Key StringId - The KMS key ID corresponding to the Nth data disk.
- name String
- The name of the data disk.
- performance
Level String - The performance level of the ESSD used as data disk:
PL0
: A single ESSD can deliver up to 10,000 random read/write IOPS.PL1
: A single ESSD can deliver up to 50,000 random read/write IOPS.PL2
: A single ESSD can deliver up to 100,000 random read/write IOPS.PL3
: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Default toPL1
.
- snapshot
Id String - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
InstanceMaintenanceTime, InstanceMaintenanceTimeArgs
- End
Time string - The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8. - Start
Time string - The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
- End
Time string - The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8. - Start
Time string - The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
- end
Time String - The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8. - start
Time String - The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
- end
Time string - The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8. - start
Time string - The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
- end_
time str - The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8. - start_
time str - The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
- end
Time String - The end time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8. - start
Time String - The start time of maintenance. The time must be on the hour at exactly 0 minute and 0 second. The
start_time
andend_time
parameters must be specified at the same time. Theend_time
value must be 1 to 23 hours later than thestart_time
value. Specify the time in the HH:mm:ss format. The time must be in UTC+8.
InstanceNetworkInterfaces, InstanceNetworkInterfacesArgs
- Network
Interface stringId - The ID of the secondary ENI.
- Network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
: Uses the TCP communication mode.HighPerformance
: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
- Security
Group List<string>Ids - The ID of security group N to which to assign ENI N.
- Vswitch
Id string - The ID of the vSwitch to which to connect ENI N.
- Network
Interface stringId - The ID of the secondary ENI.
- Network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
: Uses the TCP communication mode.HighPerformance
: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
- Security
Group []stringIds - The ID of security group N to which to assign ENI N.
- Vswitch
Id string - The ID of the vSwitch to which to connect ENI N.
- network
Interface StringId - The ID of the secondary ENI.
- network
Interface StringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
: Uses the TCP communication mode.HighPerformance
: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
- security
Group List<String>Ids - The ID of security group N to which to assign ENI N.
- vswitch
Id String - The ID of the vSwitch to which to connect ENI N.
- network
Interface stringId - The ID of the secondary ENI.
- network
Interface stringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
: Uses the TCP communication mode.HighPerformance
: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
- security
Group string[]Ids - The ID of security group N to which to assign ENI N.
- vswitch
Id string - The ID of the vSwitch to which to connect ENI N.
- network_
interface_ strid - The ID of the secondary ENI.
- network_
interface_ strtraffic_ mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
: Uses the TCP communication mode.HighPerformance
: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
- security_
group_ Sequence[str]ids - The ID of security group N to which to assign ENI N.
- vswitch_
id str - The ID of the vSwitch to which to connect ENI N.
- network
Interface StringId - The ID of the secondary ENI.
- network
Interface StringTraffic Mode - The communication mode of the ENI. Default value:
Standard
. Valid values:Standard
: Uses the TCP communication mode.HighPerformance
: Uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
- security
Group List<String>Ids - The ID of security group N to which to assign ENI N.
- vswitch
Id String - The ID of the vSwitch to which to connect ENI N.
Import
Instance can be imported using the id, e.g.
$ pulumi import alicloud:ecs/instance:Instance example i-abc12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.