AwsCloudwatchMetricAlarmArgs

interface AwsCloudwatchMetricAlarmArgs extends Omit<aws.cloudwatch.MetricAlarmArgs, 'name'> { actionsEnabled?: Input<boolean | undefined>; alarmActions?: Input<Input<string | Topic>[] | undefined>; alarmDescription?: Input<string | undefined>; comparisonOperator?: Input<string | undefined>; datapointsToAlarm?: Input<number | undefined>; dimensions?: Input<{ [key: string]: Input<string> } | undefined>; evaluateLowSampleCountPercentiles?: Input<string | undefined>; evaluationCriteria?: Input<MetricAlarmEvaluationCriteria | undefined>; evaluationInterval?: Input<number | undefined>; evaluationPeriods?: Input<number | undefined>; extendedStatistic?: Input<string | undefined>; insufficientDataActions?: Input<Input<string | Topic>[] | undefined>; lambdaActions?: AwsCloudwatchMetricAlarmLambdaActionsArgs; metric?: AwsCloudwatchMetricReference; metricName?: Input<string | undefined>; metricQueries?: Input<Input<MetricAlarmMetricQuery>[] | undefined>; name: string; namespace?: Input<string | undefined>; okActions?: Input<Input<string | Topic>[] | undefined>; period?: Input<number | undefined>; region?: Input<string | undefined>; statistic?: Input<string | undefined>; tags?: Input<{ [key: string]: Input<string> } | undefined>; threshold?: Input<number | undefined>; thresholdMetricId?: Input<string | undefined>; treatMissingData?: Input<string | undefined>; unit?: Input<string | undefined>; }

Input arguments for the CloudWatch metric-alarm capability.

Remarks

tags are merged with default runtime tags (<namespace>:project and <namespace>:env). Caller-provided values override defaults when keys collide.

If metricQueries is set, metric is not supported. If metricQueries is not set, provide metric or both metricName and namespace.

Example

CODE
const metricAlarm: AwsCloudwatchMetricAlarmArgs = {
  name: 'ordersErrorsAlarm',
  comparisonOperator: 'GreaterThanOrEqualToThreshold',
  evaluationPeriods: 1,
  period: 60,
  statistic: 'Sum',
  threshold: 1,
  metric: {
    namespace: 'Jobcloud/Application',
    metricName: 'OrdersErrorCount',
  },
};

Hierarchy

  • MetricAlarmArgs, "name">
  • AwsCloudwatchMetricAlarmArgs

Properties

actionsEnabled: Input<boolean | undefined>

Inherited from actionsEnabled

Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to true.

alarmActions: Input<Input<string | Topic>[] | undefined>

Inherited from alarmActions

The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

alarmDescription: Input<string | undefined>

Inherited from alarmDescription

The description for the alarm.

comparisonOperator: Input<string | undefined>

Inherited from comparisonOperator

The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold. Additionally, the values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

datapointsToAlarm: Input<number | undefined>

Inherited from datapointsToAlarm

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

dimensions: Input<{ [key: string]: Input<string> } | undefined>

Inherited from dimensions

The dimensions for the alarm's associated metric. For the list of available dimensions see the AWS documentation here.

evaluateLowSampleCountPercentiles: Input<string | undefined>

Inherited from evaluateLowSampleCountPercentiles

Used only for alarms based on percentiles. If you specify ignore, the alarm state will not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available. The following values are supported: ignore, and evaluate.

evaluationCriteria: Input<MetricAlarmEvaluationCriteria | undefined>

Inherited from evaluationCriteria

The evaluation criteria for PromQL alarms. Cannot be used with traditional metric alarm parameters.

evaluationInterval: Input<number | undefined>

Inherited from evaluationInterval

The frequency, in seconds, at which the alarm is evaluated. Valid values are 10, 20, 30, and any multiple of 60. Required when using evaluationCriteria.

evaluationPeriods: Input<number | undefined>

Inherited from evaluationPeriods

The number of periods over which data is compared to the specified threshold. Required for traditional metric alarms.

extendedStatistic: Input<string | undefined>

Inherited from extendedStatistic

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

insufficientDataActions: Input<Input<string | Topic>[] | undefined>

Inherited from insufficientDataActions

The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

lambdaActions: AwsCloudwatchMetricAlarmLambdaActionsArgs

Managed Lambda alarm actions with automatic resource-policy permissions.

metric: AwsCloudwatchMetricReference

Optional metric reference used to populate metricName and namespace.

metricName: Input<string | undefined>

Inherited from metricName

The name for the alarm's associated metric. See docs for supported metrics.

metricQueries: Input<Input<MetricAlarmMetricQuery>[] | undefined>

Inherited from metricQueries

Enables you to create an alarm based on a metric math expression. You may specify at most 20.

name: string

Required metric-alarm purpose name used as the Pulumi logical identity source.

Remarks

Must be a synchronous plain string available at preview time. The AWS provider alarm name is derived separately from this value using the AWS naming style.

namespace: Input<string | undefined>

Inherited from namespace

The namespace for the alarm's associated metric. See docs for the list of namespaces. See docs for supported metrics.

okActions: Input<Input<string | Topic>[] | undefined>

Inherited from okActions

The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

period: Input<number | undefined>

Inherited from period

The period in seconds over which the specified statistic is applied. Valid values are 10, 20, 30, or any multiple of 60.

region: Input<string | undefined>

Inherited from region

Region where this resource will be managed. Defaults to the Region set in the provider configuration.

statistic: Input<string | undefined>

Inherited from statistic

The statistic to apply to the alarm's associated metric. Either of the following is supported: SampleCount, Average, Sum, Minimum, Maximum

tags: Input<{ [key: string]: Input<string> } | undefined>

Inherited from tags

A map of tags to assign to the resource. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

See related part of AWS Docs for details about valid values.

NOTE: If you specify at least one metricQuery, you may not specify a metricName, namespace, period or statistic. If you do not specify a metricQuery, you must specify each of these (although you may use extendedStatistic instead of statistic).

threshold: Input<number | undefined>

Inherited from threshold

The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.

thresholdMetricId: Input<string | undefined>

Inherited from thresholdMetricId

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

treatMissingData: Input<string | undefined>

Inherited from treatMissingData

Sets how this alarm is to handle missing data points. The following values are supported: missing, ignore, breaching and notBreaching. Defaults to missing.

unit: Input<string | undefined>

Inherited from unit

The unit for the alarm's associated metric.