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 ros_cdk_ehpc
ros_cdk_ehpc.AutoScaleConfig(
scope: Construct,
id: str,
cluster_id: typing.Union[str, IResolvable],
enable_auto_grow: typing.Union[bool, IResolvable] = None,
enable_auto_shrink: typing.Union[bool, IResolvable] = None,
exclude_nodes: typing.Union[str, IResolvable] = None,
extra_nodes_grow_ratio: typing.Union[typing.Union[int, float], IResolvable] = None,
grow_interval_in_minutes: typing.Union[typing.Union[int, float], IResolvable] = None,
grow_ratio: typing.Union[typing.Union[int, float], IResolvable] = None,
grow_timeout_in_minutes: typing.Union[typing.Union[int, float], IResolvable] = None,
image_id: typing.Union[str, IResolvable] = None,
max_nodes_in_cluster: typing.Union[typing.Union[int, float], IResolvable] = None,
queues: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, QueuesProperty]]] = None,
shrink_idle_times: typing.Union[typing.Union[int, float], IResolvable] = None,
shrink_interval_in_minutes: typing.Union[typing.Union[int, float], IResolvable] = None,
spot_price_limit: typing.Union[typing.Union[int, float], IResolvable] = None,
spot_strategy: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
cluster_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property clusterId: Cluster ID. |
enable_auto_grow |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property enableAutoGrow: Specifies whether to enable auto scale-out. |
enable_auto_shrink |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property enableAutoShrink: Specifies whether to enable auto scale-in. |
exclude_nodes |
typing.Union[str, ros_cdk_core.IResolvable] |
Property excludeNodes: The compute nodes that are excluded from the list of auto scaling nodes. |
extra_nodes_grow_ratio |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property extraNodesGrowRatio: The percentage of extra compute nodes. |
grow_interval_in_minutes |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property growIntervalInMinutes: The interval between two consecutive rounds of scale-out. |
grow_ratio |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property growRatio: The percentage of each round of scale-out. |
grow_timeout_in_minutes |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property growTimeoutInMinutes: The scale-out timeout period. |
image_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property imageId: The ID of the image. |
max_nodes_in_cluster |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property maxNodesInCluster: The maximum number of compute nodes that can be added in the cluster. |
queues |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, QueuesProperty]]] |
Property queues:. |
shrink_idle_times |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property shrinkIdleTimes: The number of consecutive times that a compute node is idle during the resource scale-in check. |
shrink_interval_in_minutes |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property shrinkIntervalInMinutes: SThe interval between two consecutive rounds of scale-in. |
spot_price_limit |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property spotPriceLimit: The maximum hourly price of the compute nodes. |
spot_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotStrategy: The preemption policy of the compute nodes. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
cluster_id
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property clusterId: Cluster ID.
enable_auto_grow
Optional
- Type: typing.Union[bool, 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
enable_auto_shrink
Optional
- Type: typing.Union[bool, 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
exclude_nodes
Optional
- Type: typing.Union[str, 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.
extra_nodes_grow_ratio
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property extraNodesGrowRatio: The percentage of extra compute nodes.
Default value: 0
grow_interval_in_minutes
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property growIntervalInMinutes: The interval between two consecutive rounds of scale-out.
Unit: minutes. Default value: 2
grow_ratio
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property growRatio: The percentage of each round of scale-out.
Default value: 100
grow_timeout_in_minutes
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property growTimeoutInMinutes: The scale-out timeout period.
Unit: minutes. Default value: 20
image_id
Optional
- Type: typing.Union[str, 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.
max_nodes_in_cluster
Optional
- Type: typing.Union[typing.Union[int, float], 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: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, QueuesProperty]]]
Property queues:.
shrink_idle_times
Optional
- Type: typing.Union[typing.Union[int, float], 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
shrink_interval_in_minutes
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property shrinkIntervalInMinutes: SThe interval between two consecutive rounds of scale-in.
Unit: minutes. Default value: 2
spot_price_limit
Optional
- Type: typing.Union[typing.Union[int, float], 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.
spot_strategy
Optional
- Type: typing.Union[str, 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
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_ehpc
ros_cdk_ehpc.AutoScaleConfig.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_cluster_id |
ros_cdk_core.IResolvable |
Attribute ClusterId: Cluster Id. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_cluster_id
Required
attr_cluster_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ClusterId: Cluster Id.