Interface InputProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:27.730Z") @Stability(Experimental) public interface InputProps extends
(experimental) Properties for defining an AWS IoT Events input.


 IFunction func;
 Input input = Input.Builder.create(this, "MyInput")
         .inputName("my_input") // optional
         .attributeJsonPaths(List.of("payload.deviceId", "payload.temperature"))
 State warmState = State.Builder.create()
                 .actions(List.of(new LambdaInvokeAction(func)))
         .onInput(List.of(Event.builder() // optional
                 .actions(List.of(new LambdaInvokeAction(func))).build()))
         .onExit(List.of(Event.builder() // optional
                 .actions(List.of(new LambdaInvokeAction(func))).build()))
 State coldState = State.Builder.create()
 // transit to coldState when temperature is less than 15
 warmState.transitionTo(coldState, TransitionOptions.builder()
         .eventName("to_coldState") // optional property, default by combining the names of the States
         .when(, "payload.temperature"), Expression.fromString("15")))
         .executing(List.of(new LambdaInvokeAction(func)))
 // transit to warmState when temperature is greater than or equal to 15
 coldState.transitionTo(warmState, TransitionOptions.builder()
         .when(Expression.gte(Expression.inputAttribute(input, "payload.temperature"), Expression.fromString("15")))
 DetectorModel.Builder.create(this, "MyDetectorModel")
         .detectorModelName("test-detector-model") // optional
         .description("test-detector-model-description") // optional property, default is none
         .evaluationMethod(EventEvaluation.SERIAL) // optional property, default is iotevents.EventEvaluation.BATCH
         .detectorKey("payload.deviceId") // optional property, default is none and single detector instance will be created and all inputs will be routed to it
  • Method Details

    • getAttributeJsonPaths

      @Stability(Experimental) @NotNull List<String> getAttributeJsonPaths()
      (experimental) An expression that specifies an attribute-value pair in a JSON structure.

      Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to AWS IoT Events (BatchPutMessage). Each such message contains a JSON payload. The attribute (and its paired value) specified here are available for use in the condition expressions used by detectors.

    • getInputName

      @Stability(Experimental) @Nullable default String getInputName()
      (experimental) The name of the input.

      Default: - CloudFormation will generate a unique name of the input

    • builder

      @Stability(Experimental) static InputProps.Builder builder()
      a InputProps.Builder of InputProps