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.
Create a Alarm Resource
new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);def Alarm(resource_name, opts=None, contact_groups=None, dimensions=None, effective_interval=None, enabled=None, end_time=None, metric=None, name=None, operator=None, period=None, project=None, silence_time=None, start_time=None, statistics=None, threshold=None, triggered_count=None, webhook=None, __props__=None);public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Alarm Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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.
- Dimensions Dictionary<string, object>
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.
- Metric string
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- Project string
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- Threshold string
Alarm threshold value, which must be a numeric value currently.
- Effective
Interval string The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- Enabled bool
Whether to enable alarm rule. Default to true.
- End
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Name string
The alarm rule name.
- Operator string
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- Period int
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- Silence
Time int Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- Start
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Statistics string
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- Triggered
Count int Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- 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.
- Dimensions map[string]interface{}
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.
- Metric string
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- Project string
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- Threshold string
Alarm threshold value, which must be a numeric value currently.
- Effective
Interval string The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- Enabled bool
Whether to enable alarm rule. Default to true.
- End
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Name string
The alarm rule name.
- Operator string
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- Period int
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- Silence
Time int Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- Start
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Statistics string
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- Triggered
Count int Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- 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.
- dimensions {[key: string]: any}
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.
- metric string
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- project string
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- threshold string
Alarm threshold value, which must be a numeric value currently.
- effective
Interval string The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- enabled boolean
Whether to enable alarm rule. Default to true.
- end
Time number It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- name string
The alarm rule name.
- operator string
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- period number
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- silence
Time number Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- start
Time number It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- statistics string
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- triggered
Count number Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- 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[str] List contact groups of the alarm rule, which must have been created on the console.
- dimensions Dict[str, Any]
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.
- metric str
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- project str
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- threshold str
Alarm threshold value, which must be a numeric value currently.
- effective_
interval str The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- enabled bool
Whether to enable alarm rule. Default to true.
- end_
time float It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- name str
The alarm rule name.
- operator str
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- period float
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- silence_
time float Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- start_
time float It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- statistics str
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- triggered_
count float Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- webhook str
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 an 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): Alarmstatic get(resource_name, id, opts=None, contact_groups=None, dimensions=None, effective_interval=None, enabled=None, end_time=None, metric=None, name=None, operator=None, period=None, project=None, silence_time=None, start_time=None, statistics=None, status=None, threshold=None, triggered_count=None, webhook=None, __props__=None);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)- 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.
The following state arguments are supported:
- Contact
Groups List<string> List contact groups of the alarm rule, which must have been created on the console.
- Dimensions Dictionary<string, object>
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.
- Effective
Interval string The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- Enabled bool
Whether to enable alarm rule. Default to true.
- End
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Metric string
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- Name string
The alarm rule name.
- Operator string
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- Period int
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- Project string
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- Silence
Time int Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- Start
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Statistics string
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- Status string
The current alarm rule status.
- Threshold string
Alarm threshold value, which must be a numeric value currently.
- Triggered
Count int Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- 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.
- Dimensions map[string]interface{}
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.
- Effective
Interval string The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- Enabled bool
Whether to enable alarm rule. Default to true.
- End
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Metric string
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- Name string
The alarm rule name.
- Operator string
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- Period int
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- Project string
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- Silence
Time int Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- Start
Time int It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- Statistics string
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- Status string
The current alarm rule status.
- Threshold string
Alarm threshold value, which must be a numeric value currently.
- Triggered
Count int Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- 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.
- dimensions {[key: string]: any}
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.
- effective
Interval string The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- enabled boolean
Whether to enable alarm rule. Default to true.
- end
Time number It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- metric string
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- name string
The alarm rule name.
- operator string
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- period number
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- project string
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- silence
Time number Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- start
Time number It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- statistics string
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- status string
The current alarm rule status.
- threshold string
Alarm threshold value, which must be a numeric value currently.
- triggered
Count number Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- 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[str] List contact groups of the alarm rule, which must have been created on the console.
- dimensions Dict[str, Any]
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.
- effective_
interval str The interval of effecting alarm rule. It foramt as “hh:mm-hh:mm”, like “0:00-4:00”. Default to “00:00-23:59”.
- enabled bool
Whether to enable alarm rule. Default to true.
- end_
time float It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- metric str
Name of the monitoring metrics corresponding to a project, such as “CPUUtilization” and “networkin_rate”. For more information, see Metrics Reference.
- name str
The alarm rule name.
- operator str
Alarm comparison operator. Valid values: [”<=“, “<“, “>”, “>=”, “==”, “!=”]. Default to “==”.
- period float
Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
- project str
Monitor project name, such as “acs_ecs_dashboard” and “acs_rds_dashboard”. For more information, see Metrics Reference.
- silence_
time float Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400
- start_
time float It has been deprecated from provider version 1.50.0 and ‘effective_interval’ instead.
- statistics str
Statistical method. It must be consistent with that defined for metrics. Valid values: [“Average”, “Minimum”, “Maximum”]. Default to “Average”.
- status str
The current alarm rule status.
- threshold str
Alarm threshold value, which must be a numeric value currently.
- triggered_
count float Number of consecutive times it has been detected that the values exceed the threshold. Default to 3.
- webhook str
The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.