AWS Native is in preview. AWS Classic is fully supported.
aws-native.cloudwatch.Alarm
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource Type definition for AWS::CloudWatch::Alarm
Create Alarm Resource
new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
@overload
def Alarm(resource_name: str,
opts: Optional[ResourceOptions] = None,
actions_enabled: Optional[bool] = None,
alarm_actions: Optional[Sequence[str]] = None,
alarm_description: Optional[str] = None,
alarm_name: Optional[str] = None,
comparison_operator: Optional[str] = None,
datapoints_to_alarm: Optional[int] = None,
dimensions: Optional[Sequence[AlarmDimensionArgs]] = None,
evaluate_low_sample_count_percentile: Optional[str] = None,
evaluation_periods: Optional[int] = None,
extended_statistic: Optional[str] = None,
insufficient_data_actions: Optional[Sequence[str]] = None,
metric_name: Optional[str] = None,
metrics: Optional[Sequence[AlarmMetricDataQueryArgs]] = None,
namespace: Optional[str] = None,
ok_actions: Optional[Sequence[str]] = None,
period: Optional[int] = None,
statistic: Optional[str] = None,
threshold: Optional[float] = None,
threshold_metric_id: Optional[str] = None,
treat_missing_data: Optional[str] = None,
unit: Optional[str] = None)
@overload
def Alarm(resource_name: str,
args: AlarmArgs,
opts: Optional[ResourceOptions] = None)
func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)
public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)
type: aws-native:cloudwatch:Alarm
properties: # The arguments to resource properties.
options: # 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.
- 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.
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:
- Comparison
Operator string The arithmetic operation to use when comparing the specified statistic and threshold.
- Evaluation
Periods int The number of periods over which data is compared to the specified threshold.
- Actions
Enabled bool Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- Alarm
Actions List<string> The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- Alarm
Description string The description of the alarm.
- Alarm
Name string The name of the alarm.
- Datapoints
To intAlarm The number of datapoints that must be breaching to trigger the alarm.
- Dimensions
List<Pulumi.
Aws Native. Cloud Watch. Inputs. Alarm Dimension> The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- Evaluate
Low stringSample Count Percentile Used only for alarms based on percentiles.
- Extended
Statistic string The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- Insufficient
Data List<string>Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- Metric
Name string The name of the metric associated with the alarm.
- Metrics
List<Pulumi.
Aws Native. Cloud Watch. Inputs. Alarm Metric Data Query> An array that enables you to create an alarm based on the result of a metric math expression.
- Namespace string
The namespace of the metric associated with the alarm.
- Ok
Actions List<string> The actions to execute when this alarm transitions to the OK state from any other state.
- Period int
The period in seconds, over which the statistic is applied.
- Statistic string
The statistic for the metric associated with the alarm, other than percentile.
- Threshold double
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Threshold
Metric stringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Treat
Missing stringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- Unit string
The unit of the metric associated with the alarm.
- Comparison
Operator string The arithmetic operation to use when comparing the specified statistic and threshold.
- Evaluation
Periods int The number of periods over which data is compared to the specified threshold.
- Actions
Enabled bool Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- Alarm
Actions []string The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- Alarm
Description string The description of the alarm.
- Alarm
Name string The name of the alarm.
- Datapoints
To intAlarm The number of datapoints that must be breaching to trigger the alarm.
- Dimensions
[]Alarm
Dimension Args The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- Evaluate
Low stringSample Count Percentile Used only for alarms based on percentiles.
- Extended
Statistic string The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- Insufficient
Data []stringActions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- Metric
Name string The name of the metric associated with the alarm.
- Metrics
[]Alarm
Metric Data Query Args An array that enables you to create an alarm based on the result of a metric math expression.
- Namespace string
The namespace of the metric associated with the alarm.
- Ok
Actions []string The actions to execute when this alarm transitions to the OK state from any other state.
- Period int
The period in seconds, over which the statistic is applied.
- Statistic string
The statistic for the metric associated with the alarm, other than percentile.
- Threshold float64
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Threshold
Metric stringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Treat
Missing stringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- Unit string
The unit of the metric associated with the alarm.
- comparison
Operator String The arithmetic operation to use when comparing the specified statistic and threshold.
- evaluation
Periods Integer The number of periods over which data is compared to the specified threshold.
- actions
Enabled Boolean Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm
Actions List<String> The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm
Description String The description of the alarm.
- alarm
Name String The name of the alarm.
- datapoints
To IntegerAlarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions
List<Alarm
Dimension> The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate
Low StringSample Count Percentile Used only for alarms based on percentiles.
- extended
Statistic String The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient
Data List<String>Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric
Name String The name of the metric associated with the alarm.
- metrics
List<Alarm
Metric Data Query> An array that enables you to create an alarm based on the result of a metric math expression.
- namespace String
The namespace of the metric associated with the alarm.
- ok
Actions List<String> The actions to execute when this alarm transitions to the OK state from any other state.
- period Integer
The period in seconds, over which the statistic is applied.
- statistic String
The statistic for the metric associated with the alarm, other than percentile.
- threshold Double
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold
Metric StringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat
Missing StringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit String
The unit of the metric associated with the alarm.
- comparison
Operator string The arithmetic operation to use when comparing the specified statistic and threshold.
- evaluation
Periods number The number of periods over which data is compared to the specified threshold.
- actions
Enabled boolean Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm
Actions string[] The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm
Description string The description of the alarm.
- alarm
Name string The name of the alarm.
- datapoints
To numberAlarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions
Alarm
Dimension[] The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate
Low stringSample Count Percentile Used only for alarms based on percentiles.
- extended
Statistic string The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient
Data string[]Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric
Name string The name of the metric associated with the alarm.
- metrics
Alarm
Metric Data Query[] An array that enables you to create an alarm based on the result of a metric math expression.
- namespace string
The namespace of the metric associated with the alarm.
- ok
Actions string[] The actions to execute when this alarm transitions to the OK state from any other state.
- period number
The period in seconds, over which the statistic is applied.
- statistic string
The statistic for the metric associated with the alarm, other than percentile.
- threshold number
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold
Metric stringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat
Missing stringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit string
The unit of the metric associated with the alarm.
- comparison_
operator str The arithmetic operation to use when comparing the specified statistic and threshold.
- evaluation_
periods int The number of periods over which data is compared to the specified threshold.
- actions_
enabled bool Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm_
actions Sequence[str] The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm_
description str The description of the alarm.
- alarm_
name str The name of the alarm.
- datapoints_
to_ intalarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions
Sequence[Alarm
Dimension Args] The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate_
low_ strsample_ count_ percentile Used only for alarms based on percentiles.
- extended_
statistic str The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient_
data_ Sequence[str]actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric_
name str The name of the metric associated with the alarm.
- metrics
Sequence[Alarm
Metric Data Query Args] An array that enables you to create an alarm based on the result of a metric math expression.
- namespace str
The namespace of the metric associated with the alarm.
- ok_
actions Sequence[str] The actions to execute when this alarm transitions to the OK state from any other state.
- period int
The period in seconds, over which the statistic is applied.
- statistic str
The statistic for the metric associated with the alarm, other than percentile.
- threshold float
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold_
metric_ strid In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat_
missing_ strdata Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit str
The unit of the metric associated with the alarm.
- comparison
Operator String The arithmetic operation to use when comparing the specified statistic and threshold.
- evaluation
Periods Number The number of periods over which data is compared to the specified threshold.
- actions
Enabled Boolean Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm
Actions List<String> The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm
Description String The description of the alarm.
- alarm
Name String The name of the alarm.
- datapoints
To NumberAlarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions List<Property Map>
The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate
Low StringSample Count Percentile Used only for alarms based on percentiles.
- extended
Statistic String The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient
Data List<String>Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric
Name String The name of the metric associated with the alarm.
- metrics List<Property Map>
An array that enables you to create an alarm based on the result of a metric math expression.
- namespace String
The namespace of the metric associated with the alarm.
- ok
Actions List<String> The actions to execute when this alarm transitions to the OK state from any other state.
- period Number
The period in seconds, over which the statistic is applied.
- statistic String
The statistic for the metric associated with the alarm, other than percentile.
- threshold Number
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold
Metric StringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat
Missing StringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit String
The unit of the metric associated with the alarm.
Outputs
All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:
Supporting Types
AlarmDimension, AlarmDimensionArgs
AlarmMetric, AlarmMetricArgs
- Dimensions
List<Pulumi.
Aws Native. Cloud Watch. Inputs. Alarm Dimension> The dimensions for the metric.
- Metric
Name string The name of the metric.
- Namespace string
The namespace of the metric.
- Dimensions
[]Alarm
Dimension The dimensions for the metric.
- Metric
Name string The name of the metric.
- Namespace string
The namespace of the metric.
- dimensions
List<Alarm
Dimension> The dimensions for the metric.
- metric
Name String The name of the metric.
- namespace String
The namespace of the metric.
- dimensions
Alarm
Dimension[] The dimensions for the metric.
- metric
Name string The name of the metric.
- namespace string
The namespace of the metric.
- dimensions
Sequence[Alarm
Dimension] The dimensions for the metric.
- metric_
name str The name of the metric.
- namespace str
The namespace of the metric.
- dimensions List<Property Map>
The dimensions for the metric.
- metric
Name String The name of the metric.
- namespace String
The namespace of the metric.
AlarmMetricDataQuery, AlarmMetricDataQueryArgs
- Id string
A short name used to tie this object to the results in the response.
- Account
Id string The ID of the account where the metrics are located, if this is a cross-account alarm.
- Expression string
The math expression to be performed on the returned data.
- Label string
A human-readable label for this metric or expression.
- Metric
Stat Pulumi.Aws Native. Cloud Watch. Inputs. Alarm Metric Stat The metric to be returned, along with statistics, period, and units.
- Period int
The period in seconds, over which the statistic is applied.
- Return
Data bool This option indicates whether to return the timestamps and raw data values of this metric.
- Id string
A short name used to tie this object to the results in the response.
- Account
Id string The ID of the account where the metrics are located, if this is a cross-account alarm.
- Expression string
The math expression to be performed on the returned data.
- Label string
A human-readable label for this metric or expression.
- Metric
Stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- Period int
The period in seconds, over which the statistic is applied.
- Return
Data bool This option indicates whether to return the timestamps and raw data values of this metric.
- id String
A short name used to tie this object to the results in the response.
- account
Id String The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression String
The math expression to be performed on the returned data.
- label String
A human-readable label for this metric or expression.
- metric
Stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- period Integer
The period in seconds, over which the statistic is applied.
- return
Data Boolean This option indicates whether to return the timestamps and raw data values of this metric.
- id string
A short name used to tie this object to the results in the response.
- account
Id string The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression string
The math expression to be performed on the returned data.
- label string
A human-readable label for this metric or expression.
- metric
Stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- period number
The period in seconds, over which the statistic is applied.
- return
Data boolean This option indicates whether to return the timestamps and raw data values of this metric.
- id str
A short name used to tie this object to the results in the response.
- account_
id str The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression str
The math expression to be performed on the returned data.
- label str
A human-readable label for this metric or expression.
- metric_
stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- period int
The period in seconds, over which the statistic is applied.
- return_
data bool This option indicates whether to return the timestamps and raw data values of this metric.
- id String
A short name used to tie this object to the results in the response.
- account
Id String The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression String
The math expression to be performed on the returned data.
- label String
A human-readable label for this metric or expression.
- metric
Stat Property Map The metric to be returned, along with statistics, period, and units.
- period Number
The period in seconds, over which the statistic is applied.
- return
Data Boolean This option indicates whether to return the timestamps and raw data values of this metric.
AlarmMetricStat, AlarmMetricStatArgs
- Metric
Pulumi.
Aws Native. Cloud Watch. Inputs. Alarm Metric The metric to return, including the metric name, namespace, and dimensions.
- Period int
The granularity, in seconds, of the returned data points.
- Stat string
The statistic to return.
- Unit string
The unit to use for the returned data points.
- Metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- Period int
The granularity, in seconds, of the returned data points.
- Stat string
The statistic to return.
- Unit string
The unit to use for the returned data points.
- metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- period Integer
The granularity, in seconds, of the returned data points.
- stat String
The statistic to return.
- unit String
The unit to use for the returned data points.
- metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- period number
The granularity, in seconds, of the returned data points.
- stat string
The statistic to return.
- unit string
The unit to use for the returned data points.
- metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- period int
The granularity, in seconds, of the returned data points.
- stat str
The statistic to return.
- unit str
The unit to use for the returned data points.
- metric Property Map
The metric to return, including the metric name, namespace, and dimensions.
- period Number
The granularity, in seconds, of the returned data points.
- stat String
The statistic to return.
- unit String
The unit to use for the returned data points.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.