Skip to main content

alarm_models

Creates, updates, deletes or gets an alarm_model resource or lists alarm_models in a region

Overview

Namealarm_models
TypeResource
DescriptionRepresents an alarm model to monitor an ITE input attribute. You can use the alarm to get notified when the value is outside a specified range. For more information, see [Create an alarm model](https://docs.aws.amazon.com/iotevents/latest/developerguide/create-alarms.html) in the *Developer Guide*.
Idaws.iotevents.alarm_models

Fields

NameDatatypeDescription
alarm_model_namestringThe name of the alarm model.
alarm_model_descriptionstringThe description of the alarm model.
role_arnstringThe ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *General Reference*.
keystringAn input attribute used as a key to create an alarm. ITE routes [inputs](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Input.html) associated with this key to the alarm.
severityintegerA non-negative integer that reflects the severity level of the alarm.
alarm_ruleobjectDefines when your alarm is invoked.
alarm_event_actionsobjectContains information about one or more alarm actions.
alarm_capabilitiesobjectContains the configuration information of alarm state changes.
tagsarrayA list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. For more information, see [Tagging your resources](https://docs.aws.amazon.com/iotevents/latest/developerguide/tagging-iotevents.html) in the *Developer Guide*.
You can create up to 50 tags for one alarm model.
regionstringAWS region.

For more information, see AWS::IoTEvents::AlarmModel.

Methods

NameAccessible byRequired Params
create_resourceINSERTRoleArn, AlarmRule, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all alarm_models in a region.

SELECT
region,
alarm_model_name,
alarm_model_description,
role_arn,
key,
severity,
alarm_rule,
alarm_event_actions,
alarm_capabilities,
tags
FROM aws.iotevents.alarm_models
WHERE region = 'us-east-1';

Gets all properties from an individual alarm_model.

SELECT
region,
alarm_model_name,
alarm_model_description,
role_arn,
key,
severity,
alarm_rule,
alarm_event_actions,
alarm_capabilities,
tags
FROM aws.iotevents.alarm_models
WHERE region = 'us-east-1' AND data__Identifier = '<AlarmModelName>';

INSERT example

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

/*+ create */
INSERT INTO aws.iotevents.alarm_models (
RoleArn,
AlarmRule,
region
)
SELECT
'{{ RoleArn }}',
'{{ AlarmRule }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iotevents.alarm_models
WHERE data__Identifier = '<AlarmModelName>'
AND region = 'us-east-1';

Permissions

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

Create

iotevents:CreateAlarmModel,
iotevents:UpdateInputRouting,
iotevents:DescribeAlarmModel,
iotevents:ListTagsForResource,
iotevents:TagResource,
iam:PassRole

Read

iotevents:DescribeAlarmModel,
iotevents:ListTagsForResource

Update

iotevents:UpdateAlarmModel,
iotevents:UpdateInputRouting,
iotevents:DescribeAlarmModel,
iotevents:ListTagsForResource,
iotevents:UntagResource,
iotevents:TagResource,
iam:PassRole

Delete

iotevents:DeleteAlarmModel,
iotevents:DescribeAlarmModel

List

iotevents:ListAlarmModels