Skip to content

InstanceCloneProps

Properties for defining a InstanceClone.

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

Initializer

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkecs"
&alicloudroscdkecs.InstanceCloneProps {
    SourceInstanceId: interface{},
    BackendServerWeight: interface{},
    DeletionProtection: interface{},
    Description: interface{},
    DiskMappings: interface{},
    ImageId: interface{},
    InstanceChargeType: interface{},
    InstanceName: interface{},
    InternetMaxBandwidthIn: interface{},
    KeyPairName: interface{},
    LoadBalancerIdToAttach: interface{},
    Password: interface{},
    Period: interface{},
    RamRoleName: interface{},
    ResourceGroupId: interface{},
    SecurityGroupId: interface{},
    SpotPriceLimit: interface{},
    SpotStrategy: interface{},
    Tags: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkecs.RosInstanceClone.TagsProperty,
    ZoneId: interface{},
}

Properties

Name Type Description
SourceInstanceId interface{} Property sourceInstanceId: Source ecs instance used to copy properties to clone new ecs instance.
BackendServerWeight interface{} Property backendServerWeight: The weight of backend server of load balancer.
DeletionProtection interface{} Property deletionProtection: Whether an instance can be released manually through the console or API, deletion protection only support postPaid instance.
Description interface{} Property description: Description of the instance, [2, 256] characters.
DiskMappings interface{} Property diskMappings: Disk mappings to attach to instance.
ImageId interface{} Property imageId: Image ID to create ecs instance.
InstanceChargeType interface{} Property instanceChargeType: Instance Charge type, allowed value: Prepaid and Postpaid.
InstanceName interface{} 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 interface{} Property internetMaxBandwidthIn: Max internet out band width setting, unit in Mbps(Mega bit per second).
KeyPairName interface{} Property keyPairName: SSH key pair name.
LoadBalancerIdToAttach interface{} Property loadBalancerIdToAttach: After the instance is created.
Password interface{} Property password: Password of created ecs instance.
Period interface{} Property period: Prepaid time period.
RamRoleName interface{} Property ramRoleName: Instance RAM role name.
ResourceGroupId interface{} Property resourceGroupId: Resource group id.
SecurityGroupId interface{} Property securityGroupId: Security group to create ecs instance.
SpotPriceLimit interface{} Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid.
SpotStrategy interface{} 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 interface{} Property zoneId: The ID of the zone to which the instance belongs.

SourceInstanceIdRequired

SourceInstanceId interface{}
  • Type: interface{}

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

BackendServerWeight interface{}
  • Type: interface{}

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

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


DeletionProtectionOptional

DeletionProtection interface{}
  • Type: interface{}

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


DescriptionOptional

Description interface{}
  • Type: interface{}

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

Do not fill or empty, the default is empty.


DiskMappingsOptional

DiskMappings interface{}
  • Type: interface{}

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

ImageId interface{}
  • Type: interface{}

Property imageId: Image ID to create ecs instance.


InstanceChargeTypeOptional

InstanceChargeType interface{}
  • Type: interface{}

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

InstanceName interface{}
  • Type: interface{}

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

InternetMaxBandwidthIn interface{}
  • Type: interface{}

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

KeyPairName interface{}
  • Type: interface{}

Property keyPairName: SSH key pair name.


LoadBalancerIdToAttachOptional

LoadBalancerIdToAttach interface{}
  • Type: interface{}

Property loadBalancerIdToAttach: After the instance is created.

Automatic attach it to the load balancer.


PasswordOptional

Password interface{}
  • Type: interface{}

Property password: Password of created ecs instance.

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


PeriodOptional

Period interface{}
  • Type: interface{}

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

RamRoleName interface{}
  • Type: interface{}

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

ResourceGroupId interface{}
  • Type: interface{}

Property resourceGroupId: Resource group id.


SecurityGroupIdOptional

SecurityGroupId interface{}
  • Type: interface{}

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

SpotPriceLimit interface{}
  • Type: interface{}

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

SpotStrategy interface{}
  • Type: interface{}

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

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

ZoneId interface{}
  • Type: interface{}

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.