1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. AsPolicyV1
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.AsPolicyV1

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages a V1 AS Policy resource within flexibleengine.

    Example Usage

    AS Recurrence Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const hthAspolicy = new flexibleengine.AsPolicyV1("hthAspolicy", {
        coolDownTime: 900,
        scalingGroupId: "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        scalingPolicyAction: {
            instanceNumber: 1,
            operation: "ADD",
        },
        scalingPolicyName: "hth_aspolicy",
        scalingPolicyType: "RECURRENCE",
        scheduledPolicy: {
            endTime: "2017-12-30T12:00Z",
            launchTime: "07:00",
            recurrenceType: "Daily",
            startTime: "2017-11-30T12:00Z",
        },
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    hth_aspolicy = flexibleengine.AsPolicyV1("hthAspolicy",
        cool_down_time=900,
        scaling_group_id="4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        scaling_policy_action={
            "instance_number": 1,
            "operation": "ADD",
        },
        scaling_policy_name="hth_aspolicy",
        scaling_policy_type="RECURRENCE",
        scheduled_policy={
            "end_time": "2017-12-30T12:00Z",
            "launch_time": "07:00",
            "recurrence_type": "Daily",
            "start_time": "2017-11-30T12:00Z",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewAsPolicyV1(ctx, "hthAspolicy", &flexibleengine.AsPolicyV1Args{
    			CoolDownTime:   pulumi.Float64(900),
    			ScalingGroupId: pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
    			ScalingPolicyAction: &flexibleengine.AsPolicyV1ScalingPolicyActionArgs{
    				InstanceNumber: pulumi.Float64(1),
    				Operation:      pulumi.String("ADD"),
    			},
    			ScalingPolicyName: pulumi.String("hth_aspolicy"),
    			ScalingPolicyType: pulumi.String("RECURRENCE"),
    			ScheduledPolicy: &flexibleengine.AsPolicyV1ScheduledPolicyArgs{
    				EndTime:        pulumi.String("2017-12-30T12:00Z"),
    				LaunchTime:     pulumi.String("07:00"),
    				RecurrenceType: pulumi.String("Daily"),
    				StartTime:      pulumi.String("2017-11-30T12:00Z"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var hthAspolicy = new Flexibleengine.AsPolicyV1("hthAspolicy", new()
        {
            CoolDownTime = 900,
            ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
            ScalingPolicyAction = new Flexibleengine.Inputs.AsPolicyV1ScalingPolicyActionArgs
            {
                InstanceNumber = 1,
                Operation = "ADD",
            },
            ScalingPolicyName = "hth_aspolicy",
            ScalingPolicyType = "RECURRENCE",
            ScheduledPolicy = new Flexibleengine.Inputs.AsPolicyV1ScheduledPolicyArgs
            {
                EndTime = "2017-12-30T12:00Z",
                LaunchTime = "07:00",
                RecurrenceType = "Daily",
                StartTime = "2017-11-30T12:00Z",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.AsPolicyV1;
    import com.pulumi.flexibleengine.AsPolicyV1Args;
    import com.pulumi.flexibleengine.inputs.AsPolicyV1ScalingPolicyActionArgs;
    import com.pulumi.flexibleengine.inputs.AsPolicyV1ScheduledPolicyArgs;
    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) {
            var hthAspolicy = new AsPolicyV1("hthAspolicy", AsPolicyV1Args.builder()
                .coolDownTime(900)
                .scalingGroupId("4579f2f5-cbe8-425a-8f32-53dcb9d9053a")
                .scalingPolicyAction(AsPolicyV1ScalingPolicyActionArgs.builder()
                    .instanceNumber(1)
                    .operation("ADD")
                    .build())
                .scalingPolicyName("hth_aspolicy")
                .scalingPolicyType("RECURRENCE")
                .scheduledPolicy(AsPolicyV1ScheduledPolicyArgs.builder()
                    .endTime("2017-12-30T12:00Z")
                    .launchTime("07:00")
                    .recurrenceType("Daily")
                    .startTime("2017-11-30T12:00Z")
                    .build())
                .build());
    
        }
    }
    
    resources:
      hthAspolicy:
        type: flexibleengine:AsPolicyV1
        properties:
          coolDownTime: 900
          scalingGroupId: 4579f2f5-cbe8-425a-8f32-53dcb9d9053a
          scalingPolicyAction:
            instanceNumber: 1
            operation: ADD
          scalingPolicyName: hth_aspolicy
          scalingPolicyType: RECURRENCE
          scheduledPolicy:
            endTime: 2017-12-30T12:00Z
            launchTime: 07:00
            recurrenceType: Daily
            startTime: 2017-11-30T12:00Z
    

    AS Scheduled Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const hthAspolicy1 = new flexibleengine.AsPolicyV1("hthAspolicy1", {
        coolDownTime: 900,
        scalingGroupId: "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        scalingPolicyAction: {
            instanceNumber: 1,
            operation: "REMOVE",
        },
        scalingPolicyName: "hth_aspolicy_1",
        scalingPolicyType: "SCHEDULED",
        scheduledPolicy: {
            launchTime: "2017-12-22T12:00Z",
        },
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    hth_aspolicy1 = flexibleengine.AsPolicyV1("hthAspolicy1",
        cool_down_time=900,
        scaling_group_id="4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        scaling_policy_action={
            "instance_number": 1,
            "operation": "REMOVE",
        },
        scaling_policy_name="hth_aspolicy_1",
        scaling_policy_type="SCHEDULED",
        scheduled_policy={
            "launch_time": "2017-12-22T12:00Z",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewAsPolicyV1(ctx, "hthAspolicy1", &flexibleengine.AsPolicyV1Args{
    			CoolDownTime:   pulumi.Float64(900),
    			ScalingGroupId: pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
    			ScalingPolicyAction: &flexibleengine.AsPolicyV1ScalingPolicyActionArgs{
    				InstanceNumber: pulumi.Float64(1),
    				Operation:      pulumi.String("REMOVE"),
    			},
    			ScalingPolicyName: pulumi.String("hth_aspolicy_1"),
    			ScalingPolicyType: pulumi.String("SCHEDULED"),
    			ScheduledPolicy: &flexibleengine.AsPolicyV1ScheduledPolicyArgs{
    				LaunchTime: pulumi.String("2017-12-22T12:00Z"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var hthAspolicy1 = new Flexibleengine.AsPolicyV1("hthAspolicy1", new()
        {
            CoolDownTime = 900,
            ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
            ScalingPolicyAction = new Flexibleengine.Inputs.AsPolicyV1ScalingPolicyActionArgs
            {
                InstanceNumber = 1,
                Operation = "REMOVE",
            },
            ScalingPolicyName = "hth_aspolicy_1",
            ScalingPolicyType = "SCHEDULED",
            ScheduledPolicy = new Flexibleengine.Inputs.AsPolicyV1ScheduledPolicyArgs
            {
                LaunchTime = "2017-12-22T12:00Z",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.AsPolicyV1;
    import com.pulumi.flexibleengine.AsPolicyV1Args;
    import com.pulumi.flexibleengine.inputs.AsPolicyV1ScalingPolicyActionArgs;
    import com.pulumi.flexibleengine.inputs.AsPolicyV1ScheduledPolicyArgs;
    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) {
            var hthAspolicy1 = new AsPolicyV1("hthAspolicy1", AsPolicyV1Args.builder()
                .coolDownTime(900)
                .scalingGroupId("4579f2f5-cbe8-425a-8f32-53dcb9d9053a")
                .scalingPolicyAction(AsPolicyV1ScalingPolicyActionArgs.builder()
                    .instanceNumber(1)
                    .operation("REMOVE")
                    .build())
                .scalingPolicyName("hth_aspolicy_1")
                .scalingPolicyType("SCHEDULED")
                .scheduledPolicy(AsPolicyV1ScheduledPolicyArgs.builder()
                    .launchTime("2017-12-22T12:00Z")
                    .build())
                .build());
    
        }
    }
    
    resources:
      hthAspolicy1:
        type: flexibleengine:AsPolicyV1
        properties:
          coolDownTime: 900
          scalingGroupId: 4579f2f5-cbe8-425a-8f32-53dcb9d9053a
          scalingPolicyAction:
            instanceNumber: 1
            operation: REMOVE
          scalingPolicyName: hth_aspolicy_1
          scalingPolicyType: SCHEDULED
          scheduledPolicy:
            launchTime: 2017-12-22T12:00Z
    

    Please note that the launch_time of the SCHEDULED policy cannot be earlier than the current time.

    AS Alarm Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const hthAspolicy2 = new flexibleengine.AsPolicyV1("hthAspolicy2", {
        alarmId: "37e310f5-db9d-446e-9135-c625f9c2bbfc",
        coolDownTime: 900,
        scalingGroupId: "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        scalingPolicyAction: {
            instanceNumber: 1,
            operation: "ADD",
        },
        scalingPolicyName: "hth_aspolicy_2",
        scalingPolicyType: "ALARM",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    hth_aspolicy2 = flexibleengine.AsPolicyV1("hthAspolicy2",
        alarm_id="37e310f5-db9d-446e-9135-c625f9c2bbfc",
        cool_down_time=900,
        scaling_group_id="4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        scaling_policy_action={
            "instance_number": 1,
            "operation": "ADD",
        },
        scaling_policy_name="hth_aspolicy_2",
        scaling_policy_type="ALARM")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewAsPolicyV1(ctx, "hthAspolicy2", &flexibleengine.AsPolicyV1Args{
    			AlarmId:        pulumi.String("37e310f5-db9d-446e-9135-c625f9c2bbfc"),
    			CoolDownTime:   pulumi.Float64(900),
    			ScalingGroupId: pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
    			ScalingPolicyAction: &flexibleengine.AsPolicyV1ScalingPolicyActionArgs{
    				InstanceNumber: pulumi.Float64(1),
    				Operation:      pulumi.String("ADD"),
    			},
    			ScalingPolicyName: pulumi.String("hth_aspolicy_2"),
    			ScalingPolicyType: pulumi.String("ALARM"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var hthAspolicy2 = new Flexibleengine.AsPolicyV1("hthAspolicy2", new()
        {
            AlarmId = "37e310f5-db9d-446e-9135-c625f9c2bbfc",
            CoolDownTime = 900,
            ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
            ScalingPolicyAction = new Flexibleengine.Inputs.AsPolicyV1ScalingPolicyActionArgs
            {
                InstanceNumber = 1,
                Operation = "ADD",
            },
            ScalingPolicyName = "hth_aspolicy_2",
            ScalingPolicyType = "ALARM",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.AsPolicyV1;
    import com.pulumi.flexibleengine.AsPolicyV1Args;
    import com.pulumi.flexibleengine.inputs.AsPolicyV1ScalingPolicyActionArgs;
    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) {
            var hthAspolicy2 = new AsPolicyV1("hthAspolicy2", AsPolicyV1Args.builder()
                .alarmId("37e310f5-db9d-446e-9135-c625f9c2bbfc")
                .coolDownTime(900)
                .scalingGroupId("4579f2f5-cbe8-425a-8f32-53dcb9d9053a")
                .scalingPolicyAction(AsPolicyV1ScalingPolicyActionArgs.builder()
                    .instanceNumber(1)
                    .operation("ADD")
                    .build())
                .scalingPolicyName("hth_aspolicy_2")
                .scalingPolicyType("ALARM")
                .build());
    
        }
    }
    
    resources:
      hthAspolicy2:
        type: flexibleengine:AsPolicyV1
        properties:
          alarmId: 37e310f5-db9d-446e-9135-c625f9c2bbfc
          coolDownTime: 900
          scalingGroupId: 4579f2f5-cbe8-425a-8f32-53dcb9d9053a
          scalingPolicyAction:
            instanceNumber: 1
            operation: ADD
          scalingPolicyName: hth_aspolicy_2
          scalingPolicyType: ALARM
    

    Create AsPolicyV1 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AsPolicyV1(name: string, args: AsPolicyV1Args, opts?: CustomResourceOptions);
    @overload
    def AsPolicyV1(resource_name: str,
                   args: AsPolicyV1Args,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def AsPolicyV1(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   scaling_group_id: Optional[str] = None,
                   scaling_policy_name: Optional[str] = None,
                   scaling_policy_type: Optional[str] = None,
                   alarm_id: Optional[str] = None,
                   as_policy_v1_id: Optional[str] = None,
                   cool_down_time: Optional[float] = None,
                   region: Optional[str] = None,
                   scaling_policy_action: Optional[AsPolicyV1ScalingPolicyActionArgs] = None,
                   scheduled_policy: Optional[AsPolicyV1ScheduledPolicyArgs] = None)
    func NewAsPolicyV1(ctx *Context, name string, args AsPolicyV1Args, opts ...ResourceOption) (*AsPolicyV1, error)
    public AsPolicyV1(string name, AsPolicyV1Args args, CustomResourceOptions? opts = null)
    public AsPolicyV1(String name, AsPolicyV1Args args)
    public AsPolicyV1(String name, AsPolicyV1Args args, CustomResourceOptions options)
    
    type: flexibleengine:AsPolicyV1
    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 AsPolicyV1Args
    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 AsPolicyV1Args
    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 AsPolicyV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AsPolicyV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AsPolicyV1Args
    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 asPolicyV1Resource = new Flexibleengine.AsPolicyV1("asPolicyV1Resource", new()
    {
        ScalingGroupId = "string",
        ScalingPolicyName = "string",
        ScalingPolicyType = "string",
        AlarmId = "string",
        AsPolicyV1Id = "string",
        CoolDownTime = 0,
        Region = "string",
        ScalingPolicyAction = new Flexibleengine.Inputs.AsPolicyV1ScalingPolicyActionArgs
        {
            InstanceNumber = 0,
            Operation = "string",
        },
        ScheduledPolicy = new Flexibleengine.Inputs.AsPolicyV1ScheduledPolicyArgs
        {
            LaunchTime = "string",
            EndTime = "string",
            RecurrenceType = "string",
            RecurrenceValue = "string",
            StartTime = "string",
        },
    });
    
    example, err := flexibleengine.NewAsPolicyV1(ctx, "asPolicyV1Resource", &flexibleengine.AsPolicyV1Args{
    	ScalingGroupId:    pulumi.String("string"),
    	ScalingPolicyName: pulumi.String("string"),
    	ScalingPolicyType: pulumi.String("string"),
    	AlarmId:           pulumi.String("string"),
    	AsPolicyV1Id:      pulumi.String("string"),
    	CoolDownTime:      pulumi.Float64(0),
    	Region:            pulumi.String("string"),
    	ScalingPolicyAction: &flexibleengine.AsPolicyV1ScalingPolicyActionArgs{
    		InstanceNumber: pulumi.Float64(0),
    		Operation:      pulumi.String("string"),
    	},
    	ScheduledPolicy: &flexibleengine.AsPolicyV1ScheduledPolicyArgs{
    		LaunchTime:      pulumi.String("string"),
    		EndTime:         pulumi.String("string"),
    		RecurrenceType:  pulumi.String("string"),
    		RecurrenceValue: pulumi.String("string"),
    		StartTime:       pulumi.String("string"),
    	},
    })
    
    var asPolicyV1Resource = new AsPolicyV1("asPolicyV1Resource", AsPolicyV1Args.builder()
        .scalingGroupId("string")
        .scalingPolicyName("string")
        .scalingPolicyType("string")
        .alarmId("string")
        .asPolicyV1Id("string")
        .coolDownTime(0)
        .region("string")
        .scalingPolicyAction(AsPolicyV1ScalingPolicyActionArgs.builder()
            .instanceNumber(0)
            .operation("string")
            .build())
        .scheduledPolicy(AsPolicyV1ScheduledPolicyArgs.builder()
            .launchTime("string")
            .endTime("string")
            .recurrenceType("string")
            .recurrenceValue("string")
            .startTime("string")
            .build())
        .build());
    
    as_policy_v1_resource = flexibleengine.AsPolicyV1("asPolicyV1Resource",
        scaling_group_id="string",
        scaling_policy_name="string",
        scaling_policy_type="string",
        alarm_id="string",
        as_policy_v1_id="string",
        cool_down_time=0,
        region="string",
        scaling_policy_action={
            "instance_number": 0,
            "operation": "string",
        },
        scheduled_policy={
            "launch_time": "string",
            "end_time": "string",
            "recurrence_type": "string",
            "recurrence_value": "string",
            "start_time": "string",
        })
    
    const asPolicyV1Resource = new flexibleengine.AsPolicyV1("asPolicyV1Resource", {
        scalingGroupId: "string",
        scalingPolicyName: "string",
        scalingPolicyType: "string",
        alarmId: "string",
        asPolicyV1Id: "string",
        coolDownTime: 0,
        region: "string",
        scalingPolicyAction: {
            instanceNumber: 0,
            operation: "string",
        },
        scheduledPolicy: {
            launchTime: "string",
            endTime: "string",
            recurrenceType: "string",
            recurrenceValue: "string",
            startTime: "string",
        },
    });
    
    type: flexibleengine:AsPolicyV1
    properties:
        alarmId: string
        asPolicyV1Id: string
        coolDownTime: 0
        region: string
        scalingGroupId: string
        scalingPolicyAction:
            instanceNumber: 0
            operation: string
        scalingPolicyName: string
        scalingPolicyType: string
        scheduledPolicy:
            endTime: string
            launchTime: string
            recurrenceType: string
            recurrenceValue: string
            startTime: string
    

    AsPolicyV1 Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AsPolicyV1 resource accepts the following input properties:

    ScalingGroupId string
    The AS group ID. Changing this creates a new AS policy.
    ScalingPolicyName string
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    ScalingPolicyType string
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    AlarmId string
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    AsPolicyV1Id string
    CoolDownTime double
    The cooling duration (in seconds), and is 900 by default.
    Region string
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    ScalingPolicyAction AsPolicyV1ScalingPolicyAction
    The action of the AS policy. The scaling_policy_action structure is documented below.
    ScheduledPolicy AsPolicyV1ScheduledPolicy
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    ScalingGroupId string
    The AS group ID. Changing this creates a new AS policy.
    ScalingPolicyName string
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    ScalingPolicyType string
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    AlarmId string
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    AsPolicyV1Id string
    CoolDownTime float64
    The cooling duration (in seconds), and is 900 by default.
    Region string
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    ScalingPolicyAction AsPolicyV1ScalingPolicyActionArgs
    The action of the AS policy. The scaling_policy_action structure is documented below.
    ScheduledPolicy AsPolicyV1ScheduledPolicyArgs
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    scalingGroupId String
    The AS group ID. Changing this creates a new AS policy.
    scalingPolicyName String
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scalingPolicyType String
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    alarmId String
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    asPolicyV1Id String
    coolDownTime Double
    The cooling duration (in seconds), and is 900 by default.
    region String
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scalingPolicyAction AsPolicyV1ScalingPolicyAction
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scheduledPolicy AsPolicyV1ScheduledPolicy
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    scalingGroupId string
    The AS group ID. Changing this creates a new AS policy.
    scalingPolicyName string
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scalingPolicyType string
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    alarmId string
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    asPolicyV1Id string
    coolDownTime number
    The cooling duration (in seconds), and is 900 by default.
    region string
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scalingPolicyAction AsPolicyV1ScalingPolicyAction
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scheduledPolicy AsPolicyV1ScheduledPolicy
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    scaling_group_id str
    The AS group ID. Changing this creates a new AS policy.
    scaling_policy_name str
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scaling_policy_type str
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    alarm_id str
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    as_policy_v1_id str
    cool_down_time float
    The cooling duration (in seconds), and is 900 by default.
    region str
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scaling_policy_action AsPolicyV1ScalingPolicyActionArgs
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scheduled_policy AsPolicyV1ScheduledPolicyArgs
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    scalingGroupId String
    The AS group ID. Changing this creates a new AS policy.
    scalingPolicyName String
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scalingPolicyType String
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    alarmId String
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    asPolicyV1Id String
    coolDownTime Number
    The cooling duration (in seconds), and is 900 by default.
    region String
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scalingPolicyAction Property Map
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scheduledPolicy Property Map
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AsPolicyV1 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AsPolicyV1 Resource

    Get an existing AsPolicyV1 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?: AsPolicyV1State, opts?: CustomResourceOptions): AsPolicyV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alarm_id: Optional[str] = None,
            as_policy_v1_id: Optional[str] = None,
            cool_down_time: Optional[float] = None,
            region: Optional[str] = None,
            scaling_group_id: Optional[str] = None,
            scaling_policy_action: Optional[AsPolicyV1ScalingPolicyActionArgs] = None,
            scaling_policy_name: Optional[str] = None,
            scaling_policy_type: Optional[str] = None,
            scheduled_policy: Optional[AsPolicyV1ScheduledPolicyArgs] = None) -> AsPolicyV1
    func GetAsPolicyV1(ctx *Context, name string, id IDInput, state *AsPolicyV1State, opts ...ResourceOption) (*AsPolicyV1, error)
    public static AsPolicyV1 Get(string name, Input<string> id, AsPolicyV1State? state, CustomResourceOptions? opts = null)
    public static AsPolicyV1 get(String name, Output<String> id, AsPolicyV1State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:AsPolicyV1    get:      id: ${id}
    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:
    AlarmId string
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    AsPolicyV1Id string
    CoolDownTime double
    The cooling duration (in seconds), and is 900 by default.
    Region string
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    ScalingGroupId string
    The AS group ID. Changing this creates a new AS policy.
    ScalingPolicyAction AsPolicyV1ScalingPolicyAction
    The action of the AS policy. The scaling_policy_action structure is documented below.
    ScalingPolicyName string
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    ScalingPolicyType string
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    ScheduledPolicy AsPolicyV1ScheduledPolicy
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    AlarmId string
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    AsPolicyV1Id string
    CoolDownTime float64
    The cooling duration (in seconds), and is 900 by default.
    Region string
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    ScalingGroupId string
    The AS group ID. Changing this creates a new AS policy.
    ScalingPolicyAction AsPolicyV1ScalingPolicyActionArgs
    The action of the AS policy. The scaling_policy_action structure is documented below.
    ScalingPolicyName string
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    ScalingPolicyType string
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    ScheduledPolicy AsPolicyV1ScheduledPolicyArgs
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    alarmId String
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    asPolicyV1Id String
    coolDownTime Double
    The cooling duration (in seconds), and is 900 by default.
    region String
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scalingGroupId String
    The AS group ID. Changing this creates a new AS policy.
    scalingPolicyAction AsPolicyV1ScalingPolicyAction
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scalingPolicyName String
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scalingPolicyType String
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    scheduledPolicy AsPolicyV1ScheduledPolicy
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    alarmId string
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    asPolicyV1Id string
    coolDownTime number
    The cooling duration (in seconds), and is 900 by default.
    region string
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scalingGroupId string
    The AS group ID. Changing this creates a new AS policy.
    scalingPolicyAction AsPolicyV1ScalingPolicyAction
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scalingPolicyName string
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scalingPolicyType string
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    scheduledPolicy AsPolicyV1ScheduledPolicy
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    alarm_id str
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    as_policy_v1_id str
    cool_down_time float
    The cooling duration (in seconds), and is 900 by default.
    region str
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scaling_group_id str
    The AS group ID. Changing this creates a new AS policy.
    scaling_policy_action AsPolicyV1ScalingPolicyActionArgs
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scaling_policy_name str
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scaling_policy_type str
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    scheduled_policy AsPolicyV1ScheduledPolicyArgs
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.
    alarmId String
    The alarm rule ID. This argument is mandatory when scaling_policy_type is set to ALARM.
    asPolicyV1Id String
    coolDownTime Number
    The cooling duration (in seconds), and is 900 by default.
    region String
    The region in which to create the AS policy. If omitted, the region argument of the provider is used. Changing this creates a new AS policy.
    scalingGroupId String
    The AS group ID. Changing this creates a new AS policy.
    scalingPolicyAction Property Map
    The action of the AS policy. The scaling_policy_action structure is documented below.
    scalingPolicyName String
    The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
    scalingPolicyType String
    The AS policy type. The values can be ALARM, SCHEDULED, and RECURRENCE.
    scheduledPolicy Property Map
    The periodic or scheduled AS policy. This argument is mandatory when scaling_policy_type is set to SCHEDULED or RECURRENCE. The scheduled_policy structure is documented below.

    Supporting Types

    AsPolicyV1ScalingPolicyAction, AsPolicyV1ScalingPolicyActionArgs

    InstanceNumber double
    The number of instances to be operated. The default number is 1.
    Operation string
    The operation to be performed. The options include ADD (default), REMOVE, and SET.
    InstanceNumber float64
    The number of instances to be operated. The default number is 1.
    Operation string
    The operation to be performed. The options include ADD (default), REMOVE, and SET.
    instanceNumber Double
    The number of instances to be operated. The default number is 1.
    operation String
    The operation to be performed. The options include ADD (default), REMOVE, and SET.
    instanceNumber number
    The number of instances to be operated. The default number is 1.
    operation string
    The operation to be performed. The options include ADD (default), REMOVE, and SET.
    instance_number float
    The number of instances to be operated. The default number is 1.
    operation str
    The operation to be performed. The options include ADD (default), REMOVE, and SET.
    instanceNumber Number
    The number of instances to be operated. The default number is 1.
    operation String
    The operation to be performed. The options include ADD (default), REMOVE, and SET.

    AsPolicyV1ScheduledPolicy, AsPolicyV1ScheduledPolicyArgs

    LaunchTime string
    The time when the scaling action is triggered. If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ. If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.
    EndTime string
    The end time of the scaling action triggered periodically. The time format complies with UTC. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
    RecurrenceType string
    The periodic triggering type. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The options include Daily, Weekly, and Monthly.
    RecurrenceValue string
    The frequency at which scaling actions are triggered.
    StartTime string
    The start time of the scaling action triggered periodically. The time format complies with UTC. The current time is used by default. The time format is YYYY-MM-DDThh:mmZ.
    LaunchTime string
    The time when the scaling action is triggered. If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ. If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.
    EndTime string
    The end time of the scaling action triggered periodically. The time format complies with UTC. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
    RecurrenceType string
    The periodic triggering type. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The options include Daily, Weekly, and Monthly.
    RecurrenceValue string
    The frequency at which scaling actions are triggered.
    StartTime string
    The start time of the scaling action triggered periodically. The time format complies with UTC. The current time is used by default. The time format is YYYY-MM-DDThh:mmZ.
    launchTime String
    The time when the scaling action is triggered. If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ. If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.
    endTime String
    The end time of the scaling action triggered periodically. The time format complies with UTC. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
    recurrenceType String
    The periodic triggering type. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The options include Daily, Weekly, and Monthly.
    recurrenceValue String
    The frequency at which scaling actions are triggered.
    startTime String
    The start time of the scaling action triggered periodically. The time format complies with UTC. The current time is used by default. The time format is YYYY-MM-DDThh:mmZ.
    launchTime string
    The time when the scaling action is triggered. If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ. If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.
    endTime string
    The end time of the scaling action triggered periodically. The time format complies with UTC. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
    recurrenceType string
    The periodic triggering type. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The options include Daily, Weekly, and Monthly.
    recurrenceValue string
    The frequency at which scaling actions are triggered.
    startTime string
    The start time of the scaling action triggered periodically. The time format complies with UTC. The current time is used by default. The time format is YYYY-MM-DDThh:mmZ.
    launch_time str
    The time when the scaling action is triggered. If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ. If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.
    end_time str
    The end time of the scaling action triggered periodically. The time format complies with UTC. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
    recurrence_type str
    The periodic triggering type. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The options include Daily, Weekly, and Monthly.
    recurrence_value str
    The frequency at which scaling actions are triggered.
    start_time str
    The start time of the scaling action triggered periodically. The time format complies with UTC. The current time is used by default. The time format is YYYY-MM-DDThh:mmZ.
    launchTime String
    The time when the scaling action is triggered. If scaling_policy_type is set to SCHEDULED, the time format is YYYY-MM-DDThh:mmZ. If scaling_policy_type is set to RECURRENCE, the time format is hh:mm.
    endTime String
    The end time of the scaling action triggered periodically. The time format complies with UTC. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
    recurrenceType String
    The periodic triggering type. This argument is mandatory when scaling_policy_type is set to RECURRENCE. The options include Daily, Weekly, and Monthly.
    recurrenceValue String
    The frequency at which scaling actions are triggered.
    startTime String
    The start time of the scaling action triggered periodically. The time format complies with UTC. The current time is used by default. The time format is YYYY-MM-DDThh:mmZ.

    Import

    Auto Scaling policy can be imported using the id, e.g.

    $ pulumi import flexibleengine:index/asPolicyV1:AsPolicyV1 hth_aspolicy 5f3b5f5e-1b5f-4b5a-8f32-53dcb9d9053a
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud