Class: AWSCDK::IoTEvents::CfnDetectorModel::ActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_detector_model.rb

Overview

An action to be performed when the condition is TRUE.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clear_timer: nil, dynamo_db: nil, dynamo_d_bv2: nil, firehose: nil, iot_events: nil, iot_site_wise: nil, iot_topic_publish: nil, lambda: nil, reset_timer: nil, set_timer: nil, set_variable: nil, sns: nil, sqs: nil) ⇒ ActionProperty

Returns a new instance of ActionProperty.

Parameters:



623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'io_t_events/cfn_detector_model.rb', line 623

def initialize(clear_timer: nil, dynamo_db: nil, dynamo_d_bv2: nil, firehose: nil, iot_events: nil, iot_site_wise: nil, iot_topic_publish: nil, lambda: nil, reset_timer: nil, set_timer: nil, set_variable: nil, sns: nil, sqs: nil)
  @clear_timer = clear_timer.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::ClearTimerProperty.new(**clear_timer.transform_keys(&:to_sym)) : clear_timer
  Jsii::Type.check_type(@clear_timer, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5DbGVhclRpbWVyUHJvcGVydHkifV19fQ==")), "clearTimer") unless @clear_timer.nil?
  @dynamo_db = dynamo_db.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::DynamoDBProperty.new(**dynamo_db.transform_keys(&:to_sym)) : dynamo_db
  Jsii::Type.check_type(@dynamo_db, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5EeW5hbW9EQlByb3BlcnR5In1dfX0=")), "dynamoDb") unless @dynamo_db.nil?
  @dynamo_d_bv2 = dynamo_d_bv2.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::DynamoDBv2Property.new(**dynamo_d_bv2.transform_keys(&:to_sym)) : dynamo_d_bv2
  Jsii::Type.check_type(@dynamo_d_bv2, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5EeW5hbW9EQnYyUHJvcGVydHkifV19fQ==")), "dynamoDBv2") unless @dynamo_d_bv2.nil?
  @firehose = firehose.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::FirehoseProperty.new(**firehose.transform_keys(&:to_sym)) : firehose
  Jsii::Type.check_type(@firehose, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5GaXJlaG9zZVByb3BlcnR5In1dfX0=")), "firehose") unless @firehose.nil?
  @iot_events = iot_events.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::IotEventsProperty.new(**iot_events.transform_keys(&:to_sym)) : iot_events
  Jsii::Type.check_type(@iot_events, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5Jb3RFdmVudHNQcm9wZXJ0eSJ9XX19")), "iotEvents") unless @iot_events.nil?
  @iot_site_wise = iot_site_wise.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::IotSiteWiseProperty.new(**iot_site_wise.transform_keys(&:to_sym)) : iot_site_wise
  Jsii::Type.check_type(@iot_site_wise, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5Jb3RTaXRlV2lzZVByb3BlcnR5In1dfX0=")), "iotSiteWise") unless @iot_site_wise.nil?
  @iot_topic_publish = iot_topic_publish.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::IotTopicPublishProperty.new(**iot_topic_publish.transform_keys(&:to_sym)) : iot_topic_publish
  Jsii::Type.check_type(@iot_topic_publish, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5Jb3RUb3BpY1B1Ymxpc2hQcm9wZXJ0eSJ9XX19")), "iotTopicPublish") unless @iot_topic_publish.nil?
  @lambda = lambda.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::LambdaProperty.new(**lambda.transform_keys(&:to_sym)) : lambda
  Jsii::Type.check_type(@lambda, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5MYW1iZGFQcm9wZXJ0eSJ9XX19")), "lambda") unless @lambda.nil?
  @reset_timer = reset_timer.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::ResetTimerProperty.new(**reset_timer.transform_keys(&:to_sym)) : reset_timer
  Jsii::Type.check_type(@reset_timer, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5SZXNldFRpbWVyUHJvcGVydHkifV19fQ==")), "resetTimer") unless @reset_timer.nil?
  @set_timer = set_timer.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::SetTimerProperty.new(**set_timer.transform_keys(&:to_sym)) : set_timer
  Jsii::Type.check_type(@set_timer, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5TZXRUaW1lclByb3BlcnR5In1dfX0=")), "setTimer") unless @set_timer.nil?
  @set_variable = set_variable.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::SetVariableProperty.new(**set_variable.transform_keys(&:to_sym)) : set_variable
  Jsii::Type.check_type(@set_variable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5TZXRWYXJpYWJsZVByb3BlcnR5In1dfX0=")), "setVariable") unless @set_variable.nil?
  @sns = sns.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::SNSProperty.new(**sns.transform_keys(&:to_sym)) : sns
  Jsii::Type.check_type(@sns, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5TbnNQcm9wZXJ0eSJ9XX19")), "sns") unless @sns.nil?
  @sqs = sqs.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::SQSProperty.new(**sqs.transform_keys(&:to_sym)) : sqs
  Jsii::Type.check_type(@sqs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5TcXNQcm9wZXJ0eSJ9XX19")), "sqs") unless @sqs.nil?
end

Instance Attribute Details

#clear_timerAWSCDK::IResolvable, ... (readonly)

Information needed to clear the timer.



656
657
658
# File 'io_t_events/cfn_detector_model.rb', line 656

def clear_timer
  @clear_timer
end

#dynamo_d_bv2AWSCDK::IResolvable, ... (readonly)

Writes to the DynamoDB table that you created.

The default action payload contains all attribute-value pairs that have 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. For more information, see Actions in AWS IoT Events Developer Guide .



670
671
672
# File 'io_t_events/cfn_detector_model.rb', line 670

def dynamo_d_bv2
  @dynamo_d_bv2
end

#dynamo_dbAWSCDK::IResolvable, ... (readonly)

Writes to the DynamoDB table that you created.

The default action payload contains all attribute-value pairs that have 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. For more information, see Actions in AWS IoT Events Developer Guide .



663
664
665
# File 'io_t_events/cfn_detector_model.rb', line 663

def dynamo_db
  @dynamo_db
end

#firehoseAWSCDK::IResolvable, ... (readonly)

Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.



675
676
677
# File 'io_t_events/cfn_detector_model.rb', line 675

def firehose
  @firehose
end

#iot_eventsAWSCDK::IResolvable, ... (readonly)

Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.



680
681
682
# File 'io_t_events/cfn_detector_model.rb', line 680

def iot_events
  @iot_events
end

#iot_site_wiseAWSCDK::IResolvable, ... (readonly)

Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .



685
686
687
# File 'io_t_events/cfn_detector_model.rb', line 685

def iot_site_wise
  @iot_site_wise
end

#iot_topic_publishAWSCDK::IResolvable, ... (readonly)

Publishes an MQTT message with the given topic to the AWS IoT message broker.



690
691
692
# File 'io_t_events/cfn_detector_model.rb', line 690

def iot_topic_publish
  @iot_topic_publish
end

#lambdaAWSCDK::IResolvable, ... (readonly)

Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.



695
696
697
# File 'io_t_events/cfn_detector_model.rb', line 695

def lambda
  @lambda
end

#reset_timerAWSCDK::IResolvable, ... (readonly)

Information needed to reset the timer.



700
701
702
# File 'io_t_events/cfn_detector_model.rb', line 700

def reset_timer
  @reset_timer
end

#set_timerAWSCDK::IResolvable, ... (readonly)

Information needed to set the timer.



705
706
707
# File 'io_t_events/cfn_detector_model.rb', line 705

def set_timer
  @set_timer
end

#set_variableAWSCDK::IResolvable, ... (readonly)

Sets a variable to a specified value.



710
711
712
# File 'io_t_events/cfn_detector_model.rb', line 710

def set_variable
  @set_variable
end

#snsAWSCDK::IResolvable, ... (readonly)

Sends an Amazon SNS message.



715
716
717
# File 'io_t_events/cfn_detector_model.rb', line 715

def sns
  @sns
end

#sqsAWSCDK::IResolvable, ... (readonly)

Sends an Amazon SNS message.



720
721
722
# File 'io_t_events/cfn_detector_model.rb', line 720

def sqs
  @sqs
end

Class Method Details

.jsii_propertiesObject



722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
# File 'io_t_events/cfn_detector_model.rb', line 722

def self.jsii_properties
  {
    :clear_timer => "clearTimer",
    :dynamo_db => "dynamoDb",
    :dynamo_d_bv2 => "dynamoDBv2",
    :firehose => "firehose",
    :iot_events => "iotEvents",
    :iot_site_wise => "iotSiteWise",
    :iot_topic_publish => "iotTopicPublish",
    :lambda => "lambda",
    :reset_timer => "resetTimer",
    :set_timer => "setTimer",
    :set_variable => "setVariable",
    :sns => "sns",
    :sqs => "sqs",
  }
end

Instance Method Details

#to_jsiiObject



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
# File 'io_t_events/cfn_detector_model.rb', line 740

def to_jsii
  result = {}
  result.merge!({
    "clearTimer" => @clear_timer,
    "dynamoDb" => @dynamo_db,
    "dynamoDBv2" => @dynamo_d_bv2,
    "firehose" => @firehose,
    "iotEvents" => @iot_events,
    "iotSiteWise" => @iot_site_wise,
    "iotTopicPublish" => @iot_topic_publish,
    "lambda" => @lambda,
    "resetTimer" => @reset_timer,
    "setTimer" => @set_timer,
    "setVariable" => @set_variable,
    "sns" => @sns,
    "sqs" => @sqs,
  })
  result.compact
end