1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ess
  5. getScalingRules
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ess.getScalingRules

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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(getScalingRulesResult -> getScalingRulesResult).applyValue(scalingrulesDs -> scalingrulesDs.applyValue(getScalingRulesResult -> getScalingRulesResult.rules()[0].id())));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetScalingRules(ctx *Context, args *GetScalingRulesArgs, opts ...InvokeOption) (*GetScalingRulesResult, error)
func GetScalingRulesOutput(ctx *Context, args *GetScalingRulesOutputArgs, opts ...InvokeOption) GetScalingRulesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetScalingRulesResult> getScalingRules(GetScalingRulesArgs args, InvokeOptions options)
public static Output<GetScalingRulesResult> getScalingRules(GetScalingRulesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ess/getScalingRules:getScalingRules
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of scaling rule IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter resulting scaling rules by name.
OutputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
ScalingGroupId Changes to this property will trigger replacement. string
Scaling group id the scaling rules belong to.
Type Changes to this property will trigger replacement. string
Type of scaling rule.
Ids Changes to this property will trigger replacement. []string
A list of scaling rule IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter resulting scaling rules by name.
OutputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
ScalingGroupId Changes to this property will trigger replacement. string
Scaling group id the scaling rules belong to.
Type Changes to this property will trigger replacement. string
Type of scaling rule.
ids Changes to this property will trigger replacement. List<String>
A list of scaling rule IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter resulting scaling rules by name.
outputFile Changes to this property will trigger replacement. String
File name where to save data source results (after running pulumi preview).
scalingGroupId Changes to this property will trigger replacement. String
Scaling group id the scaling rules belong to.
type Changes to this property will trigger replacement. String
Type of scaling rule.
ids Changes to this property will trigger replacement. string[]
A list of scaling rule IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter resulting scaling rules by name.
outputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
scalingGroupId Changes to this property will trigger replacement. string
Scaling group id the scaling rules belong to.
type Changes to this property will trigger replacement. string
Type of scaling rule.
ids Changes to this property will trigger replacement. Sequence[str]
A list of scaling rule IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter resulting scaling rules by name.
output_file Changes to this property will trigger replacement. str
File name where to save data source results (after running pulumi preview).
scaling_group_id Changes to this property will trigger replacement. str
Scaling group id the scaling rules belong to.
type Changes to this property will trigger replacement. str
Type of scaling rule.
ids Changes to this property will trigger replacement. List<String>
A list of scaling rule IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter resulting scaling rules by name.
outputFile Changes to this property will trigger replacement. String
File name where to save data source results (after running pulumi preview).
scalingGroupId Changes to this property will trigger replacement. String
Scaling group id the scaling rules belong to.
type Changes to this property will trigger replacement. 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 This property is required. string
Adjustment type of the scaling rule.
AdjustmentValue This property is required. int
Adjustment value of the scaling rule.
Cooldown This property is required. int
Cooldown time of the scaling rule.
Id This property is required. string
ID of the scaling rule.
InitialMaxSize This property is required. int
(Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
MetricName This property is required. string
(Available since v1.242.0) The predefined metric of the scaling rule.
MinAdjustmentMagnitude This property is required. int
Min adjustment magnitude of scaling rule.
Name This property is required. string
Name of the scaling rule.
PredictiveScalingMode This property is required. string
(Available since v1.242.0) The mode of the predictive scaling rule.
PredictiveTaskBufferTime This property is required. 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 This property is required. string
(Available since v1.242.0) The action on the predicted maximum value.
PredictiveValueBuffer This property is required. 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.
ScalingGroupId This property is required. string
Scaling group id the scaling rules belong to.
ScalingRuleAri This property is required. string
Ari of scaling rule.
TargetValue This property is required. double
(Available since v1.242.0) The target value of the metric.
Type This property is required. string
Type of scaling rule.
AdjustmentType This property is required. string
Adjustment type of the scaling rule.
AdjustmentValue This property is required. int
Adjustment value of the scaling rule.
Cooldown This property is required. int
Cooldown time of the scaling rule.
Id This property is required. string
ID of the scaling rule.
InitialMaxSize This property is required. int
(Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
MetricName This property is required. string
(Available since v1.242.0) The predefined metric of the scaling rule.
MinAdjustmentMagnitude This property is required. int
Min adjustment magnitude of scaling rule.
Name This property is required. string
Name of the scaling rule.
PredictiveScalingMode This property is required. string
(Available since v1.242.0) The mode of the predictive scaling rule.
PredictiveTaskBufferTime This property is required. 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 This property is required. string
(Available since v1.242.0) The action on the predicted maximum value.
PredictiveValueBuffer This property is required. 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.
ScalingGroupId This property is required. string
Scaling group id the scaling rules belong to.
ScalingRuleAri This property is required. string
Ari of scaling rule.
TargetValue This property is required. float64
(Available since v1.242.0) The target value of the metric.
Type This property is required. string
Type of scaling rule.
adjustmentType This property is required. String
Adjustment type of the scaling rule.
adjustmentValue This property is required. Integer
Adjustment value of the scaling rule.
cooldown This property is required. Integer
Cooldown time of the scaling rule.
id This property is required. String
ID of the scaling rule.
initialMaxSize This property is required. Integer
(Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
metricName This property is required. String
(Available since v1.242.0) The predefined metric of the scaling rule.
minAdjustmentMagnitude This property is required. Integer
Min adjustment magnitude of scaling rule.
name This property is required. String
Name of the scaling rule.
predictiveScalingMode This property is required. String
(Available since v1.242.0) The mode of the predictive scaling rule.
predictiveTaskBufferTime This property is required. 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 This property is required. String
(Available since v1.242.0) The action on the predicted maximum value.
predictiveValueBuffer This property is required. 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.
scalingGroupId This property is required. String
Scaling group id the scaling rules belong to.
scalingRuleAri This property is required. String
Ari of scaling rule.
targetValue This property is required. Double
(Available since v1.242.0) The target value of the metric.
type This property is required. String
Type of scaling rule.
adjustmentType This property is required. string
Adjustment type of the scaling rule.
adjustmentValue This property is required. number
Adjustment value of the scaling rule.
cooldown This property is required. number
Cooldown time of the scaling rule.
id This property is required. string
ID of the scaling rule.
initialMaxSize This property is required. number
(Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
metricName This property is required. string
(Available since v1.242.0) The predefined metric of the scaling rule.
minAdjustmentMagnitude This property is required. number
Min adjustment magnitude of scaling rule.
name This property is required. string
Name of the scaling rule.
predictiveScalingMode This property is required. string
(Available since v1.242.0) The mode of the predictive scaling rule.
predictiveTaskBufferTime This property is required. 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 This property is required. string
(Available since v1.242.0) The action on the predicted maximum value.
predictiveValueBuffer This property is required. 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.
scalingGroupId This property is required. string
Scaling group id the scaling rules belong to.
scalingRuleAri This property is required. string
Ari of scaling rule.
targetValue This property is required. number
(Available since v1.242.0) The target value of the metric.
type This property is required. string
Type of scaling rule.
adjustment_type This property is required. str
Adjustment type of the scaling rule.
adjustment_value This property is required. int
Adjustment value of the scaling rule.
cooldown This property is required. int
Cooldown time of the scaling rule.
id This property is required. str
ID of the scaling rule.
initial_max_size This property is required. int
(Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
metric_name This property is required. str
(Available since v1.242.0) The predefined metric of the scaling rule.
min_adjustment_magnitude This property is required. int
Min adjustment magnitude of scaling rule.
name This property is required. str
Name of the scaling rule.
predictive_scaling_mode This property is required. str
(Available since v1.242.0) The mode of the predictive scaling rule.
predictive_task_buffer_time This property is required. 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 This property is required. str
(Available since v1.242.0) The action on the predicted maximum value.
predictive_value_buffer This property is required. 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.
scaling_group_id This property is required. str
Scaling group id the scaling rules belong to.
scaling_rule_ari This property is required. str
Ari of scaling rule.
target_value This property is required. float
(Available since v1.242.0) The target value of the metric.
type This property is required. str
Type of scaling rule.
adjustmentType This property is required. String
Adjustment type of the scaling rule.
adjustmentValue This property is required. Number
Adjustment value of the scaling rule.
cooldown This property is required. Number
Cooldown time of the scaling rule.
id This property is required. String
ID of the scaling rule.
initialMaxSize This property is required. Number
(Available since v1.242.0) The maximum number of ECS instances that can be added to the scaling group.
metricName This property is required. String
(Available since v1.242.0) The predefined metric of the scaling rule.
minAdjustmentMagnitude This property is required. Number
Min adjustment magnitude of scaling rule.
name This property is required. String
Name of the scaling rule.
predictiveScalingMode This property is required. String
(Available since v1.242.0) The mode of the predictive scaling rule.
predictiveTaskBufferTime This property is required. 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 This property is required. String
(Available since v1.242.0) The action on the predicted maximum value.
predictiveValueBuffer This property is required. 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.
scalingGroupId This property is required. String
Scaling group id the scaling rules belong to.
scalingRuleAri This property is required. String
Ari of scaling rule.
targetValue This property is required. Number
(Available since v1.242.0) The target value of the metric.
type This property is required. String
Type of scaling rule.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi