ApplicationScalingRule
This class encapsulates and extends the ROS resource type ALIYUN::SAE::ApplicationScalingRule
.
Initializers
import ros_cdk_sae
ros_cdk_sae.ApplicationScalingRule(
scope: Construct,
id: str,
app_id: typing.Union[str, IResolvable],
scaling_rule_name: typing.Union[str, IResolvable],
scaling_rule_type: typing.Union[str, IResolvable],
min_ready_instance_ratio: typing.Union[typing.Union[int, float], IResolvable] = None,
min_ready_instances: typing.Union[typing.Union[int, float], IResolvable] = None,
scaling_rule_enable: typing.Union[bool, IResolvable] = None,
scaling_rule_metric: typing.Union[IResolvable, ScalingRuleMetricProperty] = None,
scaling_rule_timer: typing.Union[IResolvable, ScalingRuleTimerProperty] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
app_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property appId: The ID of the application. |
scaling_rule_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property scalingRuleName: The name of the auto scaling policy. |
scaling_rule_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property scalingRuleType: The type of the auto scaling policy. |
min_ready_instance_ratio |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property minReadyInstanceRatio: The minimum percentage of surviving instances. |
min_ready_instances |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property minReadyInstances: Minimum number of surviving instances. |
scaling_rule_enable |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property scalingRuleEnable: Whether to enable the scaling rule. |
scaling_rule_metric |
typing.Union[ros_cdk_core.IResolvable, ScalingRuleMetricProperty] |
Property scalingRuleMetric: Configuration of monitoring indicator elasticity policy. |
scaling_rule_timer |
typing.Union[ros_cdk_core.IResolvable, ScalingRuleTimerProperty] |
Property scalingRuleTimer: The configuration of the timer scaling policy. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
app_id
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property appId: The ID of the application.
scaling_rule_name
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property scalingRuleName: The name of the auto scaling policy.
The name must start with a lowercase letter, and can contain lowercase letters, digits, and hyphens (-).The name must be 1 to 32 characters in length.
scaling_rule_type
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property scalingRuleType: The type of the auto scaling policy.
Valid values: timer: Timed scaling. metric: Custom metric scaling.mix: mix scaling
min_ready_instance_ratio
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property minReadyInstanceRatio: The minimum percentage of surviving instances.
The value description is as follows:-1: Initialization value, indicating that the percentage is not used.0~100: The unit is a percentage, rounded up. For example, if it is set to 50%, if there are currently 5 instances, the minimum number of surviving instances is 3.
min_ready_instances
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property minReadyInstances: Minimum number of surviving instances.
The value is as follows:If set to 0, the application will be interrupted during the upgrade process.If set to -1, the minimum number of surviving instances will use the system recommended value, which is 25% of the existing number of instances. If there are currently 5 instances, 5×25%=1.25, after rounding up, the minimum number of surviving instances is 2.
scaling_rule_enable
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property scalingRuleEnable: Whether to enable the scaling rule.
scaling_rule_metric
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, ScalingRuleMetricProperty]
Property scalingRuleMetric: Configuration of monitoring indicator elasticity policy.
This parameter is required when you select monitoring indicator elasticity policy setting.
scaling_rule_timer
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, ScalingRuleTimerProperty]
Property scalingRuleTimer: The configuration of the timer scaling policy.
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_sae
ros_cdk_sae.ApplicationScalingRule.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_scaling_rule_name |
ros_cdk_core.IResolvable |
Attribute ScalingRuleName: The name of the scaling rule. |
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_scaling_rule_name
Required
attr_scaling_rule_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ScalingRuleName: The name of the scaling rule.