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_time
of theSCHEDULED
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",
});
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)
.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 = 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:
- Scaling
Group stringId - The AS group ID. Changing this creates a new AS policy.
- Scaling
Policy stringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- Scaling
Policy stringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - Alarm
Id string - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - As
Policy stringV1Id - Cool
Down doubleTime - The cooling duration (in seconds), and is 900 by default.
- Region string
- Scaling
Policy AsAction Policy V1Scaling Policy Action - The action of the AS policy. The scaling_policy_action structure is documented below.
- Scheduled
Policy AsPolicy V1Scheduled Policy - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- Scaling
Group stringId - The AS group ID. Changing this creates a new AS policy.
- Scaling
Policy stringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- Scaling
Policy stringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - Alarm
Id string - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - As
Policy stringV1Id - Cool
Down float64Time - The cooling duration (in seconds), and is 900 by default.
- Region string
- 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_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- scaling
Group StringId - The AS group ID. Changing this creates a new AS policy.
- scaling
Policy StringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling
Policy StringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - alarm
Id String - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - as
Policy StringV1Id - cool
Down DoubleTime - The cooling duration (in seconds), and is 900 by default.
- region String
- scaling
Policy AsAction Policy V1Scaling Policy Action - The action of the AS policy. The scaling_policy_action structure is documented below.
- scheduled
Policy AsPolicy V1Scheduled Policy - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- scaling
Group stringId - The AS group ID. Changing this creates a new AS policy.
- scaling
Policy stringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling
Policy stringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - alarm
Id string - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - as
Policy stringV1Id - cool
Down numberTime - The cooling duration (in seconds), and is 900 by default.
- region string
- scaling
Policy AsAction Policy V1Scaling Policy Action - The action of the AS policy. The scaling_policy_action structure is documented below.
- scheduled
Policy AsPolicy V1Scheduled Policy - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. 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_type
is 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_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- scaling
Group StringId - The AS group ID. Changing this creates a new AS policy.
- scaling
Policy StringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling
Policy StringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - alarm
Id String - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - as
Policy StringV1Id - cool
Down NumberTime - The cooling duration (in seconds), and is 900 by default.
- region String
- scaling
Policy Property MapAction - The action of the AS policy. The scaling_policy_action structure is documented below.
- scheduled
Policy Property Map - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. 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
- 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.
- Alarm
Id string - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - As
Policy stringV1Id - Cool
Down doubleTime - The cooling duration (in seconds), and is 900 by default.
- Region string
- Scaling
Group stringId - The AS group ID. Changing this creates a new AS policy.
- Scaling
Policy AsAction Policy V1Scaling Policy Action - The action of the AS policy. The scaling_policy_action structure is documented below.
- Scaling
Policy stringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- Scaling
Policy stringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - Scheduled
Policy AsPolicy V1Scheduled Policy - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- Alarm
Id string - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - As
Policy stringV1Id - Cool
Down float64Time - The cooling duration (in seconds), and is 900 by default.
- Region string
- Scaling
Group stringId - 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 stringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- Scaling
Policy stringType - 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_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- alarm
Id String - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - as
Policy StringV1Id - cool
Down DoubleTime - The cooling duration (in seconds), and is 900 by default.
- region String
- scaling
Group StringId - The AS group ID. Changing this creates a new AS policy.
- scaling
Policy AsAction Policy V1Scaling Policy Action - The action of the AS policy. The scaling_policy_action structure is documented below.
- scaling
Policy StringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling
Policy StringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - scheduled
Policy AsPolicy V1Scheduled Policy - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- alarm
Id string - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - as
Policy stringV1Id - cool
Down numberTime - The cooling duration (in seconds), and is 900 by default.
- region string
- scaling
Group stringId - The AS group ID. Changing this creates a new AS policy.
- scaling
Policy AsAction Policy V1Scaling Policy Action - The action of the AS policy. The scaling_policy_action structure is documented below.
- scaling
Policy stringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling
Policy stringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - scheduled
Policy AsPolicy V1Scheduled Policy - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- alarm_
id str - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is 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_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
- alarm
Id String - The alarm rule ID. This argument is mandatory
when
scaling_policy_type
is set toALARM
. - as
Policy StringV1Id - cool
Down NumberTime - The cooling duration (in seconds), and is 900 by default.
- region String
- scaling
Group StringId - The AS group ID. Changing this creates a new AS policy.
- scaling
Policy Property MapAction - The action of the AS policy. The scaling_policy_action structure is documented below.
- scaling
Policy StringName - The name of the AS policy. The name can contain letters, digits, underscores(_), and hyphens(-),and cannot exceed 64 characters.
- scaling
Policy StringType - The AS policy type. The values can be
ALARM
,SCHEDULED
, andRECURRENCE
. - scheduled
Policy Property Map - The periodic or scheduled AS policy. This argument is mandatory
when
scaling_policy_type
is set toSCHEDULED
orRECURRENCE
. The scheduled_policy structure is documented below.
Supporting Types
AsPolicyV1ScalingPolicyAction, AsPolicyV1ScalingPolicyActionArgs
- Instance
Number 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
.
- Instance
Number 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
.
- instance
Number 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
.
- instance
Number 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
.
- instance
Number 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
- Launch
Time string - The time when the scaling action is triggered. If
scaling_policy_type
is set toSCHEDULED
, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_type
is set toRECURRENCE
, the time format is hh:mm. - End
Time 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 toRECURRENCE
. The time format is YYYY-MM-DDThh:mmZ. - Recurrence
Type string - The periodic triggering type. This argument is mandatory when
scaling_policy_type
is set toRECURRENCE
. The options includeDaily
,Weekly
, andMonthly
. - Recurrence
Value string - The frequency at which scaling actions are triggered.
- Start
Time 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 string - The time when the scaling action is triggered. If
scaling_policy_type
is set toSCHEDULED
, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_type
is set toRECURRENCE
, the time format is hh:mm. - End
Time 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 toRECURRENCE
. The time format is YYYY-MM-DDThh:mmZ. - Recurrence
Type string - The periodic triggering type. This argument is mandatory when
scaling_policy_type
is set toRECURRENCE
. The options includeDaily
,Weekly
, andMonthly
. - Recurrence
Value string - The frequency at which scaling actions are triggered.
- Start
Time 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 String - The time when the scaling action is triggered. If
scaling_policy_type
is set toSCHEDULED
, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_type
is set toRECURRENCE
, the time format is hh:mm. - end
Time 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 toRECURRENCE
. The time format is YYYY-MM-DDThh:mmZ. - recurrence
Type String - The periodic triggering type. This argument is mandatory when
scaling_policy_type
is set toRECURRENCE
. The options includeDaily
,Weekly
, andMonthly
. - recurrence
Value String - The frequency at which scaling actions are triggered.
- start
Time 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 string - The time when the scaling action is triggered. If
scaling_policy_type
is set toSCHEDULED
, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_type
is set toRECURRENCE
, the time format is hh:mm. - end
Time 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 toRECURRENCE
. The time format is YYYY-MM-DDThh:mmZ. - recurrence
Type string - The periodic triggering type. This argument is mandatory when
scaling_policy_type
is set toRECURRENCE
. The options includeDaily
,Weekly
, andMonthly
. - recurrence
Value string - The frequency at which scaling actions are triggered.
- start
Time 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 toSCHEDULED
, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_type
is 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_type
is set toRECURRENCE
. 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 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.
- launch
Time String - The time when the scaling action is triggered. If
scaling_policy_type
is set toSCHEDULED
, the time format is YYYY-MM-DDThh:mmZ. Ifscaling_policy_type
is set toRECURRENCE
, the time format is hh:mm. - end
Time 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 toRECURRENCE
. The time format is YYYY-MM-DDThh:mmZ. - recurrence
Type String - The periodic triggering type. This argument is mandatory when
scaling_policy_type
is set toRECURRENCE
. The options includeDaily
,Weekly
, andMonthly
. - recurrence
Value String - The frequency at which scaling actions are triggered.
- start
Time 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.