alicloud.ess.ScalingGroup
Explore with Pulumi AI
Provides a ESS scaling group resource which is a collection of ECS instances with the same application scenarios.
It defines the maximum and minimum numbers of ECS instances in the group, and their associated Server Load Balancer instances, RDS instances, and other attributes.
NOTE: You can launch an ESS scaling group for a VPC network via specifying parameter
vswitch_ids.
For information about ess scaling rule, see CreateScalingGroup.
NOTE: Available since v1.39.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultInteger = new random.index.Integer("default", {
    min: 10000,
    max: 99999,
});
const myName = `${name}-${defaultInteger.result}`;
const _default = alicloud.getZones({
    availableDiskCategory: "cloud_efficiency",
    availableResourceCreation: "VSwitch",
});
const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
    availabilityZone: _default.zones?.[0]?.id,
    cpuCoreCount: 2,
    memorySize: 4,
}));
const defaultGetImages = alicloud.ecs.getImages({
    nameRegex: "^ubuntu_18.*64",
    mostRecent: true,
    owners: "system",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: myName,
    cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    vpcId: defaultNetwork.id,
    cidrBlock: "172.16.0.0/24",
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
    vswitchName: myName,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
    name: myName,
    vpcId: defaultNetwork.id,
});
const defaultSecurityGroupRule = new alicloud.ecs.SecurityGroupRule("default", {
    type: "ingress",
    ipProtocol: "tcp",
    nicType: "intranet",
    policy: "accept",
    portRange: "22/22",
    priority: 1,
    securityGroupId: defaultSecurityGroup.id,
    cidrIp: "172.16.0.0/24",
});
const default2 = new alicloud.vpc.Switch("default2", {
    vpcId: defaultNetwork.id,
    cidrBlock: "172.16.1.0/24",
    zoneId: _default.then(_default => _default.zones?.[0]?.id),
    vswitchName: `${name}-bar`,
});
const defaultScalingGroup = new alicloud.ess.ScalingGroup("default", {
    minSize: 1,
    maxSize: 1,
    scalingGroupName: myName,
    defaultCooldown: 20,
    vswitchIds: [
        defaultSwitch.id,
        default2.id,
    ],
    removalPolicies: [
        "OldestInstance",
        "NewestInstance",
    ],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default_integer = random.index.Integer("default",
    min=10000,
    max=99999)
my_name = f"{name}-{default_integer['result']}"
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
    available_resource_creation="VSwitch")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
    cpu_core_count=2,
    memory_size=4)
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
    most_recent=True,
    owners="system")
default_network = alicloud.vpc.Network("default",
    vpc_name=my_name,
    cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("default",
    vpc_id=default_network.id,
    cidr_block="172.16.0.0/24",
    zone_id=default.zones[0].id,
    vswitch_name=my_name)
default_security_group = alicloud.ecs.SecurityGroup("default",
    name=my_name,
    vpc_id=default_network.id)
default_security_group_rule = alicloud.ecs.SecurityGroupRule("default",
    type="ingress",
    ip_protocol="tcp",
    nic_type="intranet",
    policy="accept",
    port_range="22/22",
    priority=1,
    security_group_id=default_security_group.id,
    cidr_ip="172.16.0.0/24")
default2 = alicloud.vpc.Switch("default2",
    vpc_id=default_network.id,
    cidr_block="172.16.1.0/24",
    zone_id=default.zones[0].id,
    vswitch_name=f"{name}-bar")
default_scaling_group = alicloud.ess.ScalingGroup("default",
    min_size=1,
    max_size=1,
    scaling_group_name=my_name,
    default_cooldown=20,
    vswitch_ids=[
        default_switch.id,
        default2.id,
    ],
    removal_policies=[
        "OldestInstance",
        "NewestInstance",
    ])
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		myName := fmt.Sprintf("%v-%v", name, defaultInteger.Result)
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableDiskCategory:     pulumi.StringRef("cloud_efficiency"),
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
			CpuCoreCount:     pulumi.IntRef(2),
			MemorySize:       pulumi.Float64Ref(4),
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecs.GetImages(ctx, &ecs.GetImagesArgs{
			NameRegex:  pulumi.StringRef("^ubuntu_18.*64"),
			MostRecent: pulumi.BoolRef(true),
			Owners:     pulumi.StringRef("system"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(myName),
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VpcId:       defaultNetwork.ID(),
			CidrBlock:   pulumi.String("172.16.0.0/24"),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
			VswitchName: pulumi.String(myName),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			Name:  pulumi.String(myName),
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ecs.NewSecurityGroupRule(ctx, "default", &ecs.SecurityGroupRuleArgs{
			Type:            pulumi.String("ingress"),
			IpProtocol:      pulumi.String("tcp"),
			NicType:         pulumi.String("intranet"),
			Policy:          pulumi.String("accept"),
			PortRange:       pulumi.String("22/22"),
			Priority:        pulumi.Int(1),
			SecurityGroupId: defaultSecurityGroup.ID(),
			CidrIp:          pulumi.String("172.16.0.0/24"),
		})
		if err != nil {
			return err
		}
		default2, err := vpc.NewSwitch(ctx, "default2", &vpc.SwitchArgs{
			VpcId:       defaultNetwork.ID(),
			CidrBlock:   pulumi.String("172.16.1.0/24"),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
			VswitchName: pulumi.Sprintf("%v-bar", name),
		})
		if err != nil {
			return err
		}
		_, err = ess.NewScalingGroup(ctx, "default", &ess.ScalingGroupArgs{
			MinSize:          pulumi.Int(1),
			MaxSize:          pulumi.Int(1),
			ScalingGroupName: pulumi.String(myName),
			DefaultCooldown:  pulumi.Int(20),
			VswitchIds: pulumi.StringArray{
				defaultSwitch.ID(),
				default2.ID(),
			},
			RemovalPolicies: pulumi.StringArray{
				pulumi.String("OldestInstance"),
				pulumi.String("NewestInstance"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var defaultInteger = new Random.Index.Integer("default", new()
    {
        Min = 10000,
        Max = 99999,
    });
    var myName = $"{name}-{defaultInteger.Result}";
    var @default = AliCloud.GetZones.Invoke(new()
    {
        AvailableDiskCategory = "cloud_efficiency",
        AvailableResourceCreation = "VSwitch",
    });
    var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
    {
        AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        CpuCoreCount = 2,
        MemorySize = 4,
    });
    var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
    {
        NameRegex = "^ubuntu_18.*64",
        MostRecent = true,
        Owners = "system",
    });
    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = myName,
        CidrBlock = "172.16.0.0/16",
    });
    var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
    {
        VpcId = defaultNetwork.Id,
        CidrBlock = "172.16.0.0/24",
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        VswitchName = myName,
    });
    var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
    {
        Name = myName,
        VpcId = defaultNetwork.Id,
    });
    var defaultSecurityGroupRule = new AliCloud.Ecs.SecurityGroupRule("default", new()
    {
        Type = "ingress",
        IpProtocol = "tcp",
        NicType = "intranet",
        Policy = "accept",
        PortRange = "22/22",
        Priority = 1,
        SecurityGroupId = defaultSecurityGroup.Id,
        CidrIp = "172.16.0.0/24",
    });
    var default2 = new AliCloud.Vpc.Switch("default2", new()
    {
        VpcId = defaultNetwork.Id,
        CidrBlock = "172.16.1.0/24",
        ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        VswitchName = $"{name}-bar",
    });
    var defaultScalingGroup = new AliCloud.Ess.ScalingGroup("default", new()
    {
        MinSize = 1,
        MaxSize = 1,
        ScalingGroupName = myName,
        DefaultCooldown = 20,
        VswitchIds = new[]
        {
            defaultSwitch.Id,
            default2.Id,
        },
        RemovalPolicies = new[]
        {
            "OldestInstance",
            "NewestInstance",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.SecurityGroupRule;
import com.pulumi.alicloud.ecs.SecurityGroupRuleArgs;
import com.pulumi.alicloud.ess.ScalingGroup;
import com.pulumi.alicloud.ess.ScalingGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
            .min(10000)
            .max(99999)
            .build());
        final var myName = String.format("%s-%s", name,defaultInteger.result());
        final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableDiskCategory("cloud_efficiency")
            .availableResourceCreation("VSwitch")
            .build());
        final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .availabilityZone(default_.zones()[0].id())
            .cpuCoreCount(2)
            .memorySize(4)
            .build());
        final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
            .nameRegex("^ubuntu_18.*64")
            .mostRecent(true)
            .owners("system")
            .build());
        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName(myName)
            .cidrBlock("172.16.0.0/16")
            .build());
        var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
            .vpcId(defaultNetwork.id())
            .cidrBlock("172.16.0.0/24")
            .zoneId(default_.zones()[0].id())
            .vswitchName(myName)
            .build());
        var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
            .name(myName)
            .vpcId(defaultNetwork.id())
            .build());
        var defaultSecurityGroupRule = new SecurityGroupRule("defaultSecurityGroupRule", SecurityGroupRuleArgs.builder()
            .type("ingress")
            .ipProtocol("tcp")
            .nicType("intranet")
            .policy("accept")
            .portRange("22/22")
            .priority(1)
            .securityGroupId(defaultSecurityGroup.id())
            .cidrIp("172.16.0.0/24")
            .build());
        var default2 = new Switch("default2", SwitchArgs.builder()
            .vpcId(defaultNetwork.id())
            .cidrBlock("172.16.1.0/24")
            .zoneId(default_.zones()[0].id())
            .vswitchName(String.format("%s-bar", name))
            .build());
        var defaultScalingGroup = new ScalingGroup("defaultScalingGroup", ScalingGroupArgs.builder()
            .minSize(1)
            .maxSize(1)
            .scalingGroupName(myName)
            .defaultCooldown(20)
            .vswitchIds(            
                defaultSwitch.id(),
                default2.id())
            .removalPolicies(            
                "OldestInstance",
                "NewestInstance")
            .build());
    }
}
configuration:
  name:
    type: string
    default: terraform-example
resources:
  defaultInteger:
    type: random:integer
    name: default
    properties:
      min: 10000
      max: 99999
  defaultNetwork:
    type: alicloud:vpc:Network
    name: default
    properties:
      vpcName: ${myName}
      cidrBlock: 172.16.0.0/16
  defaultSwitch:
    type: alicloud:vpc:Switch
    name: default
    properties:
      vpcId: ${defaultNetwork.id}
      cidrBlock: 172.16.0.0/24
      zoneId: ${default.zones[0].id}
      vswitchName: ${myName}
  defaultSecurityGroup:
    type: alicloud:ecs:SecurityGroup
    name: default
    properties:
      name: ${myName}
      vpcId: ${defaultNetwork.id}
  defaultSecurityGroupRule:
    type: alicloud:ecs:SecurityGroupRule
    name: default
    properties:
      type: ingress
      ipProtocol: tcp
      nicType: intranet
      policy: accept
      portRange: 22/22
      priority: 1
      securityGroupId: ${defaultSecurityGroup.id}
      cidrIp: 172.16.0.0/24
  default2:
    type: alicloud:vpc:Switch
    properties:
      vpcId: ${defaultNetwork.id}
      cidrBlock: 172.16.1.0/24
      zoneId: ${default.zones[0].id}
      vswitchName: ${name}-bar
  defaultScalingGroup:
    type: alicloud:ess:ScalingGroup
    name: default
    properties:
      minSize: 1
      maxSize: 1
      scalingGroupName: ${myName}
      defaultCooldown: 20
      vswitchIds:
        - ${defaultSwitch.id}
        - ${default2.id}
      removalPolicies:
        - OldestInstance
        - NewestInstance
variables:
  myName: ${name}-${defaultInteger.result}
  default:
    fn::invoke:
      function: alicloud:getZones
      arguments:
        availableDiskCategory: cloud_efficiency
        availableResourceCreation: VSwitch
  defaultGetInstanceTypes:
    fn::invoke:
      function: alicloud:ecs:getInstanceTypes
      arguments:
        availabilityZone: ${default.zones[0].id}
        cpuCoreCount: 2
        memorySize: 4
  defaultGetImages:
    fn::invoke:
      function: alicloud:ecs:getImages
      arguments:
        nameRegex: ^ubuntu_18.*64
        mostRecent: true
        owners: system
Module Support
You can use to the existing autoscaling module to create a scaling group, configuration and lifecycle hook one-click.
Create ScalingGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScalingGroup(name: string, args: ScalingGroupArgs, opts?: CustomResourceOptions);@overload
def ScalingGroup(resource_name: str,
                 args: ScalingGroupArgs,
                 opts: Optional[ResourceOptions] = None)
@overload
def ScalingGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 max_size: Optional[int] = None,
                 min_size: Optional[int] = None,
                 max_instance_lifetime: Optional[int] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 db_instance_ids: Optional[Sequence[str]] = None,
                 default_cooldown: Optional[int] = None,
                 desired_capacity: Optional[int] = None,
                 group_deletion_protection: Optional[bool] = None,
                 allocation_strategy: Optional[str] = None,
                 health_check_type: Optional[str] = None,
                 health_check_types: Optional[Sequence[str]] = None,
                 instance_id: Optional[str] = None,
                 launch_template_id: Optional[str] = None,
                 launch_template_overrides: Optional[Sequence[ScalingGroupLaunchTemplateOverrideArgs]] = None,
                 launch_template_version: Optional[str] = None,
                 loadbalancer_ids: Optional[Sequence[str]] = None,
                 vswitch_ids: Optional[Sequence[str]] = None,
                 container_group_id: Optional[str] = None,
                 group_type: Optional[str] = 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,
                 resource_group_id: Optional[str] = None,
                 scaling_group_name: Optional[str] = None,
                 scaling_policy: Optional[str] = None,
                 spot_allocation_strategy: Optional[str] = None,
                 spot_instance_pools: Optional[int] = None,
                 spot_instance_remedy: Optional[bool] = None,
                 stop_instance_timeout: Optional[int] = None,
                 az_balance: Optional[bool] = None,
                 vswitch_id: Optional[str] = None,
                 alb_server_groups: Optional[Sequence[ScalingGroupAlbServerGroupArgs]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var scalingGroupResource = new AliCloud.Ess.ScalingGroup("scalingGroupResource", new()
{
    MaxSize = 0,
    MinSize = 0,
    MaxInstanceLifetime = 0,
    Tags = 
    {
        { "string", "string" },
    },
    DbInstanceIds = new[]
    {
        "string",
    },
    DefaultCooldown = 0,
    DesiredCapacity = 0,
    GroupDeletionProtection = false,
    AllocationStrategy = "string",
    HealthCheckType = "string",
    HealthCheckTypes = new[]
    {
        "string",
    },
    InstanceId = "string",
    LaunchTemplateId = "string",
    LaunchTemplateOverrides = new[]
    {
        new AliCloud.Ess.Inputs.ScalingGroupLaunchTemplateOverrideArgs
        {
            InstanceType = "string",
            SpotPriceLimit = 0,
            WeightedCapacity = 0,
        },
    },
    LaunchTemplateVersion = "string",
    LoadbalancerIds = new[]
    {
        "string",
    },
    VswitchIds = new[]
    {
        "string",
    },
    ContainerGroupId = "string",
    GroupType = "string",
    MultiAzPolicy = "string",
    OnDemandBaseCapacity = 0,
    OnDemandPercentageAboveBaseCapacity = 0,
    ProtectedInstances = new[]
    {
        "string",
    },
    RemovalPolicies = new[]
    {
        "string",
    },
    ResourceGroupId = "string",
    ScalingGroupName = "string",
    ScalingPolicy = "string",
    SpotAllocationStrategy = "string",
    SpotInstancePools = 0,
    SpotInstanceRemedy = false,
    StopInstanceTimeout = 0,
    AzBalance = false,
    AlbServerGroups = new[]
    {
        new AliCloud.Ess.Inputs.ScalingGroupAlbServerGroupArgs
        {
            AlbServerGroupId = "string",
            Port = 0,
            Weight = 0,
        },
    },
});
example, err := ess.NewScalingGroup(ctx, "scalingGroupResource", &ess.ScalingGroupArgs{
	MaxSize:             pulumi.Int(0),
	MinSize:             pulumi.Int(0),
	MaxInstanceLifetime: pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	DbInstanceIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	DefaultCooldown:         pulumi.Int(0),
	DesiredCapacity:         pulumi.Int(0),
	GroupDeletionProtection: pulumi.Bool(false),
	AllocationStrategy:      pulumi.String("string"),
	HealthCheckType:         pulumi.String("string"),
	HealthCheckTypes: pulumi.StringArray{
		pulumi.String("string"),
	},
	InstanceId:       pulumi.String("string"),
	LaunchTemplateId: pulumi.String("string"),
	LaunchTemplateOverrides: ess.ScalingGroupLaunchTemplateOverrideArray{
		&ess.ScalingGroupLaunchTemplateOverrideArgs{
			InstanceType:     pulumi.String("string"),
			SpotPriceLimit:   pulumi.Float64(0),
			WeightedCapacity: pulumi.Int(0),
		},
	},
	LaunchTemplateVersion: pulumi.String("string"),
	LoadbalancerIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	VswitchIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ContainerGroupId:                    pulumi.String("string"),
	GroupType:                           pulumi.String("string"),
	MultiAzPolicy:                       pulumi.String("string"),
	OnDemandBaseCapacity:                pulumi.Int(0),
	OnDemandPercentageAboveBaseCapacity: pulumi.Int(0),
	ProtectedInstances: pulumi.StringArray{
		pulumi.String("string"),
	},
	RemovalPolicies: pulumi.StringArray{
		pulumi.String("string"),
	},
	ResourceGroupId:        pulumi.String("string"),
	ScalingGroupName:       pulumi.String("string"),
	ScalingPolicy:          pulumi.String("string"),
	SpotAllocationStrategy: pulumi.String("string"),
	SpotInstancePools:      pulumi.Int(0),
	SpotInstanceRemedy:     pulumi.Bool(false),
	StopInstanceTimeout:    pulumi.Int(0),
	AzBalance:              pulumi.Bool(false),
	AlbServerGroups: ess.ScalingGroupAlbServerGroupArray{
		&ess.ScalingGroupAlbServerGroupArgs{
			AlbServerGroupId: pulumi.String("string"),
			Port:             pulumi.Int(0),
			Weight:           pulumi.Int(0),
		},
	},
})
var scalingGroupResource = new ScalingGroup("scalingGroupResource", ScalingGroupArgs.builder()
    .maxSize(0)
    .minSize(0)
    .maxInstanceLifetime(0)
    .tags(Map.of("string", "string"))
    .dbInstanceIds("string")
    .defaultCooldown(0)
    .desiredCapacity(0)
    .groupDeletionProtection(false)
    .allocationStrategy("string")
    .healthCheckType("string")
    .healthCheckTypes("string")
    .instanceId("string")
    .launchTemplateId("string")
    .launchTemplateOverrides(ScalingGroupLaunchTemplateOverrideArgs.builder()
        .instanceType("string")
        .spotPriceLimit(0)
        .weightedCapacity(0)
        .build())
    .launchTemplateVersion("string")
    .loadbalancerIds("string")
    .vswitchIds("string")
    .containerGroupId("string")
    .groupType("string")
    .multiAzPolicy("string")
    .onDemandBaseCapacity(0)
    .onDemandPercentageAboveBaseCapacity(0)
    .protectedInstances("string")
    .removalPolicies("string")
    .resourceGroupId("string")
    .scalingGroupName("string")
    .scalingPolicy("string")
    .spotAllocationStrategy("string")
    .spotInstancePools(0)
    .spotInstanceRemedy(false)
    .stopInstanceTimeout(0)
    .azBalance(false)
    .albServerGroups(ScalingGroupAlbServerGroupArgs.builder()
        .albServerGroupId("string")
        .port(0)
        .weight(0)
        .build())
    .build());
scaling_group_resource = alicloud.ess.ScalingGroup("scalingGroupResource",
    max_size=0,
    min_size=0,
    max_instance_lifetime=0,
    tags={
        "string": "string",
    },
    db_instance_ids=["string"],
    default_cooldown=0,
    desired_capacity=0,
    group_deletion_protection=False,
    allocation_strategy="string",
    health_check_type="string",
    health_check_types=["string"],
    instance_id="string",
    launch_template_id="string",
    launch_template_overrides=[{
        "instance_type": "string",
        "spot_price_limit": 0,
        "weighted_capacity": 0,
    }],
    launch_template_version="string",
    loadbalancer_ids=["string"],
    vswitch_ids=["string"],
    container_group_id="string",
    group_type="string",
    multi_az_policy="string",
    on_demand_base_capacity=0,
    on_demand_percentage_above_base_capacity=0,
    protected_instances=["string"],
    removal_policies=["string"],
    resource_group_id="string",
    scaling_group_name="string",
    scaling_policy="string",
    spot_allocation_strategy="string",
    spot_instance_pools=0,
    spot_instance_remedy=False,
    stop_instance_timeout=0,
    az_balance=False,
    alb_server_groups=[{
        "alb_server_group_id": "string",
        "port": 0,
        "weight": 0,
    }])
const scalingGroupResource = new alicloud.ess.ScalingGroup("scalingGroupResource", {
    maxSize: 0,
    minSize: 0,
    maxInstanceLifetime: 0,
    tags: {
        string: "string",
    },
    dbInstanceIds: ["string"],
    defaultCooldown: 0,
    desiredCapacity: 0,
    groupDeletionProtection: false,
    allocationStrategy: "string",
    healthCheckType: "string",
    healthCheckTypes: ["string"],
    instanceId: "string",
    launchTemplateId: "string",
    launchTemplateOverrides: [{
        instanceType: "string",
        spotPriceLimit: 0,
        weightedCapacity: 0,
    }],
    launchTemplateVersion: "string",
    loadbalancerIds: ["string"],
    vswitchIds: ["string"],
    containerGroupId: "string",
    groupType: "string",
    multiAzPolicy: "string",
    onDemandBaseCapacity: 0,
    onDemandPercentageAboveBaseCapacity: 0,
    protectedInstances: ["string"],
    removalPolicies: ["string"],
    resourceGroupId: "string",
    scalingGroupName: "string",
    scalingPolicy: "string",
    spotAllocationStrategy: "string",
    spotInstancePools: 0,
    spotInstanceRemedy: false,
    stopInstanceTimeout: 0,
    azBalance: false,
    albServerGroups: [{
        albServerGroupId: "string",
        port: 0,
        weight: 0,
    }],
});
type: alicloud:ess:ScalingGroup
properties:
    albServerGroups:
        - albServerGroupId: string
          port: 0
          weight: 0
    allocationStrategy: string
    azBalance: false
    containerGroupId: string
    dbInstanceIds:
        - string
    defaultCooldown: 0
    desiredCapacity: 0
    groupDeletionProtection: false
    groupType: string
    healthCheckType: string
    healthCheckTypes:
        - string
    instanceId: string
    launchTemplateId: string
    launchTemplateOverrides:
        - instanceType: string
          spotPriceLimit: 0
          weightedCapacity: 0
    launchTemplateVersion: string
    loadbalancerIds:
        - string
    maxInstanceLifetime: 0
    maxSize: 0
    minSize: 0
    multiAzPolicy: string
    onDemandBaseCapacity: 0
    onDemandPercentageAboveBaseCapacity: 0
    protectedInstances:
        - string
    removalPolicies:
        - string
    resourceGroupId: string
    scalingGroupName: string
    scalingPolicy: string
    spotAllocationStrategy: string
    spotInstancePools: 0
    spotInstanceRemedy: false
    stopInstanceTimeout: 0
    tags:
        string: string
    vswitchIds:
        - string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ScalingGroup resource accepts the following input properties:
- MaxSize int
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- MinSize int
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- AlbServer List<Pulumi.Groups Ali Cloud. Ess. Inputs. Scaling Group Alb Server Group> 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- AllocationStrategy string
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- AzBalance bool
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- ContainerGroup stringId 
- The ID of the elastic container instance.
- DbInstance 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.
 
- DefaultCooldown int
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- DesiredCapacity int
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- GroupDeletion boolProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- GroupType string
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- HealthCheck stringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- HealthCheck List<string>Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- InstanceId string
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- LaunchTemplate 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.
- LaunchTemplate List<Pulumi.Overrides Ali Cloud. Ess. Inputs. Scaling Group Launch Template Override> 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- LaunchTemplate stringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- LoadbalancerIds 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.
 
- MaxInstance intLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- MultiAz stringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- OnDemand 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.
- OnDemand intPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- ProtectedInstances List<string>
- Set or unset instances within group into protected status.
- RemovalPolicies 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.
 
- ResourceGroup stringId 
- The ID of the resource group to which you want to add the scaling group.
- ScalingGroup 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.
- ScalingPolicy string
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- SpotAllocation stringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- SpotInstance intPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- SpotInstance boolRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- StopInstance intTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Dictionary<string, string>
- 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.
 
- VswitchId string
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- VswitchIds List<string>
- List of virtual switch IDs in which the ecs instances to be launched.
- MaxSize int
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- MinSize int
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- AlbServer []ScalingGroups Group Alb Server Group Args 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- AllocationStrategy string
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- AzBalance bool
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- ContainerGroup stringId 
- The ID of the elastic container instance.
- DbInstance []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.
 
- DefaultCooldown int
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- DesiredCapacity int
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- GroupDeletion boolProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- GroupType string
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- HealthCheck stringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- HealthCheck []stringTypes 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- InstanceId string
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- LaunchTemplate 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.
- LaunchTemplate []ScalingOverrides Group Launch Template Override Args 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- LaunchTemplate stringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- LoadbalancerIds []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.
 
- MaxInstance intLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- MultiAz stringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- OnDemand 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.
- OnDemand intPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- ProtectedInstances []string
- Set or unset instances within group into protected status.
- RemovalPolicies []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.
 
- ResourceGroup stringId 
- The ID of the resource group to which you want to add the scaling group.
- ScalingGroup 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.
- ScalingPolicy string
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- SpotAllocation stringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- SpotInstance intPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- SpotInstance boolRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- StopInstance intTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- map[string]string
- 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.
 
- VswitchId string
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- VswitchIds []string
- List of virtual switch IDs in which the ecs instances to be launched.
- maxSize Integer
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- minSize Integer
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- albServer List<ScalingGroups Group Alb Server Group> 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocationStrategy String
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- azBalance Boolean
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- containerGroup StringId 
- The ID of the elastic container instance.
- dbInstance 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.
 
- defaultCooldown Integer
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desiredCapacity Integer
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- groupDeletion BooleanProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- groupType String
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- healthCheck StringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- healthCheck List<String>Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instanceId String
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- launchTemplate 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.
- launchTemplate List<ScalingOverrides Group Launch Template Override> 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- launchTemplate StringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- loadbalancerIds 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.
 
- maxInstance IntegerLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- multiAz StringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- onDemand 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.
- onDemand IntegerPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protectedInstances List<String>
- Set or unset instances within group into protected status.
- removalPolicies 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.
 
- resourceGroup StringId 
- The ID of the resource group to which you want to add the scaling group.
- scalingGroup 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.
- scalingPolicy String
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spotAllocation StringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- spotInstance IntegerPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spotInstance BooleanRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- stopInstance IntegerTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Map<String,String>
- 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.
 
- vswitchId String
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- vswitchIds List<String>
- List of virtual switch IDs in which the ecs instances to be launched.
- maxSize number
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- minSize number
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- albServer ScalingGroups Group Alb Server Group[] 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocationStrategy string
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- azBalance boolean
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- containerGroup stringId 
- The ID of the elastic container instance.
- dbInstance 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.
 
- defaultCooldown number
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desiredCapacity number
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- groupDeletion booleanProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- groupType string
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- healthCheck stringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- healthCheck string[]Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instanceId string
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- launchTemplate 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.
- launchTemplate ScalingOverrides Group Launch Template Override[] 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- launchTemplate stringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- loadbalancerIds 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.
 
- maxInstance numberLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- multiAz stringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- onDemand 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.
- onDemand numberPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protectedInstances string[]
- Set or unset instances within group into protected status.
- removalPolicies 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.
 
- resourceGroup stringId 
- The ID of the resource group to which you want to add the scaling group.
- scalingGroup 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.
- scalingPolicy string
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spotAllocation stringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- spotInstance numberPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spotInstance booleanRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- stopInstance numberTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- {[key: string]: string}
- 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.
 
- vswitchId string
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- vswitchIds 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, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- min_size int
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- alb_server_ Sequence[Scalinggroups Group Alb Server Group Args] 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocation_strategy str
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- az_balance bool
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- container_group_ strid 
- The ID of the elastic container instance.
- 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. trueorfalse, 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, ECI, NONE, LOAD_BALANCER. Default to ECS.
- health_check_ Sequence[str]types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instance_id str
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- 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_ Sequence[Scalingoverrides Group Launch Template Override Args] 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- 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_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_instance_ intlifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- multi_az_ strpolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.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.
 
- resource_group_ strid 
- The ID of the resource group to which you want to add the scaling group.
- 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.
- scaling_policy str
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spot_allocation_ strstrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- 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.
- stop_instance_ inttimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Mapping[str, str]
- 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.
- vswitch_ids Sequence[str]
- List of virtual switch IDs in which the ecs instances to be launched.
- maxSize Number
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- minSize Number
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- albServer List<Property Map>Groups 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocationStrategy String
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- azBalance Boolean
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- containerGroup StringId 
- The ID of the elastic container instance.
- dbInstance 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.
 
- defaultCooldown Number
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desiredCapacity Number
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- groupDeletion BooleanProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- groupType String
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- healthCheck StringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- healthCheck List<String>Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instanceId String
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- launchTemplate 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.
- launchTemplate List<Property Map>Overrides 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- launchTemplate StringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- loadbalancerIds 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.
 
- maxInstance NumberLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- multiAz StringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- onDemand 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.
- onDemand NumberPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protectedInstances List<String>
- Set or unset instances within group into protected status.
- removalPolicies 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.
 
- resourceGroup StringId 
- The ID of the resource group to which you want to add the scaling group.
- scalingGroup 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.
- scalingPolicy String
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spotAllocation StringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- spotInstance NumberPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spotInstance BooleanRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- stopInstance NumberTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Map<String>
- 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.
 
- vswitchId String
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- vswitchIds 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,
        alb_server_groups: Optional[Sequence[ScalingGroupAlbServerGroupArgs]] = None,
        allocation_strategy: Optional[str] = None,
        az_balance: Optional[bool] = None,
        container_group_id: Optional[str] = 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,
        health_check_types: Optional[Sequence[str]] = None,
        instance_id: Optional[str] = None,
        launch_template_id: Optional[str] = None,
        launch_template_overrides: Optional[Sequence[ScalingGroupLaunchTemplateOverrideArgs]] = None,
        launch_template_version: Optional[str] = None,
        loadbalancer_ids: Optional[Sequence[str]] = None,
        max_instance_lifetime: Optional[int] = 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,
        resource_group_id: Optional[str] = None,
        scaling_group_name: Optional[str] = None,
        scaling_policy: Optional[str] = None,
        spot_allocation_strategy: Optional[str] = None,
        spot_instance_pools: Optional[int] = None,
        spot_instance_remedy: Optional[bool] = None,
        stop_instance_timeout: Optional[int] = None,
        tags: Optional[Mapping[str, str]] = None,
        vswitch_id: Optional[str] = None,
        vswitch_ids: Optional[Sequence[str]] = None) -> ScalingGroupfunc 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)resources:  _:    type: alicloud:ess:ScalingGroup    get:      id: ${id}- 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.
- AlbServer List<Pulumi.Groups Ali Cloud. Ess. Inputs. Scaling Group Alb Server Group> 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- AllocationStrategy string
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- AzBalance bool
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- ContainerGroup stringId 
- The ID of the elastic container instance.
- DbInstance 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.
 
- DefaultCooldown int
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- DesiredCapacity int
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- GroupDeletion boolProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- GroupType string
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- HealthCheck stringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- HealthCheck List<string>Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- InstanceId string
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- LaunchTemplate 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.
- LaunchTemplate List<Pulumi.Overrides Ali Cloud. Ess. Inputs. Scaling Group Launch Template Override> 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- LaunchTemplate stringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- LoadbalancerIds 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.
 
- MaxInstance intLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- MaxSize int
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- MinSize int
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- MultiAz stringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- OnDemand 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.
- OnDemand intPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- ProtectedInstances List<string>
- Set or unset instances within group into protected status.
- RemovalPolicies 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.
 
- ResourceGroup stringId 
- The ID of the resource group to which you want to add the scaling group.
- ScalingGroup 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.
- ScalingPolicy string
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- SpotAllocation stringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- SpotInstance intPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- SpotInstance boolRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- StopInstance intTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Dictionary<string, string>
- 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.
 
- VswitchId string
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- VswitchIds List<string>
- List of virtual switch IDs in which the ecs instances to be launched.
- AlbServer []ScalingGroups Group Alb Server Group Args 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- AllocationStrategy string
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- AzBalance bool
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- ContainerGroup stringId 
- The ID of the elastic container instance.
- DbInstance []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.
 
- DefaultCooldown int
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- DesiredCapacity int
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- GroupDeletion boolProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- GroupType string
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- HealthCheck stringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- HealthCheck []stringTypes 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- InstanceId string
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- LaunchTemplate 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.
- LaunchTemplate []ScalingOverrides Group Launch Template Override Args 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- LaunchTemplate stringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- LoadbalancerIds []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.
 
- MaxInstance intLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- MaxSize int
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- MinSize int
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- MultiAz stringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- OnDemand 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.
- OnDemand intPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- ProtectedInstances []string
- Set or unset instances within group into protected status.
- RemovalPolicies []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.
 
- ResourceGroup stringId 
- The ID of the resource group to which you want to add the scaling group.
- ScalingGroup 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.
- ScalingPolicy string
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- SpotAllocation stringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- SpotInstance intPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- SpotInstance boolRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- StopInstance intTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- map[string]string
- 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.
 
- VswitchId string
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- VswitchIds []string
- List of virtual switch IDs in which the ecs instances to be launched.
- albServer List<ScalingGroups Group Alb Server Group> 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocationStrategy String
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- azBalance Boolean
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- containerGroup StringId 
- The ID of the elastic container instance.
- dbInstance 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.
 
- defaultCooldown Integer
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desiredCapacity Integer
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- groupDeletion BooleanProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- groupType String
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- healthCheck StringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- healthCheck List<String>Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instanceId String
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- launchTemplate 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.
- launchTemplate List<ScalingOverrides Group Launch Template Override> 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- launchTemplate StringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- loadbalancerIds 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.
 
- maxInstance IntegerLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- maxSize Integer
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- minSize Integer
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- multiAz StringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- onDemand 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.
- onDemand IntegerPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protectedInstances List<String>
- Set or unset instances within group into protected status.
- removalPolicies 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.
 
- resourceGroup StringId 
- The ID of the resource group to which you want to add the scaling group.
- scalingGroup 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.
- scalingPolicy String
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spotAllocation StringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- spotInstance IntegerPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spotInstance BooleanRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- stopInstance IntegerTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Map<String,String>
- 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.
 
- vswitchId String
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- vswitchIds List<String>
- List of virtual switch IDs in which the ecs instances to be launched.
- albServer ScalingGroups Group Alb Server Group[] 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocationStrategy string
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- azBalance boolean
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- containerGroup stringId 
- The ID of the elastic container instance.
- dbInstance 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.
 
- defaultCooldown number
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desiredCapacity number
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- groupDeletion booleanProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- groupType string
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- healthCheck stringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- healthCheck string[]Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instanceId string
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- launchTemplate 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.
- launchTemplate ScalingOverrides Group Launch Template Override[] 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- launchTemplate stringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- loadbalancerIds 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.
 
- maxInstance numberLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- maxSize number
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- minSize number
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- multiAz stringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- onDemand 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.
- onDemand numberPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protectedInstances string[]
- Set or unset instances within group into protected status.
- removalPolicies 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.
 
- resourceGroup stringId 
- The ID of the resource group to which you want to add the scaling group.
- scalingGroup 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.
- scalingPolicy string
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spotAllocation stringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- spotInstance numberPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spotInstance booleanRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- stopInstance numberTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- {[key: string]: string}
- 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.
 
- vswitchId string
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- vswitchIds string[]
- List of virtual switch IDs in which the ecs instances to be launched.
- alb_server_ Sequence[Scalinggroups Group Alb Server Group Args] 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocation_strategy str
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- az_balance bool
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- container_group_ strid 
- The ID of the elastic container instance.
- 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. trueorfalse, 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, ECI, NONE, LOAD_BALANCER. Default to ECS.
- health_check_ Sequence[str]types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instance_id str
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- 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_ Sequence[Scalingoverrides Group Launch Template Override Args] 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- 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_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_instance_ intlifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- max_size int
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- min_size int
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- multi_az_ strpolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.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.
 
- resource_group_ strid 
- The ID of the resource group to which you want to add the scaling group.
- 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.
- scaling_policy str
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spot_allocation_ strstrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- 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.
- stop_instance_ inttimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Mapping[str, str]
- 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.
- vswitch_ids Sequence[str]
- List of virtual switch IDs in which the ecs instances to be launched.
- albServer List<Property Map>Groups 
- If a Serve ALB instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server ALB instance. See alb_server_groupbelow for details.
- allocationStrategy String
- The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- azBalance Boolean
- Specifies whether to evenly distribute instances in the scaling group across multiple zones. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- containerGroup StringId 
- The ID of the elastic container instance.
- dbInstance 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.
 
- defaultCooldown Number
- Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
- desiredCapacity Number
- Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
- groupDeletion BooleanProtection 
- Specifies whether the scaling group deletion protection is enabled. trueorfalse, Default value:false.
- groupType String
- Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
- healthCheck StringType 
- Resource type within scaling group. Optional values: ECS, ECI, NONE, LOAD_BALANCER. Default to ECS.
- healthCheck List<String>Types 
- The health check modes of the scaling group. Valid values: ECS, NONE, LOAD_BALANCER.
- instanceId String
- The ID of the instance from which Auto Scaling obtains the required configuration information and uses the information to automatically create a scaling configuration.
- launchTemplate 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.
- launchTemplate List<Property Map>Overrides 
- The details of the instance types that are specified by using the Extend Instance Type of Launch Template feature. See launch_template_overridebelow for details.
- launchTemplate StringVersion 
- The version number of the launch template. Valid values are the version number, Latest, orDefault, Default value:Default.
- loadbalancerIds 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.
 
- maxInstance NumberLifetime 
- The maximum life span of an instance in the scaling group. Unit: seconds.
- maxSize Number
- Maximum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, max_sizecan be set to2000.
- minSize Number
- Minimum number of ECS instances in the scaling group. Value range: [0, 2000].
NOTE: From version 1.204.1, min_sizecan be set to2000.
- multiAz StringPolicy 
- Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, COMPOSABLE, BALANCE or COST_OPTIMIZED(Available since v1.54.0).
- onDemand 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.
- onDemand NumberPercentage Above Base Capacity 
- Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
- protectedInstances List<String>
- Set or unset instances within group into protected status.
- removalPolicies 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.
 
- resourceGroup StringId 
- The ID of the resource group to which you want to add the scaling group.
- scalingGroup 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.
- scalingPolicy String
- The reclaim mode of the scaling group. Optional values: recycle, release, forceRecycle, forceRelease.
- spotAllocation StringStrategy 
- The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy for preemptible instances. This parameter takes effect only if you set MultiAZPolicy to COMPOSABLE.
- spotInstance NumberPools 
- The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
- spotInstance BooleanRemedy 
- Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
- stopInstance NumberTimeout 
- The period of time required by the ECS instance to enter the Stopped state. Unit: seconds. Valid values: 30 to 240.
- Map<String>
- 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.
 
- vswitchId String
- It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
- vswitchIds List<String>
- List of virtual switch IDs in which the ecs instances to be launched.
Supporting Types
ScalingGroupAlbServerGroup, ScalingGroupAlbServerGroupArgs          
- AlbServer stringGroup Id 
- The ID of ALB server group.
- Port int
- The port number used by an ECS instance after Auto Scaling adds the ECS instance to ALB server group.
- Weight int
- The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to ALB server group.
- AlbServer stringGroup Id 
- The ID of ALB server group.
- Port int
- The port number used by an ECS instance after Auto Scaling adds the ECS instance to ALB server group.
- Weight int
- The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to ALB server group.
- albServer StringGroup Id 
- The ID of ALB server group.
- port Integer
- The port number used by an ECS instance after Auto Scaling adds the ECS instance to ALB server group.
- weight Integer
- The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to ALB server group.
- albServer stringGroup Id 
- The ID of ALB server group.
- port number
- The port number used by an ECS instance after Auto Scaling adds the ECS instance to ALB server group.
- weight number
- The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to ALB server group.
- alb_server_ strgroup_ id 
- The ID of ALB server group.
- port int
- The port number used by an ECS instance after Auto Scaling adds the ECS instance to ALB server group.
- weight int
- The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to ALB server group.
- albServer StringGroup Id 
- The ID of ALB server group.
- port Number
- The port number used by an ECS instance after Auto Scaling adds the ECS instance to ALB server group.
- weight Number
- The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to ALB server group.
ScalingGroupLaunchTemplateOverride, ScalingGroupLaunchTemplateOverrideArgs          
- InstanceType string
- The instance type in launchTemplateOverride.
- SpotPrice doubleLimit 
- The maximum bid price of instance type in launchTemplateOverride. - NOTE: When detach loadbalancers, instances in group will be remove from loadbalancer's - Default Server Group; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's- Default Server Group.- NOTE: When detach dbInstances, private ip of instances in group will be remove from dbInstance's - WhiteList; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's- WhiteList.- NOTE: - on_demand_base_capacity,- on_demand_percentage_above_base_capacity,- spot_instance_pools,- spot_instance_remedyare valid only if- multi_az_policyis 'COST_OPTIMIZED'.
- WeightedCapacity int
- The weight of the instance type in launchTemplateOverride.
- InstanceType string
- The instance type in launchTemplateOverride.
- SpotPrice float64Limit 
- The maximum bid price of instance type in launchTemplateOverride. - NOTE: When detach loadbalancers, instances in group will be remove from loadbalancer's - Default Server Group; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's- Default Server Group.- NOTE: When detach dbInstances, private ip of instances in group will be remove from dbInstance's - WhiteList; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's- WhiteList.- NOTE: - on_demand_base_capacity,- on_demand_percentage_above_base_capacity,- spot_instance_pools,- spot_instance_remedyare valid only if- multi_az_policyis 'COST_OPTIMIZED'.
- WeightedCapacity int
- The weight of the instance type in launchTemplateOverride.
- instanceType String
- The instance type in launchTemplateOverride.
- spotPrice DoubleLimit 
- The maximum bid price of instance type in launchTemplateOverride. - NOTE: When detach loadbalancers, instances in group will be remove from loadbalancer's - Default Server Group; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's- Default Server Group.- NOTE: When detach dbInstances, private ip of instances in group will be remove from dbInstance's - WhiteList; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's- WhiteList.- NOTE: - on_demand_base_capacity,- on_demand_percentage_above_base_capacity,- spot_instance_pools,- spot_instance_remedyare valid only if- multi_az_policyis 'COST_OPTIMIZED'.
- weightedCapacity Integer
- The weight of the instance type in launchTemplateOverride.
- instanceType string
- The instance type in launchTemplateOverride.
- spotPrice numberLimit 
- The maximum bid price of instance type in launchTemplateOverride. - NOTE: When detach loadbalancers, instances in group will be remove from loadbalancer's - Default Server Group; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's- Default Server Group.- NOTE: When detach dbInstances, private ip of instances in group will be remove from dbInstance's - WhiteList; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's- WhiteList.- NOTE: - on_demand_base_capacity,- on_demand_percentage_above_base_capacity,- spot_instance_pools,- spot_instance_remedyare valid only if- multi_az_policyis 'COST_OPTIMIZED'.
- weightedCapacity number
- The weight of the instance type in launchTemplateOverride.
- instance_type str
- The instance type in launchTemplateOverride.
- spot_price_ floatlimit 
- The maximum bid price of instance type in launchTemplateOverride. - NOTE: When detach loadbalancers, instances in group will be remove from loadbalancer's - Default Server Group; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's- Default Server Group.- NOTE: When detach dbInstances, private ip of instances in group will be remove from dbInstance's - WhiteList; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's- WhiteList.- NOTE: - on_demand_base_capacity,- on_demand_percentage_above_base_capacity,- spot_instance_pools,- spot_instance_remedyare valid only if- multi_az_policyis 'COST_OPTIMIZED'.
- weighted_capacity int
- The weight of the instance type in launchTemplateOverride.
- instanceType String
- The instance type in launchTemplateOverride.
- spotPrice NumberLimit 
- The maximum bid price of instance type in launchTemplateOverride. - NOTE: When detach loadbalancers, instances in group will be remove from loadbalancer's - Default Server Group; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's- Default Server Group.- NOTE: When detach dbInstances, private ip of instances in group will be remove from dbInstance's - WhiteList; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's- WhiteList.- NOTE: - on_demand_base_capacity,- on_demand_percentage_above_base_capacity,- spot_instance_pools,- spot_instance_remedyare valid only if- multi_az_policyis 'COST_OPTIMIZED'.
- weightedCapacity Number
- The weight of the instance type in launchTemplateOverride.
Import
ESS scaling group can be imported using the id, e.g.
$ pulumi import alicloud:ess/scalingGroup:ScalingGroup example asg-abc123456
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.