alicloud.cms.Alarm
Explore with Pulumi AI
Provides a Cloud Monitor Service Alarm resource.
For information about Cloud Monitor Service Alarm and how to use it, see What is Alarm.
NOTE: Available since v1.9.1.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const default = alicloud.getZones({
availableDiskCategory: "cloud_efficiency",
availableResourceCreation: "VSwitch",
});
const defaultGetImages = alicloud.ecs.getImages({
mostRecent: true,
owners: "system",
});
const defaultGetInstanceTypes = Promise.all([_default, defaultGetImages]).then(([_default, defaultGetImages]) => alicloud.ecs.getInstanceTypes({
availabilityZone: _default.zones?.[0]?.id,
imageId: defaultGetImages.images?.[0]?.id,
}));
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
cidrBlock: "10.4.0.0/24",
vpcId: defaultNetwork.id,
zoneId: _default.then(_default => _default.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.ecs.Instance("default", {
availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
instanceName: name,
imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
securityGroups: [defaultSecurityGroup.id],
vswitchId: defaultSwitch.id,
});
const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("default", {alarmContactGroupName: name});
const defaultAlarm = new alicloud.cms.Alarm("default", {
name: name,
project: "acs_ecs_dashboard",
metric: "disk_writebytes",
period: 900,
contactGroups: [defaultAlarmContactGroup.alarmContactGroupName],
effectiveInterval: "06:00-20:00",
metricDimensions: pulumi.interpolate` [
{
"instanceId": "${defaultInstance.id}",
"device": "/dev/vda1"
}
]
`,
escalationsCritical: {
statistics: "Average",
comparisonOperator: "<=",
threshold: "35",
times: 2,
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
available_resource_creation="VSwitch")
default_get_images = alicloud.ecs.get_images(most_recent=True,
owners="system")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
image_id=default_get_images.images[0].id)
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="10.4.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
cidr_block="10.4.0.0/24",
vpc_id=default_network.id,
zone_id=default.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
vpc_id=default_network.id)
default_instance = alicloud.ecs.Instance("default",
availability_zone=default.zones[0].id,
instance_name=name,
image_id=default_get_images.images[0].id,
instance_type=default_get_instance_types.instance_types[0].id,
security_groups=[default_security_group.id],
vswitch_id=default_switch.id)
default_alarm_contact_group = alicloud.cms.AlarmContactGroup("default", alarm_contact_group_name=name)
default_alarm = alicloud.cms.Alarm("default",
name=name,
project="acs_ecs_dashboard",
metric="disk_writebytes",
period=900,
contact_groups=[default_alarm_contact_group.alarm_contact_group_name],
effective_interval="06:00-20:00",
metric_dimensions=default_instance.id.apply(lambda id: f""" [
{{
"instanceId": "{id}",
"device": "/dev/vda1"
}}
]
"""),
escalations_critical={
"statistics": "Average",
"comparison_operator": "<=",
"threshold": "35",
"times": 2,
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
MostRecent: pulumi.BoolRef(true),
Owners: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
ImageId: pulumi.StringRef(defaultGetImages.Images[0].Id),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/24"),
VpcId: defaultNetwork.ID(),
ZoneId: pulumi.String(_default.Zones[0].Id),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
AvailabilityZone: pulumi.String(_default.Zones[0].Id),
InstanceName: pulumi.String(name),
ImageId: pulumi.String(defaultGetImages.Images[0].Id),
InstanceType: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
SecurityGroups: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
VswitchId: defaultSwitch.ID(),
})
if err != nil {
return err
}
defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "default", &cms.AlarmContactGroupArgs{
AlarmContactGroupName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = cms.NewAlarm(ctx, "default", &cms.AlarmArgs{
Name: pulumi.String(name),
Project: pulumi.String("acs_ecs_dashboard"),
Metric: pulumi.String("disk_writebytes"),
Period: pulumi.Int(900),
ContactGroups: pulumi.StringArray{
defaultAlarmContactGroup.AlarmContactGroupName,
},
EffectiveInterval: pulumi.String("06:00-20:00"),
MetricDimensions: defaultInstance.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf(` [
{
"instanceId": "%v",
"device": "/dev/vda1"
}
]
`, id), nil
}).(pulumi.StringOutput),
EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
Statistics: pulumi.String("Average"),
ComparisonOperator: pulumi.String("<="),
Threshold: pulumi.String("35"),
Times: pulumi.Int(2),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableDiskCategory = "cloud_efficiency",
AvailableResourceCreation = "VSwitch",
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
MostRecent = true,
Owners = "system",
});
var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
CidrBlock = "10.4.0.0/24",
VpcId = defaultNetwork.Id,
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Ecs.Instance("default", new()
{
AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
InstanceName = name,
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
SecurityGroups = new[]
{
defaultSecurityGroup.Id,
},
VswitchId = defaultSwitch.Id,
});
var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("default", new()
{
AlarmContactGroupName = name,
});
var defaultAlarm = new AliCloud.Cms.Alarm("default", new()
{
Name = name,
Project = "acs_ecs_dashboard",
Metric = "disk_writebytes",
Period = 900,
ContactGroups = new[]
{
defaultAlarmContactGroup.AlarmContactGroupName,
},
EffectiveInterval = "06:00-20:00",
MetricDimensions = defaultInstance.Id.Apply(id => @$" [
{{
""instanceId"": ""{id}"",
""device"": ""/dev/vda1""
}}
]
"),
EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
{
Statistics = "Average",
ComparisonOperator = "<=",
Threshold = "35",
Times = 2,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.cms.AlarmContactGroup;
import com.pulumi.alicloud.cms.AlarmContactGroupArgs;
import com.pulumi.alicloud.cms.Alarm;
import com.pulumi.alicloud.cms.AlarmArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsCriticalArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableDiskCategory("cloud_efficiency")
.availableResourceCreation("VSwitch")
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.mostRecent(true)
.owners("system")
.build());
final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.availabilityZone(default_.zones()[0].id())
.imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(default_.zones()[0].id())
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.availabilityZone(default_.zones()[0].id())
.instanceName(name)
.imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.securityGroups(defaultSecurityGroup.id())
.vswitchId(defaultSwitch.id())
.build());
var defaultAlarmContactGroup = new AlarmContactGroup("defaultAlarmContactGroup", AlarmContactGroupArgs.builder()
.alarmContactGroupName(name)
.build());
var defaultAlarm = new Alarm("defaultAlarm", AlarmArgs.builder()
.name(name)
.project("acs_ecs_dashboard")
.metric("disk_writebytes")
.period(900)
.contactGroups(defaultAlarmContactGroup.alarmContactGroupName())
.effectiveInterval("06:00-20:00")
.metricDimensions(defaultInstance.id().applyValue(id -> """
[
{
"instanceId": "%s",
"device": "/dev/vda1"
}
]
", id)))
.escalationsCritical(AlarmEscalationsCriticalArgs.builder()
.statistics("Average")
.comparisonOperator("<=")
.threshold(35)
.times(2)
.build())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 10.4.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}
cidrBlock: 10.4.0.0/24
vpcId: ${defaultNetwork.id}
zoneId: ${default.zones[0].id}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${name}
vpcId: ${defaultNetwork.id}
defaultInstance:
type: alicloud:ecs:Instance
name: default
properties:
availabilityZone: ${default.zones[0].id}
instanceName: ${name}
imageId: ${defaultGetImages.images[0].id}
instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
securityGroups:
- ${defaultSecurityGroup.id}
vswitchId: ${defaultSwitch.id}
defaultAlarmContactGroup:
type: alicloud:cms:AlarmContactGroup
name: default
properties:
alarmContactGroupName: ${name}
defaultAlarm:
type: alicloud:cms:Alarm
name: default
properties:
name: ${name}
project: acs_ecs_dashboard
metric: disk_writebytes
period: 900
contactGroups:
- ${defaultAlarmContactGroup.alarmContactGroupName}
effectiveInterval: 06:00-20:00
metricDimensions: |2
[
{
"instanceId": "${defaultInstance.id}",
"device": "/dev/vda1"
}
]
escalationsCritical:
statistics: Average
comparisonOperator: <=
threshold: 35
times: 2
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableDiskCategory: cloud_efficiency
availableResourceCreation: VSwitch
defaultGetImages:
fn::invoke:
Function: alicloud:ecs:getImages
Arguments:
mostRecent: true
owners: system
defaultGetInstanceTypes:
fn::invoke:
Function: alicloud:ecs:getInstanceTypes
Arguments:
availabilityZone: ${default.zones[0].id}
imageId: ${defaultGetImages.images[0].id}
Create Alarm Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
@overload
def Alarm(resource_name: str,
args: AlarmArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Alarm(resource_name: str,
opts: Optional[ResourceOptions] = None,
metric: Optional[str] = None,
contact_groups: Optional[Sequence[str]] = None,
project: Optional[str] = None,
metric_dimensions: Optional[str] = None,
period: Optional[int] = None,
end_time: Optional[int] = None,
escalations_critical: Optional[AlarmEscalationsCriticalArgs] = None,
escalations_info: Optional[AlarmEscalationsInfoArgs] = None,
escalations_warn: Optional[AlarmEscalationsWarnArgs] = None,
effective_interval: Optional[str] = None,
composite_expression: Optional[AlarmCompositeExpressionArgs] = None,
name: Optional[str] = None,
enabled: Optional[bool] = None,
dimensions: Optional[Mapping[str, str]] = None,
prometheuses: Optional[Sequence[AlarmPrometheusArgs]] = None,
silence_time: Optional[int] = None,
start_time: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
targets: Optional[Sequence[AlarmTargetArgs]] = None,
webhook: Optional[str] = None)
func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)
public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)
type: alicloud:cms:Alarm
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 AlarmArgs
- 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 AlarmArgs
- 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 AlarmArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlarmArgs
- 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 alarmResource = new AliCloud.Cms.Alarm("alarmResource", new()
{
Metric = "string",
ContactGroups = new[]
{
"string",
},
Project = "string",
MetricDimensions = "string",
Period = 0,
EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
{
ComparisonOperator = "string",
Statistics = "string",
Threshold = "string",
Times = 0,
},
EscalationsInfo = new AliCloud.Cms.Inputs.AlarmEscalationsInfoArgs
{
ComparisonOperator = "string",
Statistics = "string",
Threshold = "string",
Times = 0,
},
EscalationsWarn = new AliCloud.Cms.Inputs.AlarmEscalationsWarnArgs
{
ComparisonOperator = "string",
Statistics = "string",
Threshold = "string",
Times = 0,
},
EffectiveInterval = "string",
CompositeExpression = new AliCloud.Cms.Inputs.AlarmCompositeExpressionArgs
{
ExpressionListJoin = "string",
ExpressionLists = new[]
{
new AliCloud.Cms.Inputs.AlarmCompositeExpressionExpressionListArgs
{
ComparisonOperator = "string",
MetricName = "string",
Period = "string",
Statistics = "string",
Threshold = "string",
},
},
ExpressionRaw = "string",
Level = "string",
Times = 0,
},
Name = "string",
Enabled = false,
Prometheuses = new[]
{
new AliCloud.Cms.Inputs.AlarmPrometheusArgs
{
Annotations =
{
{ "string", "string" },
},
Level = "string",
PromQl = "string",
Times = 0,
},
},
SilenceTime = 0,
Tags =
{
{ "string", "string" },
},
Targets = new[]
{
new AliCloud.Cms.Inputs.AlarmTargetArgs
{
Arn = "string",
JsonParams = "string",
Level = "string",
TargetId = "string",
},
},
Webhook = "string",
});
example, err := cms.NewAlarm(ctx, "alarmResource", &cms.AlarmArgs{
Metric: pulumi.String("string"),
ContactGroups: pulumi.StringArray{
pulumi.String("string"),
},
Project: pulumi.String("string"),
MetricDimensions: pulumi.String("string"),
Period: pulumi.Int(0),
EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
ComparisonOperator: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Times: pulumi.Int(0),
},
EscalationsInfo: &cms.AlarmEscalationsInfoArgs{
ComparisonOperator: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Times: pulumi.Int(0),
},
EscalationsWarn: &cms.AlarmEscalationsWarnArgs{
ComparisonOperator: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
Times: pulumi.Int(0),
},
EffectiveInterval: pulumi.String("string"),
CompositeExpression: &cms.AlarmCompositeExpressionArgs{
ExpressionListJoin: pulumi.String("string"),
ExpressionLists: cms.AlarmCompositeExpressionExpressionListArray{
&cms.AlarmCompositeExpressionExpressionListArgs{
ComparisonOperator: pulumi.String("string"),
MetricName: pulumi.String("string"),
Period: pulumi.String("string"),
Statistics: pulumi.String("string"),
Threshold: pulumi.String("string"),
},
},
ExpressionRaw: pulumi.String("string"),
Level: pulumi.String("string"),
Times: pulumi.Int(0),
},
Name: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Prometheuses: cms.AlarmPrometheusArray{
&cms.AlarmPrometheusArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Level: pulumi.String("string"),
PromQl: pulumi.String("string"),
Times: pulumi.Int(0),
},
},
SilenceTime: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Targets: cms.AlarmTargetArray{
&cms.AlarmTargetArgs{
Arn: pulumi.String("string"),
JsonParams: pulumi.String("string"),
Level: pulumi.String("string"),
TargetId: pulumi.String("string"),
},
},
Webhook: pulumi.String("string"),
})
var alarmResource = new Alarm("alarmResource", AlarmArgs.builder()
.metric("string")
.contactGroups("string")
.project("string")
.metricDimensions("string")
.period(0)
.escalationsCritical(AlarmEscalationsCriticalArgs.builder()
.comparisonOperator("string")
.statistics("string")
.threshold("string")
.times(0)
.build())
.escalationsInfo(AlarmEscalationsInfoArgs.builder()
.comparisonOperator("string")
.statistics("string")
.threshold("string")
.times(0)
.build())
.escalationsWarn(AlarmEscalationsWarnArgs.builder()
.comparisonOperator("string")
.statistics("string")
.threshold("string")
.times(0)
.build())
.effectiveInterval("string")
.compositeExpression(AlarmCompositeExpressionArgs.builder()
.expressionListJoin("string")
.expressionLists(AlarmCompositeExpressionExpressionListArgs.builder()
.comparisonOperator("string")
.metricName("string")
.period("string")
.statistics("string")
.threshold("string")
.build())
.expressionRaw("string")
.level("string")
.times(0)
.build())
.name("string")
.enabled(false)
.prometheuses(AlarmPrometheusArgs.builder()
.annotations(Map.of("string", "string"))
.level("string")
.promQl("string")
.times(0)
.build())
.silenceTime(0)
.tags(Map.of("string", "string"))
.targets(AlarmTargetArgs.builder()
.arn("string")
.jsonParams("string")
.level("string")
.targetId("string")
.build())
.webhook("string")
.build());
alarm_resource = alicloud.cms.Alarm("alarmResource",
metric="string",
contact_groups=["string"],
project="string",
metric_dimensions="string",
period=0,
escalations_critical=alicloud.cms.AlarmEscalationsCriticalArgs(
comparison_operator="string",
statistics="string",
threshold="string",
times=0,
),
escalations_info=alicloud.cms.AlarmEscalationsInfoArgs(
comparison_operator="string",
statistics="string",
threshold="string",
times=0,
),
escalations_warn=alicloud.cms.AlarmEscalationsWarnArgs(
comparison_operator="string",
statistics="string",
threshold="string",
times=0,
),
effective_interval="string",
composite_expression=alicloud.cms.AlarmCompositeExpressionArgs(
expression_list_join="string",
expression_lists=[alicloud.cms.AlarmCompositeExpressionExpressionListArgs(
comparison_operator="string",
metric_name="string",
period="string",
statistics="string",
threshold="string",
)],
expression_raw="string",
level="string",
times=0,
),
name="string",
enabled=False,
prometheuses=[alicloud.cms.AlarmPrometheusArgs(
annotations={
"string": "string",
},
level="string",
prom_ql="string",
times=0,
)],
silence_time=0,
tags={
"string": "string",
},
targets=[alicloud.cms.AlarmTargetArgs(
arn="string",
json_params="string",
level="string",
target_id="string",
)],
webhook="string")
const alarmResource = new alicloud.cms.Alarm("alarmResource", {
metric: "string",
contactGroups: ["string"],
project: "string",
metricDimensions: "string",
period: 0,
escalationsCritical: {
comparisonOperator: "string",
statistics: "string",
threshold: "string",
times: 0,
},
escalationsInfo: {
comparisonOperator: "string",
statistics: "string",
threshold: "string",
times: 0,
},
escalationsWarn: {
comparisonOperator: "string",
statistics: "string",
threshold: "string",
times: 0,
},
effectiveInterval: "string",
compositeExpression: {
expressionListJoin: "string",
expressionLists: [{
comparisonOperator: "string",
metricName: "string",
period: "string",
statistics: "string",
threshold: "string",
}],
expressionRaw: "string",
level: "string",
times: 0,
},
name: "string",
enabled: false,
prometheuses: [{
annotations: {
string: "string",
},
level: "string",
promQl: "string",
times: 0,
}],
silenceTime: 0,
tags: {
string: "string",
},
targets: [{
arn: "string",
jsonParams: "string",
level: "string",
targetId: "string",
}],
webhook: "string",
});
type: alicloud:cms:Alarm
properties:
compositeExpression:
expressionListJoin: string
expressionLists:
- comparisonOperator: string
metricName: string
period: string
statistics: string
threshold: string
expressionRaw: string
level: string
times: 0
contactGroups:
- string
effectiveInterval: string
enabled: false
escalationsCritical:
comparisonOperator: string
statistics: string
threshold: string
times: 0
escalationsInfo:
comparisonOperator: string
statistics: string
threshold: string
times: 0
escalationsWarn:
comparisonOperator: string
statistics: string
threshold: string
times: 0
metric: string
metricDimensions: string
name: string
period: 0
project: string
prometheuses:
- annotations:
string: string
level: string
promQl: string
times: 0
silenceTime: 0
tags:
string: string
targets:
- arn: string
jsonParams: string
level: string
targetId: string
webhook: string
Alarm Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Alarm resource accepts the following input properties:
- Contact
Groups List<string> - List contact groups of the alarm rule, which must have been created on the console.
- Metric string
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - Project string
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - Composite
Expression Pulumi.Ali Cloud. Cms. Inputs. Alarm Composite Expression - The trigger conditions for multiple metrics. See
composite_expression
below. - Dimensions Dictionary<string, string>
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - Effective
Interval string - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - Enabled bool
- Whether to enable alarm rule. Default value:
true
. - End
Time int - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Escalations
Critical Pulumi.Ali Cloud. Cms. Inputs. Alarm Escalations Critical - A configuration of critical alarm. See
escalations_critical
below. - Escalations
Info Pulumi.Ali Cloud. Cms. Inputs. Alarm Escalations Info - A configuration of critical info. See
escalations_info
below. - Escalations
Warn Pulumi.Ali Cloud. Cms. Inputs. Alarm Escalations Warn - A configuration of critical warn. See
escalations_warn
below. - Metric
Dimensions string - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- Name string
- The name of the alert rule.
- Period int
- The statistical period of the metric. Unit: seconds. Default value:
300
. - Prometheuses
List<Pulumi.
Ali Cloud. Cms. Inputs. Alarm Prometheus> - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - Silence
Time int - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - Start
Time int - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Targets
List<Pulumi.
Ali Cloud. Cms. Inputs. Alarm Target> - The information about the resource for which alerts are triggered. See
targets
below. - Webhook string
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- Contact
Groups []string - List contact groups of the alarm rule, which must have been created on the console.
- Metric string
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - Project string
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - Composite
Expression AlarmComposite Expression Args - The trigger conditions for multiple metrics. See
composite_expression
below. - Dimensions map[string]string
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - Effective
Interval string - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - Enabled bool
- Whether to enable alarm rule. Default value:
true
. - End
Time int - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Escalations
Critical AlarmEscalations Critical Args - A configuration of critical alarm. See
escalations_critical
below. - Escalations
Info AlarmEscalations Info Args - A configuration of critical info. See
escalations_info
below. - Escalations
Warn AlarmEscalations Warn Args - A configuration of critical warn. See
escalations_warn
below. - Metric
Dimensions string - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- Name string
- The name of the alert rule.
- Period int
- The statistical period of the metric. Unit: seconds. Default value:
300
. - Prometheuses
[]Alarm
Prometheus Args - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - Silence
Time int - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - Start
Time int - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - map[string]string
- A mapping of tags to assign to the resource.
- Targets
[]Alarm
Target Args - The information about the resource for which alerts are triggered. See
targets
below. - Webhook string
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- contact
Groups List<String> - List contact groups of the alarm rule, which must have been created on the console.
- metric String
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - project String
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - composite
Expression AlarmComposite Expression - The trigger conditions for multiple metrics. See
composite_expression
below. - dimensions Map<String,String>
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective
Interval String - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled Boolean
- Whether to enable alarm rule. Default value:
true
. - end
Time Integer - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations
Critical AlarmEscalations Critical - A configuration of critical alarm. See
escalations_critical
below. - escalations
Info AlarmEscalations Info - A configuration of critical info. See
escalations_info
below. - escalations
Warn AlarmEscalations Warn - A configuration of critical warn. See
escalations_warn
below. - metric
Dimensions String - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name String
- The name of the alert rule.
- period Integer
- The statistical period of the metric. Unit: seconds. Default value:
300
. - prometheuses
List<Alarm
Prometheus> - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence
Time Integer - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start
Time Integer - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Map<String,String>
- A mapping of tags to assign to the resource.
- targets
List<Alarm
Target> - The information about the resource for which alerts are triggered. See
targets
below. - webhook String
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- contact
Groups string[] - List contact groups of the alarm rule, which must have been created on the console.
- metric string
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - project string
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - composite
Expression AlarmComposite Expression - The trigger conditions for multiple metrics. See
composite_expression
below. - dimensions {[key: string]: string}
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective
Interval string - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled boolean
- Whether to enable alarm rule. Default value:
true
. - end
Time number - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations
Critical AlarmEscalations Critical - A configuration of critical alarm. See
escalations_critical
below. - escalations
Info AlarmEscalations Info - A configuration of critical info. See
escalations_info
below. - escalations
Warn AlarmEscalations Warn - A configuration of critical warn. See
escalations_warn
below. - metric
Dimensions string - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name string
- The name of the alert rule.
- period number
- The statistical period of the metric. Unit: seconds. Default value:
300
. - prometheuses
Alarm
Prometheus[] - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence
Time number - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start
Time number - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- targets
Alarm
Target[] - The information about the resource for which alerts are triggered. See
targets
below. - webhook string
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- contact_
groups Sequence[str] - List contact groups of the alarm rule, which must have been created on the console.
- metric str
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - project str
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - composite_
expression AlarmComposite Expression Args - The trigger conditions for multiple metrics. See
composite_expression
below. - dimensions Mapping[str, str]
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective_
interval str - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled bool
- Whether to enable alarm rule. Default value:
true
. - end_
time int - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations_
critical AlarmEscalations Critical Args - A configuration of critical alarm. See
escalations_critical
below. - escalations_
info AlarmEscalations Info Args - A configuration of critical info. See
escalations_info
below. - escalations_
warn AlarmEscalations Warn Args - A configuration of critical warn. See
escalations_warn
below. - metric_
dimensions str - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name str
- The name of the alert rule.
- period int
- The statistical period of the metric. Unit: seconds. Default value:
300
. - prometheuses
Sequence[Alarm
Prometheus Args] - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence_
time int - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start_
time int - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- targets
Sequence[Alarm
Target Args] - The information about the resource for which alerts are triggered. See
targets
below. - webhook str
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- contact
Groups List<String> - List contact groups of the alarm rule, which must have been created on the console.
- metric String
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - project String
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - composite
Expression Property Map - The trigger conditions for multiple metrics. See
composite_expression
below. - dimensions Map<String>
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective
Interval String - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled Boolean
- Whether to enable alarm rule. Default value:
true
. - end
Time Number - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations
Critical Property Map - A configuration of critical alarm. See
escalations_critical
below. - escalations
Info Property Map - A configuration of critical info. See
escalations_info
below. - escalations
Warn Property Map - A configuration of critical warn. See
escalations_warn
below. - metric
Dimensions String - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name String
- The name of the alert rule.
- period Number
- The statistical period of the metric. Unit: seconds. Default value:
300
. - prometheuses List<Property Map>
- The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence
Time Number - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start
Time Number - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Map<String>
- A mapping of tags to assign to the resource.
- targets List<Property Map>
- The information about the resource for which alerts are triggered. See
targets
below. - webhook String
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
Outputs
All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:
Look up Existing Alarm Resource
Get an existing Alarm 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?: AlarmState, opts?: CustomResourceOptions): Alarm
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
composite_expression: Optional[AlarmCompositeExpressionArgs] = None,
contact_groups: Optional[Sequence[str]] = None,
dimensions: Optional[Mapping[str, str]] = None,
effective_interval: Optional[str] = None,
enabled: Optional[bool] = None,
end_time: Optional[int] = None,
escalations_critical: Optional[AlarmEscalationsCriticalArgs] = None,
escalations_info: Optional[AlarmEscalationsInfoArgs] = None,
escalations_warn: Optional[AlarmEscalationsWarnArgs] = None,
metric: Optional[str] = None,
metric_dimensions: Optional[str] = None,
name: Optional[str] = None,
period: Optional[int] = None,
project: Optional[str] = None,
prometheuses: Optional[Sequence[AlarmPrometheusArgs]] = None,
silence_time: Optional[int] = None,
start_time: Optional[int] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
targets: Optional[Sequence[AlarmTargetArgs]] = None,
webhook: Optional[str] = None) -> Alarm
func GetAlarm(ctx *Context, name string, id IDInput, state *AlarmState, opts ...ResourceOption) (*Alarm, error)
public static Alarm Get(string name, Input<string> id, AlarmState? state, CustomResourceOptions? opts = null)
public static Alarm get(String name, Output<String> id, AlarmState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Composite
Expression Pulumi.Ali Cloud. Cms. Inputs. Alarm Composite Expression - The trigger conditions for multiple metrics. See
composite_expression
below. - Contact
Groups List<string> - List contact groups of the alarm rule, which must have been created on the console.
- Dimensions Dictionary<string, string>
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - Effective
Interval string - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - Enabled bool
- Whether to enable alarm rule. Default value:
true
. - End
Time int - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Escalations
Critical Pulumi.Ali Cloud. Cms. Inputs. Alarm Escalations Critical - A configuration of critical alarm. See
escalations_critical
below. - Escalations
Info Pulumi.Ali Cloud. Cms. Inputs. Alarm Escalations Info - A configuration of critical info. See
escalations_info
below. - Escalations
Warn Pulumi.Ali Cloud. Cms. Inputs. Alarm Escalations Warn - A configuration of critical warn. See
escalations_warn
below. - Metric string
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - Metric
Dimensions string - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- Name string
- The name of the alert rule.
- Period int
- The statistical period of the metric. Unit: seconds. Default value:
300
. - Project string
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - Prometheuses
List<Pulumi.
Ali Cloud. Cms. Inputs. Alarm Prometheus> - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - Silence
Time int - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - Start
Time int - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Status string
- The status of the Alarm.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Targets
List<Pulumi.
Ali Cloud. Cms. Inputs. Alarm Target> - The information about the resource for which alerts are triggered. See
targets
below. - Webhook string
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- Composite
Expression AlarmComposite Expression Args - The trigger conditions for multiple metrics. See
composite_expression
below. - Contact
Groups []string - List contact groups of the alarm rule, which must have been created on the console.
- Dimensions map[string]string
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - Effective
Interval string - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - Enabled bool
- Whether to enable alarm rule. Default value:
true
. - End
Time int - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Escalations
Critical AlarmEscalations Critical Args - A configuration of critical alarm. See
escalations_critical
below. - Escalations
Info AlarmEscalations Info Args - A configuration of critical info. See
escalations_info
below. - Escalations
Warn AlarmEscalations Warn Args - A configuration of critical warn. See
escalations_warn
below. - Metric string
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - Metric
Dimensions string - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- Name string
- The name of the alert rule.
- Period int
- The statistical period of the metric. Unit: seconds. Default value:
300
. - Project string
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - Prometheuses
[]Alarm
Prometheus Args - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - Silence
Time int - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - Start
Time int - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - Status string
- The status of the Alarm.
- map[string]string
- A mapping of tags to assign to the resource.
- Targets
[]Alarm
Target Args - The information about the resource for which alerts are triggered. See
targets
below. - Webhook string
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- composite
Expression AlarmComposite Expression - The trigger conditions for multiple metrics. See
composite_expression
below. - contact
Groups List<String> - List contact groups of the alarm rule, which must have been created on the console.
- dimensions Map<String,String>
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective
Interval String - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled Boolean
- Whether to enable alarm rule. Default value:
true
. - end
Time Integer - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations
Critical AlarmEscalations Critical - A configuration of critical alarm. See
escalations_critical
below. - escalations
Info AlarmEscalations Info - A configuration of critical info. See
escalations_info
below. - escalations
Warn AlarmEscalations Warn - A configuration of critical warn. See
escalations_warn
below. - metric String
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - metric
Dimensions String - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name String
- The name of the alert rule.
- period Integer
- The statistical period of the metric. Unit: seconds. Default value:
300
. - project String
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - prometheuses
List<Alarm
Prometheus> - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence
Time Integer - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start
Time Integer - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - status String
- The status of the Alarm.
- Map<String,String>
- A mapping of tags to assign to the resource.
- targets
List<Alarm
Target> - The information about the resource for which alerts are triggered. See
targets
below. - webhook String
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- composite
Expression AlarmComposite Expression - The trigger conditions for multiple metrics. See
composite_expression
below. - contact
Groups string[] - List contact groups of the alarm rule, which must have been created on the console.
- dimensions {[key: string]: string}
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective
Interval string - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled boolean
- Whether to enable alarm rule. Default value:
true
. - end
Time number - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations
Critical AlarmEscalations Critical - A configuration of critical alarm. See
escalations_critical
below. - escalations
Info AlarmEscalations Info - A configuration of critical info. See
escalations_info
below. - escalations
Warn AlarmEscalations Warn - A configuration of critical warn. See
escalations_warn
below. - metric string
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - metric
Dimensions string - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name string
- The name of the alert rule.
- period number
- The statistical period of the metric. Unit: seconds. Default value:
300
. - project string
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - prometheuses
Alarm
Prometheus[] - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence
Time number - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start
Time number - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - status string
- The status of the Alarm.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- targets
Alarm
Target[] - The information about the resource for which alerts are triggered. See
targets
below. - webhook string
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- composite_
expression AlarmComposite Expression Args - The trigger conditions for multiple metrics. See
composite_expression
below. - contact_
groups Sequence[str] - List contact groups of the alarm rule, which must have been created on the console.
- dimensions Mapping[str, str]
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective_
interval str - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled bool
- Whether to enable alarm rule. Default value:
true
. - end_
time int - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations_
critical AlarmEscalations Critical Args - A configuration of critical alarm. See
escalations_critical
below. - escalations_
info AlarmEscalations Info Args - A configuration of critical info. See
escalations_info
below. - escalations_
warn AlarmEscalations Warn Args - A configuration of critical warn. See
escalations_warn
below. - metric str
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - metric_
dimensions str - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name str
- The name of the alert rule.
- period int
- The statistical period of the metric. Unit: seconds. Default value:
300
. - project str
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - prometheuses
Sequence[Alarm
Prometheus Args] - The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence_
time int - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start_
time int - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - status str
- The status of the Alarm.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- targets
Sequence[Alarm
Target Args] - The information about the resource for which alerts are triggered. See
targets
below. - webhook str
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
- composite
Expression Property Map - The trigger conditions for multiple metrics. See
composite_expression
below. - contact
Groups List<String> - List contact groups of the alarm rule, which must have been created on the console.
- dimensions Map<String>
- Field
dimensions
has been deprecated from provider version 1.173.0. New fieldmetric_dimensions
instead. - effective
Interval String - The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default value:
00:00-23:59
. - enabled Boolean
- Whether to enable alarm rule. Default value:
true
. - end
Time Number - Field
end_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - escalations
Critical Property Map - A configuration of critical alarm. See
escalations_critical
below. - escalations
Info Property Map - A configuration of critical info. See
escalations_info
below. - escalations
Warn Property Map - A configuration of critical warn. See
escalations_warn
below. - metric String
- The name of the metric, such as
CPUUtilization
andnetworkin_rate
. For more information, see Metrics Reference. - metric
Dimensions String - Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.
- name String
- The name of the alert rule.
- period Number
- The statistical period of the metric. Unit: seconds. Default value:
300
. - project String
- The namespace of the cloud service, such as
acs_ecs_dashboard
andacs_rds_dashboard
. For more information, see Metrics Reference. NOTE: Thedimensions
andmetric_dimensions
must be empty whenproject
isacs_prometheus
, otherwise, one of them must be set. - prometheuses List<Property Map>
- The Prometheus alert rule. See
prometheus
below. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring. - silence
Time Number - Notification silence period in the alarm state, in seconds. Default value:
86400
. Valid value range: [300, 86400]. - start
Time Number - Field
start_time
has been deprecated from provider version 1.50.0. New fieldeffective_interval
instead. - status String
- The status of the Alarm.
- Map<String>
- A mapping of tags to assign to the resource.
- targets List<Property Map>
- The information about the resource for which alerts are triggered. See
targets
below. - webhook String
- The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
Supporting Types
AlarmCompositeExpression, AlarmCompositeExpressionArgs
- Expression
List stringJoin - The relationship between the trigger conditions for multiple metrics. Valid values:
&&
,||
. - Expression
Lists List<Pulumi.Ali Cloud. Cms. Inputs. Alarm Composite Expression Expression List> - The trigger conditions that are created in standard mode. See
expression_list
below. - Expression
Raw string - The trigger conditions that are created by using expressions.
- Level string
- The level of the alert. Valid values:
CRITICAL
,WARN
,INFO
. - Times int
- The number of consecutive triggers.
- Expression
List stringJoin - The relationship between the trigger conditions for multiple metrics. Valid values:
&&
,||
. - Expression
Lists []AlarmComposite Expression Expression List - The trigger conditions that are created in standard mode. See
expression_list
below. - Expression
Raw string - The trigger conditions that are created by using expressions.
- Level string
- The level of the alert. Valid values:
CRITICAL
,WARN
,INFO
. - Times int
- The number of consecutive triggers.
- expression
List StringJoin - The relationship between the trigger conditions for multiple metrics. Valid values:
&&
,||
. - expression
Lists List<AlarmComposite Expression Expression List> - The trigger conditions that are created in standard mode. See
expression_list
below. - expression
Raw String - The trigger conditions that are created by using expressions.
- level String
- The level of the alert. Valid values:
CRITICAL
,WARN
,INFO
. - times Integer
- The number of consecutive triggers.
- expression
List stringJoin - The relationship between the trigger conditions for multiple metrics. Valid values:
&&
,||
. - expression
Lists AlarmComposite Expression Expression List[] - The trigger conditions that are created in standard mode. See
expression_list
below. - expression
Raw string - The trigger conditions that are created by using expressions.
- level string
- The level of the alert. Valid values:
CRITICAL
,WARN
,INFO
. - times number
- The number of consecutive triggers.
- expression_
list_ strjoin - The relationship between the trigger conditions for multiple metrics. Valid values:
&&
,||
. - expression_
lists Sequence[AlarmComposite Expression Expression List] - The trigger conditions that are created in standard mode. See
expression_list
below. - expression_
raw str - The trigger conditions that are created by using expressions.
- level str
- The level of the alert. Valid values:
CRITICAL
,WARN
,INFO
. - times int
- The number of consecutive triggers.
- expression
List StringJoin - The relationship between the trigger conditions for multiple metrics. Valid values:
&&
,||
. - expression
Lists List<Property Map> - The trigger conditions that are created in standard mode. See
expression_list
below. - expression
Raw String - The trigger conditions that are created by using expressions.
- level String
- The level of the alert. Valid values:
CRITICAL
,WARN
,INFO
. - times Number
- The number of consecutive triggers.
AlarmCompositeExpressionExpressionList, AlarmCompositeExpressionExpressionListArgs
- Comparison
Operator string - Metric
Name string - The metric that is used to monitor the cloud service.
- Period string
- The statistical period of the metric. Unit: seconds. Default value:
300
. - Statistics string
- Field
statistics
has been removed from provider version 1.216.0. New fieldescalations_critical.statistics
instead. - Threshold string
- Field
threshold
has been removed from provider version 1.216.0. New fieldescalations_critical.threshold
instead.
- Comparison
Operator string - Metric
Name string - The metric that is used to monitor the cloud service.
- Period string
- The statistical period of the metric. Unit: seconds. Default value:
300
. - Statistics string
- Field
statistics
has been removed from provider version 1.216.0. New fieldescalations_critical.statistics
instead. - Threshold string
- Field
threshold
has been removed from provider version 1.216.0. New fieldescalations_critical.threshold
instead.
- comparison
Operator String - metric
Name String - The metric that is used to monitor the cloud service.
- period String
- The statistical period of the metric. Unit: seconds. Default value:
300
. - statistics String
- Field
statistics
has been removed from provider version 1.216.0. New fieldescalations_critical.statistics
instead. - threshold String
- Field
threshold
has been removed from provider version 1.216.0. New fieldescalations_critical.threshold
instead.
- comparison
Operator string - metric
Name string - The metric that is used to monitor the cloud service.
- period string
- The statistical period of the metric. Unit: seconds. Default value:
300
. - statistics string
- Field
statistics
has been removed from provider version 1.216.0. New fieldescalations_critical.statistics
instead. - threshold string
- Field
threshold
has been removed from provider version 1.216.0. New fieldescalations_critical.threshold
instead.
- comparison_
operator str - metric_
name str - The metric that is used to monitor the cloud service.
- period str
- The statistical period of the metric. Unit: seconds. Default value:
300
. - statistics str
- Field
statistics
has been removed from provider version 1.216.0. New fieldescalations_critical.statistics
instead. - threshold str
- Field
threshold
has been removed from provider version 1.216.0. New fieldescalations_critical.threshold
instead.
- comparison
Operator String - metric
Name String - The metric that is used to monitor the cloud service.
- period String
- The statistical period of the metric. Unit: seconds. Default value:
300
. - statistics String
- Field
statistics
has been removed from provider version 1.216.0. New fieldescalations_critical.statistics
instead. - threshold String
- Field
threshold
has been removed from provider version 1.216.0. New fieldescalations_critical.threshold
instead.
AlarmEscalationsCritical, AlarmEscalationsCriticalArgs
- Comparison
Operator string - Critical level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - Statistics string
- Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- Threshold string
- Critical level alarm threshold value, which must be a numeric value currently.
- Times int
- Critical level alarm retry times. Default value:
3
.
- Comparison
Operator string - Critical level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - Statistics string
- Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- Threshold string
- Critical level alarm threshold value, which must be a numeric value currently.
- Times int
- Critical level alarm retry times. Default value:
3
.
- comparison
Operator String - Critical level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics String
- Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold String
- Critical level alarm threshold value, which must be a numeric value currently.
- times Integer
- Critical level alarm retry times. Default value:
3
.
- comparison
Operator string - Critical level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics string
- Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold string
- Critical level alarm threshold value, which must be a numeric value currently.
- times number
- Critical level alarm retry times. Default value:
3
.
- comparison_
operator str - Critical level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics str
- Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold str
- Critical level alarm threshold value, which must be a numeric value currently.
- times int
- Critical level alarm retry times. Default value:
3
.
- comparison
Operator String - Critical level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics String
- Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold String
- Critical level alarm threshold value, which must be a numeric value currently.
- times Number
- Critical level alarm retry times. Default value:
3
.
AlarmEscalationsInfo, AlarmEscalationsInfoArgs
- Comparison
Operator string - Info level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - Statistics string
- Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- Threshold string
- Info level alarm threshold value, which must be a numeric value currently.
- Times int
- Info level alarm retry times. Default value:
3
.
- Comparison
Operator string - Info level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - Statistics string
- Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- Threshold string
- Info level alarm threshold value, which must be a numeric value currently.
- Times int
- Info level alarm retry times. Default value:
3
.
- comparison
Operator String - Info level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics String
- Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold String
- Info level alarm threshold value, which must be a numeric value currently.
- times Integer
- Info level alarm retry times. Default value:
3
.
- comparison
Operator string - Info level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics string
- Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold string
- Info level alarm threshold value, which must be a numeric value currently.
- times number
- Info level alarm retry times. Default value:
3
.
- comparison_
operator str - Info level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics str
- Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold str
- Info level alarm threshold value, which must be a numeric value currently.
- times int
- Info level alarm retry times. Default value:
3
.
- comparison
Operator String - Info level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics String
- Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold String
- Info level alarm threshold value, which must be a numeric value currently.
- times Number
- Info level alarm retry times. Default value:
3
.
AlarmEscalationsWarn, AlarmEscalationsWarnArgs
- Comparison
Operator string - Warn level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - Statistics string
- Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- Threshold string
- Warn level alarm threshold value, which must be a numeric value currently.
- Times int
- Warn level alarm retry times. Default value:
3
.
- Comparison
Operator string - Warn level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - Statistics string
- Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- Threshold string
- Warn level alarm threshold value, which must be a numeric value currently.
- Times int
- Warn level alarm retry times. Default value:
3
.
- comparison
Operator String - Warn level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics String
- Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold String
- Warn level alarm threshold value, which must be a numeric value currently.
- times Integer
- Warn level alarm retry times. Default value:
3
.
- comparison
Operator string - Warn level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics string
- Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold string
- Warn level alarm threshold value, which must be a numeric value currently.
- times number
- Warn level alarm retry times. Default value:
3
.
- comparison_
operator str - Warn level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics str
- Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold str
- Warn level alarm threshold value, which must be a numeric value currently.
- times int
- Warn level alarm retry times. Default value:
3
.
- comparison
Operator String - Warn level alarm comparison operator. Default value:
>
. Valid values:>
,>=
,<
,<=
,!=
,GreaterThanYesterday
,LessThanYesterday
,GreaterThanLastWeek
,LessThanLastWeek
,GreaterThanLastPeriod
,LessThanLastPeriod
. NOTE: From version 1.225.0,comparison_operator
cannot be set to==
. - statistics String
- Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
- threshold String
- Warn level alarm threshold value, which must be a numeric value currently.
- times Number
- Warn level alarm retry times. Default value:
3
.
AlarmPrometheus, AlarmPrometheusArgs
- Annotations Dictionary<string, string>
- The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
- Level string
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - Prom
Ql string - The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
- Times int
- The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
- Annotations map[string]string
- The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
- Level string
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - Prom
Ql string - The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
- Times int
- The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
- annotations Map<String,String>
- The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
- level String
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - prom
Ql String - The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
- times Integer
- The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
- annotations {[key: string]: string}
- The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
- level string
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - prom
Ql string - The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
- times number
- The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
- annotations Mapping[str, str]
- The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
- level str
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - prom_
ql str - The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
- times int
- The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
- annotations Map<String>
- The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
- level String
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - prom
Ql String - The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
- times Number
- The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
AlarmTarget, AlarmTargetArgs
- Arn string
ARN uniquely identifies the resource that the alert targets.
NOTE: The targets attribute is used to specify where notifications or actions should be directed when an alarm condition is met. This attribute corresponds to what is referred to as the "Push Channel" in the Alibaba Cloud console. NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.
- Json
Params string - Specifies additional parameters for the alert callback in JSON format. This can include configuration settings specific to the alert action.
- Level string
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - Target
Id string - The ID of the resource for which alerts are triggered. This is typically used to specify individual resources that should respond to the alert.
- Arn string
ARN uniquely identifies the resource that the alert targets.
NOTE: The targets attribute is used to specify where notifications or actions should be directed when an alarm condition is met. This attribute corresponds to what is referred to as the "Push Channel" in the Alibaba Cloud console. NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.
- Json
Params string - Specifies additional parameters for the alert callback in JSON format. This can include configuration settings specific to the alert action.
- Level string
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - Target
Id string - The ID of the resource for which alerts are triggered. This is typically used to specify individual resources that should respond to the alert.
- arn String
ARN uniquely identifies the resource that the alert targets.
NOTE: The targets attribute is used to specify where notifications or actions should be directed when an alarm condition is met. This attribute corresponds to what is referred to as the "Push Channel" in the Alibaba Cloud console. NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.
- json
Params String - Specifies additional parameters for the alert callback in JSON format. This can include configuration settings specific to the alert action.
- level String
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - target
Id String - The ID of the resource for which alerts are triggered. This is typically used to specify individual resources that should respond to the alert.
- arn string
ARN uniquely identifies the resource that the alert targets.
NOTE: The targets attribute is used to specify where notifications or actions should be directed when an alarm condition is met. This attribute corresponds to what is referred to as the "Push Channel" in the Alibaba Cloud console. NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.
- json
Params string - Specifies additional parameters for the alert callback in JSON format. This can include configuration settings specific to the alert action.
- level string
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - target
Id string - The ID of the resource for which alerts are triggered. This is typically used to specify individual resources that should respond to the alert.
- arn str
ARN uniquely identifies the resource that the alert targets.
NOTE: The targets attribute is used to specify where notifications or actions should be directed when an alarm condition is met. This attribute corresponds to what is referred to as the "Push Channel" in the Alibaba Cloud console. NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.
- json_
params str - Specifies additional parameters for the alert callback in JSON format. This can include configuration settings specific to the alert action.
- level str
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - target_
id str - The ID of the resource for which alerts are triggered. This is typically used to specify individual resources that should respond to the alert.
- arn String
ARN uniquely identifies the resource that the alert targets.
NOTE: The targets attribute is used to specify where notifications or actions should be directed when an alarm condition is met. This attribute corresponds to what is referred to as the "Push Channel" in the Alibaba Cloud console. NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.
- json
Params String - Specifies additional parameters for the alert callback in JSON format. This can include configuration settings specific to the alert action.
- level String
- The level of the alert. Valid values:
Critical
,Warn
,Info
. - target
Id String - The ID of the resource for which alerts are triggered. This is typically used to specify individual resources that should respond to the alert.
Import
Cloud Monitor Service Alarm can be imported using the id, e.g.
$ pulumi import alicloud:cms/alarm:Alarm example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.