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*.
Idawscc.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 &#91;Tagging your resources&#93;(https://docs.aws.amazon.com/iotevents/latest/developerguide/tagging-iotevents.html) in the &#42;Developer Guide&#42;.<br />You can create up to 50 tags for one alarm model.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcealarm_modelsINSERTRoleArn, AlarmRule, region
delete_resourcealarm_modelsDELETEIdentifier, region
update_resourcealarm_modelsUPDATEIdentifier, PatchDocument, region
list_resourcesalarm_models_list_onlySELECTregion
get_resourcealarm_modelsSELECTIdentifier, region

SELECT examples

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 awscc.iotevents.alarm_models
WHERE
region = 'us-east-1' AND
Identifier = '{{ alarm_model_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.iotevents.alarm_models
SET PatchDocument = string('{{ {
"AlarmModelDescription": alarm_model_description,
"RoleArn": role_arn,
"Severity": severity,
"AlarmRule": alarm_rule,
"AlarmEventActions": alarm_event_actions,
"AlarmCapabilities": alarm_capabilities,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ alarm_model_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.iotevents.alarm_models
WHERE
Identifier = '{{ alarm_model_name }}' AND
region = 'us-east-1';

Permissions

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

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