Skip to content

InstanceCloneProps

Properties for defining a InstanceClone.

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

Initializer

import com.aliyun.ros.cdk.ecs.InstanceCloneProps;
InstanceCloneProps.builder()
    .sourceInstanceId(java.lang.String)
    .sourceInstanceId(IResolvable)
//  .backendServerWeight(java.lang.Number)
//  .backendServerWeight(IResolvable)
//  .deletionProtection(java.lang.Boolean)
//  .deletionProtection(IResolvable)
//  .description(java.lang.String)
//  .description(IResolvable)
//  .diskMappings(IResolvable)
//  .diskMappings(java.util.List<IResolvable)
//  .diskMappings(DiskMappingsProperty>)
//  .imageId(java.lang.String)
//  .imageId(IResolvable)
//  .instanceChargeType(java.lang.String)
//  .instanceChargeType(IResolvable)
//  .instanceName(java.lang.String)
//  .instanceName(IResolvable)
//  .internetMaxBandwidthIn(java.lang.Number)
//  .internetMaxBandwidthIn(IResolvable)
//  .keyPairName(java.lang.String)
//  .keyPairName(IResolvable)
//  .loadBalancerIdToAttach(java.lang.String)
//  .loadBalancerIdToAttach(IResolvable)
//  .password(java.lang.String)
//  .password(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .ramRoleName(java.lang.String)
//  .ramRoleName(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .securityGroupId(java.lang.String)
//  .securityGroupId(IResolvable)
//  .spotPriceLimit(java.lang.String)
//  .spotPriceLimit(IResolvable)
//  .spotStrategy(java.lang.String)
//  .spotStrategy(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .zoneId(java.lang.String)
//  .zoneId(IResolvable)
    .build();

Properties

Name Type Description
sourceInstanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property sourceInstanceId: Source ecs instance used to copy properties to clone new ecs instance.
backendServerWeight java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property backendServerWeight: The weight of backend server of load balancer.
deletionProtection java.lang.Boolean OR com.aliyun.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 java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property description: Description of the instance, [2, 256] characters.
diskMappings com.aliyun.ros.cdk.core.IResolvable OR java.util.ListDiskMappingsProperty> Property diskMappings: Disk mappings to attach to instance.
imageId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageId: Image ID to create ecs instance.
instanceChargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceChargeType: Instance Charge type, allowed value: Prepaid and Postpaid.
instanceName java.lang.String OR com.aliyun.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 java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property internetMaxBandwidthIn: Max internet out band width setting, unit in Mbps(Mega bit per second).
keyPairName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property keyPairName: SSH key pair name.
loadBalancerIdToAttach java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property loadBalancerIdToAttach: After the instance is created.
password java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property password: Password of created ecs instance.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: Prepaid time period.
ramRoleName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ramRoleName: Instance RAM role name.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: Resource group id.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: Security group to create ecs instance.
spotPriceLimit java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid.
spotStrategy java.lang.String OR com.aliyun.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 java.util.List<TagsProperty> Property tags: Tags to attach to instance.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The ID of the zone to which the instance belongs.

sourceInstanceIdRequired

public java.lang.Object getSourceInstanceId();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getBackendServerWeight();
  • Type: java.lang.Number OR com.aliyun.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 java.lang.Object getDeletionProtection();
  • Type: java.lang.Boolean OR com.aliyun.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 java.lang.Object getDescription();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

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

Do not fill or empty, the default is empty.


diskMappingsOptional

public java.lang.Object getDiskMappings();
  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListDiskMappingsProperty>

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 java.lang.Object getImageId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property imageId: Image ID to create ecs instance.


instanceChargeTypeOptional

public java.lang.Object getInstanceChargeType();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getInstanceName();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getInternetMaxBandwidthIn();
  • Type: java.lang.Number OR com.aliyun.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 java.lang.Object getKeyPairName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property keyPairName: SSH key pair name.


loadBalancerIdToAttachOptional

public java.lang.Object getLoadBalancerIdToAttach();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property loadBalancerIdToAttach: After the instance is created.

Automatic attach it to the load balancer.


passwordOptional

public java.lang.Object getPassword();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getPeriod();
  • Type: java.lang.Number OR com.aliyun.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 java.lang.Object getRamRoleName();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getResourceGroupId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: Resource group id.


securityGroupIdOptional

public java.lang.Object getSecurityGroupId();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getSpotPriceLimit();
  • Type: java.lang.String OR com.aliyun.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 java.lang.Object getSpotStrategy();
  • Type: java.lang.String OR com.aliyun.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 java.util.List<TagsProperty> getTags();

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 java.lang.Object getZoneId();
  • Type: java.lang.String OR com.aliyun.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.