create_alarm_model
async
¶
create_alarm_model(
alarm_model_name: AlarmModelName,
role_arn: AmazonResourceName,
alarm_rule: AlarmRule,
*,
config_overrides: Optional[AsyncIoTEventsClientConfig] = None,
alarm_model_description: Optional[AlarmModelDescription] = None,
tags: Optional[Tags] = None,
key: Optional[AttributeJsonPath] = None,
severity: Optional[Severity] = None,
alarm_notification: Optional[AlarmNotification] = None,
alarm_event_actions: Optional[AlarmEventActions] = None,
alarm_capabilities: Optional[AlarmCapabilities] = None,
) -> CreateAlarmModelResponse
Creates an alarm model to monitor an AWS IoT Events 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 in the AWS IoT Events Developer Guide.
Parameters:
-
alarm_model_name(AlarmModelName) –A unique name that helps you identify the alarm model. You can't change this name after you create the alarm model.
-
alarm_model_description(Optional[AlarmModelDescription], default:None) –A description that tells you what the alarm model detects.
-
role_arn(AmazonResourceName) –The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference.
-
tags(Optional[Tags], default:None) –A 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 AWS IoT Events resources in the AWS IoT Events Developer Guide.
You can create up to 50 tags for one alarm model.
-
key(Optional[AttributeJsonPath], default:None) –An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this key to the alarm.
-
severity(Optional[Severity], default:None) –A non-negative integer that reflects the severity level of the alarm.
-
alarm_rule(AlarmRule) –Defines when your alarm is invoked.
-
alarm_notification(Optional[AlarmNotification], default:None) –Contains information about one or more notification actions.
-
alarm_event_actions(Optional[AlarmEventActions], default:None) –Contains information about one or more alarm actions.
-
alarm_capabilities(Optional[AlarmCapabilities], default:None) –Contains the configuration information of alarm state changes.
Raises:
-
InternalFailureException–An internal failure occurred.
-
InvalidRequestException–The request was invalid.
-
LimitExceededException–A limit was exceeded.
-
ResourceAlreadyExistsException–The resource already exists.
-
ResourceInUseException–The resource is in use.
-
ServiceUnavailableException–The service is currently unavailable.
-
ThrottlingException–The request could not be completed due to throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iot_events/_services/async_io_t_events.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |