Skip to content

InstanceCloneProps

Properties for defining a InstanceClone.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ecs-instanceclone

Initializer

import { InstanceCloneProps } from '@alicloud/ros-cdk-ecs'
const instanceCloneProps: InstanceCloneProps = { ... }

Properties

Name Type Description
sourceInstanceId string | @alicloud/ros-cdk-core.IResolvable Property sourceInstanceId: Source ecs instance used to copy properties to clone new ecs instance.
backendServerWeight number | @alicloud/ros-cdk-core.IResolvable Property backendServerWeight: The weight of backend server of load balancer.
deletionProtection boolean | @alicloud/ros-cdk-core.IResolvable Property deletionProtection: Whether an instance can be released manually through the console or API, deletion protection only support postPaid instance.
description string | @alicloud/ros-cdk-core.IResolvable Property description: Description of the instance, [2, 256] characters.
diskMappings @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | DiskMappingsProperty[] Property diskMappings: Disk mappings to attach to instance.
imageId string | @alicloud/ros-cdk-core.IResolvable Property imageId: Image ID to create ecs instance.
instanceChargeType string | @alicloud/ros-cdk-core.IResolvable Property instanceChargeType: Instance Charge type, allowed value: Prepaid and Postpaid.
instanceName string | @alicloud/ros-cdk-core.IResolvable Property instanceName: Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
internetMaxBandwidthIn number | @alicloud/ros-cdk-core.IResolvable Property internetMaxBandwidthIn: Max internet out band width setting, unit in Mbps(Mega bit per second).
keyPairName string | @alicloud/ros-cdk-core.IResolvable Property keyPairName: SSH key pair name.
loadBalancerIdToAttach string | @alicloud/ros-cdk-core.IResolvable Property loadBalancerIdToAttach: After the instance is created.
password string | @alicloud/ros-cdk-core.IResolvable Property password: Password of created ecs instance.
period number | @alicloud/ros-cdk-core.IResolvable Property period: Prepaid time period.
ramRoleName string | @alicloud/ros-cdk-core.IResolvable Property ramRoleName: Instance RAM role name.
resourceGroupId string | @alicloud/ros-cdk-core.IResolvable Property resourceGroupId: Resource group id.
securityGroupId string | @alicloud/ros-cdk-core.IResolvable Property securityGroupId: Security group to create ecs instance.
spotPriceLimit string | @alicloud/ros-cdk-core.IResolvable Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid.
spotStrategy string | @alicloud/ros-cdk-core.IResolvable Property spotStrategy: The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter InstanceChargeType is PostPaid.
tags TagsProperty[] Property tags: Tags to attach to instance.
zoneId string | @alicloud/ros-cdk-core.IResolvable Property zoneId: The ID of the zone to which the instance belongs.

sourceInstanceIdRequired

public readonly sourceInstanceId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property sourceInstanceId: Source ecs instance used to copy properties to clone new ecs instance.

It will copy the InstanceType, ImageId, InternetChargeType, InternetMaxBandwidthIn, InternetMaxBandwidthOut and the system disk and data disk configurations. If the instance network is VPC, it will also clone the relative properties. If specified instance with more than one security group, it will use the first security group to create instance. you can also specify the SecurityGroupId to override it.


backendServerWeightOptional

public readonly backendServerWeight: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property backendServerWeight: The weight of backend server of load balancer.

From 0 to 100, 0 means offline. Default is 100.


deletionProtectionOptional

public readonly deletionProtection: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

Property deletionProtection: Whether an instance can be released manually through the console or API, deletion protection only support postPaid instance.


descriptionOptional

public readonly description: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property description: Description of the instance, [2, 256] characters.

Do not fill or empty, the default is empty.


diskMappingsOptional

public readonly diskMappings: IResolvable | IResolvable | DiskMappingsProperty[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | DiskMappingsProperty[]

Property diskMappings: Disk mappings to attach to instance.

Max support 16 disks. If the image contains a data disk, you can specify other parameters of the data disk via the same value of parameter "Device". If parameter "Category" is not specified, it will be cloud_efficiency instead of "Category" of data disk in the image.


imageIdOptional

public readonly imageId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property imageId: Image ID to create ecs instance.


instanceChargeTypeOptional

public readonly instanceChargeType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property instanceChargeType: Instance Charge type, allowed value: Prepaid and Postpaid.

If specified Prepaid, please ensure you have sufficient balance in your account. Or instance creation will be failure. Default value is Postpaid.


instanceNameOptional

public readonly instanceName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property instanceName: Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.


internetMaxBandwidthInOptional

public readonly internetMaxBandwidthIn: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property internetMaxBandwidthIn: Max internet out band width setting, unit in Mbps(Mega bit per second).

The range is [0,200], default is 200 Mbps.


keyPairNameOptional

public readonly keyPairName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property keyPairName: SSH key pair name.


loadBalancerIdToAttachOptional

public readonly loadBalancerIdToAttach: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property loadBalancerIdToAttach: After the instance is created.

Automatic attach it to the load balancer.


passwordOptional

public readonly password: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property password: Password of created ecs instance.

Must contain at least 3 types of special character, lower character, upper character, number.


periodOptional

public readonly period: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property period: Prepaid time period.

Unit is month, it could be from 1 to 9 or 12, 24, 36, 48, 60. Default value is 1.


ramRoleNameOptional

public readonly ramRoleName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property ramRoleName: Instance RAM role name.

The name is provided and maintained by Resource Access Management (RAM) and can be queried using ListRoles. For more information, see RAM API CreateRole and ListRoles.


resourceGroupIdOptional

public readonly resourceGroupId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property resourceGroupId: Resource group id.


securityGroupIdOptional

public readonly securityGroupId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property securityGroupId: Security group to create ecs instance.

For classic instance need the security group not belong to VPC, for VPC instance, please make sure the security group belong to specified VPC.


spotPriceLimitOptional

public readonly spotPriceLimit: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid.

Three decimals is allowed at most.


spotStrategyOptional

public readonly spotStrategy: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property spotStrategy: The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter InstanceChargeType 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 value: NoSpot.


tagsOptional

public readonly tags: TagsProperty[];

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


zoneIdOptional

public readonly zoneId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property zoneId: The ID of the zone to which the instance belongs.

For more information, call the DescribeZones operation to query the most recent zone list. Default value is empty, which means random selection.