opentelekomcloud.AsPolicyV1
Explore with Pulumi AI
Up-to-date reference of API arguments for AS policy you can get at documentation portal
Manages a V1 AS Policy resource within OpenTelekomCloud.
Example Usage
AS Recurrence Policy
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const hthAspolicy = new opentelekomcloud.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_opentelekomcloud as opentelekomcloud
hth_aspolicy = opentelekomcloud.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/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.NewAsPolicyV1(ctx, "hthAspolicy", &opentelekomcloud.AsPolicyV1Args{
			CoolDownTime:   pulumi.Float64(900),
			ScalingGroupId: pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
			ScalingPolicyAction: &opentelekomcloud.AsPolicyV1ScalingPolicyActionArgs{
				InstanceNumber: pulumi.Float64(1),
				Operation:      pulumi.String("ADD"),
			},
			ScalingPolicyName: pulumi.String("hth_aspolicy"),
			ScalingPolicyType: pulumi.String("RECURRENCE"),
			ScheduledPolicy: &opentelekomcloud.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 Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var hthAspolicy = new Opentelekomcloud.AsPolicyV1("hthAspolicy", new()
    {
        CoolDownTime = 900,
        ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        ScalingPolicyAction = new Opentelekomcloud.Inputs.AsPolicyV1ScalingPolicyActionArgs
        {
            InstanceNumber = 1,
            Operation = "ADD",
        },
        ScalingPolicyName = "hth_aspolicy",
        ScalingPolicyType = "RECURRENCE",
        ScheduledPolicy = new Opentelekomcloud.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.opentelekomcloud.AsPolicyV1;
import com.pulumi.opentelekomcloud.AsPolicyV1Args;
import com.pulumi.opentelekomcloud.inputs.AsPolicyV1ScalingPolicyActionArgs;
import com.pulumi.opentelekomcloud.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: opentelekomcloud: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 opentelekomcloud from "@pulumi/opentelekomcloud";
const hthAspolicy1 = new opentelekomcloud.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_opentelekomcloud as opentelekomcloud
hth_aspolicy1 = opentelekomcloud.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/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.NewAsPolicyV1(ctx, "hthAspolicy1", &opentelekomcloud.AsPolicyV1Args{
			CoolDownTime:   pulumi.Float64(900),
			ScalingGroupId: pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
			ScalingPolicyAction: &opentelekomcloud.AsPolicyV1ScalingPolicyActionArgs{
				InstanceNumber: pulumi.Float64(1),
				Operation:      pulumi.String("REMOVE"),
			},
			ScalingPolicyName: pulumi.String("hth_aspolicy_1"),
			ScalingPolicyType: pulumi.String("SCHEDULED"),
			ScheduledPolicy: &opentelekomcloud.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 Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var hthAspolicy1 = new Opentelekomcloud.AsPolicyV1("hthAspolicy1", new()
    {
        CoolDownTime = 900,
        ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        ScalingPolicyAction = new Opentelekomcloud.Inputs.AsPolicyV1ScalingPolicyActionArgs
        {
            InstanceNumber = 1,
            Operation = "REMOVE",
        },
        ScalingPolicyName = "hth_aspolicy_1",
        ScalingPolicyType = "SCHEDULED",
        ScheduledPolicy = new Opentelekomcloud.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.opentelekomcloud.AsPolicyV1;
import com.pulumi.opentelekomcloud.AsPolicyV1Args;
import com.pulumi.opentelekomcloud.inputs.AsPolicyV1ScalingPolicyActionArgs;
import com.pulumi.opentelekomcloud.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: opentelekomcloud: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
Note: The
launch_timeof theSCHEDULEDpolicy cannot be earlier than the current time.
AS Alarm Policy
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const hthAspolicy2 = new opentelekomcloud.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_opentelekomcloud as opentelekomcloud
hth_aspolicy2 = opentelekomcloud.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/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.NewAsPolicyV1(ctx, "hthAspolicy2", &opentelekomcloud.AsPolicyV1Args{
			AlarmId:        pulumi.String("37e310f5-db9d-446e-9135-c625f9c2bbfc"),
			CoolDownTime:   pulumi.Float64(900),
			ScalingGroupId: pulumi.String("4579f2f5-cbe8-425a-8f32-53dcb9d9053a"),
			ScalingPolicyAction: &opentelekomcloud.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 Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var hthAspolicy2 = new Opentelekomcloud.AsPolicyV1("hthAspolicy2", new()
    {
        AlarmId = "37e310f5-db9d-446e-9135-c625f9c2bbfc",
        CoolDownTime = 900,
        ScalingGroupId = "4579f2f5-cbe8-425a-8f32-53dcb9d9053a",
        ScalingPolicyAction = new Opentelekomcloud.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.opentelekomcloud.AsPolicyV1;
import com.pulumi.opentelekomcloud.AsPolicyV1Args;
import com.pulumi.opentelekomcloud.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: opentelekomcloud: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: opentelekomcloud: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 Opentelekomcloud.AsPolicyV1("asPolicyV1Resource", new()
{
    ScalingGroupId = "string",
    ScalingPolicyName = "string",
    ScalingPolicyType = "string",
    AlarmId = "string",
    AsPolicyV1Id = "string",
    CoolDownTime = 0,
    Region = "string",
    ScalingPolicyAction = new Opentelekomcloud.Inputs.AsPolicyV1ScalingPolicyActionArgs
    {
        InstanceNumber = 0,
        Operation = "string",
    },
    ScheduledPolicy = new Opentelekomcloud.Inputs.AsPolicyV1ScheduledPolicyArgs
    {
        LaunchTime = "string",
        EndTime = "string",
        RecurrenceType = "string",
        RecurrenceValue = "string",
        StartTime = "string",
    },
});
example, err := opentelekomcloud.NewAsPolicyV1(ctx, "asPolicyV1Resource", &opentelekomcloud.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: &opentelekomcloud.AsPolicyV1ScalingPolicyActionArgs{
		InstanceNumber: pulumi.Float64(0),
		Operation:      pulumi.String("string"),
	},
	ScheduledPolicy: &opentelekomcloud.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.0)
    .region("string")
    .scalingPolicyAction(AsPolicyV1ScalingPolicyActionArgs.builder()
        .instanceNumber(0.0)
        .operation("string")
        .build())
    .scheduledPolicy(AsPolicyV1ScheduledPolicyArgs.builder()
        .launchTime("string")
        .endTime("string")
        .recurrenceType("string")
        .recurrenceValue("string")
        .startTime("string")
        .build())
    .build());
as_policy_v1_resource = opentelekomcloud.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 opentelekomcloud.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: opentelekomcloud: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:
- ScalingGroup stringId 
- The AS group ID. Changing this creates a new AS policy.
- ScalingPolicy stringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- ScalingPolicy stringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- AlarmId string
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- AsPolicy stringV1Id 
- CoolDown doubleTime 
- The cooling duration (in seconds), and is 900 by default.
- Region string
- ScalingPolicy AsAction Policy V1Scaling Policy Action 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- ScheduledPolicy AsPolicy V1Scheduled Policy 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- ScalingGroup stringId 
- The AS group ID. Changing this creates a new AS policy.
- ScalingPolicy stringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- ScalingPolicy stringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- AlarmId string
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- AsPolicy stringV1Id 
- CoolDown float64Time 
- The cooling duration (in seconds), and is 900 by default.
- Region string
- ScalingPolicy AsAction Policy V1Scaling Policy Action Args 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- ScheduledPolicy AsPolicy V1Scheduled Policy Args 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- scalingGroup StringId 
- The AS group ID. Changing this creates a new AS policy.
- scalingPolicy StringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scalingPolicy StringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- alarmId String
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- asPolicy StringV1Id 
- coolDown DoubleTime 
- The cooling duration (in seconds), and is 900 by default.
- region String
- scalingPolicy AsAction Policy V1Scaling Policy Action 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scheduledPolicy AsPolicy V1Scheduled Policy 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- scalingGroup stringId 
- The AS group ID. Changing this creates a new AS policy.
- scalingPolicy stringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scalingPolicy stringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- alarmId string
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- asPolicy stringV1Id 
- coolDown numberTime 
- The cooling duration (in seconds), and is 900 by default.
- region string
- scalingPolicy AsAction Policy V1Scaling Policy Action 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scheduledPolicy AsPolicy V1Scheduled Policy 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- scaling_group_ strid 
- The AS group ID. Changing this creates a new AS policy.
- scaling_policy_ strname 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling_policy_ strtype 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- alarm_id str
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- as_policy_ strv1_ id 
- cool_down_ floattime 
- The cooling duration (in seconds), and is 900 by default.
- region str
- scaling_policy_ Asaction Policy V1Scaling Policy Action Args 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scheduled_policy AsPolicy V1Scheduled Policy Args 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- scalingGroup StringId 
- The AS group ID. Changing this creates a new AS policy.
- scalingPolicy StringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scalingPolicy StringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- alarmId String
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- asPolicy StringV1Id 
- coolDown NumberTime 
- The cooling duration (in seconds), and is 900 by default.
- region String
- scalingPolicy Property MapAction 
- 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_typeis set toSCHEDULEDorRECURRENCE. 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) -> AsPolicyV1func 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: opentelekomcloud: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.
- AlarmId string
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- AsPolicy stringV1Id 
- CoolDown doubleTime 
- The cooling duration (in seconds), and is 900 by default.
- Region string
- ScalingGroup stringId 
- The AS group ID. Changing this creates a new AS policy.
- ScalingPolicy AsAction Policy V1Scaling Policy Action 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- ScalingPolicy stringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- ScalingPolicy stringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- ScheduledPolicy AsPolicy V1Scheduled Policy 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- AlarmId string
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- AsPolicy stringV1Id 
- CoolDown float64Time 
- The cooling duration (in seconds), and is 900 by default.
- Region string
- ScalingGroup stringId 
- The AS group ID. Changing this creates a new AS policy.
- ScalingPolicy AsAction Policy V1Scaling Policy Action Args 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- ScalingPolicy stringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- ScalingPolicy stringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- ScheduledPolicy AsPolicy V1Scheduled Policy Args 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- alarmId String
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- asPolicy StringV1Id 
- coolDown DoubleTime 
- The cooling duration (in seconds), and is 900 by default.
- region String
- scalingGroup StringId 
- The AS group ID. Changing this creates a new AS policy.
- scalingPolicy AsAction Policy V1Scaling Policy Action 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scalingPolicy StringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scalingPolicy StringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- scheduledPolicy AsPolicy V1Scheduled Policy 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- alarmId string
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- asPolicy stringV1Id 
- coolDown numberTime 
- The cooling duration (in seconds), and is 900 by default.
- region string
- scalingGroup stringId 
- The AS group ID. Changing this creates a new AS policy.
- scalingPolicy AsAction Policy V1Scaling Policy Action 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scalingPolicy stringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scalingPolicy stringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- scheduledPolicy AsPolicy V1Scheduled Policy 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- alarm_id str
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- as_policy_ strv1_ id 
- cool_down_ floattime 
- The cooling duration (in seconds), and is 900 by default.
- region str
- scaling_group_ strid 
- The AS group ID. Changing this creates a new AS policy.
- scaling_policy_ Asaction Policy V1Scaling Policy Action Args 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scaling_policy_ strname 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling_policy_ strtype 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- scheduled_policy AsPolicy V1Scheduled Policy Args 
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. The scheduled_policy structure is documented below.
- alarmId String
- The alarm rule ID. This argument is mandatory
when scaling_policy_typeis set toALARM.
- asPolicy StringV1Id 
- coolDown NumberTime 
- The cooling duration (in seconds), and is 900 by default.
- region String
- scalingGroup StringId 
- The AS group ID. Changing this creates a new AS policy.
- scalingPolicy Property MapAction 
- The action of the AS policy. The scaling_policy_action structure is documented below.
- scalingPolicy StringName 
- The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scalingPolicy StringType 
- The AS policy type. The values can be ALARM,SCHEDULED, andRECURRENCE.
- scheduledPolicy Property Map
- The periodic or scheduled AS policy. This argument is mandatory
when scaling_policy_typeis set toSCHEDULEDorRECURRENCE. 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, andSET.
- 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, andSET.
- 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, andSET.
- 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, andSET.
- 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, andSET.
- 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, andSET.
AsPolicyV1ScheduledPolicy, AsPolicyV1ScheduledPolicyArgs        
- LaunchTime string
- The time when the scaling action is triggered. If scaling_policy_typeis set toSCHEDULED, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_typeis set toRECURRENCE, 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_typeis set toRECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
- RecurrenceType string
- The periodic triggering type. This argument is mandatory when
scaling_policy_typeis set toRECURRENCE. The options includeDaily,Weekly, andMonthly.
- 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_typeis set toSCHEDULED, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_typeis set toRECURRENCE, 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_typeis set toRECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
- RecurrenceType string
- The periodic triggering type. This argument is mandatory when
scaling_policy_typeis set toRECURRENCE. The options includeDaily,Weekly, andMonthly.
- 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_typeis set toSCHEDULED, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_typeis set toRECURRENCE, 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_typeis set toRECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
- recurrenceType String
- The periodic triggering type. This argument is mandatory when
scaling_policy_typeis set toRECURRENCE. The options includeDaily,Weekly, andMonthly.
- 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_typeis set toSCHEDULED, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_typeis set toRECURRENCE, 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_typeis set toRECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
- recurrenceType string
- The periodic triggering type. This argument is mandatory when
scaling_policy_typeis set toRECURRENCE. The options includeDaily,Weekly, andMonthly.
- 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_typeis set toSCHEDULED, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_typeis set toRECURRENCE, 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_typeis set toRECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
- recurrence_type str
- The periodic triggering type. This argument is mandatory when
scaling_policy_typeis set toRECURRENCE. The options includeDaily,Weekly, andMonthly.
- 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_typeis set toSCHEDULED, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_typeis set toRECURRENCE, 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_typeis set toRECURRENCE. The time format is YYYY-MM-DDThh:mmZ.
- recurrenceType String
- The periodic triggering type. This argument is mandatory when
scaling_policy_typeis set toRECURRENCE. The options includeDaily,Weekly, andMonthly.
- 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.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the opentelekomcloudTerraform Provider.