1. Packages
  2. AWS Native
  3. API Docs
  4. cloudwatch
  5. Alarm

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.77.0 published on Wednesday, Sep 20, 2023 by Pulumi

aws-native.cloudwatch.Alarm

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.77.0 published on Wednesday, Sep 20, 2023 by Pulumi

    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)
    public Alarm(String name, AlarmArgs args)
    public Alarm(String name, AlarmArgs args, CustomResourceOptions options)
    
    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:

    ComparisonOperator string

    The arithmetic operation to use when comparing the specified statistic and threshold.

    EvaluationPeriods int

    The number of periods over which data is compared to the specified threshold.

    ActionsEnabled bool

    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

    AlarmActions List<string>

    The list of actions to execute when this alarm transitions into an ALARM state from any other state.

    AlarmDescription string

    The description of the alarm.

    AlarmName string

    The name of the alarm.

    DatapointsToAlarm int

    The number of datapoints that must be breaching to trigger the alarm.

    Dimensions List<Pulumi.AwsNative.CloudWatch.Inputs.AlarmDimension>

    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.

    EvaluateLowSampleCountPercentile string

    Used only for alarms based on percentiles.

    ExtendedStatistic string

    The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.

    InsufficientDataActions List<string>

    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

    MetricName string

    The name of the metric associated with the alarm.

    Metrics List<Pulumi.AwsNative.CloudWatch.Inputs.AlarmMetricDataQuery>

    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.

    OkActions 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.

    ThresholdMetricId string

    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.

    TreatMissingData string

    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.

    ComparisonOperator string

    The arithmetic operation to use when comparing the specified statistic and threshold.

    EvaluationPeriods int

    The number of periods over which data is compared to the specified threshold.

    ActionsEnabled bool

    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

    AlarmActions []string

    The list of actions to execute when this alarm transitions into an ALARM state from any other state.

    AlarmDescription string

    The description of the alarm.

    AlarmName string

    The name of the alarm.

    DatapointsToAlarm int

    The number of datapoints that must be breaching to trigger the alarm.

    Dimensions []AlarmDimensionArgs

    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.

    EvaluateLowSampleCountPercentile string

    Used only for alarms based on percentiles.

    ExtendedStatistic string

    The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.

    InsufficientDataActions []string

    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

    MetricName string

    The name of the metric associated with the alarm.

    Metrics []AlarmMetricDataQueryArgs

    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.

    OkActions []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.

    ThresholdMetricId string

    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.

    TreatMissingData string

    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.

    comparisonOperator String

    The arithmetic operation to use when comparing the specified statistic and threshold.

    evaluationPeriods Integer

    The number of periods over which data is compared to the specified threshold.

    actionsEnabled Boolean

    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

    alarmActions List<String>

    The list of actions to execute when this alarm transitions into an ALARM state from any other state.

    alarmDescription String

    The description of the alarm.

    alarmName String

    The name of the alarm.

    datapointsToAlarm Integer

    The number of datapoints that must be breaching to trigger the alarm.

    dimensions List<AlarmDimension>

    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.

    evaluateLowSampleCountPercentile String

    Used only for alarms based on percentiles.

    extendedStatistic String

    The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.

    insufficientDataActions List<String>

    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

    metricName String

    The name of the metric associated with the alarm.

    metrics List<AlarmMetricDataQuery>

    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.

    okActions 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.

    thresholdMetricId String

    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.

    treatMissingData String

    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.

    comparisonOperator string

    The arithmetic operation to use when comparing the specified statistic and threshold.

    evaluationPeriods number

    The number of periods over which data is compared to the specified threshold.

    actionsEnabled boolean

    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

    alarmActions string[]

    The list of actions to execute when this alarm transitions into an ALARM state from any other state.

    alarmDescription string

    The description of the alarm.

    alarmName string

    The name of the alarm.

    datapointsToAlarm number

    The number of datapoints that must be breaching to trigger the alarm.

    dimensions AlarmDimension[]

    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.

    evaluateLowSampleCountPercentile string

    Used only for alarms based on percentiles.

    extendedStatistic string

    The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.

    insufficientDataActions string[]

    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

    metricName string

    The name of the metric associated with the alarm.

    metrics AlarmMetricDataQuery[]

    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.

    okActions 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.

    thresholdMetricId string

    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.

    treatMissingData string

    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_alarm int

    The number of datapoints that must be breaching to trigger the alarm.

    dimensions Sequence[AlarmDimensionArgs]

    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_sample_count_percentile str

    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_actions Sequence[str]

    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[AlarmMetricDataQueryArgs]

    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_id str

    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_data str

    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.

    comparisonOperator String

    The arithmetic operation to use when comparing the specified statistic and threshold.

    evaluationPeriods Number

    The number of periods over which data is compared to the specified threshold.

    actionsEnabled Boolean

    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

    alarmActions List<String>

    The list of actions to execute when this alarm transitions into an ALARM state from any other state.

    alarmDescription String

    The description of the alarm.

    alarmName String

    The name of the alarm.

    datapointsToAlarm Number

    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.

    evaluateLowSampleCountPercentile String

    Used only for alarms based on percentiles.

    extendedStatistic String

    The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.

    insufficientDataActions List<String>

    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

    metricName 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.

    okActions 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.

    thresholdMetricId String

    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.

    treatMissingData String

    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:

    Arn string

    Amazon Resource Name is a unique name for each resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    Arn string

    Amazon Resource Name is a unique name for each resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    arn String

    Amazon Resource Name is a unique name for each resource.

    id String

    The provider-assigned unique ID for this managed resource.

    arn string

    Amazon Resource Name is a unique name for each resource.

    id string

    The provider-assigned unique ID for this managed resource.

    arn str

    Amazon Resource Name is a unique name for each resource.

    id str

    The provider-assigned unique ID for this managed resource.

    arn String

    Amazon Resource Name is a unique name for each resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Supporting Types

    AlarmDimension, AlarmDimensionArgs

    Name string

    The name of the dimension.

    Value string

    The value for the dimension.

    Name string

    The name of the dimension.

    Value string

    The value for the dimension.

    name String

    The name of the dimension.

    value String

    The value for the dimension.

    name string

    The name of the dimension.

    value string

    The value for the dimension.

    name str

    The name of the dimension.

    value str

    The value for the dimension.

    name String

    The name of the dimension.

    value String

    The value for the dimension.

    AlarmMetric, AlarmMetricArgs

    Dimensions List<Pulumi.AwsNative.CloudWatch.Inputs.AlarmDimension>

    The dimensions for the metric.

    MetricName string

    The name of the metric.

    Namespace string

    The namespace of the metric.

    Dimensions []AlarmDimension

    The dimensions for the metric.

    MetricName string

    The name of the metric.

    Namespace string

    The namespace of the metric.

    dimensions List<AlarmDimension>

    The dimensions for the metric.

    metricName String

    The name of the metric.

    namespace String

    The namespace of the metric.

    dimensions AlarmDimension[]

    The dimensions for the metric.

    metricName string

    The name of the metric.

    namespace string

    The namespace of the metric.

    dimensions Sequence[AlarmDimension]

    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.

    metricName 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.

    AccountId 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.

    MetricStat Pulumi.AwsNative.CloudWatch.Inputs.AlarmMetricStat

    The metric to be returned, along with statistics, period, and units.

    Period int

    The period in seconds, over which the statistic is applied.

    ReturnData 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.

    AccountId 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.

    MetricStat AlarmMetricStat

    The metric to be returned, along with statistics, period, and units.

    Period int

    The period in seconds, over which the statistic is applied.

    ReturnData 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.

    accountId 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.

    metricStat AlarmMetricStat

    The metric to be returned, along with statistics, period, and units.

    period Integer

    The period in seconds, over which the statistic is applied.

    returnData 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.

    accountId 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.

    metricStat AlarmMetricStat

    The metric to be returned, along with statistics, period, and units.

    period number

    The period in seconds, over which the statistic is applied.

    returnData 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 AlarmMetricStat

    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.

    accountId 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.

    metricStat 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.

    returnData Boolean

    This option indicates whether to return the timestamps and raw data values of this metric.

    AlarmMetricStat, AlarmMetricStatArgs

    Metric Pulumi.AwsNative.CloudWatch.Inputs.AlarmMetric

    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 AlarmMetric

    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 AlarmMetric

    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 AlarmMetric

    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 AlarmMetric

    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 logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.77.0 published on Wednesday, Sep 20, 2023 by Pulumi