volcengine.autoscaling.ScalingPolicy
Explore with Pulumi AI
Provides a resource to manage scaling policy
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooScalingGroup = new Volcengine.Autoscaling.ScalingGroup("fooScalingGroup", new()
{
ScalingGroupName = "acc-test-scaling-group",
SubnetIds = new[]
{
fooSubnet.Id,
},
MultiAzPolicy = "BALANCE",
DesireInstanceNumber = 0,
MinInstanceNumber = 0,
MaxInstanceNumber = 1,
InstanceTerminatePolicy = "OldestInstance",
DefaultCooldown = 10,
});
var fooScalingPolicy = new Volcengine.Autoscaling.ScalingPolicy("fooScalingPolicy", new()
{
Active = false,
ScalingGroupId = fooScalingGroup.Id,
ScalingPolicyName = "acc-tf-sg-policy-test",
ScalingPolicyType = "Alarm",
AdjustmentType = "QuantityChangeInCapacity",
AdjustmentValue = 100,
Cooldown = 10,
AlarmPolicyRuleType = "Static",
AlarmPolicyEvaluationCount = 1,
AlarmPolicyConditionMetricName = "Instance_CpuBusy_Avg",
AlarmPolicyConditionMetricUnit = "Percent",
AlarmPolicyConditionComparisonOperator = "=",
AlarmPolicyConditionThreshold = "100",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/autoscaling"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooScalingGroup, err := autoscaling.NewScalingGroup(ctx, "fooScalingGroup", &autoscaling.ScalingGroupArgs{
ScalingGroupName: pulumi.String("acc-test-scaling-group"),
SubnetIds: pulumi.StringArray{
fooSubnet.ID(),
},
MultiAzPolicy: pulumi.String("BALANCE"),
DesireInstanceNumber: pulumi.Int(0),
MinInstanceNumber: pulumi.Int(0),
MaxInstanceNumber: pulumi.Int(1),
InstanceTerminatePolicy: pulumi.String("OldestInstance"),
DefaultCooldown: pulumi.Int(10),
})
if err != nil {
return err
}
_, err = autoscaling.NewScalingPolicy(ctx, "fooScalingPolicy", &autoscaling.ScalingPolicyArgs{
Active: pulumi.Bool(false),
ScalingGroupId: fooScalingGroup.ID(),
ScalingPolicyName: pulumi.String("acc-tf-sg-policy-test"),
ScalingPolicyType: pulumi.String("Alarm"),
AdjustmentType: pulumi.String("QuantityChangeInCapacity"),
AdjustmentValue: pulumi.Int(100),
Cooldown: pulumi.Int(10),
AlarmPolicyRuleType: pulumi.String("Static"),
AlarmPolicyEvaluationCount: pulumi.Int(1),
AlarmPolicyConditionMetricName: pulumi.String("Instance_CpuBusy_Avg"),
AlarmPolicyConditionMetricUnit: pulumi.String("Percent"),
AlarmPolicyConditionComparisonOperator: pulumi.String("="),
AlarmPolicyConditionThreshold: pulumi.String("100"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.autoscaling.ScalingGroup;
import com.pulumi.volcengine.autoscaling.ScalingGroupArgs;
import com.pulumi.volcengine.autoscaling.ScalingPolicy;
import com.pulumi.volcengine.autoscaling.ScalingPolicyArgs;
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 fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooScalingGroup = new ScalingGroup("fooScalingGroup", ScalingGroupArgs.builder()
.scalingGroupName("acc-test-scaling-group")
.subnetIds(fooSubnet.id())
.multiAzPolicy("BALANCE")
.desireInstanceNumber(0)
.minInstanceNumber(0)
.maxInstanceNumber(1)
.instanceTerminatePolicy("OldestInstance")
.defaultCooldown(10)
.build());
var fooScalingPolicy = new ScalingPolicy("fooScalingPolicy", ScalingPolicyArgs.builder()
.active(false)
.scalingGroupId(fooScalingGroup.id())
.scalingPolicyName("acc-tf-sg-policy-test")
.scalingPolicyType("Alarm")
.adjustmentType("QuantityChangeInCapacity")
.adjustmentValue(100)
.cooldown(10)
.alarmPolicyRuleType("Static")
.alarmPolicyEvaluationCount(1)
.alarmPolicyConditionMetricName("Instance_CpuBusy_Avg")
.alarmPolicyConditionMetricUnit("Percent")
.alarmPolicyConditionComparisonOperator("=")
.alarmPolicyConditionThreshold(100)
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_scaling_group = volcengine.autoscaling.ScalingGroup("fooScalingGroup",
scaling_group_name="acc-test-scaling-group",
subnet_ids=[foo_subnet.id],
multi_az_policy="BALANCE",
desire_instance_number=0,
min_instance_number=0,
max_instance_number=1,
instance_terminate_policy="OldestInstance",
default_cooldown=10)
foo_scaling_policy = volcengine.autoscaling.ScalingPolicy("fooScalingPolicy",
active=False,
scaling_group_id=foo_scaling_group.id,
scaling_policy_name="acc-tf-sg-policy-test",
scaling_policy_type="Alarm",
adjustment_type="QuantityChangeInCapacity",
adjustment_value=100,
cooldown=10,
alarm_policy_rule_type="Static",
alarm_policy_evaluation_count=1,
alarm_policy_condition_metric_name="Instance_CpuBusy_Avg",
alarm_policy_condition_metric_unit="Percent",
alarm_policy_condition_comparison_operator="=",
alarm_policy_condition_threshold="100")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooScalingGroup = new volcengine.autoscaling.ScalingGroup("fooScalingGroup", {
scalingGroupName: "acc-test-scaling-group",
subnetIds: [fooSubnet.id],
multiAzPolicy: "BALANCE",
desireInstanceNumber: 0,
minInstanceNumber: 0,
maxInstanceNumber: 1,
instanceTerminatePolicy: "OldestInstance",
defaultCooldown: 10,
});
const fooScalingPolicy = new volcengine.autoscaling.ScalingPolicy("fooScalingPolicy", {
active: false,
scalingGroupId: fooScalingGroup.id,
scalingPolicyName: "acc-tf-sg-policy-test",
scalingPolicyType: "Alarm",
adjustmentType: "QuantityChangeInCapacity",
adjustmentValue: 100,
cooldown: 10,
alarmPolicyRuleType: "Static",
alarmPolicyEvaluationCount: 1,
alarmPolicyConditionMetricName: "Instance_CpuBusy_Avg",
alarmPolicyConditionMetricUnit: "Percent",
alarmPolicyConditionComparisonOperator: "=",
alarmPolicyConditionThreshold: "100",
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooScalingGroup:
type: volcengine:autoscaling:ScalingGroup
properties:
scalingGroupName: acc-test-scaling-group
subnetIds:
- ${fooSubnet.id}
multiAzPolicy: BALANCE
desireInstanceNumber: 0
minInstanceNumber: 0
maxInstanceNumber: 1
instanceTerminatePolicy: OldestInstance
defaultCooldown: 10
fooScalingPolicy:
type: volcengine:autoscaling:ScalingPolicy
properties:
active: false
scalingGroupId: ${fooScalingGroup.id}
scalingPolicyName: acc-tf-sg-policy-test
scalingPolicyType: Alarm
adjustmentType: QuantityChangeInCapacity
adjustmentValue: 100
cooldown: 10
alarmPolicyRuleType: Static
alarmPolicyEvaluationCount: 1
alarmPolicyConditionMetricName: Instance_CpuBusy_Avg
alarmPolicyConditionMetricUnit: Percent
alarmPolicyConditionComparisonOperator: =
alarmPolicyConditionThreshold: 100
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create ScalingPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScalingPolicy(name: string, args: ScalingPolicyArgs, opts?: CustomResourceOptions);
@overload
def ScalingPolicy(resource_name: str,
args: ScalingPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScalingPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
scaling_group_id: Optional[str] = None,
adjustment_type: Optional[str] = None,
adjustment_value: Optional[int] = None,
scaling_policy_type: Optional[str] = None,
scaling_policy_name: Optional[str] = None,
alarm_policy_condition_metric_name: Optional[str] = None,
alarm_policy_condition_threshold: Optional[str] = None,
alarm_policy_evaluation_count: Optional[int] = None,
alarm_policy_rule_type: Optional[str] = None,
cooldown: Optional[int] = None,
alarm_policy_condition_metric_unit: Optional[str] = None,
active: Optional[bool] = None,
alarm_policy_condition_comparison_operator: Optional[str] = None,
scheduled_policy_launch_time: Optional[str] = None,
scheduled_policy_recurrence_end_time: Optional[str] = None,
scheduled_policy_recurrence_type: Optional[str] = None,
scheduled_policy_recurrence_value: Optional[str] = None)
func NewScalingPolicy(ctx *Context, name string, args ScalingPolicyArgs, opts ...ResourceOption) (*ScalingPolicy, error)
public ScalingPolicy(string name, ScalingPolicyArgs args, CustomResourceOptions? opts = null)
public ScalingPolicy(String name, ScalingPolicyArgs args)
public ScalingPolicy(String name, ScalingPolicyArgs args, CustomResourceOptions options)
type: volcengine:autoscaling:ScalingPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ScalingPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ScalingPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScalingPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScalingPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScalingPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scalingPolicyResource = new Volcengine.Autoscaling.ScalingPolicy("scalingPolicyResource", new()
{
ScalingGroupId = "string",
AdjustmentType = "string",
AdjustmentValue = 0,
ScalingPolicyType = "string",
ScalingPolicyName = "string",
AlarmPolicyConditionMetricName = "string",
AlarmPolicyConditionThreshold = "string",
AlarmPolicyEvaluationCount = 0,
AlarmPolicyRuleType = "string",
Cooldown = 0,
AlarmPolicyConditionMetricUnit = "string",
Active = false,
AlarmPolicyConditionComparisonOperator = "string",
ScheduledPolicyLaunchTime = "string",
ScheduledPolicyRecurrenceEndTime = "string",
ScheduledPolicyRecurrenceType = "string",
ScheduledPolicyRecurrenceValue = "string",
});
example, err := autoscaling.NewScalingPolicy(ctx, "scalingPolicyResource", &autoscaling.ScalingPolicyArgs{
ScalingGroupId: pulumi.String("string"),
AdjustmentType: pulumi.String("string"),
AdjustmentValue: pulumi.Int(0),
ScalingPolicyType: pulumi.String("string"),
ScalingPolicyName: pulumi.String("string"),
AlarmPolicyConditionMetricName: pulumi.String("string"),
AlarmPolicyConditionThreshold: pulumi.String("string"),
AlarmPolicyEvaluationCount: pulumi.Int(0),
AlarmPolicyRuleType: pulumi.String("string"),
Cooldown: pulumi.Int(0),
AlarmPolicyConditionMetricUnit: pulumi.String("string"),
Active: pulumi.Bool(false),
AlarmPolicyConditionComparisonOperator: pulumi.String("string"),
ScheduledPolicyLaunchTime: pulumi.String("string"),
ScheduledPolicyRecurrenceEndTime: pulumi.String("string"),
ScheduledPolicyRecurrenceType: pulumi.String("string"),
ScheduledPolicyRecurrenceValue: pulumi.String("string"),
})
var scalingPolicyResource = new ScalingPolicy("scalingPolicyResource", ScalingPolicyArgs.builder()
.scalingGroupId("string")
.adjustmentType("string")
.adjustmentValue(0)
.scalingPolicyType("string")
.scalingPolicyName("string")
.alarmPolicyConditionMetricName("string")
.alarmPolicyConditionThreshold("string")
.alarmPolicyEvaluationCount(0)
.alarmPolicyRuleType("string")
.cooldown(0)
.alarmPolicyConditionMetricUnit("string")
.active(false)
.alarmPolicyConditionComparisonOperator("string")
.scheduledPolicyLaunchTime("string")
.scheduledPolicyRecurrenceEndTime("string")
.scheduledPolicyRecurrenceType("string")
.scheduledPolicyRecurrenceValue("string")
.build());
scaling_policy_resource = volcengine.autoscaling.ScalingPolicy("scalingPolicyResource",
scaling_group_id="string",
adjustment_type="string",
adjustment_value=0,
scaling_policy_type="string",
scaling_policy_name="string",
alarm_policy_condition_metric_name="string",
alarm_policy_condition_threshold="string",
alarm_policy_evaluation_count=0,
alarm_policy_rule_type="string",
cooldown=0,
alarm_policy_condition_metric_unit="string",
active=False,
alarm_policy_condition_comparison_operator="string",
scheduled_policy_launch_time="string",
scheduled_policy_recurrence_end_time="string",
scheduled_policy_recurrence_type="string",
scheduled_policy_recurrence_value="string")
const scalingPolicyResource = new volcengine.autoscaling.ScalingPolicy("scalingPolicyResource", {
scalingGroupId: "string",
adjustmentType: "string",
adjustmentValue: 0,
scalingPolicyType: "string",
scalingPolicyName: "string",
alarmPolicyConditionMetricName: "string",
alarmPolicyConditionThreshold: "string",
alarmPolicyEvaluationCount: 0,
alarmPolicyRuleType: "string",
cooldown: 0,
alarmPolicyConditionMetricUnit: "string",
active: false,
alarmPolicyConditionComparisonOperator: "string",
scheduledPolicyLaunchTime: "string",
scheduledPolicyRecurrenceEndTime: "string",
scheduledPolicyRecurrenceType: "string",
scheduledPolicyRecurrenceValue: "string",
});
type: volcengine:autoscaling:ScalingPolicy
properties:
active: false
adjustmentType: string
adjustmentValue: 0
alarmPolicyConditionComparisonOperator: string
alarmPolicyConditionMetricName: string
alarmPolicyConditionMetricUnit: string
alarmPolicyConditionThreshold: string
alarmPolicyEvaluationCount: 0
alarmPolicyRuleType: string
cooldown: 0
scalingGroupId: string
scalingPolicyName: string
scalingPolicyType: string
scheduledPolicyLaunchTime: string
scheduledPolicyRecurrenceEndTime: string
scheduledPolicyRecurrenceType: string
scheduledPolicyRecurrenceValue: string
ScalingPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ScalingPolicy resource accepts the following input properties:
- Adjustment
Type string - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- Adjustment
Value int - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - Scaling
Group stringId - The id of the scaling group to which the scaling policy belongs.
- Scaling
Policy stringName - The name of the scaling policy.
- Scaling
Policy stringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- Active bool
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- Alarm
Policy stringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- Alarm
Policy stringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy intEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Cooldown int
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- Scheduled
Policy stringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - Scheduled
Policy stringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - Scheduled
Policy stringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- Scheduled
Policy stringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W.
- Adjustment
Type string - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- Adjustment
Value int - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - Scaling
Group stringId - The id of the scaling group to which the scaling policy belongs.
- Scaling
Policy stringName - The name of the scaling policy.
- Scaling
Policy stringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- Active bool
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- Alarm
Policy stringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- Alarm
Policy stringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy intEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Cooldown int
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- Scheduled
Policy stringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - Scheduled
Policy stringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - Scheduled
Policy stringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- Scheduled
Policy stringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W.
- adjustment
Type String - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment
Value Integer - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - scaling
Group StringId - The id of the scaling group to which the scaling policy belongs.
- scaling
Policy StringName - The name of the scaling policy.
- scaling
Policy StringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- active Boolean
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- alarm
Policy StringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm
Policy StringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy IntegerEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown Integer
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scheduled
Policy StringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled
Policy StringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled
Policy StringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled
Policy StringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W.
- adjustment
Type string - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment
Value number - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - scaling
Group stringId - The id of the scaling group to which the scaling policy belongs.
- scaling
Policy stringName - The name of the scaling policy.
- scaling
Policy stringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- active boolean
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- alarm
Policy stringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm
Policy stringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm
Policy stringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy stringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy numberEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy stringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown number
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scheduled
Policy stringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled
Policy stringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled
Policy stringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled
Policy stringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W.
- adjustment_
type str - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment_
value int - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - scaling_
group_ strid - The id of the scaling group to which the scaling policy belongs.
- scaling_
policy_ strname - The name of the scaling policy.
- scaling_
policy_ strtype - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- active bool
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- alarm_
policy_ strcondition_ comparison_ operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm_
policy_ strcondition_ metric_ name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm_
policy_ strcondition_ metric_ unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm_
policy_ strcondition_ threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm_
policy_ intevaluation_ count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm_
policy_ strrule_ type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown int
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scheduled_
policy_ strlaunch_ time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled_
policy_ strrecurrence_ end_ time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled_
policy_ strrecurrence_ type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled_
policy_ strrecurrence_ value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W.
- adjustment
Type String - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment
Value Number - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - scaling
Group StringId - The id of the scaling group to which the scaling policy belongs.
- scaling
Policy StringName - The name of the scaling policy.
- scaling
Policy StringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- active Boolean
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- alarm
Policy StringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm
Policy StringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy NumberEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown Number
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scheduled
Policy StringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled
Policy StringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled
Policy StringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled
Policy StringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScalingPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Scaling
Policy stringId - The id of the scaling policy.
- Status string
- The status of the scaling policy. Valid values: Active, InActive.
- Id string
- The provider-assigned unique ID for this managed resource.
- Scaling
Policy stringId - The id of the scaling policy.
- Status string
- The status of the scaling policy. Valid values: Active, InActive.
- id String
- The provider-assigned unique ID for this managed resource.
- scaling
Policy StringId - The id of the scaling policy.
- status String
- The status of the scaling policy. Valid values: Active, InActive.
- id string
- The provider-assigned unique ID for this managed resource.
- scaling
Policy stringId - The id of the scaling policy.
- status string
- The status of the scaling policy. Valid values: Active, InActive.
- id str
- The provider-assigned unique ID for this managed resource.
- scaling_
policy_ strid - The id of the scaling policy.
- status str
- The status of the scaling policy. Valid values: Active, InActive.
- id String
- The provider-assigned unique ID for this managed resource.
- scaling
Policy StringId - The id of the scaling policy.
- status String
- The status of the scaling policy. Valid values: Active, InActive.
Look up Existing ScalingPolicy Resource
Get an existing ScalingPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScalingPolicyState, opts?: CustomResourceOptions): ScalingPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
adjustment_type: Optional[str] = None,
adjustment_value: Optional[int] = None,
alarm_policy_condition_comparison_operator: Optional[str] = None,
alarm_policy_condition_metric_name: Optional[str] = None,
alarm_policy_condition_metric_unit: Optional[str] = None,
alarm_policy_condition_threshold: Optional[str] = None,
alarm_policy_evaluation_count: Optional[int] = None,
alarm_policy_rule_type: Optional[str] = None,
cooldown: Optional[int] = None,
scaling_group_id: Optional[str] = None,
scaling_policy_id: Optional[str] = None,
scaling_policy_name: Optional[str] = None,
scaling_policy_type: Optional[str] = None,
scheduled_policy_launch_time: Optional[str] = None,
scheduled_policy_recurrence_end_time: Optional[str] = None,
scheduled_policy_recurrence_type: Optional[str] = None,
scheduled_policy_recurrence_value: Optional[str] = None,
status: Optional[str] = None) -> ScalingPolicy
func GetScalingPolicy(ctx *Context, name string, id IDInput, state *ScalingPolicyState, opts ...ResourceOption) (*ScalingPolicy, error)
public static ScalingPolicy Get(string name, Input<string> id, ScalingPolicyState? state, CustomResourceOptions? opts = null)
public static ScalingPolicy get(String name, Output<String> id, ScalingPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Active bool
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- Adjustment
Type string - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- Adjustment
Value int - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - Alarm
Policy stringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- Alarm
Policy stringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy intEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Cooldown int
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- Scaling
Group stringId - The id of the scaling group to which the scaling policy belongs.
- Scaling
Policy stringId - The id of the scaling policy.
- Scaling
Policy stringName - The name of the scaling policy.
- Scaling
Policy stringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- Scheduled
Policy stringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - Scheduled
Policy stringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - Scheduled
Policy stringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- Scheduled
Policy stringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W. - Status string
- The status of the scaling policy. Valid values: Active, InActive.
- Active bool
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- Adjustment
Type string - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- Adjustment
Value int - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - Alarm
Policy stringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- Alarm
Policy stringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy intEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Alarm
Policy stringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - Cooldown int
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- Scaling
Group stringId - The id of the scaling group to which the scaling policy belongs.
- Scaling
Policy stringId - The id of the scaling policy.
- Scaling
Policy stringName - The name of the scaling policy.
- Scaling
Policy stringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- Scheduled
Policy stringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - Scheduled
Policy stringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - Scheduled
Policy stringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- Scheduled
Policy stringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W. - Status string
- The status of the scaling policy. Valid values: Active, InActive.
- active Boolean
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- adjustment
Type String - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment
Value Integer - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - alarm
Policy StringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm
Policy StringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy IntegerEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown Integer
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scaling
Group StringId - The id of the scaling group to which the scaling policy belongs.
- scaling
Policy StringId - The id of the scaling policy.
- scaling
Policy StringName - The name of the scaling policy.
- scaling
Policy StringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- scheduled
Policy StringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled
Policy StringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled
Policy StringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled
Policy StringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W. - status String
- The status of the scaling policy. Valid values: Active, InActive.
- active boolean
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- adjustment
Type string - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment
Value number - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - alarm
Policy stringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm
Policy stringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm
Policy stringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy stringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy numberEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy stringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown number
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scaling
Group stringId - The id of the scaling group to which the scaling policy belongs.
- scaling
Policy stringId - The id of the scaling policy.
- scaling
Policy stringName - The name of the scaling policy.
- scaling
Policy stringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- scheduled
Policy stringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled
Policy stringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled
Policy stringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled
Policy stringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W. - status string
- The status of the scaling policy. Valid values: Active, InActive.
- active bool
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- adjustment_
type str - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment_
value int - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - alarm_
policy_ strcondition_ comparison_ operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm_
policy_ strcondition_ metric_ name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm_
policy_ strcondition_ metric_ unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm_
policy_ strcondition_ threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm_
policy_ intevaluation_ count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm_
policy_ strrule_ type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown int
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scaling_
group_ strid - The id of the scaling group to which the scaling policy belongs.
- scaling_
policy_ strid - The id of the scaling policy.
- scaling_
policy_ strname - The name of the scaling policy.
- scaling_
policy_ strtype - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- scheduled_
policy_ strlaunch_ time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled_
policy_ strrecurrence_ end_ time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled_
policy_ strrecurrence_ type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled_
policy_ strrecurrence_ value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W. - status str
- The status of the scaling policy. Valid values: Active, InActive.
- active Boolean
- The active flag of the scaling policy. [Warning] the scaling policy can be active only when the scaling group be active otherwise will fail.
- adjustment
Type String - The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
- adjustment
Value Number - The adjustment value of the scaling policy. When the value of the
AdjustmentType
parameter isQuantityChangeInCapacity
: -100 ~ 100, 0 is not allowed, unit: piece. When the value of theAdjustmentType
parameter isPercentChangeInCapacity
: -100 ~ 10000, 0 is not allowed, unit: %. When the value of theAdjustmentType
parameter isTotalCapacity
: the default is 0 to 100, unit: piece. - alarm
Policy StringCondition Comparison Operator - The comparison operator of the alarm policy condition of the scaling policy. Valid values:
>
,<
,=
. It is only valid and required when the value ofScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Metric Name - The metric name of the alarm policy condition of the scaling policy. Valid values: CpuTotal_Max, CpuTotal_Min, CpuTotal_Avg, MemoryUsedUtilization_Max, MemoryUsedUtilization_Min, MemoryUsedUtilization_Avg, Instance_CpuBusy_Max, Instance_CpuBusy_Min, Instance_CpuBusy_Avg.
- alarm
Policy StringCondition Metric Unit - The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringCondition Threshold - The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy NumberEvaluation Count - The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - alarm
Policy StringRule Type - The rule type of the alarm policy of the scaling policy. Valid value: Static. It is only valid and required when the value of
ScalingPolicyType
isAlarm
. - cooldown Number
- The cooldown of the scaling policy. Default value is the cooldown time of the scaling group. Value: 0~86400, unit: second, if left blank, the cooling time of the scaling group will be used by default.
- scaling
Group StringId - The id of the scaling group to which the scaling policy belongs.
- scaling
Policy StringId - The id of the scaling policy.
- scaling
Policy StringName - The name of the scaling policy.
- scaling
Policy StringType - The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
- scheduled
Policy StringLaunch Time - The launch time of the scheduled policy of the scaling policy.
When the value of
ScalingPolicyType
isScheduled
, it means that the trigger time of the scheduled task must be greater than the current time. When the value ofScalingPolicyType
isRecurrence
: IfScheduledPolicy.RecurrenceType
is not specified, it means to execute only once according to the date and time specified here. IfScheduledPolicy.RecurrenceType
is specified, it indicates the start time of the periodic task. Only the time within 90 days from the date of creation/modification is supported. When the value ofScalingPolicyType
isAlarm
, this parameter is invalid. - scheduled
Policy StringRecurrence End Time - The recurrence end time of the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType). - scheduled
Policy StringRecurrence Type - The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
- scheduled
Policy StringRecurrence Value - The recurrence value the scheduled policy of the scaling policy. Valid and required when
ScalingPolicyType
isRecurrence
. When the value of the ScheduledPolicy.RecurrenceType parameter is Daily, only one value can be filled in, ranging from 1 to 31. When the value of the ScheduledPolicy.RecurrenceType parameter is Weekly, you can enter multiple values separated by commas (,). The values from Monday to Sunday are: 1,2,3,4,5,6,7. When the value of the ScheduledPolicy.RecurrenceType parameter is Monthly, the format is A-B. The value ranges of A and B are both 1~31, and B must be greater than or equal to A. When the value of the ScheduledPolicy.RecurrenceType parameter is Cron, it means UTC+8 time, supports 5-field expressions of minutes, hours, days, months, and weeks, and supports wildcard English commas (,), English question marks (?), and conjunctions ( -), asterisk (*), pound sign (#), slash (/), L, and W. - status String
- The status of the scaling policy. Valid values: Active, InActive.
Import
ScalingPolicy can be imported using the ScalingGroupId:ScalingPolicyId, e.g.
$ pulumi import volcengine:autoscaling/scalingPolicy:ScalingPolicy default scg-yblfbfhy7agh9zn72iaz:sp-yblf9l4fvcl8j1prohsp
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.