1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. AsPolicyV1
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

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",
    },
});
Copy
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",
    })
Copy
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
	})
}
Copy
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",
        },
    });

});
Copy
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());

    }
}
Copy
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
Copy

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",
    },
});
Copy
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",
    })
Copy
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
	})
}
Copy
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",
        },
    });

});
Copy
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());

    }
}
Copy
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
Copy

Note: 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 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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. AsPolicyV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AsPolicyV1Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AsPolicyV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
    },
});
Copy
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: &.AsPolicyV1ScalingPolicyActionArgs{
InstanceNumber: pulumi.Float64(0),
Operation: pulumi.String("string"),
},
ScheduledPolicy: &.AsPolicyV1ScheduledPolicyArgs{
LaunchTime: pulumi.String("string"),
EndTime: pulumi.String("string"),
RecurrenceType: pulumi.String("string"),
RecurrenceValue: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
})
Copy
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());
Copy
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",
    })
Copy
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",
    },
});
Copy
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
Copy

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 This property is required. string
The AS group ID. Changing this creates a new AS policy.
ScalingPolicyName This property is required. string
The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
ScalingPolicyType This property is required. 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
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 This property is required. string
The AS group ID. Changing this creates a new AS policy.
ScalingPolicyName This property is required. string
The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
ScalingPolicyType This property is required. 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
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 This property is required. String
The AS group ID. Changing this creates a new AS policy.
scalingPolicyName This property is required. String
The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
scalingPolicyType This property is required. 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
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 This property is required. string
The AS group ID. Changing this creates a new AS policy.
scalingPolicyName This property is required. string
The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
scalingPolicyType This property is required. 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
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 This property is required. str
The AS group ID. Changing this creates a new AS policy.
scaling_policy_name This property is required. str
The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
scaling_policy_type This property is required. 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
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 This property is required. String
The AS group ID. Changing this creates a new AS policy.
scalingPolicyName This property is required. String
The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
scalingPolicyType This property is required. 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
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: opentelekomcloud:AsPolicyV1    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
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
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
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
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
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
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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.