Skip to main content

composite_alarms

Creates, updates, deletes or gets a composite_alarm resource or lists composite_alarms in a region

Overview

Namecomposite_alarms
TypeResource
DescriptionThe AWS::CloudWatch::CompositeAlarm type specifies an alarm which aggregates the states of other Alarms (Metric or Composite Alarms) as defined by the AlarmRule expression
Idaws.cloudwatch.composite_alarms

Fields

NameDatatypeDescription
arnstringAmazon Resource Name (ARN) of the alarm
alarm_namestringThe name of the Composite Alarm
alarm_rulestringExpression which aggregates the state of other Alarms (Metric or Composite Alarms)
alarm_descriptionstringThe description of the alarm
actions_enabledbooleanIndicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
ok_actionsarrayThe 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).
alarm_actionsarrayThe 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).
insufficient_data_actionsarrayThe 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).
actions_suppressorstringActions 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.
actions_suppressor_wait_periodintegerActions will be suppressed if ExtensionPeriod is active. The length of time that actions are suppressed is in seconds.
actions_suppressor_extension_periodintegerActions will be suppressed if WaitPeriod is active. The length of time that actions are suppressed is in seconds.
tagsarrayA list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAlarmRule, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all composite_alarms in a region.

SELECT
region,
arn,
alarm_name,
alarm_rule,
alarm_description,
actions_enabled,
ok_actions,
alarm_actions,
insufficient_data_actions,
actions_suppressor,
actions_suppressor_wait_period,
actions_suppressor_extension_period,
tags
FROM aws.cloudwatch.composite_alarms
WHERE region = 'us-east-1';

Gets all properties from an individual composite_alarm.

SELECT
region,
arn,
alarm_name,
alarm_rule,
alarm_description,
actions_enabled,
ok_actions,
alarm_actions,
insufficient_data_actions,
actions_suppressor,
actions_suppressor_wait_period,
actions_suppressor_extension_period,
tags
FROM aws.cloudwatch.composite_alarms
WHERE region = 'us-east-1' AND data__Identifier = '<AlarmName>';

INSERT example

Use the following StackQL query and manifest file to create a new composite_alarm resource, using stack-deploy.

/*+ create */
INSERT INTO aws.cloudwatch.composite_alarms (
AlarmRule,
region
)
SELECT
'{{ AlarmRule }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.cloudwatch.composite_alarms
WHERE data__Identifier = '<AlarmName>'
AND region = 'us-east-1';

Permissions

To operate on the composite_alarms resource, the following permissions are required:

Create

cloudwatch:DescribeAlarms,
cloudwatch:PutCompositeAlarm,
cloudwatch:TagResource

Read

cloudwatch:DescribeAlarms,
cloudwatch:ListTagsForResource

Update

cloudwatch:DescribeAlarms,
cloudwatch:PutCompositeAlarm,
cloudwatch:TagResource,
cloudwatch:UntagResource

Delete

cloudwatch:DescribeAlarms,
cloudwatch:DeleteAlarms

List

cloudwatch:DescribeAlarms