AutoProvisioningGroup
This class encapsulates and extends the ROS resource type ALIYUN::ECS::AutoProvisioningGroup
, which is used to create an auto provisioning group.
Initializers
import ros_cdk_ecs
ros_cdk_ecs.AutoProvisioningGroup(
scope: Construct,
id: str,
total_target_capacity: typing.Union[str, IResolvable],
auto_provisioning_group_name: typing.Union[str, IResolvable] = None,
auto_provisioning_group_type: typing.Union[str, IResolvable] = None,
check_execution_status: typing.Union[bool, IResolvable] = None,
default_target_capacity_type: typing.Union[str, IResolvable] = None,
description: typing.Union[str, IResolvable] = None,
excess_capacity_termination_policy: typing.Union[str, IResolvable] = None,
launch_configuration: typing.Union[IResolvable, LaunchConfigurationProperty] = None,
launch_template_config: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, LaunchTemplateConfigProperty]]] = None,
launch_template_id: typing.Union[str, IResolvable] = None,
launch_template_version: typing.Union[str, IResolvable] = None,
max_spot_price: typing.Union[typing.Union[int, float], IResolvable] = None,
pay_as_you_go_allocation_strategy: typing.Union[str, IResolvable] = None,
pay_as_you_go_target_capacity: typing.Union[str, IResolvable] = None,
spot_allocation_strategy: typing.Union[str, IResolvable] = None,
spot_instance_interruption_behavior: typing.Union[str, IResolvable] = None,
spot_instance_pools_to_use_count: typing.Union[typing.Union[int, float], IResolvable] = None,
spot_target_capacity: typing.Union[str, IResolvable] = None,
terminate_instances: typing.Union[bool, IResolvable] = None,
terminate_instances_with_expiration: typing.Union[bool, IResolvable] = None,
valid_from: typing.Union[str, IResolvable] = None,
valid_until: 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. |
total_target_capacity |
typing.Union[str, ros_cdk_core.IResolvable] |
Property totalTargetCapacity: The total target capacity of the auto provisioning group. |
auto_provisioning_group_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property autoProvisioningGroupName: The name of the auto provisioning group to be created. |
auto_provisioning_group_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property autoProvisioningGroupType: The type of the auto provisioning group. |
check_execution_status |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property checkExecutionStatus: Whether check execution status. |
default_target_capacity_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property defaultTargetCapacityType: The type of supplemental instances. |
description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property description: The description of the auto provisioning group. |
excess_capacity_termination_policy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property excessCapacityTerminationPolicy: The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. |
launch_configuration |
typing.Union[ros_cdk_core.IResolvable, LaunchConfigurationProperty] |
Property launchConfiguration:. |
launch_template_config |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, LaunchTemplateConfigProperty]]] |
Property launchTemplateConfig:. |
launch_template_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property launchTemplateId: The ID of the instance launch template associated with the auto provisioning group. |
launch_template_version |
typing.Union[str, ros_cdk_core.IResolvable] |
Property launchTemplateVersion: The version of the instance launch template associated with the auto provisioning group. |
max_spot_price |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property maxSpotPrice: The global maximum price for preemptible instances in the auto provisioning group. |
pay_as_you_go_allocation_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property payAsYouGoAllocationStrategy: The scale-out policy for pay-as-you-go instances. |
pay_as_you_go_target_capacity |
typing.Union[str, ros_cdk_core.IResolvable] |
Property payAsYouGoTargetCapacity: The target capacity of pay-as-you-go instances in the auto provisioning group. |
spot_allocation_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotAllocationStrategy: The scale-out policy for preemptible instances. |
spot_instance_interruption_behavior |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotInstanceInterruptionBehavior: The default behavior after preemptible instances are shut down. |
spot_instance_pools_to_use_count |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property spotInstancePoolsToUseCount: This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price. |
spot_target_capacity |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotTargetCapacity: The target capacity of preemptible instances in the auto provisioning group. |
terminate_instances |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property terminateInstances: Specifies whether to release instances of the auto provisioning group. |
terminate_instances_with_expiration |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property terminateInstancesWithExpiration: The shutdown policy for preemptible instances when the auto provisioning group expires. |
valid_from |
typing.Union[str, ros_cdk_core.IResolvable] |
Property validFrom: The time when the auto provisioning group is started. |
valid_until |
typing.Union[str, ros_cdk_core.IResolvable] |
Property validUntil: The time when the auto provisioning group expires. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
total_target_capacity
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property totalTargetCapacity: The total target capacity of the auto provisioning group.
The target capacity consists of the following three parts: The target capacity of pay-as-you-go instances specified by the PayAsYouGoTargetCapacity parameter The target capacity of preemptible instances specified by the SpotTargetCapacity parameter The supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity
auto_provisioning_group_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property autoProvisioningGroupName: The name of the auto provisioning group to be created.
It must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
auto_provisioning_group_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property autoProvisioningGroupType: The type of the auto provisioning group.
Valid values: request: One-time delivery. After the auto provisioning group is started, it only attempts to create an instance cluster once. If the cluster fails to be created, the group does not try again. maintain: The continuous delivery and maintain capacity type. After the auto provisioning group is started, it continuously attempts to create and maintain the instance cluster. The auto provisioning group compares the real-time and target capacity of the cluster. If the cluster does not meet the target capacity, the group will create instances until the cluster meets the target capacity. Default value: maintain
check_execution_status
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property checkExecutionStatus: Whether check execution status.
If set true, ROS will check the state of AutoProvisioningGroup to be fulfilled. Otherwise ROS will regard AutoProvisioningGroup create failed.
default_target_capacity_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property defaultTargetCapacityType: The type of supplemental instances.
When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values: PayAsYouGo: Pay-as-you-go instances. Spot: Preemptible instances. Default value: Spot
description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: The description of the auto provisioning group.
excess_capacity_termination_policy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property excessCapacityTerminationPolicy: The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity.
Valid values: no-termination: Excess preemptible instances are not shut down. termination: Excess preemptible instances are to be shut down. The action to be performed on these shutdown instances is specified by the SpotInstanceInterruptionBehavior parameter. Default value: no-termination
launch_configuration
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, LaunchConfigurationProperty]
Property launchConfiguration:.
launch_template_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, LaunchTemplateConfigProperty]]]
Property launchTemplateConfig:.
launch_template_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property launchTemplateId: The ID of the instance launch template associated with the auto provisioning group.
You can call the DescribeLaunchTemplates operation to query available instance launch templates. An auto provisioning group can be associated with only one instance launch template. But you can configure multiple extended configurations for the launch template through the LaunchTemplateConfig parameter.
launch_template_version
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property launchTemplateVersion: The version of the instance launch template associated with the auto provisioning group.
You can call the DescribeLaunchTemplateVersions operation to query the versions of available instance launch templates.
max_spot_price
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property maxSpotPrice: The global maximum price for preemptible instances in the auto provisioning group.
If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
pay_as_you_go_allocation_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payAsYouGoAllocationStrategy: The scale-out policy for pay-as-you-go instances.
Valid values: lowest-price: The cost optimization policy the auto provisioning group follows to select instance types of the lowest cost to create instances. prioritized: The priority-based policy the auto provisioning group follows to create instances. The priority of an instance type is specified by the LaunchTemplateConfig.N.Priority parameter. Default value: lowest-price
pay_as_you_go_target_capacity
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payAsYouGoTargetCapacity: The target capacity of pay-as-you-go instances in the auto provisioning group.
spot_allocation_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotAllocationStrategy: The scale-out policy for preemptible instances.
Valid values: lowest-price: The cost optimization policy the auto provisioning group follows to select instance types of the lowest cost to create instances. diversified: The distribution balancing policy the auto provisioning group follows to evenly create instances across zones specified in multiple extended template configurations. Default value: lowest-price
spot_instance_interruption_behavior
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotInstanceInterruptionBehavior: The default behavior after preemptible instances are shut down.
Value values: stop: stops preemptible instances. terminate: releases preemptible instances. Default value: stop
spot_instance_pools_to_use_count
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property spotInstancePoolsToUseCount: This parameter takes effect when the SpotAllocationStrategy parameter is set to lowest-price.
The auto provisioning group selects instance types of the lowest cost to create instances.
spot_target_capacity
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotTargetCapacity: The target capacity of preemptible instances in the auto provisioning group.
terminate_instances
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property terminateInstances: Specifies whether to release instances of the auto provisioning group.
Valid values: true false Default: false
terminate_instances_with_expiration
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property terminateInstancesWithExpiration: The shutdown policy for preemptible instances when the auto provisioning group expires.
Valid values: true: shuts down preemptible instances. The action to be performed on these shutdown instances is specified by the SpotInstanceInterruptionBehavior parameter. false: does not shut down preemptible instances. Default: false
valid_from
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property validFrom: The time when the auto provisioning group is started.
The period of time between this point in time and the point in time specified by the ValidUntil parameter is the effective time period of the auto provisioning group. By default, an auto provisioning group is immediately started after creation.
valid_until
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property validUntil: The time when the auto provisioning group expires.
The period of time between this point in time and the point in time specified by the ValidFrom parameter is the effective time period of the auto provisioning group. By default, an auto provisioning group never expires.
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_ecs
ros_cdk_ecs.AutoProvisioningGroup.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_auto_provisioning_group_id |
ros_cdk_core.IResolvable |
Attribute AutoProvisioningGroupId: The ID of the auto provisioning group. |
attr_auto_provisioning_group_name |
ros_cdk_core.IResolvable |
Attribute AutoProvisioningGroupName: The name of the auto provisioning group. |
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_auto_provisioning_group_id
Required
attr_auto_provisioning_group_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute AutoProvisioningGroupId: The ID of the auto provisioning group.
attr_auto_provisioning_group_name
Required
attr_auto_provisioning_group_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute AutoProvisioningGroupName: The name of the auto provisioning group.