Skip to content

AutoProvisioningGroup

This class encapsulates and extends the ROS resource type ALIYUN::ECS::AutoProvisioningGroup.

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,
  data_disk_config: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, DataDiskConfigProperty]]] = 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,
  min_target_capacity: typing.Union[str, IResolvable] = None,
  pay_as_you_go_allocation_strategy: typing.Union[str, IResolvable] = None,
  pay_as_you_go_target_capacity: typing.Union[str, IResolvable] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  resource_pool_options: typing.Union[IResolvable, ResourcePoolOptionsProperty] = 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,
  system_disk_config: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, SystemDiskConfigProperty]]] = 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 delivery type of the auto provisioning group.
check_execution_status typing.Union[bool, ros_cdk_core.IResolvable] Property checkExecutionStatus: Whether check execution status.
data_disk_config typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DataDiskConfigProperty]]] Property dataDiskConfig: List of instance data disk information.
default_target_capacity_type typing.Union[str, ros_cdk_core.IResolvable] Property defaultTargetCapacityType: Specifies the billing method for the capacity difference when the sum of PayAsYouGoTargetCapacity and SpotTargetCapacity is less than TotalTargetCapacity.
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: Specifies whether to release instances when the real-time capacity of the auto provisioning group exceeds the target capacity and scale-in is triggered.
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 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.
min_target_capacity typing.Union[str, ros_cdk_core.IResolvable] Property minTargetCapacity: The target minimum capacity of the elastic supply 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 for pay-as-you-go instances in the auto provisioning group.
resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupId: The resource group ID.
resource_pool_options typing.Union[ros_cdk_core.IResolvable, ResourcePoolOptionsProperty] Property resourcePoolOptions: Resource pooling policy to use when creating an instance.
spot_allocation_strategy typing.Union[str, ros_cdk_core.IResolvable] Property spotAllocationStrategy: The strategy for creating spot instances.
spot_instance_interruption_behavior typing.Union[str, ros_cdk_core.IResolvable] Property spotInstanceInterruptionBehavior: The behavior when a spot instance is interrupted.
spot_instance_pools_to_use_count typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property spotInstancePoolsToUseCount: Takes effect only when SpotAllocationStrategy is set to lowest-price.
spot_target_capacity typing.Union[str, ros_cdk_core.IResolvable] Property spotTargetCapacity: The target capacity for spot instances in the auto provisioning group.
system_disk_config typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, SystemDiskConfigProperty]]] Property systemDiskConfig: List of instance system disk information.
terminate_instances typing.Union[bool, ros_cdk_core.IResolvable] Property terminateInstances: Specifies whether to release instances in the group when you delete the auto provisioning group.
terminate_instances_with_expiration typing.Union[bool, ros_cdk_core.IResolvable] Property terminateInstancesWithExpiration: Specifies whether to release instances in the group when the auto provisioning group expires.
valid_from typing.Union[str, ros_cdk_core.IResolvable] Property validFrom: The start time of the auto provisioning group.
valid_until typing.Union[str, ros_cdk_core.IResolvable] Property validUntil: The expiration time of the auto provisioning group.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

total_target_capacityRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property totalTargetCapacity: The total target capacity of the auto provisioning group.

Valid values: Positive integers. The total capacity must be greater than or equal to the sum of PayAsYouGoTargetCapacity (target capacity for pay-as-you-go instances) and SpotTargetCapacity (target capacity for spot instances).


auto_provisioning_group_nameOptional

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

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property autoProvisioningGroupType: The delivery type of the auto provisioning group.

Valid values:

  • request: One-time asynchronous delivery. The group delivers the instance cluster only at startup. If scheduling fails, no retry occurs.
  • instant: One-time synchronous delivery. The group creates instances synchronously at startup and returns the list of successfully created instances and reasons for failures in the response.
  • maintain: Continuous provisioning. The group attempts to deliver the instance cluster at startup and monitors real-time capacity. If the target capacity is not met, it continues creating ECS instances. Default value: maintain.

check_execution_statusOptional

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


data_disk_configOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DataDiskConfigProperty]]]

Property dataDiskConfig: List of instance data disk information.


default_target_capacity_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property defaultTargetCapacityType: Specifies the billing method for the capacity difference when the sum of PayAsYouGoTargetCapacity and SpotTargetCapacity is less than TotalTargetCapacity.

Valid values:

  • PayAsYouGo: Pay-as-you-go instances.
  • Spot: Spot instances. Default value: Spot.

descriptionOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: The description of the auto provisioning group.


excess_capacity_termination_policyOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property excessCapacityTerminationPolicy: Specifies whether to release instances when the real-time capacity of the auto provisioning group exceeds the target capacity and scale-in is triggered.

Valid values:

  • termination: Releases scaled-in instances.
  • no-termination: Only removes scaled-in instances from the auto provisioning group. Default value: no-termination.

launch_configurationOptional

Property launchConfiguration:.


launch_template_configOptional

Property launchTemplateConfig:.


launch_template_idOptional

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

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property launchTemplateVersion: The version of the launch template associated with the auto provisioning group.

Call DescribeLaunchTemplateVersions to query available launch template versions. Default value: The default version of the launch template.


max_spot_priceOptional

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


min_target_capacityOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property minTargetCapacity: The target minimum capacity of the elastic supply group.

Value range: Positive integer. Once you have set this parameter, note that: Only create one-time synchronous delivery type elastic supply group (AutoProvisioningGroupType = instant), the parameters to take effect. If the inventory of instances in the current domain is less than this value, the call to the interface will fail and no instance will be created. If the instance inventory in the current domain is greater than the parameter value, the instance is created normally according to the other parameter values that have been set.


pay_as_you_go_allocation_strategyOptional

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

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property payAsYouGoTargetCapacity: The target capacity for pay-as-you-go instances in the auto provisioning group.

Valid values: Integers less than or equal to the value of TotalTargetCapacity.


resource_group_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupId: The resource group ID.


resource_pool_optionsOptional

Property resourcePoolOptions: Resource pooling policy to use when creating an instance.

Once you have set this parameter, note that: This parameter only applies if a pay-as-you-go instance is created. Only create one-time synchronous delivery type elastic supply group (AutoProvisioningGroupType = instant), the parameters to take effect.


spot_allocation_strategyOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property spotAllocationStrategy: The strategy for creating spot instances.

Valid values:

  • lowest-price: Cost optimization strategy. Selects the instance type with the lowest price.
  • diversified: Balanced zone distribution strategy. Creates instances across the zones specified in the launch template configurations and distributes them evenly.
  • capacity-optimized: Capacity optimization strategy. Selects the optimal instance type and zone based on inventory availability. Default value: lowest-price.

spot_instance_interruption_behaviorOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property spotInstanceInterruptionBehavior: The behavior when a spot instance is interrupted.

Valid values:

  • stop: Stops the instance.
  • terminate: Releases the instance. Default value: terminate.

spot_instance_pools_to_use_countOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property spotInstancePoolsToUseCount: Takes effect only when SpotAllocationStrategy is set to lowest-price.

Specifies the number of lowest-priced instance types from which the auto provisioning group creates instances. Valid values: Less than the value of N in LaunchTemplateConfig.N.


spot_target_capacityOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property spotTargetCapacity: The target capacity for spot instances in the auto provisioning group.

Valid values: Integers less than or equal to the value of TotalTargetCapacity.


system_disk_configOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, SystemDiskConfigProperty]]]

Property systemDiskConfig: List of instance system disk information.


terminate_instancesOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property terminateInstances: Specifies whether to release instances in the group when you delete the auto provisioning group.

Valid values:

  • true: Releases instances in the group.
  • false: Retains instances in the group. Default value: false.

terminate_instances_with_expirationOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property terminateInstancesWithExpiration: Specifies whether to release instances in the group when the auto provisioning group expires.

Valid values:

  • true: Releases instances in the group.
  • false: Only removes instances from the auto provisioning group. Default value: false.

valid_fromOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property validFrom: The start time of the auto provisioning group.

Used together with ValidUntil to define the validity period. Specify the time in ISO 8601 format using UTC+0 time. Format: yyyy-MM-ddTHH:mm:ssZ. Default value: The timestamp when the API call takes effect immediately.


valid_untilOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property validUntil: The expiration time of the auto provisioning group.

Used together with ValidFrom to define the validity period. Specify the time in ISO 8601 format using UTC+0 time. Format: yyyy-MM-ddTHH:mm:ssZ. Default value: 2099-12-31T23:59:59Z.


enable_resource_property_constraintOptional

  • 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.
fetch_condition No description.
fetch_dependency No description.
fetch_resource_desc 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.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

fetch_condition

def fetch_condition() -> RosCondition

fetch_dependency

def fetch_dependency() -> typing.List[str]

fetch_resource_desc

def fetch_resource_desc() -> str

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

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

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
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 typing.Union[str, ros_cdk_core.IResolvable] Attribute AutoProvisioningGroupId: The ID of the auto provisioning group.
attr_auto_provisioning_group_name typing.Union[str, ros_cdk_core.IResolvable] Attribute AutoProvisioningGroupName: The name of the auto provisioning group.
props AutoProvisioningGroupProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


envRequired

env: IResourceEnvironment
  • Type: ros_cdk_core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_auto_provisioning_group_idRequired

attr_auto_provisioning_group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute AutoProvisioningGroupId: The ID of the auto provisioning group.


attr_auto_provisioning_group_nameRequired

attr_auto_provisioning_group_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute AutoProvisioningGroupName: The name of the auto provisioning group.


propsRequired

props: AutoProvisioningGroupProps