1. Packages
  2. Volcengine
  3. API Docs
  4. autoscaling
  5. ScalingPolicy
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.autoscaling.ScalingPolicy

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    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:

    AdjustmentType string
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    AdjustmentValue int
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    ScalingGroupId string
    The id of the scaling group to which the scaling policy belongs.
    ScalingPolicyName string
    The name of the scaling policy.
    ScalingPolicyType string
    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.
    AlarmPolicyConditionComparisonOperator string
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionMetricName string
    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.
    AlarmPolicyConditionMetricUnit string
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionThreshold string
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyEvaluationCount int
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyRuleType string
    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 is Alarm.
    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.
    ScheduledPolicyLaunchTime string
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    ScheduledPolicyRecurrenceEndTime string
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    ScheduledPolicyRecurrenceType string
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    ScheduledPolicyRecurrenceValue string
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    AdjustmentType string
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    AdjustmentValue int
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    ScalingGroupId string
    The id of the scaling group to which the scaling policy belongs.
    ScalingPolicyName string
    The name of the scaling policy.
    ScalingPolicyType string
    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.
    AlarmPolicyConditionComparisonOperator string
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionMetricName string
    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.
    AlarmPolicyConditionMetricUnit string
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionThreshold string
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyEvaluationCount int
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyRuleType string
    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 is Alarm.
    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.
    ScheduledPolicyLaunchTime string
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    ScheduledPolicyRecurrenceEndTime string
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    ScheduledPolicyRecurrenceType string
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    ScheduledPolicyRecurrenceValue string
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    adjustmentType String
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    adjustmentValue Integer
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    scalingGroupId String
    The id of the scaling group to which the scaling policy belongs.
    scalingPolicyName String
    The name of the scaling policy.
    scalingPolicyType String
    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.
    alarmPolicyConditionComparisonOperator String
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionMetricName String
    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.
    alarmPolicyConditionMetricUnit String
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionThreshold String
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyEvaluationCount Integer
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyRuleType String
    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 is Alarm.
    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.
    scheduledPolicyLaunchTime String
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduledPolicyRecurrenceEndTime String
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduledPolicyRecurrenceType String
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduledPolicyRecurrenceValue String
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    adjustmentType string
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    adjustmentValue number
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    scalingGroupId string
    The id of the scaling group to which the scaling policy belongs.
    scalingPolicyName string
    The name of the scaling policy.
    scalingPolicyType string
    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.
    alarmPolicyConditionComparisonOperator string
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionMetricName string
    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.
    alarmPolicyConditionMetricUnit string
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionThreshold string
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyEvaluationCount number
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyRuleType string
    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 is Alarm.
    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.
    scheduledPolicyLaunchTime string
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduledPolicyRecurrenceEndTime string
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduledPolicyRecurrenceType string
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduledPolicyRecurrenceValue string
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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 is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    scaling_group_id str
    The id of the scaling group to which the scaling policy belongs.
    scaling_policy_name str
    The name of the scaling policy.
    scaling_policy_type str
    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_condition_comparison_operator str
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_condition_metric_name str
    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_condition_metric_unit str
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_condition_threshold str
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_evaluation_count int
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_rule_type str
    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 is Alarm.
    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_launch_time str
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduled_policy_recurrence_end_time str
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduled_policy_recurrence_type str
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduled_policy_recurrence_value str
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    adjustmentType String
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    adjustmentValue Number
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    scalingGroupId String
    The id of the scaling group to which the scaling policy belongs.
    scalingPolicyName String
    The name of the scaling policy.
    scalingPolicyType String
    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.
    alarmPolicyConditionComparisonOperator String
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionMetricName String
    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.
    alarmPolicyConditionMetricUnit String
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionThreshold String
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyEvaluationCount Number
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyRuleType String
    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 is Alarm.
    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.
    scheduledPolicyLaunchTime String
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduledPolicyRecurrenceEndTime String
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduledPolicyRecurrenceType String
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduledPolicyRecurrenceValue String
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    ScalingPolicyId string
    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.
    ScalingPolicyId string
    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.
    scalingPolicyId String
    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.
    scalingPolicyId string
    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_id str
    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.
    scalingPolicyId String
    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.
    The following state arguments are supported:
    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.
    AdjustmentType string
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    AdjustmentValue int
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    AlarmPolicyConditionComparisonOperator string
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionMetricName string
    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.
    AlarmPolicyConditionMetricUnit string
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionThreshold string
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyEvaluationCount int
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyRuleType string
    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 is Alarm.
    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.
    ScalingGroupId string
    The id of the scaling group to which the scaling policy belongs.
    ScalingPolicyId string
    The id of the scaling policy.
    ScalingPolicyName string
    The name of the scaling policy.
    ScalingPolicyType string
    The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
    ScheduledPolicyLaunchTime string
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    ScheduledPolicyRecurrenceEndTime string
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    ScheduledPolicyRecurrenceType string
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    ScheduledPolicyRecurrenceValue string
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    AdjustmentType string
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    AdjustmentValue int
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    AlarmPolicyConditionComparisonOperator string
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionMetricName string
    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.
    AlarmPolicyConditionMetricUnit string
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyConditionThreshold string
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyEvaluationCount int
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    AlarmPolicyRuleType string
    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 is Alarm.
    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.
    ScalingGroupId string
    The id of the scaling group to which the scaling policy belongs.
    ScalingPolicyId string
    The id of the scaling policy.
    ScalingPolicyName string
    The name of the scaling policy.
    ScalingPolicyType string
    The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
    ScheduledPolicyLaunchTime string
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    ScheduledPolicyRecurrenceEndTime string
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    ScheduledPolicyRecurrenceType string
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    ScheduledPolicyRecurrenceValue string
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    adjustmentType String
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    adjustmentValue Integer
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    alarmPolicyConditionComparisonOperator String
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionMetricName String
    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.
    alarmPolicyConditionMetricUnit String
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionThreshold String
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyEvaluationCount Integer
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyRuleType String
    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 is Alarm.
    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.
    scalingGroupId String
    The id of the scaling group to which the scaling policy belongs.
    scalingPolicyId String
    The id of the scaling policy.
    scalingPolicyName String
    The name of the scaling policy.
    scalingPolicyType String
    The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
    scheduledPolicyLaunchTime String
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduledPolicyRecurrenceEndTime String
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduledPolicyRecurrenceType String
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduledPolicyRecurrenceValue String
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    adjustmentType string
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    adjustmentValue number
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    alarmPolicyConditionComparisonOperator string
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionMetricName string
    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.
    alarmPolicyConditionMetricUnit string
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionThreshold string
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyEvaluationCount number
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyRuleType string
    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 is Alarm.
    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.
    scalingGroupId string
    The id of the scaling group to which the scaling policy belongs.
    scalingPolicyId string
    The id of the scaling policy.
    scalingPolicyName string
    The name of the scaling policy.
    scalingPolicyType string
    The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
    scheduledPolicyLaunchTime string
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduledPolicyRecurrenceEndTime string
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduledPolicyRecurrenceType string
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduledPolicyRecurrenceValue string
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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 is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    alarm_policy_condition_comparison_operator str
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_condition_metric_name str
    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_condition_metric_unit str
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_condition_threshold str
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_evaluation_count int
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarm_policy_rule_type str
    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 is Alarm.
    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_id str
    The id of the scaling group to which the scaling policy belongs.
    scaling_policy_id str
    The id of the scaling policy.
    scaling_policy_name str
    The name of the scaling policy.
    scaling_policy_type str
    The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
    scheduled_policy_launch_time str
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduled_policy_recurrence_end_time str
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduled_policy_recurrence_type str
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduled_policy_recurrence_value str
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    adjustmentType String
    The adjustment type of the scaling policy. Valid values: QuantityChangeInCapacity, PercentChangeInCapacity, TotalCapacity.
    adjustmentValue Number
    The adjustment value of the scaling policy. When the value of the AdjustmentType parameter is QuantityChangeInCapacity: -100 ~ 100, 0 is not allowed, unit: piece. When the value of the AdjustmentType parameter is PercentChangeInCapacity: -100 ~ 10000, 0 is not allowed, unit: %. When the value of the AdjustmentType parameter is TotalCapacity: the default is 0 to 100, unit: piece.
    alarmPolicyConditionComparisonOperator String
    The comparison operator of the alarm policy condition of the scaling policy. Valid values: >, <, =. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionMetricName String
    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.
    alarmPolicyConditionMetricUnit String
    The comparison operator of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyConditionThreshold String
    The threshold of the alarm policy condition of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyEvaluationCount Number
    The evaluation count of the alarm policy of the scaling policy. It is only valid and required when the value of ScalingPolicyType is Alarm.
    alarmPolicyRuleType String
    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 is Alarm.
    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.
    scalingGroupId String
    The id of the scaling group to which the scaling policy belongs.
    scalingPolicyId String
    The id of the scaling policy.
    scalingPolicyName String
    The name of the scaling policy.
    scalingPolicyType String
    The type of scaling policy. Valid values: Scheduled, Recurrence, Alarm.
    scheduledPolicyLaunchTime String
    The launch time of the scheduled policy of the scaling policy. When the value of ScalingPolicyType is Scheduled, it means that the trigger time of the scheduled task must be greater than the current time. When the value of ScalingPolicyType is Recurrence: If ScheduledPolicy.RecurrenceType is not specified, it means to execute only once according to the date and time specified here. If ScheduledPolicy.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 of ScalingPolicyType is Alarm, this parameter is invalid.
    scheduledPolicyRecurrenceEndTime String
    The recurrence end time of the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. If not configured, it will default to the day/week/month after this moment according to the recurrence period (ScheduledPolicy.RecurrenceType).
    scheduledPolicyRecurrenceType String
    The recurrence type the scheduled policy of the scaling policy. Valid values: Daily, Weekly, Monthly, Cron.
    scheduledPolicyRecurrenceValue String
    The recurrence value the scheduled policy of the scaling policy. Valid and required when ScalingPolicyType is Recurrence. 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.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine