Class: AWSCDK::IoTEvents::CfnAlarmModel::AlarmActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnAlarmModel::AlarmActionProperty
- Defined in:
- io_t_events/cfn_alarm_model.rb
Overview
Specifies one of the following actions to receive notifications when the alarm state changes.
Instance Attribute Summary collapse
-
#dynamo_d_bv2 ⇒ AWSCDK::IResolvable, ...
readonly
Defines an action to write to the Amazon DynamoDB table that you created.
-
#dynamo_db ⇒ AWSCDK::IResolvable, ...
readonly
Defines an action to write to the Amazon DynamoDB table that you created.
-
#firehose ⇒ AWSCDK::IResolvable, ...
readonly
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
-
#iot_events ⇒ AWSCDK::IResolvable, ...
readonly
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
-
#iot_site_wise ⇒ AWSCDK::IResolvable, ...
readonly
Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .
-
#iot_topic_publish ⇒ AWSCDK::IResolvable, ...
readonly
Information required to publish the MQTT message through the AWS IoT message broker.
-
#lambda ⇒ AWSCDK::IResolvable, ...
readonly
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
-
#sns ⇒ AWSCDK::IResolvable, ...
readonly
Information required to publish the Amazon SNS message.
-
#sqs ⇒ AWSCDK::IResolvable, ...
readonly
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dynamo_db: nil, dynamo_d_bv2: nil, firehose: nil, iot_events: nil, iot_site_wise: nil, iot_topic_publish: nil, lambda: nil, sns: nil, sqs: nil) ⇒ AlarmActionProperty
constructor
A new instance of AlarmActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dynamo_db: nil, dynamo_d_bv2: nil, firehose: nil, iot_events: nil, iot_site_wise: nil, iot_topic_publish: nil, lambda: nil, sns: nil, sqs: nil) ⇒ AlarmActionProperty
Returns a new instance of AlarmActionProperty.
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'io_t_events/cfn_alarm_model.rb', line 674 def initialize(dynamo_db: nil, dynamo_d_bv2: nil, firehose: nil, iot_events: nil, iot_site_wise: nil, iot_topic_publish: nil, lambda: nil, sns: nil, sqs: nil) @dynamo_db = dynamo_db.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::DynamoDBProperty.new(**dynamo_db.transform_keys(&:to_sym)) : dynamo_db Jsii::Type.check_type(@dynamo_db, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5EeW5hbW9EQlByb3BlcnR5In1dfX0=")), "dynamoDb") unless @dynamo_db.nil? @dynamo_d_bv2 = dynamo_d_bv2.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::DynamoDBv2Property.new(**dynamo_d_bv2.transform_keys(&:to_sym)) : dynamo_d_bv2 Jsii::Type.check_type(@dynamo_d_bv2, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5EeW5hbW9EQnYyUHJvcGVydHkifV19fQ==")), "dynamoDBv2") unless @dynamo_d_bv2.nil? @firehose = firehose.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::FirehoseProperty.new(**firehose.transform_keys(&:to_sym)) : firehose Jsii::Type.check_type(@firehose, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5GaXJlaG9zZVByb3BlcnR5In1dfX0=")), "firehose") unless @firehose.nil? @iot_events = iot_events.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::IotEventsProperty.new(**iot_events.transform_keys(&:to_sym)) : iot_events Jsii::Type.check_type(@iot_events, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5Jb3RFdmVudHNQcm9wZXJ0eSJ9XX19")), "iotEvents") unless @iot_events.nil? @iot_site_wise = iot_site_wise.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::IotSiteWiseProperty.new(**iot_site_wise.transform_keys(&:to_sym)) : iot_site_wise Jsii::Type.check_type(@iot_site_wise, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5Jb3RTaXRlV2lzZVByb3BlcnR5In1dfX0=")), "iotSiteWise") unless @iot_site_wise.nil? @iot_topic_publish = iot_topic_publish.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::IotTopicPublishProperty.new(**iot_topic_publish.transform_keys(&:to_sym)) : iot_topic_publish Jsii::Type.check_type(@iot_topic_publish, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5Jb3RUb3BpY1B1Ymxpc2hQcm9wZXJ0eSJ9XX19")), "iotTopicPublish") unless @iot_topic_publish.nil? @lambda = lambda.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::LambdaProperty.new(**lambda.transform_keys(&:to_sym)) : lambda Jsii::Type.check_type(@lambda, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5MYW1iZGFQcm9wZXJ0eSJ9XX19")), "lambda") unless @lambda.nil? @sns = sns.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::SNSProperty.new(**sns.transform_keys(&:to_sym)) : sns Jsii::Type.check_type(@sns, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5TbnNQcm9wZXJ0eSJ9XX19")), "sns") unless @sns.nil? @sqs = sqs.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::SQSProperty.new(**sqs.transform_keys(&:to_sym)) : sqs Jsii::Type.check_type(@sqs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5TcXNQcm9wZXJ0eSJ9XX19")), "sqs") unless @sqs.nil? end |
Instance Attribute Details
#dynamo_d_bv2 ⇒ AWSCDK::IResolvable, ... (readonly)
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 table_name parameter can be 'GreenhouseTemperatureTable' .
- For references, you must specify either variables or input values. For example, the value for the
table_nameparameter 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 content_expression parameter in Payload uses 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 table_name parameter uses a string concatenation.
'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide .
The value for the type parameter in Payload must be JSON .
750 751 752 |
# File 'io_t_events/cfn_alarm_model.rb', line 750 def dynamo_d_bv2 @dynamo_d_bv2 end |
#dynamo_db ⇒ AWSCDK::IResolvable, ... (readonly)
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 hash_key_type parameter can be 'STRING' .
- For references, you must specify either variables or input values. For example, the value for the
hash_key_fieldparameter 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 hash_key_value parameter 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 table_name parameter uses a string concatenation.
'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
For more information, see Expressions in the AWS IoT Events Developer Guide .
If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payload_field parameter is <payload-field>_raw .
722 723 724 |
# File 'io_t_events/cfn_alarm_model.rb', line 722 def dynamo_db @dynamo_db end |
#firehose ⇒ AWSCDK::IResolvable, ... (readonly)
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
755 756 757 |
# File 'io_t_events/cfn_alarm_model.rb', line 755 def firehose @firehose end |
#iot_events ⇒ AWSCDK::IResolvable, ... (readonly)
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
760 761 762 |
# File 'io_t_events/cfn_alarm_model.rb', line 760 def iot_events @iot_events end |
#iot_site_wise ⇒ AWSCDK::IResolvable, ... (readonly)
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 property_alias parameter can be '/company/windfarm/3/turbine/7/temperature' .
- For references, you must specify either variables or input values. For example, the value for the
asset_idparameter 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 property_alias parameter uses a substitution template.
'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'
You must specify either property_alias or both asset_id and property_id to identify the target asset property in AWS IoT SiteWise .
For more information, see Expressions in the AWS IoT Events Developer Guide .
780 781 782 |
# File 'io_t_events/cfn_alarm_model.rb', line 780 def iot_site_wise @iot_site_wise end |
#iot_topic_publish ⇒ AWSCDK::IResolvable, ... (readonly)
Information required to publish the MQTT message through the AWS IoT message broker.
785 786 787 |
# File 'io_t_events/cfn_alarm_model.rb', line 785 def iot_topic_publish @iot_topic_publish end |
#lambda ⇒ AWSCDK::IResolvable, ... (readonly)
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
790 791 792 |
# File 'io_t_events/cfn_alarm_model.rb', line 790 def lambda @lambda end |
#sns ⇒ AWSCDK::IResolvable, ... (readonly)
Information required to publish the Amazon SNS message.
795 796 797 |
# File 'io_t_events/cfn_alarm_model.rb', line 795 def sns @sns end |
#sqs ⇒ AWSCDK::IResolvable, ... (readonly)
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
800 801 802 |
# File 'io_t_events/cfn_alarm_model.rb', line 800 def sqs @sqs end |
Class Method Details
.jsii_properties ⇒ Object
802 803 804 805 806 807 808 809 810 811 812 813 814 |
# File 'io_t_events/cfn_alarm_model.rb', line 802 def self.jsii_properties { :dynamo_db => "dynamoDb", :dynamo_d_bv2 => "dynamoDBv2", :firehose => "firehose", :iot_events => "iotEvents", :iot_site_wise => "iotSiteWise", :iot_topic_publish => "iotTopicPublish", :lambda => "lambda", :sns => "sns", :sqs => "sqs", } end |
Instance Method Details
#to_jsii ⇒ Object
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'io_t_events/cfn_alarm_model.rb', line 816 def to_jsii result = {} result.merge!({ "dynamoDb" => @dynamo_db, "dynamoDBv2" => @dynamo_d_bv2, "firehose" => @firehose, "iotEvents" => @iot_events, "iotSiteWise" => @iot_site_wise, "iotTopicPublish" => @iot_topic_publish, "lambda" => @lambda, "sns" => @sns, "sqs" => @sqs, }) result.compact end |