alicloud.ess.ScalingGroup
Import
ESS scaling group can be imported using the id, e.g.
$ pulumi import alicloud:ess/scalingGroup:ScalingGroup example asg-abc123456
Create ScalingGroup Resource
new ScalingGroup(name: string, args: ScalingGroupArgs, opts?: CustomResourceOptions);
@overload
def ScalingGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_ids: Optional[Sequence[str]] = None,
default_cooldown: Optional[int] = None,
desired_capacity: Optional[int] = None,
group_deletion_protection: Optional[bool] = None,
group_type: Optional[str] = None,
health_check_type: Optional[str] = None,
launch_template_id: Optional[str] = None,
launch_template_version: Optional[str] = None,
loadbalancer_ids: Optional[Sequence[str]] = None,
max_size: Optional[int] = None,
min_size: Optional[int] = None,
multi_az_policy: Optional[str] = None,
on_demand_base_capacity: Optional[int] = None,
on_demand_percentage_above_base_capacity: Optional[int] = None,
protected_instances: Optional[Sequence[str]] = None,
removal_policies: Optional[Sequence[str]] = None,
scaling_group_name: Optional[str] = None,
spot_instance_pools: Optional[int] = None,
spot_instance_remedy: Optional[bool] = None,
tags: Optional[Mapping[str, Any]] = None,
vswitch_id: Optional[str] = None,
vswitch_ids: Optional[Sequence[str]] = None)
@overload
def ScalingGroup(resource_name: str,
args: ScalingGroupArgs,
opts: Optional[ResourceOptions] = None)
func NewScalingGroup(ctx *Context, name string, args ScalingGroupArgs, opts ...ResourceOption) (*ScalingGroup, error)
public ScalingGroup(string name, ScalingGroupArgs args, CustomResourceOptions? opts = null)
public ScalingGroup(String name, ScalingGroupArgs args)
public ScalingGroup(String name, ScalingGroupArgs args, CustomResourceOptions options)
type: alicloud:ess:ScalingGroup
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args ScalingGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args ScalingGroupArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts 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].
- Group
Deletion boolProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- Group
Type string Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- Health
Check stringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- Launch
Template stringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- Launch
Template stringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- Protected
Instances List<string> Set or unset instances within group into protected status.
- 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.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace 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].
- Group
Deletion boolProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- Group
Type string Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- Health
Check stringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- Launch
Template stringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- Launch
Template stringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- Protected
Instances []string Set or unset instances within group into protected status.
- 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.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- Vswitch
Ids []string List of virtual switch IDs in which the ecs instances to be launched.
- max
Size Integer Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- min
Size Integer 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 Integer Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desired
Capacity Integer Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- group
Deletion BooleanProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group
Type String Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health
Check StringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch
Template StringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch
Template StringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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 IntegerBase 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 IntegerPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protected
Instances List<String> Set or unset instances within group into protected status.
- 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 IntegerPools 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.
- Map<String,Object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch
Ids List<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].
- group
Deletion booleanProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group
Type string Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health
Check stringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch
Template stringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch
Template stringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- protected
Instances string[] Set or unset instances within group into protected status.
- 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.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id string It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch
Ids 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_ Sequence[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 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].
- group_
deletion_ boolprotection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group_
type str Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health_
check_ strtype Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch_
template_ strid Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch_
template_ strversion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- loadbalancer_
ids Sequence[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_on
argument targeting youralicloud.slb.Listener
in 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_ 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.
- protected_
instances Sequence[str] Set or unset instances within group into protected status.
- removal_
policies Sequence[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_ 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.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch_
id str It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch_
ids Sequence[str] 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 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 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].
- group
Deletion BooleanProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group
Type String Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health
Check StringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch
Template StringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch
Template StringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- protected
Instances List<String> Set or unset instances within group into protected status.
- 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 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.
- Map<Any>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch
Ids List<String> 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:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up 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): ScalingGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
db_instance_ids: Optional[Sequence[str]] = None,
default_cooldown: Optional[int] = None,
desired_capacity: Optional[int] = None,
group_deletion_protection: Optional[bool] = None,
group_type: Optional[str] = None,
health_check_type: Optional[str] = None,
launch_template_id: Optional[str] = None,
launch_template_version: Optional[str] = None,
loadbalancer_ids: Optional[Sequence[str]] = None,
max_size: Optional[int] = None,
min_size: Optional[int] = None,
multi_az_policy: Optional[str] = None,
on_demand_base_capacity: Optional[int] = None,
on_demand_percentage_above_base_capacity: Optional[int] = None,
protected_instances: Optional[Sequence[str]] = None,
removal_policies: Optional[Sequence[str]] = None,
scaling_group_name: Optional[str] = None,
spot_instance_pools: Optional[int] = None,
spot_instance_remedy: Optional[bool] = None,
tags: Optional[Mapping[str, Any]] = None,
vswitch_id: Optional[str] = None,
vswitch_ids: Optional[Sequence[str]] = None) -> ScalingGroup
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)
public static ScalingGroup get(String name, Output<String> id, ScalingGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- 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].
- Group
Deletion boolProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- Group
Type string Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- Health
Check stringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- Launch
Template stringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- Launch
Template stringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- Protected
Instances List<string> Set or unset instances within group into protected status.
- 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.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace 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].
- Group
Deletion boolProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- Group
Type string Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- Health
Check stringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- Launch
Template stringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- Launch
Template stringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- Protected
Instances []string Set or unset instances within group into protected status.
- 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.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Vswitch
Id string It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- Vswitch
Ids []string List of virtual switch IDs in which the ecs instances to be launched.
- 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 Integer Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desired
Capacity Integer Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- group
Deletion BooleanProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group
Type String Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health
Check StringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch
Template StringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch
Template StringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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 Integer Maximum number of ECS instances in the scaling group. Value range: [0, 1000].
- min
Size Integer 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 IntegerBase 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 IntegerPercentage Above Base Capacity Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protected
Instances List<String> Set or unset instances within group into protected status.
- 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 IntegerPools 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.
- Map<String,Object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch
Ids List<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].
- group
Deletion booleanProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group
Type string Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health
Check stringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch
Template stringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch
Template stringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- protected
Instances string[] Set or unset instances within group into protected status.
- 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.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id string It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch
Ids string[] List of virtual switch IDs in which the ecs instances to be launched.
- db_
instance_ Sequence[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 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].
- group_
deletion_ boolprotection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group_
type str Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health_
check_ strtype Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch_
template_ strid Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch_
template_ strversion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- loadbalancer_
ids Sequence[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_on
argument targeting youralicloud.slb.Listener
in 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_ strpolicy 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.
- protected_
instances Sequence[str] Set or unset instances within group into protected status.
- removal_
policies Sequence[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_ 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.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch_
id str It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch_
ids Sequence[str] List of virtual switch IDs in which the ecs instances to be launched.
- 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 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].
- group
Deletion BooleanProtection Specifies whether the scaling group deletion protection is enabled.
true
orfalse
, Default value:false
.- group
Type String Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- health
Check StringType Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
- launch
Template StringId Instance launch template ID, scaling group obtains launch configuration from instance launch template, see Launch Template. Creating scaling group from launch template enable group automatically.
- launch
Template StringVersion The version number of the launch template. Valid values are the version number,
Latest
, orDefault
, Default value:Default
.- 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_on
argument targeting youralicloud.slb.Listener
in 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.
- protected
Instances List<String> Set or unset instances within group into protected status.
- 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 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.
- Map<Any>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- vswitch
Id String It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
- vswitch
Ids List<String> List of virtual switch IDs in which the ecs instances to be launched.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.