CfnAlarmModelPropsMixin
- class aws_cdk.mixins_preview.aws_iotevents.mixins.CfnAlarmModelPropsMixin(props, *, strategy=None)
Bases:
MixinRepresents 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 .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-alarmmodel.html
- CloudformationResource:
AWS::IoTEvents::AlarmModel
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins cfn_alarm_model_props_mixin = iotevents_mixins.CfnAlarmModelPropsMixin(iotevents_mixins.CfnAlarmModelMixinProps( alarm_capabilities=iotevents_mixins.CfnAlarmModelPropsMixin.AlarmCapabilitiesProperty( acknowledge_flow=iotevents_mixins.CfnAlarmModelPropsMixin.AcknowledgeFlowProperty( enabled=False ), initialization_configuration=iotevents_mixins.CfnAlarmModelPropsMixin.InitializationConfigurationProperty( disabled_on_initialization=False ) ), alarm_event_actions=iotevents_mixins.CfnAlarmModelPropsMixin.AlarmEventActionsProperty( alarm_actions=[iotevents_mixins.CfnAlarmModelPropsMixin.AlarmActionProperty( dynamo_db=iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBProperty( hash_key_field="hashKeyField", hash_key_type="hashKeyType", hash_key_value="hashKeyValue", operation="operation", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), payload_field="payloadField", range_key_field="rangeKeyField", range_key_type="rangeKeyType", range_key_value="rangeKeyValue", table_name="tableName" ), dynamo_dBv2=iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBv2Property( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), table_name="tableName" ), firehose=iotevents_mixins.CfnAlarmModelPropsMixin.FirehoseProperty( delivery_stream_name="deliveryStreamName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), separator="separator" ), iot_events=iotevents_mixins.CfnAlarmModelPropsMixin.IotEventsProperty( input_name="inputName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), iot_site_wise=iotevents_mixins.CfnAlarmModelPropsMixin.IotSiteWiseProperty( asset_id="assetId", entry_id="entryId", property_alias="propertyAlias", property_id="propertyId", property_value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyValueProperty( quality="quality", timestamp=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty( offset_in_nanos="offsetInNanos", time_in_seconds="timeInSeconds" ), value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyVariantProperty( boolean_value="booleanValue", double_value="doubleValue", integer_value="integerValue", string_value="stringValue" ) ) ), iot_topic_publish=iotevents_mixins.CfnAlarmModelPropsMixin.IotTopicPublishProperty( mqtt_topic="mqttTopic", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), lambda_=iotevents_mixins.CfnAlarmModelPropsMixin.LambdaProperty( function_arn="functionArn", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), sns=iotevents_mixins.CfnAlarmModelPropsMixin.SnsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), target_arn="targetArn" ), sqs=iotevents_mixins.CfnAlarmModelPropsMixin.SqsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), queue_url="queueUrl", use_base64=False ) )] ), alarm_model_description="alarmModelDescription", alarm_model_name="alarmModelName", alarm_rule=iotevents_mixins.CfnAlarmModelPropsMixin.AlarmRuleProperty( simple_rule=iotevents_mixins.CfnAlarmModelPropsMixin.SimpleRuleProperty( comparison_operator="comparisonOperator", input_property="inputProperty", threshold="threshold" ) ), key="key", role_arn="roleArn", severity=123, tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::IoTEvents::AlarmModel.- Parameters:
props (
Union[CfnAlarmModelMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['alarmCapabilities', 'alarmEventActions', 'alarmModelDescription', 'alarmModelName', 'alarmRule', 'key', 'roleArn', 'severity', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AcknowledgeFlowProperty
- class CfnAlarmModelPropsMixin.AcknowledgeFlowProperty(*, enabled=None)
Bases:
objectSpecifies whether to get notified for alarm state changes.
- Parameters:
enabled (
Union[bool,IResolvable,None]) – The value must beTRUEorFALSE. IfTRUE, you receive a notification when the alarm state changes. You must choose to acknowledge the notification before the alarm state can return toNORMAL. IfFALSE, you won’t receive notifications. The alarm automatically changes to theNORMALstate when the input property value returns to the specified range.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins acknowledge_flow_property = iotevents_mixins.CfnAlarmModelPropsMixin.AcknowledgeFlowProperty( enabled=False )
Attributes
- enabled
The value must be
TRUEorFALSE.If
TRUE, you receive a notification when the alarm state changes. You must choose to acknowledge the notification before the alarm state can return toNORMAL. IfFALSE, you won’t receive notifications. The alarm automatically changes to theNORMALstate when the input property value returns to the specified range.
AlarmActionProperty
- class CfnAlarmModelPropsMixin.AlarmActionProperty(*, dynamo_db=None, dynamo_d_bv2=None, firehose=None, iot_events=None, iot_site_wise=None, iot_topic_publish=None, lambda_=None, sns=None, sqs=None)
Bases:
objectSpecifies one of the following actions to receive notifications when the alarm state changes.
- Parameters:
dynamo_db (
Union[IResolvable,DynamoDBProperty,Dict[str,Any],None]) – Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. You must use expressions for all parameters inDynamoDBAction. The expressions accept literals, operators, functions, references, and substitution templates. Examples - For literal values, the expressions must contain single quotes. For example, the value for thehashKeyTypeparameter can be'STRING'. - For references, you must specify either variables or input values. For example, the value for thehashKeyFieldparameter can be$input.GreenhouseInput.name. - For a substitution template, you must use${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for thehashKeyValueparameter uses a substitution template.'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'- For a string concatenation, you must use+. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for thetableNameparameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.dateFor more information, see Expressions in the AWS IoT Events Developer Guide . If the defined payload type is a string,DynamoDBActionwrites non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for thepayloadFieldparameter is<payload-field>_raw.dynamo_d_bv2 (
Union[IResolvable,DynamoDBv2Property,Dict[str,Any],None]) –Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. You must use expressions for all parameters in
DynamoDBv2Action. The expressions accept literals, operators, functions, references, and substitution templates. Examples - For literal values, the expressions must contain single quotes. For example, the value for thetableNameparameter can be'GreenhouseTemperatureTable'. - For references, you must specify either variables or input values. For example, the value for thetableNameparameter can be$variable.ddbtableName. - For a substitution template, you must use${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for thecontentExpressionparameter inPayloaduses a substitution template.'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'- For a string concatenation, you must use+. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for thetableNameparameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.dateFor more information, see Expressions in the AWS IoT Events Developer Guide . The value for thetypeparameter inPayloadmust beJSON.firehose (
Union[IResolvable,FirehoseProperty,Dict[str,Any],None]) – Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.iot_events (
Union[IResolvable,IotEventsProperty,Dict[str,Any],None]) – Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.iot_site_wise (
Union[IResolvable,IotSiteWiseProperty,Dict[str,Any],None]) –Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise . You must use expressions for all parameters in
IotSiteWiseAction. The expressions accept literals, operators, functions, references, and substitutions templates. Examples - For literal values, the expressions must contain single quotes. For example, the value for thepropertyAliasparameter can be'/company/windfarm/3/turbine/7/temperature'. - For references, you must specify either variables or input values. For example, the value for theassetIdparameter can be$input.TurbineInput.assetId1. - For a substitution template, you must use${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for thepropertyAliasparameter uses a substitution template.'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'You must specify eitherpropertyAliasor bothassetIdandpropertyIdto identify the target asset property in AWS IoT SiteWise . For more information, see Expressions in the AWS IoT Events Developer Guide .iot_topic_publish (
Union[IResolvable,IotTopicPublishProperty,Dict[str,Any],None]) – Information required to publish the MQTT message through the AWS IoT message broker.lambda – Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
sns (
Union[IResolvable,SnsProperty,Dict[str,Any],None]) – Information required to publish the Amazon SNS message.sqs (
Union[IResolvable,SqsProperty,Dict[str,Any],None]) – Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins alarm_action_property = iotevents_mixins.CfnAlarmModelPropsMixin.AlarmActionProperty( dynamo_db=iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBProperty( hash_key_field="hashKeyField", hash_key_type="hashKeyType", hash_key_value="hashKeyValue", operation="operation", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), payload_field="payloadField", range_key_field="rangeKeyField", range_key_type="rangeKeyType", range_key_value="rangeKeyValue", table_name="tableName" ), dynamo_dBv2=iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBv2Property( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), table_name="tableName" ), firehose=iotevents_mixins.CfnAlarmModelPropsMixin.FirehoseProperty( delivery_stream_name="deliveryStreamName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), separator="separator" ), iot_events=iotevents_mixins.CfnAlarmModelPropsMixin.IotEventsProperty( input_name="inputName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), iot_site_wise=iotevents_mixins.CfnAlarmModelPropsMixin.IotSiteWiseProperty( asset_id="assetId", entry_id="entryId", property_alias="propertyAlias", property_id="propertyId", property_value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyValueProperty( quality="quality", timestamp=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty( offset_in_nanos="offsetInNanos", time_in_seconds="timeInSeconds" ), value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyVariantProperty( boolean_value="booleanValue", double_value="doubleValue", integer_value="integerValue", string_value="stringValue" ) ) ), iot_topic_publish=iotevents_mixins.CfnAlarmModelPropsMixin.IotTopicPublishProperty( mqtt_topic="mqttTopic", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), lambda_=iotevents_mixins.CfnAlarmModelPropsMixin.LambdaProperty( function_arn="functionArn", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), sns=iotevents_mixins.CfnAlarmModelPropsMixin.SnsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), target_arn="targetArn" ), sqs=iotevents_mixins.CfnAlarmModelPropsMixin.SqsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), queue_url="queueUrl", use_base64=False ) )
Attributes
- dynamo_d_bv2
Defines an action to write to the Amazon DynamoDB table that you created.
The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
You must use expressions for all parameters in
DynamoDBv2Action. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
tableNameparameter can be'GreenhouseTemperatureTable'.For references, you must specify either variables or input values. For example, the value for the
tableNameparameter can be$variable.ddbtableName.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
contentExpressionparameter inPayloaduses a substitution template.'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'For a string concatenation, you must use
+. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
tableNameparameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.dateFor more information, see Expressions in the AWS IoT Events Developer Guide .
The value for the
typeparameter inPayloadmust beJSON.
- dynamo_db
Defines an action to write to the Amazon DynamoDB table that you created.
The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
You must use expressions for all parameters in
DynamoDBAction. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
hashKeyTypeparameter can be'STRING'.For references, you must specify either variables or input values. For example, the value for the
hashKeyFieldparameter can be$input.GreenhouseInput.name.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
hashKeyValueparameter uses a substitution template.'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'For a string concatenation, you must use
+. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
tableNameparameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.dateFor more information, see Expressions in the AWS IoT Events Developer Guide .
If the defined payload type is a string,
DynamoDBActionwrites non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for thepayloadFieldparameter is<payload-field>_raw.
- firehose
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
- iot_events
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
- iot_site_wise
Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .
You must use expressions for all parameters in
IotSiteWiseAction. The expressions accept literals, operators, functions, references, and substitutions templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
propertyAliasparameter can be'/company/windfarm/3/turbine/7/temperature'.For references, you must specify either variables or input values. For example, the value for the
assetIdparameter can be$input.TurbineInput.assetId1.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
propertyAliasparameter uses a substitution template.'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'You must specify either
propertyAliasor bothassetIdandpropertyIdto identify the target asset property in AWS IoT SiteWise .For more information, see Expressions in the AWS IoT Events Developer Guide .
- iot_topic_publish
Information required to publish the MQTT message through the AWS IoT message broker.
- lambda_
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
- sns
Information required to publish the Amazon SNS message.
- sqs
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
AlarmCapabilitiesProperty
- class CfnAlarmModelPropsMixin.AlarmCapabilitiesProperty(*, acknowledge_flow=None, initialization_configuration=None)
Bases:
objectContains the configuration information of alarm state changes.
- Parameters:
acknowledge_flow (
Union[IResolvable,AcknowledgeFlowProperty,Dict[str,Any],None]) – Specifies whether to get notified for alarm state changes.initialization_configuration (
Union[IResolvable,InitializationConfigurationProperty,Dict[str,Any],None]) – Specifies the default alarm state. The configuration applies to all alarms that were created based on this alarm model.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins alarm_capabilities_property = iotevents_mixins.CfnAlarmModelPropsMixin.AlarmCapabilitiesProperty( acknowledge_flow=iotevents_mixins.CfnAlarmModelPropsMixin.AcknowledgeFlowProperty( enabled=False ), initialization_configuration=iotevents_mixins.CfnAlarmModelPropsMixin.InitializationConfigurationProperty( disabled_on_initialization=False ) )
Attributes
- acknowledge_flow
Specifies whether to get notified for alarm state changes.
- initialization_configuration
Specifies the default alarm state.
The configuration applies to all alarms that were created based on this alarm model.
AlarmEventActionsProperty
- class CfnAlarmModelPropsMixin.AlarmEventActionsProperty(*, alarm_actions=None)
Bases:
objectContains information about one or more alarm actions.
- Parameters:
alarm_actions (
Union[IResolvable,Sequence[Union[IResolvable,AlarmActionProperty,Dict[str,Any]]],None]) – Specifies one or more supported actions to receive notifications when the alarm state changes.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins alarm_event_actions_property = iotevents_mixins.CfnAlarmModelPropsMixin.AlarmEventActionsProperty( alarm_actions=[iotevents_mixins.CfnAlarmModelPropsMixin.AlarmActionProperty( dynamo_db=iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBProperty( hash_key_field="hashKeyField", hash_key_type="hashKeyType", hash_key_value="hashKeyValue", operation="operation", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), payload_field="payloadField", range_key_field="rangeKeyField", range_key_type="rangeKeyType", range_key_value="rangeKeyValue", table_name="tableName" ), dynamo_dBv2=iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBv2Property( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), table_name="tableName" ), firehose=iotevents_mixins.CfnAlarmModelPropsMixin.FirehoseProperty( delivery_stream_name="deliveryStreamName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), separator="separator" ), iot_events=iotevents_mixins.CfnAlarmModelPropsMixin.IotEventsProperty( input_name="inputName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), iot_site_wise=iotevents_mixins.CfnAlarmModelPropsMixin.IotSiteWiseProperty( asset_id="assetId", entry_id="entryId", property_alias="propertyAlias", property_id="propertyId", property_value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyValueProperty( quality="quality", timestamp=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty( offset_in_nanos="offsetInNanos", time_in_seconds="timeInSeconds" ), value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyVariantProperty( boolean_value="booleanValue", double_value="doubleValue", integer_value="integerValue", string_value="stringValue" ) ) ), iot_topic_publish=iotevents_mixins.CfnAlarmModelPropsMixin.IotTopicPublishProperty( mqtt_topic="mqttTopic", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), lambda_=iotevents_mixins.CfnAlarmModelPropsMixin.LambdaProperty( function_arn="functionArn", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) ), sns=iotevents_mixins.CfnAlarmModelPropsMixin.SnsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), target_arn="targetArn" ), sqs=iotevents_mixins.CfnAlarmModelPropsMixin.SqsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), queue_url="queueUrl", use_base64=False ) )] )
Attributes
- alarm_actions
Specifies one or more supported actions to receive notifications when the alarm state changes.
AlarmRuleProperty
- class CfnAlarmModelPropsMixin.AlarmRuleProperty(*, simple_rule=None)
Bases:
objectDefines when your alarm is invoked.
- Parameters:
simple_rule (
Union[IResolvable,SimpleRuleProperty,Dict[str,Any],None]) – A rule that compares an input property value to a threshold value with a comparison operator.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins alarm_rule_property = iotevents_mixins.CfnAlarmModelPropsMixin.AlarmRuleProperty( simple_rule=iotevents_mixins.CfnAlarmModelPropsMixin.SimpleRuleProperty( comparison_operator="comparisonOperator", input_property="inputProperty", threshold="threshold" ) )
Attributes
- simple_rule
A rule that compares an input property value to a threshold value with a comparison operator.
AssetPropertyTimestampProperty
- class CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty(*, offset_in_nanos=None, time_in_seconds=None)
Bases:
objectA structure that contains timestamp information. For more information, see TimeInNanos in the AWS IoT SiteWise API Reference .
You must use expressions for all parameters in
AssetPropertyTimestamp. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
timeInSecondsparameter can be'1586400675'.For references, you must specify either variables or input values. For example, the value for the
offsetInNanosparameter can be$variable.time.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
timeInSecondsparameter uses a substitution template.'${$input.TemperatureInput.sensorData.timestamp / 1000}'For more information, see Expressions in the AWS IoT Events Developer Guide .
- Parameters:
offset_in_nanos (
Optional[str]) – The nanosecond offset converted fromtimeInSeconds. The valid range is between 0-999999999.time_in_seconds (
Optional[str]) – The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins asset_property_timestamp_property = iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty( offset_in_nanos="offsetInNanos", time_in_seconds="timeInSeconds" )
Attributes
- offset_in_nanos
The nanosecond offset converted from
timeInSeconds.The valid range is between 0-999999999.
- time_in_seconds
The timestamp, in seconds, in the Unix epoch format.
The valid range is between 1-31556889864403199.
AssetPropertyValueProperty
- class CfnAlarmModelPropsMixin.AssetPropertyValueProperty(*, quality=None, timestamp=None, value=None)
Bases:
objectA structure that contains value information. For more information, see AssetPropertyValue in the AWS IoT SiteWise API Reference .
You must use expressions for all parameters in
AssetPropertyValue. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
qualityparameter can be'GOOD'.For references, you must specify either variables or input values. For example, the value for the
qualityparameter can be$input.TemperatureInput.sensorData.quality.
For more information, see Expressions in the AWS IoT Events Developer Guide .
- Parameters:
quality (
Optional[str]) – The quality of the asset property value. The value must be'GOOD','BAD', or'UNCERTAIN'.timestamp (
Union[IResolvable,AssetPropertyTimestampProperty,Dict[str,Any],None]) – The timestamp associated with the asset property value. The default is the current event time.value (
Union[IResolvable,AssetPropertyVariantProperty,Dict[str,Any],None]) – The value to send to an asset property.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins asset_property_value_property = iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyValueProperty( quality="quality", timestamp=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty( offset_in_nanos="offsetInNanos", time_in_seconds="timeInSeconds" ), value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyVariantProperty( boolean_value="booleanValue", double_value="doubleValue", integer_value="integerValue", string_value="stringValue" ) )
Attributes
- quality
The quality of the asset property value.
The value must be
'GOOD','BAD', or'UNCERTAIN'.
- timestamp
The timestamp associated with the asset property value.
The default is the current event time.
- value
The value to send to an asset property.
AssetPropertyVariantProperty
- class CfnAlarmModelPropsMixin.AssetPropertyVariantProperty(*, boolean_value=None, double_value=None, integer_value=None, string_value=None)
Bases:
objectA structure that contains an asset property value.
For more information, see Variant in the AWS IoT SiteWise API Reference .
You must use expressions for all parameters in
AssetPropertyVariant. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
integerValueparameter can be'100'.For references, you must specify either variables or parameters. For example, the value for the
booleanValueparameter can be$variable.offline.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
doubleValueparameter uses a substitution template.'${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}'For more information, see Expressions in the AWS IoT Events Developer Guide .
You must specify one of the following value types, depending on the
dataTypeof the specified asset property. For more information, see AssetProperty in the AWS IoT SiteWise API Reference .- Parameters:
boolean_value (
Optional[str]) – The asset property value is a Boolean value that must be'TRUE'or'FALSE'. You must use an expression, and the evaluated result should be a Boolean value.double_value (
Optional[str]) – The asset property value is a double. You must use an expression, and the evaluated result should be a double.integer_value (
Optional[str]) – The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.string_value (
Optional[str]) – The asset property value is a string. You must use an expression, and the evaluated result should be a string.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins asset_property_variant_property = iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyVariantProperty( boolean_value="booleanValue", double_value="doubleValue", integer_value="integerValue", string_value="stringValue" )
Attributes
- boolean_value
The asset property value is a Boolean value that must be
'TRUE'or'FALSE'.You must use an expression, and the evaluated result should be a Boolean value.
- double_value
The asset property value is a double.
You must use an expression, and the evaluated result should be a double.
- integer_value
The asset property value is an integer.
You must use an expression, and the evaluated result should be an integer.
- string_value
The asset property value is a string.
You must use an expression, and the evaluated result should be a string.
DynamoDBProperty
- class CfnAlarmModelPropsMixin.DynamoDBProperty(*, hash_key_field=None, hash_key_type=None, hash_key_value=None, operation=None, payload=None, payload_field=None, range_key_field=None, range_key_type=None, range_key_value=None, table_name=None)
Bases:
objectDefines an action to write to the Amazon DynamoDB table that you created.
The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
You must use expressions for all parameters in
DynamoDBAction. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
hashKeyTypeparameter can be'STRING'.For references, you must specify either variables or input values. For example, the value for the
hashKeyFieldparameter can be$input.GreenhouseInput.name.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
hashKeyValueparameter uses a substitution template.'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'For a string concatenation, you must use
+. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
tableNameparameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.dateFor more information, see Expressions in the AWS IoT Events Developer Guide .
If the defined payload type is a string,
DynamoDBActionwrites non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for thepayloadFieldparameter is<payload-field>_raw.- Parameters:
hash_key_field (
Optional[str]) – The name of the hash key (also called the partition key). ThehashKeyFieldvalue must match the partition key of the target DynamoDB table.hash_key_type (
Optional[str]) – The data type for the hash key (also called the partition key). You can specify the following values:. -'STRING'- The hash key is a string. -'NUMBER'- The hash key is a number. If you don’t specifyhashKeyType, the default value is'STRING'.hash_key_value (
Optional[str]) – The value of the hash key (also called the partition key).operation (
Optional[str]) – The type of operation to perform. You can specify the following values:. -'INSERT'- Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key. -'UPDATE'- Update an existing item of the DynamoDB table with new data. This item’s partition key must match the specified hash key. If you specified a range key, the range key must match the item’s sort key. -'DELETE'- Delete an existing item of the DynamoDB table. This item’s partition key must match the specified hash key. If you specified a range key, the range key must match the item’s sort key. If you don’t specify this parameter, AWS IoT Events triggers the'INSERT'operation.payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – Information needed to configure the payload. By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can usecontentExpression.payload_field (
Optional[str]) – The name of the DynamoDB column that receives the action payload. If you don’t specify this parameter, the name of the DynamoDB column ispayload.range_key_field (
Optional[str]) – The name of the range key (also called the sort key). TherangeKeyFieldvalue must match the sort key of the target DynamoDB table.range_key_type (
Optional[str]) – The data type for the range key (also called the sort key), You can specify the following values:. -'STRING'- The range key is a string. -'NUMBER'- The range key is number. If you don’t specifyrangeKeyField, the default value is'STRING'.range_key_value (
Optional[str]) – The value of the range key (also called the sort key).table_name (
Optional[str]) – The name of the DynamoDB table. ThetableNamevalue must match the table name of the target DynamoDB table.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins dynamo_dBProperty = iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBProperty( hash_key_field="hashKeyField", hash_key_type="hashKeyType", hash_key_value="hashKeyValue", operation="operation", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), payload_field="payloadField", range_key_field="rangeKeyField", range_key_type="rangeKeyType", range_key_value="rangeKeyValue", table_name="tableName" )
Attributes
- hash_key_field
The name of the hash key (also called the partition key).
The
hashKeyFieldvalue must match the partition key of the target DynamoDB table.
- hash_key_type
.
'STRING'- The hash key is a string.'NUMBER'- The hash key is a number.
If you don’t specify
hashKeyType, the default value is'STRING'.- See:
- Type:
The data type for the hash key (also called the partition key). You can specify the following values
- hash_key_value
The value of the hash key (also called the partition key).
- operation
.
'INSERT'- Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.'UPDATE'- Update an existing item of the DynamoDB table with new data. This item’s partition key must match the specified hash key. If you specified a range key, the range key must match the item’s sort key.'DELETE'- Delete an existing item of the DynamoDB table. This item’s partition key must match the specified hash key. If you specified a range key, the range key must match the item’s sort key.
If you don’t specify this parameter, AWS IoT Events triggers the
'INSERT'operation.- See:
- Type:
The type of operation to perform. You can specify the following values
- payload
Information needed to configure the payload.
By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use
contentExpression.
- payload_field
The name of the DynamoDB column that receives the action payload.
If you don’t specify this parameter, the name of the DynamoDB column is
payload.
- range_key_field
The name of the range key (also called the sort key).
The
rangeKeyFieldvalue must match the sort key of the target DynamoDB table.
- range_key_type
.
'STRING'- The range key is a string.'NUMBER'- The range key is number.
If you don’t specify
rangeKeyField, the default value is'STRING'.- See:
- Type:
The data type for the range key (also called the sort key), You can specify the following values
- range_key_value
The value of the range key (also called the sort key).
- table_name
The name of the DynamoDB table.
The
tableNamevalue must match the table name of the target DynamoDB table.
DynamoDBv2Property
- class CfnAlarmModelPropsMixin.DynamoDBv2Property(*, payload=None, table_name=None)
Bases:
objectDefines an action to write to the Amazon DynamoDB table that you created.
The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
You must use expressions for all parameters in
DynamoDBv2Action. The expressions accept literals, operators, functions, references, and substitution templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
tableNameparameter can be'GreenhouseTemperatureTable'.For references, you must specify either variables or input values. For example, the value for the
tableNameparameter can be$variable.ddbtableName.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
contentExpressionparameter inPayloaduses a substitution template.'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'For a string concatenation, you must use
+. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
tableNameparameter uses a string concatenation.'GreenhouseTemperatureTable ' + $input.GreenhouseInput.dateFor more information, see Expressions in the AWS IoT Events Developer Guide .
The value for the
typeparameter inPayloadmust beJSON.- Parameters:
payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – Information needed to configure the payload. By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can usecontentExpression.table_name (
Optional[str]) – The name of the DynamoDB table.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins dynamo_dBv2_property = iotevents_mixins.CfnAlarmModelPropsMixin.DynamoDBv2Property( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), table_name="tableName" )
Attributes
- payload
Information needed to configure the payload.
By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use
contentExpression.
- table_name
The name of the DynamoDB table.
FirehoseProperty
- class CfnAlarmModelPropsMixin.FirehoseProperty(*, delivery_stream_name=None, payload=None, separator=None)
Bases:
objectSends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
- Parameters:
delivery_stream_name (
Optional[str]) – The name of the Kinesis Data Firehose delivery stream where the data is written.payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – You can configure the action payload when you send a message to an Amazon Data Firehose delivery stream.separator (
Optional[str]) – A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: ‘n’ (newline), ‘t’ (tab), ‘rn’ (Windows newline), ‘,’ (comma).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins firehose_property = iotevents_mixins.CfnAlarmModelPropsMixin.FirehoseProperty( delivery_stream_name="deliveryStreamName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), separator="separator" )
Attributes
- delivery_stream_name
The name of the Kinesis Data Firehose delivery stream where the data is written.
- payload
You can configure the action payload when you send a message to an Amazon Data Firehose delivery stream.
- separator
A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream.
Valid values are: ‘n’ (newline), ‘t’ (tab), ‘rn’ (Windows newline), ‘,’ (comma).
InitializationConfigurationProperty
- class CfnAlarmModelPropsMixin.InitializationConfigurationProperty(*, disabled_on_initialization=None)
Bases:
objectSpecifies the default alarm state.
The configuration applies to all alarms that were created based on this alarm model.
- Parameters:
disabled_on_initialization (
Union[bool,IResolvable,None]) – The value must beTRUEorFALSE. IfFALSE, all alarm instances created based on the alarm model are activated. The default value isTRUE.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins initialization_configuration_property = iotevents_mixins.CfnAlarmModelPropsMixin.InitializationConfigurationProperty( disabled_on_initialization=False )
Attributes
- disabled_on_initialization
The value must be
TRUEorFALSE.If
FALSE, all alarm instances created based on the alarm model are activated. The default value isTRUE.
IotEventsProperty
- class CfnAlarmModelPropsMixin.IotEventsProperty(*, input_name=None, payload=None)
Bases:
objectSends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
- Parameters:
input_name (
Optional[str]) – The name of the AWS IoT Events input where the data is sent.payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – You can configure the action payload when you send a message to an AWS IoT Events input.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins iot_events_property = iotevents_mixins.CfnAlarmModelPropsMixin.IotEventsProperty( input_name="inputName", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) )
Attributes
- input_name
The name of the AWS IoT Events input where the data is sent.
- payload
You can configure the action payload when you send a message to an AWS IoT Events input.
IotSiteWiseProperty
- class CfnAlarmModelPropsMixin.IotSiteWiseProperty(*, asset_id=None, entry_id=None, property_alias=None, property_id=None, property_value=None)
Bases:
objectSends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .
You must use expressions for all parameters in
IotSiteWiseAction. The expressions accept literals, operators, functions, references, and substitutions templates.Examples - For literal values, the expressions must contain single quotes. For example, the value for the
propertyAliasparameter can be'/company/windfarm/3/turbine/7/temperature'.For references, you must specify either variables or input values. For example, the value for the
assetIdparameter can be$input.TurbineInput.assetId1.For a substitution template, you must use
${}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
In the following example, the value for the
propertyAliasparameter uses a substitution template.'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'You must specify either
propertyAliasor bothassetIdandpropertyIdto identify the target asset property in AWS IoT SiteWise .For more information, see Expressions in the AWS IoT Events Developer Guide .
- Parameters:
asset_id (
Optional[str]) – The ID of the asset that has the specified property.entry_id (
Optional[str]) – A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.property_alias (
Optional[str]) – The alias of the asset property.property_id (
Optional[str]) – The ID of the asset property.property_value (
Union[IResolvable,AssetPropertyValueProperty,Dict[str,Any],None]) – The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins iot_site_wise_property = iotevents_mixins.CfnAlarmModelPropsMixin.IotSiteWiseProperty( asset_id="assetId", entry_id="entryId", property_alias="propertyAlias", property_id="propertyId", property_value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyValueProperty( quality="quality", timestamp=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyTimestampProperty( offset_in_nanos="offsetInNanos", time_in_seconds="timeInSeconds" ), value=iotevents_mixins.CfnAlarmModelPropsMixin.AssetPropertyVariantProperty( boolean_value="booleanValue", double_value="doubleValue", integer_value="integerValue", string_value="stringValue" ) ) )
Attributes
- asset_id
The ID of the asset that has the specified property.
- entry_id
A unique identifier for this entry.
You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.
- property_alias
The alias of the asset property.
- property_id
The ID of the asset property.
- property_value
The value to send to the asset property.
This value contains timestamp, quality, and value (TQV) information.
IotTopicPublishProperty
- class CfnAlarmModelPropsMixin.IotTopicPublishProperty(*, mqtt_topic=None, payload=None)
Bases:
objectInformation required to publish the MQTT message through the AWS IoT message broker.
- Parameters:
mqtt_topic (
Optional[str]) – The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name>) and input values ($input.<input-name>.<path-to-datum>) as the topic string.payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – You can configure the action payload when you publish a message to an AWS IoT Core topic.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins iot_topic_publish_property = iotevents_mixins.CfnAlarmModelPropsMixin.IotTopicPublishProperty( mqtt_topic="mqttTopic", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) )
Attributes
- mqtt_topic
The MQTT topic of the message.
You can use a string expression that includes variables (
$variable.<variable-name>) and input values ($input.<input-name>.<path-to-datum>) as the topic string.
- payload
You can configure the action payload when you publish a message to an AWS IoT Core topic.
LambdaProperty
- class CfnAlarmModelPropsMixin.LambdaProperty(*, function_arn=None, payload=None)
Bases:
objectCalls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
- Parameters:
function_arn (
Optional[str]) – The ARN of the Lambda function that is executed.payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – You can configure the action payload when you send a message to a Lambda function.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins lambda_property = iotevents_mixins.CfnAlarmModelPropsMixin.LambdaProperty( function_arn="functionArn", payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ) )
Attributes
- function_arn
The ARN of the Lambda function that is executed.
- payload
You can configure the action payload when you send a message to a Lambda function.
PayloadProperty
- class CfnAlarmModelPropsMixin.PayloadProperty(*, content_expression=None, type=None)
Bases:
objectInformation needed to configure the payload.
By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use
contentExpression.- Parameters:
content_expression (
Optional[str]) – The content of the payload. You can use a string expression that includes quoted strings ('<string>'), variables ($variable.<variable-name>), input values ($input.<input-name>.<path-to-datum>), string concatenations, and quoted strings that contain${}as the content. The recommended maximum size of a content expression is 1 KB.type (
Optional[str]) – The value of the payload type can be eitherSTRINGorJSON.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins payload_property = iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" )
Attributes
- content_expression
The content of the payload.
You can use a string expression that includes quoted strings (
'<string>'), variables ($variable.<variable-name>), input values ($input.<input-name>.<path-to-datum>), string concatenations, and quoted strings that contain${}as the content. The recommended maximum size of a content expression is 1 KB.
- type
The value of the payload type can be either
STRINGorJSON.
SimpleRuleProperty
- class CfnAlarmModelPropsMixin.SimpleRuleProperty(*, comparison_operator=None, input_property=None, threshold=None)
Bases:
objectA rule that compares an input property value to a threshold value with a comparison operator.
- Parameters:
comparison_operator (
Optional[str]) – The comparison operator.input_property (
Optional[str]) – The value on the left side of the comparison operator. You can specify an AWS IoT Events input attribute as an input property.threshold (
Optional[str]) – The value on the right side of the comparison operator. You can enter a number or specify an AWS IoT Events input attribute.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins simple_rule_property = iotevents_mixins.CfnAlarmModelPropsMixin.SimpleRuleProperty( comparison_operator="comparisonOperator", input_property="inputProperty", threshold="threshold" )
Attributes
- comparison_operator
The comparison operator.
- input_property
The value on the left side of the comparison operator.
You can specify an AWS IoT Events input attribute as an input property.
- threshold
The value on the right side of the comparison operator.
You can enter a number or specify an AWS IoT Events input attribute.
SnsProperty
- class CfnAlarmModelPropsMixin.SnsProperty(*, payload=None, target_arn=None)
Bases:
objectInformation required to publish the Amazon SNS message.
- Parameters:
payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – You can configure the action payload when you send a message as an Amazon SNS push notification.target_arn (
Optional[str]) – The ARN of the Amazon SNS target where the message is sent.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins sns_property = iotevents_mixins.CfnAlarmModelPropsMixin.SnsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), target_arn="targetArn" )
Attributes
- payload
You can configure the action payload when you send a message as an Amazon SNS push notification.
- target_arn
The ARN of the Amazon SNS target where the message is sent.
SqsProperty
- class CfnAlarmModelPropsMixin.SqsProperty(*, payload=None, queue_url=None, use_base64=None)
Bases:
objectSends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
- Parameters:
payload (
Union[IResolvable,PayloadProperty,Dict[str,Any],None]) – You can configure the action payload when you send a message to an Amazon SQS queue.queue_url (
Optional[str]) – The URL of the SQS queue where the data is written.use_base64 (
Union[bool,IResolvable,None]) – Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_iotevents import mixins as iotevents_mixins sqs_property = iotevents_mixins.CfnAlarmModelPropsMixin.SqsProperty( payload=iotevents_mixins.CfnAlarmModelPropsMixin.PayloadProperty( content_expression="contentExpression", type="type" ), queue_url="queueUrl", use_base64=False )
Attributes
- payload
You can configure the action payload when you send a message to an Amazon SQS queue.
- queue_url
The URL of the SQS queue where the data is written.
- use_base64
Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue.
Otherwise, set this to FALSE.