Skip to content

ScalingConfiguration

This class encapsulates and extends the ROS resource type ALIYUN::ESS::ScalingConfiguration, which is used to create a scaling configuration for a scaling group.

Initializers

import com.aliyun.ros.cdk.ess.ScalingConfiguration;
ScalingConfiguration.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .scalingGroupId(java.lang.String)
    .scalingGroupId(IResolvable)
//  .affinity(java.lang.String)
//  .affinity(IResolvable)
//  .cpu(java.lang.Number)
//  .cpu(IResolvable)
//  .creditSpecification(java.lang.String)
//  .creditSpecification(IResolvable)
//  .dedicatedHostId(java.lang.String)
//  .dedicatedHostId(IResolvable)
//  .deploymentSetId(java.lang.String)
//  .deploymentSetId(IResolvable)
//  .diskMappings(IResolvable)
//  .diskMappings(java.util.List<IResolvable)
//  .diskMappings(DiskMappingsProperty>)
//  .hostName(java.lang.String)
//  .hostName(IResolvable)
//  .hpcClusterId(java.lang.String)
//  .hpcClusterId(IResolvable)
//  .imageFamily(java.lang.String)
//  .imageFamily(IResolvable)
//  .imageId(java.lang.String)
//  .imageId(IResolvable)
//  .imageName(java.lang.String)
//  .imageName(IResolvable)
//  .imageOptionsLoginAsNonRoot(java.lang.Boolean)
//  .imageOptionsLoginAsNonRoot(IResolvable)
//  .instanceDescription(java.lang.String)
//  .instanceDescription(IResolvable)
//  .instanceId(java.lang.String)
//  .instanceId(IResolvable)
//  .instanceName(java.lang.String)
//  .instanceName(IResolvable)
//  .instancePatternInfos(IResolvable)
//  .instancePatternInfos(java.util.List<IResolvable)
//  .instancePatternInfos(InstancePatternInfosProperty>)
//  .instanceType(java.lang.String)
//  .instanceType(IResolvable)
//  .instanceTypeOverrides(IResolvable)
//  .instanceTypeOverrides(java.util.List<IResolvable)
//  .instanceTypeOverrides(InstanceTypeOverridesProperty>)
//  .instanceTypes(IResolvable)
//  .instanceTypes(java.util.List<java.lang.String)
//  .instanceTypes(IResolvable>)
//  .internetChargeType(java.lang.String)
//  .internetChargeType(IResolvable)
//  .internetMaxBandwidthIn(java.lang.Number)
//  .internetMaxBandwidthIn(IResolvable)
//  .internetMaxBandwidthOut(java.lang.Number)
//  .internetMaxBandwidthOut(IResolvable)
//  .ioOptimized(java.lang.String)
//  .ioOptimized(IResolvable)
//  .ipv6AddressCount(java.lang.Number)
//  .ipv6AddressCount(IResolvable)
//  .keyPairName(java.lang.String)
//  .keyPairName(IResolvable)
//  .loadBalancerWeight(java.lang.Number)
//  .loadBalancerWeight(IResolvable)
//  .memory(java.lang.Number)
//  .memory(IResolvable)
//  .password(java.lang.String)
//  .password(IResolvable)
//  .passwordInherit(java.lang.Boolean)
//  .passwordInherit(IResolvable)
//  .privatePoolOptions(IResolvable)
//  .privatePoolOptions(PrivatePoolOptionsProperty)
//  .ramRoleName(java.lang.String)
//  .ramRoleName(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .scalingConfigurationName(java.lang.String)
//  .scalingConfigurationName(IResolvable)
//  .securityEnhancementStrategy(java.lang.String)
//  .securityEnhancementStrategy(IResolvable)
//  .securityGroupId(java.lang.String)
//  .securityGroupId(IResolvable)
//  .securityGroupIds(IResolvable)
//  .securityGroupIds(java.util.List<java.lang.String)
//  .securityGroupIds(IResolvable>)
//  .spotDuration(java.lang.Number)
//  .spotDuration(IResolvable)
//  .spotInterruptionBehavior(java.lang.String)
//  .spotInterruptionBehavior(IResolvable)
//  .spotPriceLimit(java.lang.Number)
//  .spotPriceLimit(IResolvable)
//  .spotPriceLimitForInstanceType(IResolvable)
//  .spotPriceLimitForInstanceType(java.util.Map<java.lang.String, java.lang.Object>)
//  .spotStrategy(java.lang.String)
//  .spotStrategy(IResolvable)
//  .systemDiskAutoSnapshotPolicyId(java.lang.String)
//  .systemDiskAutoSnapshotPolicyId(IResolvable)
//  .systemDiskBurstingEnabled(java.lang.Boolean)
//  .systemDiskBurstingEnabled(IResolvable)
//  .systemDiskCategories(IResolvable)
//  .systemDiskCategories(java.util.List<java.lang.String)
//  .systemDiskCategories(IResolvable>)
//  .systemDiskCategory(java.lang.String)
//  .systemDiskCategory(IResolvable)
//  .systemDiskDescription(java.lang.String)
//  .systemDiskDescription(IResolvable)
//  .systemDiskDiskName(java.lang.String)
//  .systemDiskDiskName(IResolvable)
//  .systemDiskEncryptAlgorithm(java.lang.String)
//  .systemDiskEncryptAlgorithm(IResolvable)
//  .systemDiskEncrypted(java.lang.Boolean)
//  .systemDiskEncrypted(IResolvable)
//  .systemDiskKmsKeyId(java.lang.String)
//  .systemDiskKmsKeyId(IResolvable)
//  .systemDiskPerformanceLevel(java.lang.String)
//  .systemDiskPerformanceLevel(IResolvable)
//  .systemDiskProvisionedIops(java.lang.Number)
//  .systemDiskProvisionedIops(IResolvable)
//  .systemDiskSize(java.lang.Number)
//  .systemDiskSize(IResolvable)
//  .tagList(IResolvable)
//  .tagList(java.util.List<IResolvable)
//  .tagList(TagListProperty>)
//  .tenancy(java.lang.String)
//  .tenancy(IResolvable)
//  .userData(java.lang.String)
//  .userData(IResolvable)
//  .zoneId(java.lang.String)
//  .zoneId(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
scalingGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property scalingGroupId: Scaling group id to create the scaling configuration.
affinity java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property affinity: Specifies whether to associate an ECS instance on a dedicated host with the dedicated host.
cpu java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property cpu: The number of vCPUs.
creditSpecification java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property creditSpecification: The performance mode of the burstable instance.
dedicatedHostId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dedicatedHostId: The ID of the dedicated host on which you want to create an ECS instance.
deploymentSetId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property deploymentSetId: Deployment set ID.
diskMappings com.aliyun.ros.cdk.core.IResolvable OR java.util.ListDiskMappingsProperty> Property diskMappings: Disk mappings to attach to instance.
hostName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property hostName: The hostname of the ECS instance.
hpcClusterId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property hpcClusterId: The HPC cluster ID to which the instance belongs.
imageFamily java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageFamily: The name of the image family.
imageId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageId: Image ID to create ecs instance .
imageName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property imageName: The name of the image.
imageOptionsLoginAsNonRoot java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property imageOptionsLoginAsNonRoot: Whether the ecs instance is logged in as ecs-user.Valid values: - true - false Default value: false.
instanceDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceDescription: The description of the ECS instance.
instanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceId: Source ECS instance to copy configuration, if the properties is setting, Which will copy the InstanceType, ImageId, InternetChargeType, IoOptimized,UserData, KeyPairName, RamRoleName, InternetMaxBandwidthIn,InternetMaxBandwidthOut, and first security group id from source instance, you can also specify the relative properties to overwrite the properties copy from source instance id.
instanceName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceName: The name of the instance launched from the current scaling configuration.
instancePatternInfos com.aliyun.ros.cdk.core.IResolvable OR java.util.ListInstancePatternInfosProperty> Property instancePatternInfos: Details of the intelligent configuration settings that determine the range of instance types that meet the specified criteria.
instanceType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceType: ecs supported instance type.
instanceTypeOverrides com.aliyun.ros.cdk.core.IResolvable OR java.util.ListInstanceTypeOverridesProperty> Property instanceTypeOverrides: The instance types.
instanceTypes com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property instanceTypes: ecs supported instance types.
internetChargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property internetChargeType: Instance internet access charge type.Support 'PayByBandwidth' and 'PayByTraffic' only.
internetMaxBandwidthIn java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property internetMaxBandwidthIn: Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second).
internetMaxBandwidthOut java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property internetMaxBandwidthOut: Maximum outgoing bandwidth from the public network, measured in Mbps (Mega bit per second).
ioOptimized java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ioOptimized: The 'optimized' instance can provide better IO performance.
ipv6AddressCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property ipv6AddressCount: The number of randomly generated IPv6 addresses to be assigned to the elastic network interface (ENI).
keyPairName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property keyPairName: SSH key pair name.
loadBalancerWeight java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property loadBalancerWeight: The weight of the ECS instance as a backend server.
memory java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property memory: The memory size.
password java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property password: Password of created ecs instance.
passwordInherit java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property passwordInherit: Whether to use the password pre-configured in the image you select or not.
privatePoolOptions com.aliyun.ros.cdk.core.IResolvable OR PrivatePoolOptionsProperty Property privatePoolOptions: Option settings for private pools.
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.
scalingConfigurationName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property scalingConfigurationName: Name of created scaling configuration.
securityEnhancementStrategy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityEnhancementStrategy: Specifies whether to enable security hardening.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: Security Group to create ecs instance.
securityGroupIds com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property securityGroupIds: The IDs of the security groups with which you want to associate the ECS instances that are created by using the scaling configuration.
spotDuration java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property spotDuration: The retention period of the preemptible instance.
spotInterruptionBehavior java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property spotInterruptionBehavior: The interruption mode of the preemptible instance.
spotPriceLimit java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property spotPriceLimit: Set the hourly maximum price for the instance.
spotPriceLimitForInstanceType com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property spotPriceLimitForInstanceType: Set the hourly maximum price for the instance of specified instance type.
spotStrategy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property spotStrategy: Preemption strategy for post-paid instances.
systemDiskAutoSnapshotPolicyId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskAutoSnapshotPolicyId: Auto snapshot policy ID.
systemDiskBurstingEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskBurstingEnabled: Specifies whether to enable the burst feature for the system disk.
systemDiskCategories com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property systemDiskCategories: The categories of the system disks.
systemDiskCategory java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskCategory: Category of system disk.
systemDiskDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskDescription: The description of the system disk.
systemDiskDiskName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskDiskName: The name of the system disk.
systemDiskEncryptAlgorithm java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskEncryptAlgorithm: The encryption algorithm that you want to use to encrypt the system disk.
systemDiskEncrypted java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskEncrypted: Specifies whether to encrypt the system disk.
systemDiskKmsKeyId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskKmsKeyId: The ID of the KMS key that you want to use to encrypt the system disk.
systemDiskPerformanceLevel java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskPerformanceLevel: The performance level of an ESSD.
systemDiskProvisionedIops java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskProvisionedIops: The IOPS metric that is preconfigured for the system disk.
systemDiskSize java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property systemDiskSize: Size of system disk.
tagList com.aliyun.ros.cdk.core.IResolvable OR java.util.ListTagListProperty> Property tagList: The tags of an instance in list format.
tenancy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property tenancy: Specifies whether to create an ECS instance on a dedicated host.
userData java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property userData: User data to pass to instance.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The zone ID of the ECS instance.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

scalingGroupIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property scalingGroupId: Scaling group id to create the scaling configuration.


affinityOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property affinity: Specifies whether to associate an ECS instance on a dedicated host with the dedicated host.

Valid values:

  • default: does not associate the ECS instance with the dedicated host. If you start an ECS instance that was stopped in economical mode and the original dedicated host has insufficient resources, the ECS instance is automatically deployed to another dedicated host in the automatic deployment resource pool.
  • host: associates the ECS instance with the dedicated host. If you start an ECS instance that was stopped in economical mode, the instance remains on the original dedicated host. If the original dedicated host has insufficient resources, the ECS instance fails to start. Default value: default

cpuOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property cpu: The number of vCPUs.

You can specify the number of vCPUs and the memory size to determine the range of instance types. For example, you can set CPU to 2 and Memory to 16 to specify instance types that have 2 vCPUs and 16 GiB of memory. If you specify Cpu and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type. Note: You can specify Cpu and Memory to determine the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify instance types in the scaling configuration.


creditSpecificationOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property creditSpecification: The performance mode of the burstable instance.

Valid values: Standard: the standard mode. Unlimited: the unlimited mode.


dedicatedHostIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dedicatedHostId: The ID of the dedicated host on which you want to create an ECS instance.

You cannot create preemptible instances on dedicated hosts. If you specify DedicatedHostId, SpotStrategy and SpotPriceLimit are ignored. You can call the DescribeDedicatedHosts operation to query dedicated host IDs.


deploymentSetIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property deploymentSetId: Deployment set ID.


diskMappingsOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListDiskMappingsProperty>

Property diskMappings: Disk mappings to attach to instance.


hostNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property hostName: The hostname of the ECS instance.

The hostname cannot start or end with a period (.) or a hyphen (-). The hostname cannot contain consecutive periods (.) or hyphens (-). Naming conventions for different types of instances: Windows instances: The hostname must be 2 to 15 characters in length, and can contain letters, digits, and hyphens (-). The hostname cannot contain periods (.) or contain only digits. Other instances such as Linux instances: The hostname must be 2 to 64 characters in length. You can use periods (.) to separate a hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).


hpcClusterIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property hpcClusterId: The HPC cluster ID to which the instance belongs.


imageFamilyOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property imageFamily: The name of the image family.

You can configure this parameter to obtain the latest available images within the specified image family. The images are used to create ECS instances. If you have set the ImageId parameter, you cannot set the ImageFamily parameter.


imageIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property imageId: Image ID to create ecs instance .


imageNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property imageName: The name of the image.

Each image name must be unique in a region. If you specify ImageId, ImageName is ignored. You cannot use ImageName to specify images that are purchased from Alibaba Cloud Marketplace.


imageOptionsLoginAsNonRootOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property imageOptionsLoginAsNonRoot: Whether the ecs instance is logged in as ecs-user.Valid values: - true - false Default value: false.


instanceDescriptionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceDescription: The description of the ECS instance.

The description must be 2 to 256 characters in length. The description can contain letters and cannot start with http:// or https://.


instanceIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceId: Source ECS instance to copy configuration, if the properties is setting, Which will copy the InstanceType, ImageId, InternetChargeType, IoOptimized,UserData, KeyPairName, RamRoleName, InternetMaxBandwidthIn,InternetMaxBandwidthOut, and first security group id from source instance, you can also specify the relative properties to overwrite the properties copy from source instance id.


instanceNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceName: The name of the instance launched from the current scaling configuration.


instancePatternInfosOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListInstancePatternInfosProperty>

Property instancePatternInfos: Details of the intelligent configuration settings that determine the range of instance types that meet the specified criteria.


instanceTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceType: ecs supported instance type.


instanceTypeOverridesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListInstanceTypeOverridesProperty>

Property instanceTypeOverrides: The instance types.


instanceTypesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property instanceTypes: ecs supported instance types.

Length [1,10]. If InstanceTypes is specified,the InstanceType will be ignored.


internetChargeTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property internetChargeType: Instance internet access charge type.Support 'PayByBandwidth' and 'PayByTraffic' only.


internetMaxBandwidthInOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property internetMaxBandwidthIn: Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second).

The value range is [1,200]. If this parameter value is not specified, AliyunAPI automatically sets the value to 200 Mbps.


internetMaxBandwidthOutOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property internetMaxBandwidthOut: Maximum outgoing bandwidth from the public network, measured in Mbps (Mega bit per second).

The value range for PayByBandwidth is [0,100]. If this parameter value is not specified, AliyunAPI automatically sets the value to 0 Mbps. The value range for PayByTraffic is [0,100]. If this parameter value is not specified, an error is reported


ioOptimizedOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ioOptimized: The 'optimized' instance can provide better IO performance.

Support 'none' and 'optimized' only, default is 'none'.


ipv6AddressCountOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property ipv6AddressCount: The number of randomly generated IPv6 addresses to be assigned to the elastic network interface (ENI).


keyPairNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property keyPairName: SSH key pair name.


loadBalancerWeightOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property loadBalancerWeight: The weight of the ECS instance as a backend server.

Valid values: 1 to 100. Default value: 50.


memoryOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property memory: The memory size.

Unit: GiB. You can specify the number of vCPUs and the memory size to determine the range of instance types. For example, you can set Cpu to 2 and Memory to 16 to specify instance types that have 2 vCPUs and 16 GiB of memory. If you specify Cpu and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type. Note: You can specify Cpu and Memory to determine the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify instance types in the scaling configuration.


passwordOptional

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


passwordInheritOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property passwordInherit: Whether to use the password pre-configured in the image you select or not.

When PasswordInherit is specified, the Password must be null. For a secure access, make sure that the selected image has password configured.


privatePoolOptionsOptional

Property privatePoolOptions: Option settings for private pools.


ramRoleNameOptional

  • 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

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: Resource group id.


scalingConfigurationNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property scalingConfigurationName: Name of created scaling configuration.


securityEnhancementStrategyOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property securityEnhancementStrategy: Specifies whether to enable security hardening.

Valid values:

  • Active: enables security hardening. This value is applicable only to public images.
  • Deactive: disables security hardening. This value is applicable to all image types.

securityGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property securityGroupId: Security Group to create ecs instance.


securityGroupIdsOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property securityGroupIds: The IDs of the security groups with which you want to associate the ECS instances that are created by using the scaling configuration.

Note: If you specify SecurityGroupId, you cannot specify SecurityGroupIds.


spotDurationOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property spotDuration: The retention period of the preemptible instance.

Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. The following retention periods are available in invitational preview: 2, 3, 4, 5, and 6 hours. If you want to set this parameter to one of these values, submit a ticket. If you set this parameter to 0, no protection period is specified for the preemptible instance. Default value: 1


spotInterruptionBehaviorOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property spotInterruptionBehavior: The interruption mode of the preemptible instance.

Default value: Terminate. Set the value to Terminate. This value specifies that the preemptible instance is to be released.


spotPriceLimitOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property spotPriceLimit: Set the hourly maximum price for the instance.

Supports a maximum of 3 decimal places, and the parameter takes effect only when the value of SpotStrategy is SpotWithPriceLimit.It is a default value for all instance types, and can be overwrite by SpotPriceLimitForInstanceType


spotPriceLimitForInstanceTypeOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map

Property spotPriceLimitForInstanceType: Set the hourly maximum price for the instance of specified instance type.

The parameter takes effect only when the value of SpotStrategy is SpotWithPriceLimit. You should input the information of the tag with the format of the Key-Value, such as {"key1":"value1","key2":"value2", ... "key5":"value5"}. At most 50 items can be specified. Key ecs instance type Value Supports a maximum of 3 decimal places.


spotStrategyOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property spotStrategy: Preemption strategy for post-paid instances.

It takes effect when the parameter InstanceChargeType takes the value of PostPaid. Ranges: NoSpot: Normal pay-per-use instance SpotWithPriceLimit: Set a preemptive instance of the cap price SpotAsPriceGo: System automatic bidding, following the current market actual price Default: NoSpot.


systemDiskAutoSnapshotPolicyIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskAutoSnapshotPolicyId: Auto snapshot policy ID.


systemDiskBurstingEnabledOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskBurstingEnabled: Specifies whether to enable the burst feature for the system disk.

Valid values:

  • true
  • false Note: This parameter is available only if you set SystemDiskCategory to cloud_auto.

systemDiskCategoriesOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property systemDiskCategories: The categories of the system disks.

If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD Note: If you specify SystemDiskCategories, you cannot specify SystemDiskCategory.

systemDiskCategoryOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskCategory: Category of system disk.

Default is cloud.support cloud|cloud_efficiency|cloud_ssd|cloud_essd|ephemeral_ssd|cloud_auto


systemDiskDescriptionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskDescription: The description of the system disk.

The description must be 2 to 256 characters in length. The description can contain letters and cannot start with http:// or https://.


systemDiskDiskNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskDiskName: The name of the system disk.

The name must be 2 to 128 characters in length. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.


systemDiskEncryptAlgorithmOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskEncryptAlgorithm: The encryption algorithm that you want to use to encrypt the system disk.

Valid values:

  • AES-256
  • SM4-128 Default value: AES-256

systemDiskEncryptedOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskEncrypted: Specifies whether to encrypt the system disk.

Valid values:

  • true
  • false Default value: false

systemDiskKmsKeyIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskKmsKeyId: The ID of the KMS key that you want to use to encrypt the system disk.


systemDiskPerformanceLevelOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskPerformanceLevel: The performance level of an ESSD.


systemDiskProvisionedIopsOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskProvisionedIops: The IOPS metric that is preconfigured for the system disk.

Note: IOPS measures the number of read and write operations that an EBS device can process per second.


systemDiskSizeOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property systemDiskSize: Size of system disk.

Unit is GB.


tagListOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListTagListProperty>

Property tagList: The tags of an instance in list format.

Do not use with Tags at the same time. You should input the information of the tag with the format of Key-Value list, such as [{"Key":"key1","Value":"value1"}, ...]. At most 20 tags can be specified. Key It can be up to 64 characters in length. Cannot begin with aliyun. Cannot begin with http:// or https://. Cannot be a null string. Value It can be up to 128 characters in length. Cannot begin with aliyun. Cannot begin with http:// or https://. Can be a null string.If less then 20 tags are specified, ros will add a tag(Key: "ros-aliyun-created", Value:"stack") if possible.


tenancyOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property tenancy: Specifies whether to create an ECS instance on a dedicated host.

Valid values:

  • default: does not create an ECS instance on a dedicated host.
  • host: creates an ECS instance on a dedicated host. If you do not specify DedicatedHostId, Alibaba Cloud selects a dedicated host for the ECS instance. Default value: default

userDataOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property userData: User data to pass to instance.

[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.


zoneIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property zoneId: The zone ID of the ECS instance.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.ess.ScalingConfiguration;
ScalingConfiguration.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrScalingConfigurationId com.aliyun.ros.cdk.core.IResolvable Attribute ScalingConfigurationId: The scaling configuration id.
attrScalingGroupId com.aliyun.ros.cdk.core.IResolvable Attribute ScalingGroupId: The id of the scaling group to which the scaling configuration belongs.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrScalingConfigurationIdRequired

public IResolvable getAttrScalingConfigurationId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingConfigurationId: The scaling configuration id.


attrScalingGroupIdRequired

public IResolvable getAttrScalingGroupId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingGroupId: The id of the scaling group to which the scaling configuration belongs.