Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.ess.getScalingRules
Explore with Pulumi AI
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(getScalingRulesResult -> getScalingRulesResult).applyValue(scalingrulesDs -> scalingrulesDs.applyValue(getScalingRulesResult -> getScalingRulesResult.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
Changes to this property will trigger replacement.
- A list of scaling rule IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter resulting scaling rules by name.
- Output
File Changes to this property will trigger replacement.
- File name where to save data source results (after running
pulumi preview
). - Scaling
Group Id Changes to this property will trigger replacement.
- Scaling group id the scaling rules belong to.
- Type
Changes to this property will trigger replacement.
- Type of scaling rule.
- Ids
Changes to this property will trigger replacement.
- A list of scaling rule IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter resulting scaling rules by name.
- Output
File Changes to this property will trigger replacement.
- File name where to save data source results (after running
pulumi preview
). - Scaling
Group Id Changes to this property will trigger replacement.
- Scaling group id the scaling rules belong to.
- Type
Changes to this property will trigger replacement.
- Type of scaling rule.
- ids
Changes to this property will trigger replacement.
- A list of scaling rule IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter resulting scaling rules by name.
- output
File Changes to this property will trigger replacement.
- File name where to save data source results (after running
pulumi preview
). - scaling
Group Id Changes to this property will trigger replacement.
- Scaling group id the scaling rules belong to.
- type
Changes to this property will trigger replacement.
- Type of scaling rule.
- ids
Changes to this property will trigger replacement.
- A list of scaling rule IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter resulting scaling rules by name.
- output
File Changes to this property will trigger replacement.
- File name where to save data source results (after running
pulumi preview
). - scaling
Group Id Changes to this property will trigger replacement.
- Scaling group id the scaling rules belong to.
- type
Changes to this property will trigger replacement.
- Type of scaling rule.
- ids
Changes to this property will trigger replacement.
- A list of scaling rule IDs.
- name_
regex Changes to this property will trigger replacement.
- A regex string to filter resulting scaling rules by name.
- output_
file Changes to this property will trigger replacement.
- File name where to save data source results (after running
pulumi preview
). - scaling_
group_ id Changes to this property will trigger replacement.
- Scaling group id the scaling rules belong to.
- type
Changes to this property will trigger replacement.
- Type of scaling rule.
- ids
Changes to this property will trigger replacement.
- A list of scaling rule IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter resulting scaling rules by name.
- output
File Changes to this property will trigger replacement.
- File name where to save data source results (after running
pulumi preview
). - scaling
Group Id Changes to this property will trigger replacement.
- Scaling group id the scaling rules belong to.
- type
Changes to this property will trigger replacement.
- 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.
Ali Cloud. Ess. Outputs. Get Scaling Rules Rule> - A list of scaling rules. Each element contains the following attributes:
- Name
Regex string - Output
File string - Scaling
Group stringId - 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
[]Get
Scaling Rules Rule - A list of scaling rules. Each element contains the following attributes:
- Name
Regex string - Output
File string - Scaling
Group stringId - 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<Get
Scaling Rules Rule> - A list of scaling rules. Each element contains the following attributes:
- name
Regex String - output
File String - scaling
Group StringId - 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
Get
Scaling Rules Rule[] - A list of scaling rules. Each element contains the following attributes:
- name
Regex string - output
File string - scaling
Group stringId - 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[Get
Scaling Rules Rule] - A list of scaling rules. Each element contains the following attributes:
- name_
regex str - output_
file str - scaling_
group_ strid - 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:
- name
Regex String - output
File String - scaling
Group StringId - ID of the scaling group.
- type String
- Type of the scaling rule.
Supporting Types
GetScalingRulesRule
- Adjustment
Type This property is required. string - 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. string - 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. string - (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. string - Name of the scaling rule.
- Predictive
Scaling Mode This property is required. string - (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. string - (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. string - Scaling group id the scaling rules belong to.
- Scaling
Rule Ari This property is required. string - Ari of scaling rule.
- Target
Value 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.
- Adjustment
Type This property is required. string - 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. string - 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. string - (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. string - Name of the scaling rule.
- Predictive
Scaling Mode This property is required. string - (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. string - (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. string - Scaling group id the scaling rules belong to.
- Scaling
Rule Ari This property is required. string - Ari of scaling rule.
- Target
Value 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.
- adjustment
Type This property is required. String - Adjustment type of the scaling rule.
- adjustment
Value 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.
- initial
Max Size This property is required. Integer - (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. String - (Available since v1.242.0) The predefined metric of the scaling rule.
- min
Adjustment Magnitude This property is required. Integer - Min adjustment magnitude of scaling rule.
- name
This property is required. String - Name of the scaling rule.
- predictive
Scaling Mode This property is required. String - (Available since v1.242.0) The mode of the predictive scaling rule.
- predictive
Task Buffer Time 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.
- predictive
Value Behavior This property is required. String - (Available since v1.242.0) The action on the predicted maximum value.
- predictive
Value Buffer 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.
- scaling
Group Id This property is required. String - Scaling group id the scaling rules belong to.
- scaling
Rule Ari This property is required. String - Ari of scaling rule.
- target
Value 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.
- adjustment
Type This property is required. string - Adjustment type of the scaling rule.
- adjustment
Value 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.
- initial
Max Size This property is required. number - (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. string - (Available since v1.242.0) The predefined metric of the scaling rule.
- min
Adjustment Magnitude This property is required. number - Min adjustment magnitude of scaling rule.
- name
This property is required. string - Name of the scaling rule.
- predictive
Scaling Mode This property is required. string - (Available since v1.242.0) The mode of the predictive scaling rule.
- predictive
Task Buffer Time 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.
- predictive
Value Behavior This property is required. string - (Available since v1.242.0) The action on the predicted maximum value.
- predictive
Value Buffer 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.
- scaling
Group Id This property is required. string - Scaling group id the scaling rules belong to.
- scaling
Rule Ari This property is required. string - Ari of scaling rule.
- target
Value 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.
- adjustment
Type This property is required. String - Adjustment type of the scaling rule.
- adjustment
Value 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.
- initial
Max Size This property is required. Number - (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. String - (Available since v1.242.0) The predefined metric of the scaling rule.
- min
Adjustment Magnitude This property is required. Number - Min adjustment magnitude of scaling rule.
- name
This property is required. String - Name of the scaling rule.
- predictive
Scaling Mode This property is required. String - (Available since v1.242.0) The mode of the predictive scaling rule.
- predictive
Task Buffer Time 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.
- predictive
Value Behavior This property is required. String - (Available since v1.242.0) The action on the predicted maximum value.
- predictive
Value Buffer 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.
- scaling
Group Id This property is required. String - Scaling group id the scaling rules belong to.
- scaling
Rule Ari This property is required. String - Ari of scaling rule.
- target
Value 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.