ScalingGroup
Create a ScalingGroup Resource
new ScalingGroup(name: string, args: ScalingGroupArgs, opts?: CustomResourceOptions);def ScalingGroup(resource_name, opts=None, db_instance_ids=None, default_cooldown=None, desired_capacity=None, loadbalancer_ids=None, max_size=None, min_size=None, multi_az_policy=None, on_demand_base_capacity=None, on_demand_percentage_above_base_capacity=None, removal_policies=None, scaling_group_name=None, spot_instance_pools=None, spot_instance_remedy=None, vswitch_id=None, vswitch_ids=None, __props__=None);func NewScalingGroup(ctx *Context, name string, args ScalingGroupArgs, opts ...ResourceOption) (*ScalingGroup, error)public ScalingGroup(string name, ScalingGroupArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ScalingGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScalingGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScalingGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ScalingGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ScalingGroup resource accepts the following input properties:
- Max
Size int Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- Min
Size int Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- Db
Instance List<string>Ids If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- Default
Cooldown int Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- Desired
Capacity int Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- Loadbalancer
Ids List<string> If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- Multi
Az stringPolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- On
Demand intBase Capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- On
Demand intPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- Removal
Policies List<string> RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- Scaling
Group stringName Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- Spot
Instance intPools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- Spot
Instance boolRemedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- Vswitch
Ids List<string> List of virtual switch IDs in which the ecs instances to be launched.
- Max
Size int Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- Min
Size int Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- Db
Instance []stringIds If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- Default
Cooldown int Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- Desired
Capacity int Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- Loadbalancer
Ids []string If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- Multi
Az stringPolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- On
Demand intBase Capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- On
Demand intPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- Removal
Policies []string RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- Scaling
Group stringName Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- Spot
Instance intPools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- Spot
Instance boolRemedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- Vswitch
Ids []string List of virtual switch IDs in which the ecs instances to be launched.
- max
Size number Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- min
Size number Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- db
Instance string[]Ids If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- default
Cooldown number Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desired
Capacity number Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- loadbalancer
Ids string[] If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- multi
Az stringPolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- on
Demand numberBase Capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- on
Demand numberPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- removal
Policies string[] RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- scaling
Group stringName Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- spot
Instance numberPools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spot
Instance booleanRemedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- vswitch
Id string It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- vswitch
Ids string[] List of virtual switch IDs in which the ecs instances to be launched.
- max_
size float Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- min_
size float Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- db_
instance_ List[str]ids If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- default_
cooldown float Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desired_
capacity float Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- loadbalancer_
ids List[str] If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- multi_
az_ strpolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- on_
demand_ floatbase_ capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- on_
demand_ floatpercentage_ above_ base_ capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- removal_
policies List[str] RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- scaling_
group_ strname Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- spot_
instance_ floatpools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spot_
instance_ boolremedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- vswitch_
id str It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- vswitch_
ids List[str] List of virtual switch IDs in which the ecs instances to be launched.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScalingGroup resource produces the following output properties:
Look up an Existing ScalingGroup Resource
Get an existing ScalingGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScalingGroupState, opts?: CustomResourceOptions): ScalingGroupstatic get(resource_name, id, opts=None, db_instance_ids=None, default_cooldown=None, desired_capacity=None, loadbalancer_ids=None, max_size=None, min_size=None, multi_az_policy=None, on_demand_base_capacity=None, on_demand_percentage_above_base_capacity=None, removal_policies=None, scaling_group_name=None, spot_instance_pools=None, spot_instance_remedy=None, vswitch_id=None, vswitch_ids=None, __props__=None);func GetScalingGroup(ctx *Context, name string, id IDInput, state *ScalingGroupState, opts ...ResourceOption) (*ScalingGroup, error)public static ScalingGroup Get(string name, Input<string> id, ScalingGroupState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Db
Instance List<string>Ids If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- Default
Cooldown int Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- Desired
Capacity int Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- Loadbalancer
Ids List<string> If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- Max
Size int Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- Min
Size int Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- Multi
Az stringPolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- On
Demand intBase Capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- On
Demand intPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- Removal
Policies List<string> RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- Scaling
Group stringName Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- Spot
Instance intPools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- Spot
Instance boolRemedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- Vswitch
Ids List<string> List of virtual switch IDs in which the ecs instances to be launched.
- Db
Instance []stringIds If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- Default
Cooldown int Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- Desired
Capacity int Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- Loadbalancer
Ids []string If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- Max
Size int Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- Min
Size int Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- Multi
Az stringPolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- On
Demand intBase Capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- On
Demand intPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- Removal
Policies []string RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- Scaling
Group stringName Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- Spot
Instance intPools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- Spot
Instance boolRemedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- Vswitch
Ids []string List of virtual switch IDs in which the ecs instances to be launched.
- db
Instance string[]Ids If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- default
Cooldown number Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desired
Capacity number Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- loadbalancer
Ids string[] If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- max
Size number Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- min
Size number Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- multi
Az stringPolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- on
Demand numberBase Capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- on
Demand numberPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- removal
Policies string[] RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- scaling
Group stringName Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- spot
Instance numberPools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spot
Instance booleanRemedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- vswitch
Id string It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- vswitch
Ids string[] List of virtual switch IDs in which the ecs instances to be launched.
- db_
instance_ List[str]ids If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
- default_
cooldown float Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desired_
capacity float Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- loadbalancer_
ids List[str] If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a
depends_onargument targeting youralicloud.slb.Listenerin order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.- max_
size float Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- min_
size float Minimum number of ECS instances in the scaling group. Value range: [0, 1000].
- multi_
az_ strpolicy Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
- on_
demand_ floatbase_ capacity The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
- on_
demand_ floatpercentage_ above_ base_ capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- removal_
policies List[str] RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
- scaling_
group_ strname Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores
_, hyphens-, and decimal points.. If this parameter is not specified, the default value is ScalingGroupId.- spot_
instance_ floatpools The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spot_
instance_ boolremedy Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- vswitch_
id str It has been deprecated from version 1.7.1 and new field ‘vswitch_ids’ replaces it.
- vswitch_
ids List[str] List of virtual switch IDs in which the ecs instances to be launched.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.