Skip to main content

@swamp/aws/cloudwatch

v2026.04.23.3

AWS CLOUDWATCH infrastructure models

Repository

https://github.com/systeminit/swamp-extensions

Labels

awscloudwatchcloudinfrastructure

Contents

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/aws/cloudwatch

@swamp/aws/cloudwatch/alarmv2026.04.23.2alarm.ts

Global Arguments

ArgumentTypeDescription
ThresholdMetricId?stringIn 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.
EvaluateLowSampleCountPercentile?stringUsed only for alarms based on percentiles. If ignore, the alarm state does not change during periods with too few data points to be statistically significant. If evaluate or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.
ExtendedStatistic?stringThe percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. For an alarm based on a metric, you must specify either Statistic or ExtendedStatistic but not both. For an alarm based on a math expression, you can't specify ExtendedStatistic. Instead, you use Metrics.
ComparisonOperator?stringThe arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
TreatMissingData?stringSets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing. For more information, see [Configuring How Alarms Treat Missing Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data) in the *Amazon User Guide*. If you omit this parameter, the default behavior of missing is used.
Dimensions?arrayThe 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.
Period?numberThe period, in seconds, over which the statistic is applied. This is required for an alarm based on a metric. Valid values are 10, 20, 30, 60, and any multiple of 60. For an alarm based on a math expression, you can't specify Period, and instead you use the Metrics parameter. *Minimum:* 10
EvaluationPeriods?numberThe number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and DatapointsToAlarm is the M. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
Unit?stringThe unit of the metric associated with the alarm. Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a Metrics array. You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Secon
Namespace?stringThe namespace of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify Namespace and you use Metrics instead. For a list of namespaces for metrics from AWS services, see [Services That Publish Metrics.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html)
OKActions?arrayThe actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
AlarmActions?arrayThe list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *API Reference*.
MetricName?stringThe name of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you use Metrics instead and you can't specify MetricName.
ActionsEnabled?booleanIndicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
Metrics?arrayAn array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression. If you specify the Metrics parameter, you cannot specify MetricName, Dimensions, Period, Namespace, Statistic, ExtendedStatistic, or Unit.
AlarmDescription?stringThe description of the alarm.
AlarmName?stringThe name of the alarm. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the alarm name. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
Statistic?stringThe statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ExtendedStatistic. For an alarm based on a metric, you must specify either Statistic or ExtendedStatistic but not both. For an alarm based on a math expression, you can't specify Statistic. Instead, you use Metrics.
InsufficientDataActions?arrayThe actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
DatapointsToAlarm?numberThe number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M, and the value that you set for EvaluationPeriods is the N value. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*. If you omit this parameter, CW uses the same value here that you set for EvaluationPeriods, and
Threshold?numberThe value to compare with the specified statistic.
Tags?arrayA list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the cloudwatch:TagResource permission. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
EvaluationCriteria?object
EvaluationInterval?number
createCreate a CloudWatch Alarm
getGet a CloudWatch Alarm
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch Alarm
updateUpdate a CloudWatch Alarm
deleteDelete a CloudWatch Alarm
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch Alarm
syncSync CloudWatch Alarm state from AWS

Resources

state(infinite)— CloudWatch Alarm resource state
@swamp/aws/cloudwatch/alarm-mute-rulev2026.04.23.2alarm_mute_rule.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
Name?stringThe name of the AlarmMuteRule
Description?stringThe description of the AlarmMuteRule
RuleobjectThe rule for the mute
MuteTargets?objectTargets to be muted
StartDate?stringThe date, with the same timezone offset as "ScheduleTimezone", after which the alarm mute rule will become active.
ExpireDate?stringThe date, with the same timezone offset as "ScheduleTimezone" after which the alarm mute rule will be expired.
Tags?arrayAn array of key-value pairs to apply to this resource.
createCreate a CloudWatch AlarmMuteRule
getGet a CloudWatch AlarmMuteRule
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch AlarmMuteRule
updateUpdate a CloudWatch AlarmMuteRule
deleteDelete a CloudWatch AlarmMuteRule
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch AlarmMuteRule
syncSync CloudWatch AlarmMuteRule state from AWS

Resources

state(infinite)— CloudWatch AlarmMuteRule resource state
@swamp/aws/cloudwatch/composite-alarmv2026.04.23.2composite_alarm.ts

Global Arguments

ArgumentTypeDescription
AlarmName?stringThe name of the Composite Alarm
AlarmRulestringExpression which aggregates the state of other Alarms (Metric or Composite Alarms)
AlarmDescription?stringThe description of the alarm
ActionsEnabled?booleanIndicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
OKActions?arrayThe actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
AlarmActions?arrayThe list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
InsufficientDataActions?arrayThe actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
ActionsSuppressor?stringActions will be suppressed if the suppressor alarm is in the ALARM state. ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
ActionsSuppressorWaitPeriod?numberActions will be suppressed if ExtensionPeriod is active. The length of time that actions are suppressed is in seconds.
ActionsSuppressorExtensionPeriod?numberActions will be suppressed if WaitPeriod is active. The length of time that actions are suppressed is in seconds.
Tags?arrayA list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
createCreate a CloudWatch CompositeAlarm
getGet a CloudWatch CompositeAlarm
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch CompositeAlarm
updateUpdate a CloudWatch CompositeAlarm
deleteDelete a CloudWatch CompositeAlarm
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch CompositeAlarm
syncSync CloudWatch CompositeAlarm state from AWS

Resources

state(infinite)— CloudWatch CompositeAlarm resource state
@swamp/aws/cloudwatch/dashboardv2026.04.23.2dashboard.ts

Global Arguments

ArgumentTypeDescription
DashboardName?stringThe name of the dashboard. The name must be between 1 and 255 characters. If you do not specify a name, one will be generated automatically.
DashboardBodystringThe detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard
createCreate a CloudWatch Dashboard
getGet a CloudWatch Dashboard
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch Dashboard
updateUpdate a CloudWatch Dashboard
deleteDelete a CloudWatch Dashboard
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch Dashboard
syncSync CloudWatch Dashboard state from AWS

Resources

state(infinite)— CloudWatch Dashboard resource state
@swamp/aws/cloudwatch/metric-streamv2026.04.23.2metric_stream.ts

Global Arguments

ArgumentTypeDescription
ExcludeFilters?arrayDefine which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
FirehoseArn?stringThe ARN of the Kinesis Firehose where to stream the data.
IncludeFilters?arrayDefine which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
Name?stringName of the metric stream.
RoleArn?stringThe ARN of the role that provides access to the Kinesis Firehose.
OutputFormat?stringThe output format of the data streamed to the Kinesis Firehose.
StatisticsConfigurations?arrayBy default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
Tags?arrayA set of tags to assign to the delivery stream.
IncludeLinkedAccountsMetrics?booleanIf you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
createCreate a CloudWatch MetricStream
getGet a CloudWatch MetricStream
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch MetricStream
updateUpdate a CloudWatch MetricStream
deleteDelete a CloudWatch MetricStream
ArgumentTypeDescription
identifierstringThe primary identifier of the CloudWatch MetricStream
syncSync CloudWatch MetricStream state from AWS

Resources

state(infinite)— CloudWatch MetricStream resource state