Instance

Create a Instance Resource

def Instance(resource_name, opts=None, allocate_public_ip=None, auto_release_time=None, auto_renew_period=None, availability_zone=None, credit_specification=None, data_disks=None, deletion_protection=None, description=None, dry_run=None, force_delete=None, host_name=None, image_id=None, include_data_disks=None, instance_charge_type=None, instance_name=None, instance_type=None, internet_charge_type=None, internet_max_bandwidth_in=None, internet_max_bandwidth_out=None, io_optimized=None, is_outdated=None, key_name=None, kms_encrypted_password=None, kms_encryption_context=None, password=None, period=None, period_unit=None, private_ip=None, renewal_status=None, resource_group_id=None, role_name=None, security_enhancement_strategy=None, security_groups=None, spot_price_limit=None, spot_strategy=None, status=None, subnet_id=None, system_disk_auto_snapshot_policy_id=None, system_disk_category=None, system_disk_size=None, tags=None, user_data=None, volume_tags=None, vswitch_id=None, __props__=None);
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Instance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Instance resource accepts the following input properties:

ImageId 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.

InstanceType string

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

SecurityGroups List<string>

A list of security group ids to associate with.

AllocatePublicIp bool

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

AutoRenewPeriod int

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

AvailabilityZone string

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

CreditSpecification string

Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.

DataDisks List<Pulumi.AliCloud.Ecs.Inputs.InstanceDataDiskArgs>

The list of data disks created with instance.

DeletionProtection bool

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

Description string

The description of the data disk.

DryRun 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.

ForceDelete 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”.

HostName 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.

IncludeDataDisks bool

Whether to change instance disks charge type when changing instance charge type.

InstanceChargeType string

Valid values are PrePaid, PostPaid, The default is PostPaid.

InstanceName string
InternetChargeType string

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

InternetMaxBandwidthIn int

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.

InternetMaxBandwidthOut int

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

IoOptimized string

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

IsOutdated bool

Whether to use outdated instance type. Default to false.

KeyName string

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

KmsEncryptedPassword string

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.

KmsEncryptionContext Dictionary<string, object>

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

PeriodUnit 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”.

PrivateIp 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.

RenewalStatus string

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.

ResourceGroupId string

The Id of resource group which the instance belongs.

RoleName string

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

SecurityEnhancementStrategy string

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.

SpotPriceLimit double

The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.

SpotStrategy 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

Status string

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

SubnetId string
SystemDiskAutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

SystemDiskCategory string

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

SystemDiskSize int

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}.

Tags 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.

UserData string

User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

VolumeTags 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.

VswitchId 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.

ImageId 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.

InstanceType string

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

SecurityGroups []string

A list of security group ids to associate with.

AllocatePublicIp bool

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

AutoRenewPeriod int

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

AvailabilityZone string

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

CreditSpecification string

Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.

DataDisks []InstanceDataDisk

The list of data disks created with instance.

DeletionProtection bool

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

Description string

The description of the data disk.

DryRun 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.

ForceDelete 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”.

HostName 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.

IncludeDataDisks bool

Whether to change instance disks charge type when changing instance charge type.

InstanceChargeType string

Valid values are PrePaid, PostPaid, The default is PostPaid.

InstanceName string
InternetChargeType string

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

InternetMaxBandwidthIn int

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.

InternetMaxBandwidthOut int

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

IoOptimized string

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

IsOutdated bool

Whether to use outdated instance type. Default to false.

KeyName string

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

KmsEncryptedPassword string

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.

KmsEncryptionContext map[string]interface{}

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

PeriodUnit 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”.

PrivateIp 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.

RenewalStatus string

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.

ResourceGroupId string

The Id of resource group which the instance belongs.

RoleName string

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

SecurityEnhancementStrategy string

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.

SpotPriceLimit float64

The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.

SpotStrategy 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

Status string

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

SubnetId string
SystemDiskAutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

SystemDiskCategory string

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

SystemDiskSize int

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}.

Tags 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.

UserData string

User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

VolumeTags 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.

VswitchId 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.

imageId 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.

instanceType string

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

securityGroups string[]

A list of security group ids to associate with.

allocatePublicIp boolean

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime string

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

autoRenewPeriod number

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

availabilityZone string

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

creditSpecification string

Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.

dataDisks InstanceDataDisk[]

The list of data disks created with instance.

deletionProtection boolean

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

description string

The description of the data disk.

dryRun 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.

forceDelete 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”.

hostName 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.

includeDataDisks boolean

Whether to change instance disks charge type when changing instance charge type.

instanceChargeType string

Valid values are PrePaid, PostPaid, The default is PostPaid.

instanceName string
internetChargeType string

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

internetMaxBandwidthIn number

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.

internetMaxBandwidthOut number

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

ioOptimized string

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

isOutdated boolean

Whether to use outdated instance type. Default to false.

keyName string

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

kmsEncryptedPassword string

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.

kmsEncryptionContext {[key: string]: any}

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

periodUnit 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”.

privateIp 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.

renewalStatus string

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.

resourceGroupId string

The Id of resource group which the instance belongs.

roleName string

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

securityEnhancementStrategy string

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.

spotPriceLimit number

The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.

spotStrategy 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

status string

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

subnetId string
systemDiskAutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

systemDiskCategory string

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

systemDiskSize number

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}.

tags {[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.

userData string

User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

volumeTags {[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.

vswitchId 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.

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.

instance_type str

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

security_groups List[str]

A list of security group ids to associate with.

allocate_public_ip bool

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

auto_release_time str

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

auto_renew_period float

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

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 List[InstanceDataDisk]

The list of data disks created with instance.

deletion_protection bool

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

description str

The description of the data disk.

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.

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.

include_data_disks bool

Whether to change instance disks charge type when changing instance charge type.

instance_charge_type str

Valid values are PrePaid, PostPaid, The default is PostPaid.

instance_name str
internet_charge_type str

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

internet_max_bandwidth_in float

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_bandwidth_out float

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

io_optimized str

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

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_password str

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_context Dict[str, Any]

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 float

The duration that you will buy the resource, in month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

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 is PrePaid. 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_id str

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.

security_enhancement_strategy str

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.

spot_price_limit float

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

status str

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

subnet_id str
system_disk_auto_snapshot_policy_id str

The ID of the automatic snapshot policy applied to the system disk.

system_disk_category str

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

system_disk_size float

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}.

tags Dict[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. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

volume_tags Dict[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.

Outputs

All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
PublicIp string

The instance public ip.

Id string
The provider-assigned unique ID for this managed resource.
PublicIp string

The instance public ip.

id string
The provider-assigned unique ID for this managed resource.
publicIp string

The instance public ip.

id str
The provider-assigned unique ID for this managed resource.
public_ip str

The instance public ip.

Look up an 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
static get(resource_name, id, opts=None, allocate_public_ip=None, auto_release_time=None, auto_renew_period=None, availability_zone=None, credit_specification=None, data_disks=None, deletion_protection=None, description=None, dry_run=None, force_delete=None, host_name=None, image_id=None, include_data_disks=None, instance_charge_type=None, instance_name=None, instance_type=None, internet_charge_type=None, internet_max_bandwidth_in=None, internet_max_bandwidth_out=None, io_optimized=None, is_outdated=None, key_name=None, kms_encrypted_password=None, kms_encryption_context=None, password=None, period=None, period_unit=None, private_ip=None, public_ip=None, renewal_status=None, resource_group_id=None, role_name=None, security_enhancement_strategy=None, security_groups=None, spot_price_limit=None, spot_strategy=None, status=None, subnet_id=None, system_disk_auto_snapshot_policy_id=None, system_disk_category=None, system_disk_size=None, tags=None, user_data=None, volume_tags=None, vswitch_id=None, __props__=None);
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)
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.

The following state arguments are supported:

AllocatePublicIp bool

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

AutoRenewPeriod int

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

AvailabilityZone string

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

CreditSpecification string

Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.

DataDisks List<Pulumi.AliCloud.Ecs.Inputs.InstanceDataDiskArgs>

The list of data disks created with instance.

DeletionProtection bool

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

Description string

The description of the data disk.

DryRun 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.

ForceDelete 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”.

HostName 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.

ImageId 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.

IncludeDataDisks bool

Whether to change instance disks charge type when changing instance charge type.

InstanceChargeType string

Valid values are PrePaid, PostPaid, The default is PostPaid.

InstanceName string
InstanceType string

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

InternetChargeType string

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

InternetMaxBandwidthIn int

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.

InternetMaxBandwidthOut int

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

IoOptimized string

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

IsOutdated bool

Whether to use outdated instance type. Default to false.

KeyName string

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

KmsEncryptedPassword string

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.

KmsEncryptionContext Dictionary<string, object>

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

PeriodUnit 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”.

PrivateIp 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.

PublicIp string

The instance public ip.

RenewalStatus string

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.

ResourceGroupId string

The Id of resource group which the instance belongs.

RoleName string

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

SecurityEnhancementStrategy string

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.

SecurityGroups List<string>

A list of security group ids to associate with.

SpotPriceLimit double

The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.

SpotStrategy 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

Status string

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

SubnetId string
SystemDiskAutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

SystemDiskCategory string

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

SystemDiskSize int

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}.

Tags 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.

UserData string

User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

VolumeTags 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.

VswitchId 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.

AllocatePublicIp bool

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

AutoReleaseTime string

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

AutoRenewPeriod int

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

AvailabilityZone string

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

CreditSpecification string

Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.

DataDisks []InstanceDataDisk

The list of data disks created with instance.

DeletionProtection bool

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

Description string

The description of the data disk.

DryRun 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.

ForceDelete 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”.

HostName 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.

ImageId 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.

IncludeDataDisks bool

Whether to change instance disks charge type when changing instance charge type.

InstanceChargeType string

Valid values are PrePaid, PostPaid, The default is PostPaid.

InstanceName string
InstanceType string

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

InternetChargeType string

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

InternetMaxBandwidthIn int

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.

InternetMaxBandwidthOut int

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

IoOptimized string

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

IsOutdated bool

Whether to use outdated instance type. Default to false.

KeyName string

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

KmsEncryptedPassword string

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.

KmsEncryptionContext map[string]interface{}

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

PeriodUnit 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”.

PrivateIp 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.

PublicIp string

The instance public ip.

RenewalStatus string

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.

ResourceGroupId string

The Id of resource group which the instance belongs.

RoleName string

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

SecurityEnhancementStrategy string

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.

SecurityGroups []string

A list of security group ids to associate with.

SpotPriceLimit float64

The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.

SpotStrategy 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

Status string

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

SubnetId string
SystemDiskAutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

SystemDiskCategory string

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

SystemDiskSize int

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}.

Tags 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.

UserData string

User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

VolumeTags 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.

VswitchId 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.

allocatePublicIp boolean

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

autoReleaseTime string

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

autoRenewPeriod number

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

availabilityZone string

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

creditSpecification string

Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.

dataDisks InstanceDataDisk[]

The list of data disks created with instance.

deletionProtection boolean

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

description string

The description of the data disk.

dryRun 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.

forceDelete 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”.

hostName 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.

imageId 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.

includeDataDisks boolean

Whether to change instance disks charge type when changing instance charge type.

instanceChargeType string

Valid values are PrePaid, PostPaid, The default is PostPaid.

instanceName string
instanceType string

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

internetChargeType string

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

internetMaxBandwidthIn number

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.

internetMaxBandwidthOut number

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

ioOptimized string

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

isOutdated boolean

Whether to use outdated instance type. Default to false.

keyName string

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

kmsEncryptedPassword string

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.

kmsEncryptionContext {[key: string]: any}

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

periodUnit 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”.

privateIp 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.

publicIp string

The instance public ip.

renewalStatus string

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.

resourceGroupId string

The Id of resource group which the instance belongs.

roleName string

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

securityEnhancementStrategy string

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.

securityGroups string[]

A list of security group ids to associate with.

spotPriceLimit number

The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.

spotStrategy 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

status string

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

subnetId string
systemDiskAutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

systemDiskCategory string

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

systemDiskSize number

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}.

tags {[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.

userData string

User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

volumeTags {[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.

vswitchId 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_ip bool

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.

Deprecated: Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance.

auto_release_time str

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. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.

auto_renew_period float

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value: - [1, 2, 3, 6, 12] when period_unit in “Month” - [1, 2, 3] when period_unit in “Week”

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 List[InstanceDataDisk]

The list of data disks created with instance.

deletion_protection bool

Whether enable the deletion protection or not. - true: Enable deletion protection. - false: Disable deletion protection.

description str

The description of the data disk.

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.

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.

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.

include_data_disks bool

Whether to change instance disks charge type when changing instance charge type.

instance_charge_type str

Valid values are PrePaid, PostPaid, The default is PostPaid.

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.

internet_charge_type str

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.

internet_max_bandwidth_in float

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_bandwidth_out float

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

io_optimized str

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Deprecated: Attribute io_optimized has been deprecated on instance resource. All the launched alicloud instances will be IO optimized. Suggest to remove it from your template.

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_password str

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_context Dict[str, Any]

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

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 float

The duration that you will buy the resource, in month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid values: - [1-9, 12, 24, 36, 48, 60] when period_unit in “Month” - [1-3] when period_unit in “Week”

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.

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 is PrePaid. 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_id str

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.

security_enhancement_strategy str

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[str]

A list of security group ids to associate with.

spot_price_limit float

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

status str

The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to Running.

subnet_id str
system_disk_auto_snapshot_policy_id str

The ID of the automatic snapshot policy applied to the system disk.

system_disk_category str

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

system_disk_size float

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}.

tags Dict[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. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.

volume_tags Dict[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.

Supporting Types

InstanceDataDisk

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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]

AutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

Category string

The category of the disk: - cloud: The general cloud disk. - cloud_efficiency: The efficiency cloud disk. - cloud_ssd: The SSD cloud disk. - cloud_essd: The ESSD cloud disk. - ephemeral_ssd: The local SSD disk. Default to cloud_efficiency.

DeleteWithInstance bool

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.

Description string

The description of the data disk.

Encrypted bool

-(Optional, Bool, ForceNew) Encrypted the data in this disk.

Name string

The name of the data disk.

SnapshotId 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]

AutoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

Category string

The category of the disk: - cloud: The general cloud disk. - cloud_efficiency: The efficiency cloud disk. - cloud_ssd: The SSD cloud disk. - cloud_essd: The ESSD cloud disk. - ephemeral_ssd: The local SSD disk. Default to cloud_efficiency.

DeleteWithInstance bool

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.

Description string

The description of the data disk.

Encrypted bool

-(Optional, Bool, ForceNew) Encrypted the data in this disk.

Name string

The name of the data disk.

SnapshotId 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]

autoSnapshotPolicyId string

The ID of the automatic snapshot policy applied to the system disk.

category string

The category of the disk: - cloud: The general cloud disk. - cloud_efficiency: The efficiency cloud disk. - cloud_ssd: The SSD cloud disk. - cloud_essd: The ESSD cloud disk. - ephemeral_ssd: The local SSD disk. Default to cloud_efficiency.

deleteWithInstance boolean

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.

description string

The description of the data disk.

encrypted boolean

-(Optional, Bool, ForceNew) Encrypted the data in this disk.

name string

The name of the data disk.

snapshotId 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 float

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]

autoSnapshotPolicyId str

The ID of the automatic snapshot policy applied to the system disk.

category str

The category of the disk: - cloud: The general cloud disk. - cloud_efficiency: The efficiency cloud disk. - cloud_ssd: The SSD cloud disk. - cloud_essd: The ESSD cloud disk. - ephemeral_ssd: The local SSD disk. Default to cloud_efficiency.

delete_with_instance bool

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.

description str

The description of the data disk.

encrypted bool

-(Optional, Bool, ForceNew) Encrypted the data in this disk.

name str

The name of the data disk.

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.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.