1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ess
  5. getScalingRules
Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi

alicloud.ess.getScalingRules

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi

    This data source provides available scaling rule resources.

    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-ex";
    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 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 defaultScalingGroup = new alicloud.ess.ScalingGroup("default", {
        minSize: 1,
        maxSize: 1,
        scalingGroupName: myName,
        removalPolicies: [
            "OldestInstance",
            "NewestInstance",
        ],
        vswitchIds: [defaultSwitch.id],
    });
    const defaultScalingRule = new alicloud.ess.ScalingRule("default", {
        scalingGroupId: defaultScalingGroup.id,
        scalingRuleName: myName,
        adjustmentType: "PercentChangeInCapacity",
        adjustmentValue: 1,
    });
    const scalingrulesDs = alicloud.ess.getScalingRulesOutput({
        scalingGroupId: defaultScalingGroup.id,
        ids: [defaultScalingRule.id],
        nameRegex: myName,
    });
    export const firstScalingRule = scalingrulesDs.apply(scalingrulesDs => scalingrulesDs.rules?.[0]?.id);
    
    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-ex"
    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_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_scaling_group = alicloud.ess.ScalingGroup("default",
        min_size=1,
        max_size=1,
        scaling_group_name=my_name,
        removal_policies=[
            "OldestInstance",
            "NewestInstance",
        ],
        vswitch_ids=[default_switch.id])
    default_scaling_rule = alicloud.ess.ScalingRule("default",
        scaling_group_id=default_scaling_group.id,
        scaling_rule_name=my_name,
        adjustment_type="PercentChangeInCapacity",
        adjustment_value=1)
    scalingrules_ds = alicloud.ess.get_scaling_rules_output(scaling_group_id=default_scaling_group.id,
        ids=[default_scaling_rule.id],
        name_regex=my_name)
    pulumi.export("firstScalingRule", scalingrules_ds.rules[0].id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"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-ex"
    		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
    		}
    		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
    		}
    		defaultScalingGroup, err := ess.NewScalingGroup(ctx, "default", &ess.ScalingGroupArgs{
    			MinSize:          pulumi.Int(1),
    			MaxSize:          pulumi.Int(1),
    			ScalingGroupName: pulumi.String(myName),
    			RemovalPolicies: pulumi.StringArray{
    				pulumi.String("OldestInstance"),
    				pulumi.String("NewestInstance"),
    			},
    			VswitchIds: pulumi.StringArray{
    				defaultSwitch.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultScalingRule, err := ess.NewScalingRule(ctx, "default", &ess.ScalingRuleArgs{
    			ScalingGroupId:  defaultScalingGroup.ID(),
    			ScalingRuleName: pulumi.String(myName),
    			AdjustmentType:  pulumi.String("PercentChangeInCapacity"),
    			AdjustmentValue: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		scalingrulesDs := ess.GetScalingRulesOutput(ctx, ess.GetScalingRulesOutputArgs{
    			ScalingGroupId: defaultScalingGroup.ID(),
    			Ids: pulumi.StringArray{
    				defaultScalingRule.ID(),
    			},
    			NameRegex: pulumi.String(myName),
    		}, nil)
    		ctx.Export("firstScalingRule", scalingrulesDs.ApplyT(func(scalingrulesDs ess.GetScalingRulesResult) (*string, error) {
    			return &scalingrulesDs.Rules[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		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-ex";
        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 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 defaultScalingGroup = new AliCloud.Ess.ScalingGroup("default", new()
        {
            MinSize = 1,
            MaxSize = 1,
            ScalingGroupName = myName,
            RemovalPolicies = new[]
            {
                "OldestInstance",
                "NewestInstance",
            },
            VswitchIds = new[]
            {
                defaultSwitch.Id,
            },
        });
    
        var defaultScalingRule = new AliCloud.Ess.ScalingRule("default", new()
        {
            ScalingGroupId = defaultScalingGroup.Id,
            ScalingRuleName = myName,
            AdjustmentType = "PercentChangeInCapacity",
            AdjustmentValue = 1,
        });
    
        var scalingrulesDs = AliCloud.Ess.GetScalingRules.Invoke(new()
        {
            ScalingGroupId = defaultScalingGroup.Id,
            Ids = new[]
            {
                defaultScalingRule.Id,
            },
            NameRegex = myName,
        });
    
        return new Dictionary<string, object?>
        {
            ["firstScalingRule"] = scalingrulesDs.Apply(getScalingRulesResult => getScalingRulesResult.Rules[0]?.Id),
        };
    });
    
    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.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ess.ScalingGroup;
    import com.pulumi.alicloud.ess.ScalingGroupArgs;
    import com.pulumi.alicloud.ess.ScalingRule;
    import com.pulumi.alicloud.ess.ScalingRuleArgs;
    import com.pulumi.alicloud.ess.EssFunctions;
    import com.pulumi.alicloud.ess.inputs.GetScalingRulesArgs;
    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-ex");
            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());
    
            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 defaultScalingGroup = new ScalingGroup("defaultScalingGroup", ScalingGroupArgs.builder()
                .minSize(1)
                .maxSize(1)
                .scalingGroupName(myName)
                .removalPolicies(            
                    "OldestInstance",
                    "NewestInstance")
                .vswitchIds(defaultSwitch.id())
                .build());
    
            var defaultScalingRule = new ScalingRule("defaultScalingRule", ScalingRuleArgs.builder()
                .scalingGroupId(defaultScalingGroup.id())
                .scalingRuleName(myName)
                .adjustmentType("PercentChangeInCapacity")
                .adjustmentValue(1)
                .build());
    
            final var scalingrulesDs = EssFunctions.getScalingRules(GetScalingRulesArgs.builder()
                .scalingGroupId(defaultScalingGroup.id())
                .ids(defaultScalingRule.id())
                .nameRegex(myName)
                .build());
    
            ctx.export("firstScalingRule", scalingrulesDs.applyValue(_scalingrulesDs -> _scalingrulesDs.rules()[0].id()));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-ex
    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}
      defaultScalingGroup:
        type: alicloud:ess:ScalingGroup
        name: default
        properties:
          minSize: 1
          maxSize: 1
          scalingGroupName: ${myName}
          removalPolicies:
            - OldestInstance
            - NewestInstance
          vswitchIds:
            - ${defaultSwitch.id}
      defaultScalingRule:
        type: alicloud:ess:ScalingRule
        name: default
        properties:
          scalingGroupId: ${defaultScalingGroup.id}
          scalingRuleName: ${myName}
          adjustmentType: PercentChangeInCapacity
          adjustmentValue: 1
    variables:
      myName: ${name}-${defaultInteger.result}
      default:
        fn::invoke:
          function: alicloud:getZones
          arguments:
            availableDiskCategory: cloud_efficiency
            availableResourceCreation: VSwitch
      scalingrulesDs:
        fn::invoke:
          function: alicloud:ess:getScalingRules
          arguments:
            scalingGroupId: ${defaultScalingGroup.id}
            ids:
              - ${defaultScalingRule.id}
            nameRegex: ${myName}
    outputs:
      firstScalingRule: ${scalingrulesDs.rules[0].id}
    

    Using getScalingRules

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getScalingRules(args: GetScalingRulesArgs, opts?: InvokeOptions): Promise<GetScalingRulesResult>
    function getScalingRulesOutput(args: GetScalingRulesOutputArgs, opts?: InvokeOptions): Output<GetScalingRulesResult>
    def get_scaling_rules(ids: Optional[Sequence[str]] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          scaling_group_id: Optional[str] = None,
                          type: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetScalingRulesResult
    def get_scaling_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          scaling_group_id: Optional[pulumi.Input[str]] = None,
                          type: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetScalingRulesResult]
    func GetScalingRules(ctx *Context, args *GetScalingRulesArgs, opts ...InvokeOption) (*GetScalingRulesResult, error)
    func GetScalingRulesOutput(ctx *Context, args *GetScalingRulesOutputArgs, opts ...InvokeOption) GetScalingRulesResultOutput

    > Note: This function is named GetScalingRules in the Go SDK.

    public static class GetScalingRules 
    {
        public static Task<GetScalingRulesResult> InvokeAsync(GetScalingRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetScalingRulesResult> Invoke(GetScalingRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetScalingRulesResult> getScalingRules(GetScalingRulesArgs args, InvokeOptions options)
    public static Output<GetScalingRulesResult> getScalingRules(GetScalingRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:ess/getScalingRules:getScalingRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of scaling rule IDs.
    NameRegex string
    A regex string to filter resulting scaling rules by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ScalingGroupId string
    Scaling group id the scaling rules belong to.
    Type string
    Type of scaling rule.
    Ids []string
    A list of scaling rule IDs.
    NameRegex string
    A regex string to filter resulting scaling rules by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ScalingGroupId string
    Scaling group id the scaling rules belong to.
    Type string
    Type of scaling rule.
    ids List<String>
    A list of scaling rule IDs.
    nameRegex String
    A regex string to filter resulting scaling rules by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    scalingGroupId String
    Scaling group id the scaling rules belong to.
    type String
    Type of scaling rule.
    ids string[]
    A list of scaling rule IDs.
    nameRegex string
    A regex string to filter resulting scaling rules by name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    scalingGroupId string
    Scaling group id the scaling rules belong to.
    type string
    Type of scaling rule.
    ids Sequence[str]
    A list of scaling rule IDs.
    name_regex str
    A regex string to filter resulting scaling rules by name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    scaling_group_id str
    Scaling group id the scaling rules belong to.
    type str
    Type of scaling rule.
    ids List<String>
    A list of scaling rule IDs.
    nameRegex String
    A regex string to filter resulting scaling rules by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    scalingGroupId String
    Scaling group id the scaling rules belong to.
    type String
    Type of scaling rule.

    getScalingRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of scaling rule ids.
    Names List<string>
    A list of scaling rule names.
    Rules List<Pulumi.AliCloud.Ess.Outputs.GetScalingRulesRule>
    A list of scaling rules. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    ScalingGroupId string
    ID of the scaling group.
    Type string
    Type of the scaling rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of scaling rule ids.
    Names []string
    A list of scaling rule names.
    Rules []GetScalingRulesRule
    A list of scaling rules. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    ScalingGroupId string
    ID of the scaling group.
    Type string
    Type of the scaling rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of scaling rule ids.
    names List<String>
    A list of scaling rule names.
    rules List<GetScalingRulesRule>
    A list of scaling rules. Each element contains the following attributes:
    nameRegex String
    outputFile String
    scalingGroupId String
    ID of the scaling group.
    type String
    Type of the scaling rule.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of scaling rule ids.
    names string[]
    A list of scaling rule names.
    rules GetScalingRulesRule[]
    A list of scaling rules. Each element contains the following attributes:
    nameRegex string
    outputFile string
    scalingGroupId string
    ID of the scaling group.
    type string
    Type of the scaling rule.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of scaling rule ids.
    names Sequence[str]
    A list of scaling rule names.
    rules Sequence[GetScalingRulesRule]
    A list of scaling rules. Each element contains the following attributes:
    name_regex str
    output_file str
    scaling_group_id str
    ID of the scaling group.
    type str
    Type of the scaling rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of scaling rule ids.
    names List<String>
    A list of scaling rule names.
    rules List<Property Map>
    A list of scaling rules. Each element contains the following attributes:
    nameRegex String
    outputFile String
    scalingGroupId String
    ID of the scaling group.
    type String
    Type of the scaling rule.

    Supporting Types

    GetScalingRulesRule

    AdjustmentType string
    Adjustment type of the scaling rule.
    AdjustmentValue int
    Adjustment value of the scaling rule.
    Cooldown int
    Cooldown time of the scaling rule.
    DisableScaleIn bool
    (Available since v1.250.0) Indicates whether scale-in is disabled. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values: true, false.
    EstimatedInstanceWarmup int
    (Available since v1.250.0) The warm-up period during which a series of preparation measures are taken on new instances. Auto Scaling does not monitor the metric data of instances that are being warmed up.
    HybridMetrics List<Pulumi.AliCloud.Ess.Inputs.GetScalingRulesRuleHybridMetric>
    (Available since v1.250.0) The Hybrid Cloud Monitoring metrics.
    HybridMonitorNamespace string
    (Available since v1.250.0) The ID of the Hybrid Cloud Monitoring namespace.
    Id string
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    InitialMaxSize int
    (Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
    MetricName string
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    MetricType string
    (Available since v1.250.0) The type of the event-triggered task that is associated with the scaling rule.
    MinAdjustmentMagnitude int
    Min adjustment magnitude of scaling rule.
    Name string
    Name of the scaling rule.
    PredictiveScalingMode string
    (Available since v1.242.0) The mode of the predictive scaling rule.
    PredictiveTaskBufferTime int
    (Available since v1.242.0) The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created by a predictive scaling rule are executed on the hour. You can set a buffer time to execute prediction tasks and prepare resources in advance.
    PredictiveValueBehavior string
    (Available since v1.242.0) The action on the predicted maximum value.
    PredictiveValueBuffer int
    (Available since v1.242.0) The ratio based on which the predicted value is increased if you set predictive_value_behavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
    ScaleInEvaluationCount int
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-in operation.
    ScaleOutEvaluationCount int
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-out operation.
    ScalingGroupId string
    Scaling group id the scaling rules belong to.
    ScalingRuleAri string
    Ari of scaling rule.
    StepAdjustments List<Pulumi.AliCloud.Ess.Inputs.GetScalingRulesRuleStepAdjustment>
    (Available since v1.250.0) The step adjustments of the step scaling rule.
    TargetValue double
    (Available since v1.242.0) The target value of the metric.
    Type string
    Type of scaling rule.
    AdjustmentType string
    Adjustment type of the scaling rule.
    AdjustmentValue int
    Adjustment value of the scaling rule.
    Cooldown int
    Cooldown time of the scaling rule.
    DisableScaleIn bool
    (Available since v1.250.0) Indicates whether scale-in is disabled. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values: true, false.
    EstimatedInstanceWarmup int
    (Available since v1.250.0) The warm-up period during which a series of preparation measures are taken on new instances. Auto Scaling does not monitor the metric data of instances that are being warmed up.
    HybridMetrics []GetScalingRulesRuleHybridMetric
    (Available since v1.250.0) The Hybrid Cloud Monitoring metrics.
    HybridMonitorNamespace string
    (Available since v1.250.0) The ID of the Hybrid Cloud Monitoring namespace.
    Id string
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    InitialMaxSize int
    (Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
    MetricName string
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    MetricType string
    (Available since v1.250.0) The type of the event-triggered task that is associated with the scaling rule.
    MinAdjustmentMagnitude int
    Min adjustment magnitude of scaling rule.
    Name string
    Name of the scaling rule.
    PredictiveScalingMode string
    (Available since v1.242.0) The mode of the predictive scaling rule.
    PredictiveTaskBufferTime int
    (Available since v1.242.0) The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created by a predictive scaling rule are executed on the hour. You can set a buffer time to execute prediction tasks and prepare resources in advance.
    PredictiveValueBehavior string
    (Available since v1.242.0) The action on the predicted maximum value.
    PredictiveValueBuffer int
    (Available since v1.242.0) The ratio based on which the predicted value is increased if you set predictive_value_behavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
    ScaleInEvaluationCount int
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-in operation.
    ScaleOutEvaluationCount int
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-out operation.
    ScalingGroupId string
    Scaling group id the scaling rules belong to.
    ScalingRuleAri string
    Ari of scaling rule.
    StepAdjustments []GetScalingRulesRuleStepAdjustment
    (Available since v1.250.0) The step adjustments of the step scaling rule.
    TargetValue float64
    (Available since v1.242.0) The target value of the metric.
    Type string
    Type of scaling rule.
    adjustmentType String
    Adjustment type of the scaling rule.
    adjustmentValue Integer
    Adjustment value of the scaling rule.
    cooldown Integer
    Cooldown time of the scaling rule.
    disableScaleIn Boolean
    (Available since v1.250.0) Indicates whether scale-in is disabled. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values: true, false.
    estimatedInstanceWarmup Integer
    (Available since v1.250.0) The warm-up period during which a series of preparation measures are taken on new instances. Auto Scaling does not monitor the metric data of instances that are being warmed up.
    hybridMetrics List<GetScalingRulesRuleHybridMetric>
    (Available since v1.250.0) The Hybrid Cloud Monitoring metrics.
    hybridMonitorNamespace String
    (Available since v1.250.0) The ID of the Hybrid Cloud Monitoring namespace.
    id String
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    initialMaxSize Integer
    (Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
    metricName String
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    metricType String
    (Available since v1.250.0) The type of the event-triggered task that is associated with the scaling rule.
    minAdjustmentMagnitude Integer
    Min adjustment magnitude of scaling rule.
    name String
    Name of the scaling rule.
    predictiveScalingMode String
    (Available since v1.242.0) The mode of the predictive scaling rule.
    predictiveTaskBufferTime Integer
    (Available since v1.242.0) The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created by a predictive scaling rule are executed on the hour. You can set a buffer time to execute prediction tasks and prepare resources in advance.
    predictiveValueBehavior String
    (Available since v1.242.0) The action on the predicted maximum value.
    predictiveValueBuffer Integer
    (Available since v1.242.0) The ratio based on which the predicted value is increased if you set predictive_value_behavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
    scaleInEvaluationCount Integer
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-in operation.
    scaleOutEvaluationCount Integer
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-out operation.
    scalingGroupId String
    Scaling group id the scaling rules belong to.
    scalingRuleAri String
    Ari of scaling rule.
    stepAdjustments List<GetScalingRulesRuleStepAdjustment>
    (Available since v1.250.0) The step adjustments of the step scaling rule.
    targetValue Double
    (Available since v1.242.0) The target value of the metric.
    type String
    Type of scaling rule.
    adjustmentType string
    Adjustment type of the scaling rule.
    adjustmentValue number
    Adjustment value of the scaling rule.
    cooldown number
    Cooldown time of the scaling rule.
    disableScaleIn boolean
    (Available since v1.250.0) Indicates whether scale-in is disabled. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values: true, false.
    estimatedInstanceWarmup number
    (Available since v1.250.0) The warm-up period during which a series of preparation measures are taken on new instances. Auto Scaling does not monitor the metric data of instances that are being warmed up.
    hybridMetrics GetScalingRulesRuleHybridMetric[]
    (Available since v1.250.0) The Hybrid Cloud Monitoring metrics.
    hybridMonitorNamespace string
    (Available since v1.250.0) The ID of the Hybrid Cloud Monitoring namespace.
    id string
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    initialMaxSize number
    (Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
    metricName string
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    metricType string
    (Available since v1.250.0) The type of the event-triggered task that is associated with the scaling rule.
    minAdjustmentMagnitude number
    Min adjustment magnitude of scaling rule.
    name string
    Name of the scaling rule.
    predictiveScalingMode string
    (Available since v1.242.0) The mode of the predictive scaling rule.
    predictiveTaskBufferTime number
    (Available since v1.242.0) The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created by a predictive scaling rule are executed on the hour. You can set a buffer time to execute prediction tasks and prepare resources in advance.
    predictiveValueBehavior string
    (Available since v1.242.0) The action on the predicted maximum value.
    predictiveValueBuffer number
    (Available since v1.242.0) The ratio based on which the predicted value is increased if you set predictive_value_behavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
    scaleInEvaluationCount number
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-in operation.
    scaleOutEvaluationCount number
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-out operation.
    scalingGroupId string
    Scaling group id the scaling rules belong to.
    scalingRuleAri string
    Ari of scaling rule.
    stepAdjustments GetScalingRulesRuleStepAdjustment[]
    (Available since v1.250.0) The step adjustments of the step scaling rule.
    targetValue number
    (Available since v1.242.0) The target value of the metric.
    type string
    Type of scaling rule.
    adjustment_type str
    Adjustment type of the scaling rule.
    adjustment_value int
    Adjustment value of the scaling rule.
    cooldown int
    Cooldown time of the scaling rule.
    disable_scale_in bool
    (Available since v1.250.0) Indicates whether scale-in is disabled. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values: true, false.
    estimated_instance_warmup int
    (Available since v1.250.0) The warm-up period during which a series of preparation measures are taken on new instances. Auto Scaling does not monitor the metric data of instances that are being warmed up.
    hybrid_metrics Sequence[GetScalingRulesRuleHybridMetric]
    (Available since v1.250.0) The Hybrid Cloud Monitoring metrics.
    hybrid_monitor_namespace str
    (Available since v1.250.0) The ID of the Hybrid Cloud Monitoring namespace.
    id str
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    initial_max_size int
    (Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
    metric_name str
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    metric_type str
    (Available since v1.250.0) The type of the event-triggered task that is associated with the scaling rule.
    min_adjustment_magnitude int
    Min adjustment magnitude of scaling rule.
    name str
    Name of the scaling rule.
    predictive_scaling_mode str
    (Available since v1.242.0) The mode of the predictive scaling rule.
    predictive_task_buffer_time int
    (Available since v1.242.0) The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created by a predictive scaling rule are executed on the hour. You can set a buffer time to execute prediction tasks and prepare resources in advance.
    predictive_value_behavior str
    (Available since v1.242.0) The action on the predicted maximum value.
    predictive_value_buffer int
    (Available since v1.242.0) The ratio based on which the predicted value is increased if you set predictive_value_behavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
    scale_in_evaluation_count int
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-in operation.
    scale_out_evaluation_count int
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-out operation.
    scaling_group_id str
    Scaling group id the scaling rules belong to.
    scaling_rule_ari str
    Ari of scaling rule.
    step_adjustments Sequence[GetScalingRulesRuleStepAdjustment]
    (Available since v1.250.0) The step adjustments of the step scaling rule.
    target_value float
    (Available since v1.242.0) The target value of the metric.
    type str
    Type of scaling rule.
    adjustmentType String
    Adjustment type of the scaling rule.
    adjustmentValue Number
    Adjustment value of the scaling rule.
    cooldown Number
    Cooldown time of the scaling rule.
    disableScaleIn Boolean
    (Available since v1.250.0) Indicates whether scale-in is disabled. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule. Valid values: true, false.
    estimatedInstanceWarmup Number
    (Available since v1.250.0) The warm-up period during which a series of preparation measures are taken on new instances. Auto Scaling does not monitor the metric data of instances that are being warmed up.
    hybridMetrics List<Property Map>
    (Available since v1.250.0) The Hybrid Cloud Monitoring metrics.
    hybridMonitorNamespace String
    (Available since v1.250.0) The ID of the Hybrid Cloud Monitoring namespace.
    id String
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    initialMaxSize Number
    (Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
    metricName String
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    metricType String
    (Available since v1.250.0) The type of the event-triggered task that is associated with the scaling rule.
    minAdjustmentMagnitude Number
    Min adjustment magnitude of scaling rule.
    name String
    Name of the scaling rule.
    predictiveScalingMode String
    (Available since v1.242.0) The mode of the predictive scaling rule.
    predictiveTaskBufferTime Number
    (Available since v1.242.0) The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created by a predictive scaling rule are executed on the hour. You can set a buffer time to execute prediction tasks and prepare resources in advance.
    predictiveValueBehavior String
    (Available since v1.242.0) The action on the predicted maximum value.
    predictiveValueBuffer Number
    (Available since v1.242.0) The ratio based on which the predicted value is increased if you set predictive_value_behavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value that is increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
    scaleInEvaluationCount Number
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-in operation.
    scaleOutEvaluationCount Number
    (Available since v1.250.0) After you create a target tracking scaling rule, an event-triggered task is automatically created and associated with the scaling rule. This parameter defines the number of consecutive times the alert condition must be satisfied before the event-triggered task initiates a scale-out operation.
    scalingGroupId String
    Scaling group id the scaling rules belong to.
    scalingRuleAri String
    Ari of scaling rule.
    stepAdjustments List<Property Map>
    (Available since v1.250.0) The step adjustments of the step scaling rule.
    targetValue Number
    (Available since v1.242.0) The target value of the metric.
    type String
    Type of scaling rule.

    GetScalingRulesRuleHybridMetric

    Dimensions List<Pulumi.AliCloud.Ess.Inputs.GetScalingRulesRuleHybridMetricDimension>
    (Available since v1.250.0) The metric dimensions. You can use this parameter to specify the monitored resources.
    Expression string
    (Available since v1.250.0) The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and includes only the following operators: +, -, *, /.
    Id string
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    MetricName string
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    Statistic string
    (Available since v1.250.0) The statistical method of the metric data.
    Dimensions []GetScalingRulesRuleHybridMetricDimension
    (Available since v1.250.0) The metric dimensions. You can use this parameter to specify the monitored resources.
    Expression string
    (Available since v1.250.0) The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and includes only the following operators: +, -, *, /.
    Id string
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    MetricName string
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    Statistic string
    (Available since v1.250.0) The statistical method of the metric data.
    dimensions List<GetScalingRulesRuleHybridMetricDimension>
    (Available since v1.250.0) The metric dimensions. You can use this parameter to specify the monitored resources.
    expression String
    (Available since v1.250.0) The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and includes only the following operators: +, -, *, /.
    id String
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    metricName String
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    statistic String
    (Available since v1.250.0) The statistical method of the metric data.
    dimensions GetScalingRulesRuleHybridMetricDimension[]
    (Available since v1.250.0) The metric dimensions. You can use this parameter to specify the monitored resources.
    expression string
    (Available since v1.250.0) The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and includes only the following operators: +, -, *, /.
    id string
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    metricName string
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    statistic string
    (Available since v1.250.0) The statistical method of the metric data.
    dimensions Sequence[GetScalingRulesRuleHybridMetricDimension]
    (Available since v1.250.0) The metric dimensions. You can use this parameter to specify the monitored resources.
    expression str
    (Available since v1.250.0) The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and includes only the following operators: +, -, *, /.
    id str
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    metric_name str
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    statistic str
    (Available since v1.250.0) The statistical method of the metric data.
    dimensions List<Property Map>
    (Available since v1.250.0) The metric dimensions. You can use this parameter to specify the monitored resources.
    expression String
    (Available since v1.250.0) The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and includes only the following operators: +, -, *, /.
    id String
    (Available since v1.250.0) The reference ID of the metric in the metric expression.
    metricName String
    (Available since v1.250.0) The name of the Hybrid Cloud Monitoring metric.
    statistic String
    (Available since v1.250.0) The statistical method of the metric data.

    GetScalingRulesRuleHybridMetricDimension

    DimensionKey string
    (Available since v1.250.0) The dimension key of the metric.
    DimensionValue string
    (Available since v1.250.0) The dimension value of the metric.
    DimensionKey string
    (Available since v1.250.0) The dimension key of the metric.
    DimensionValue string
    (Available since v1.250.0) The dimension value of the metric.
    dimensionKey String
    (Available since v1.250.0) The dimension key of the metric.
    dimensionValue String
    (Available since v1.250.0) The dimension value of the metric.
    dimensionKey string
    (Available since v1.250.0) The dimension key of the metric.
    dimensionValue string
    (Available since v1.250.0) The dimension value of the metric.
    dimension_key str
    (Available since v1.250.0) The dimension key of the metric.
    dimension_value str
    (Available since v1.250.0) The dimension value of the metric.
    dimensionKey String
    (Available since v1.250.0) The dimension key of the metric.
    dimensionValue String
    (Available since v1.250.0) The dimension value of the metric.

    GetScalingRulesRuleStepAdjustment

    MetricIntervalLowerBound string
    (Available since v1.250.0) The lower limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    MetricIntervalUpperBound string
    (Available since v1.250.0) The upper limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    ScalingAdjustment int
    (Available since v1.250.0) The number of instances that are scaled in each step adjustment.
    MetricIntervalLowerBound string
    (Available since v1.250.0) The lower limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    MetricIntervalUpperBound string
    (Available since v1.250.0) The upper limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    ScalingAdjustment int
    (Available since v1.250.0) The number of instances that are scaled in each step adjustment.
    metricIntervalLowerBound String
    (Available since v1.250.0) The lower limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    metricIntervalUpperBound String
    (Available since v1.250.0) The upper limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    scalingAdjustment Integer
    (Available since v1.250.0) The number of instances that are scaled in each step adjustment.
    metricIntervalLowerBound string
    (Available since v1.250.0) The lower limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    metricIntervalUpperBound string
    (Available since v1.250.0) The upper limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    scalingAdjustment number
    (Available since v1.250.0) The number of instances that are scaled in each step adjustment.
    metric_interval_lower_bound str
    (Available since v1.250.0) The lower limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    metric_interval_upper_bound str
    (Available since v1.250.0) The upper limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    scaling_adjustment int
    (Available since v1.250.0) The number of instances that are scaled in each step adjustment.
    metricIntervalLowerBound String
    (Available since v1.250.0) The lower limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    metricIntervalUpperBound String
    (Available since v1.250.0) The upper limit of each step adjustment. Valid values: -9.999999E18 to 9.999999E18.
    scalingAdjustment Number
    (Available since v1.250.0) The number of instances that are scaled in each step adjustment.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi