Class Alarm
This resource provides a alarm rule resource and it can be used to monitor several cloud services according different metrics. Details for alarm rule.
Inherited Members
Namespace: Pulumi.AliCloud.Cms
Assembly: Pulumi.AliCloud.dll
Syntax
public class Alarm : CustomResource
Constructors
View SourceAlarm(String, AlarmArgs, CustomResourceOptions)
Create a Alarm resource with the given unique name, arguments, and options.
Declaration
public Alarm(string name, AlarmArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AlarmArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceContactGroups
List contact groups of the alarm rule, which must have been created on the console.
Declaration
public Output<ImmutableArray<string>> ContactGroups { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Dimensions
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.
Declaration
public Output<ImmutableDictionary<string, object>> Dimensions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
EffectiveInterval
The interval of effecting alarm rule. It foramt as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".
Declaration
public Output<string> EffectiveInterval { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
Whether to enable alarm rule. Default to true.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EndTime
It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.
Declaration
public Output<int?> EndTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Metric
Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.
Declaration
public Output<string> Metric { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The alarm rule name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Operator
Alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".
Declaration
public Output<string> Operator { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Period
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
Declaration
public Output<int?> Period { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Project
Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SilenceTime
Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
Declaration
public Output<int?> SilenceTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
StartTime
It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.
Declaration
public Output<int?> StartTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Statistics
Statistical method. It must be consistent with that defined for metrics. Valid values: ["Average", "Minimum", "Maximum"]. Default to "Average".
Declaration
public Output<string> Statistics { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
The current alarm rule status.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Threshold
Alarm threshold value, which must be a numeric value currently.
Declaration
public Output<string> Threshold { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TriggeredCount
Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
Declaration
public Output<int?> TriggeredCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Webhook
The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
Declaration
public Output<string> Webhook { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AlarmState, CustomResourceOptions)
Get an existing Alarm resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Alarm Get(string name, Input<string> id, AlarmState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AlarmState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Alarm |