AutoScaleConfig
This class encapsulates and extends the ROS resource type ALIYUN::EHPC::AutoScaleConfig
, which is used to configure the auto scaling settings of a cluster.
Initializers
import com.aliyun.ros.cdk.ehpc.AutoScaleConfig;
AutoScaleConfig.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.clusterId(java.lang.String)
.clusterId(IResolvable)
// .enableAutoGrow(java.lang.Boolean)
// .enableAutoGrow(IResolvable)
// .enableAutoShrink(java.lang.Boolean)
// .enableAutoShrink(IResolvable)
// .excludeNodes(java.lang.String)
// .excludeNodes(IResolvable)
// .extraNodesGrowRatio(java.lang.Number)
// .extraNodesGrowRatio(IResolvable)
// .growIntervalInMinutes(java.lang.Number)
// .growIntervalInMinutes(IResolvable)
// .growRatio(java.lang.Number)
// .growRatio(IResolvable)
// .growTimeoutInMinutes(java.lang.Number)
// .growTimeoutInMinutes(IResolvable)
// .imageId(java.lang.String)
// .imageId(IResolvable)
// .maxNodesInCluster(java.lang.Number)
// .maxNodesInCluster(IResolvable)
// .queues(IResolvable)
// .queues(java.util.List<IResolvable)
// .queues(QueuesProperty>)
// .shrinkIdleTimes(java.lang.Number)
// .shrinkIdleTimes(IResolvable)
// .shrinkIntervalInMinutes(java.lang.Number)
// .shrinkIntervalInMinutes(IResolvable)
// .spotPriceLimit(java.lang.Number)
// .spotPriceLimit(IResolvable)
// .spotStrategy(java.lang.String)
// .spotStrategy(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. |
clusterId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property clusterId: Cluster ID. |
enableAutoGrow |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property enableAutoGrow: Specifies whether to enable auto scale-out. |
enableAutoShrink |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property enableAutoShrink: Specifies whether to enable auto scale-in. |
excludeNodes |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property excludeNodes: The compute nodes that are excluded from the list of auto scaling nodes. |
extraNodesGrowRatio |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property extraNodesGrowRatio: The percentage of extra compute nodes. |
growIntervalInMinutes |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property growIntervalInMinutes: The interval between two consecutive rounds of scale-out. |
growRatio |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property growRatio: The percentage of each round of scale-out. |
growTimeoutInMinutes |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property growTimeoutInMinutes: The scale-out timeout period. |
imageId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property imageId: The ID of the image. |
maxNodesInCluster |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property maxNodesInCluster: The maximum number of compute nodes that can be added in the cluster. |
queues |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property queues:. |
shrinkIdleTimes |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property shrinkIdleTimes: The number of consecutive times that a compute node is idle during the resource scale-in check. |
shrinkIntervalInMinutes |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property shrinkIntervalInMinutes: SThe interval between two consecutive rounds of scale-in. |
spotPriceLimit |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property spotPriceLimit: The maximum hourly price of the compute nodes. |
spotStrategy |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property spotStrategy: The preemption policy of the compute nodes. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
clusterId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property clusterId: Cluster ID.
enableAutoGrow
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableAutoGrow: Specifies whether to enable auto scale-out.
Valid values: true: enables auto scale-out. false: disables auto scale-out Default value: false
enableAutoShrink
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableAutoShrink: Specifies whether to enable auto scale-in.
Valid values: true: enables auto scale-in. false: disables auto scale-in Default value: false
excludeNodes
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property excludeNodes: The compute nodes that are excluded from the list of auto scaling nodes.
Separate multiple compute nodes with commas (,). If you want to retain a compute node, you can set the node as an exceptional node. Then, the node is not released if it is idle.
extraNodesGrowRatio
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property extraNodesGrowRatio: The percentage of extra compute nodes.
Default value: 0
growIntervalInMinutes
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property growIntervalInMinutes: The interval between two consecutive rounds of scale-out.
Unit: minutes. Default value: 2
growRatio
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property growRatio: The percentage of each round of scale-out.
Default value: 100
growTimeoutInMinutes
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property growTimeoutInMinutes: The scale-out timeout period.
Unit: minutes. Default value: 20
imageId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageId: The ID of the image.
If you set both Queues.N.QueueImageId and ImageId, Queues.N.QueueImageId prevails. If you set Queues.N.QueueImageId or ImageId, the parameter that you set takes effect. If you leave both Queues.N.QueueImageId and ImageId empty, the image that was specified when you created the cluster or the last time when you scaled out the cluster is used by default.
maxNodesInCluster
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maxNodesInCluster: The maximum number of compute nodes that can be added in the cluster.
Default value: 100
queues
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
QueuesProperty>
Property queues:.
shrinkIdleTimes
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property shrinkIdleTimes: The number of consecutive times that a compute node is idle during the resource scale-in check.
Default value: 3
shrinkIntervalInMinutes
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property shrinkIntervalInMinutes: SThe interval between two consecutive rounds of scale-in.
Unit: minutes. Default value: 2
spotPriceLimit
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property spotPriceLimit: The maximum hourly price of the compute nodes.
The value can be accurate to three decimal places. The parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.
spotStrategy
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property spotStrategy: The preemption policy of the compute nodes.
Valid values: NoSpot: The compute nodes are pay-as-you-go instances. SpotWithPriceLimit: The compute nodes are preemptible instances that have a user-defined maximum hourly price. SpotAsPriceGo: The compute nodes are preemptible instances for which the market price at the time of purchase is used as the bid price. Default value: NoSpot
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.ehpc.AutoScaleConfig;
AutoScaleConfig.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- 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. |
attrClusterId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ClusterId: Cluster Id. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrClusterId
Required
public IResolvable getAttrClusterId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ClusterId: Cluster Id.