Class CfnDetectorModelPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.iotevents.CfnDetectorModelPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:00.348Z") @Stability(Stable) public class CfnDetectorModelPropsMixin extends Mixin implements software.constructs.IMixin
The AWS::IoTEvents::DetectorModel resource creates a detector model.

You create a detector model (a model of your equipment or process) using states . For each state, you define conditional (Boolean) logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see How to Use AWS IoT Events in the AWS IoT Events Developer Guide .

When you successfully update a detector model (using the AWS IoT Events console, AWS IoT Events API or CLI commands, or CloudFormation ) all detector instances created by the model are reset to their initial states. (The detector's state , and the values of any variables and timers are reset.)

When you successfully update a detector model (using the AWS IoT Events console, AWS IoT Events API or CLI commands, or CloudFormation ) the version number of the detector model is incremented. (A detector model with version number 1 before the update has version number 2 after the update succeeds.)

If you attempt to update a detector model using CloudFormation and the update does not succeed, the system may, in some cases, restore the original detector model. When this occurs, the detector model's version is incremented twice (for example, from version 1 to version 3) and the detector instances are reset.

Also, be aware that if you attempt to update several detector models at once using CloudFormation , some updates may succeed and others fail. In this case, the effects on each detector model's detector instances and version number depend on whether the update succeeded or failed, with the results as stated.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.iotevents.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnDetectorModelPropsMixin cfnDetectorModelPropsMixin = CfnDetectorModelPropsMixin.Builder.create(CfnDetectorModelMixinProps.builder()
         .detectorModelDefinition(DetectorModelDefinitionProperty.builder()
                 .initialStateName("initialStateName")
                 .states(List.of(StateProperty.builder()
                         .onEnter(OnEnterProperty.builder()
                                 .events(List.of(EventProperty.builder()
                                         .actions(List.of(ActionProperty.builder()
                                                 .clearTimer(ClearTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .dynamoDb(DynamoDBProperty.builder()
                                                         .hashKeyField("hashKeyField")
                                                         .hashKeyType("hashKeyType")
                                                         .hashKeyValue("hashKeyValue")
                                                         .operation("operation")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .payloadField("payloadField")
                                                         .rangeKeyField("rangeKeyField")
                                                         .rangeKeyType("rangeKeyType")
                                                         .rangeKeyValue("rangeKeyValue")
                                                         .tableName("tableName")
                                                         .build())
                                                 .dynamoDBv2(DynamoDBv2Property.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .tableName("tableName")
                                                         .build())
                                                 .firehose(FirehoseProperty.builder()
                                                         .deliveryStreamName("deliveryStreamName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .separator("separator")
                                                         .build())
                                                 .iotEvents(IotEventsProperty.builder()
                                                         .inputName("inputName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .iotSiteWise(IotSiteWiseProperty.builder()
                                                         .assetId("assetId")
                                                         .entryId("entryId")
                                                         .propertyAlias("propertyAlias")
                                                         .propertyId("propertyId")
                                                         .propertyValue(AssetPropertyValueProperty.builder()
                                                                 .quality("quality")
                                                                 .timestamp(AssetPropertyTimestampProperty.builder()
                                                                         .offsetInNanos("offsetInNanos")
                                                                         .timeInSeconds("timeInSeconds")
                                                                         .build())
                                                                 .value(AssetPropertyVariantProperty.builder()
                                                                         .booleanValue("booleanValue")
                                                                         .doubleValue("doubleValue")
                                                                         .integerValue("integerValue")
                                                                         .stringValue("stringValue")
                                                                         .build())
                                                                 .build())
                                                         .build())
                                                 .iotTopicPublish(IotTopicPublishProperty.builder()
                                                         .mqttTopic("mqttTopic")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .lambda(LambdaProperty.builder()
                                                         .functionArn("functionArn")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .resetTimer(ResetTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .setTimer(SetTimerProperty.builder()
                                                         .durationExpression("durationExpression")
                                                         .seconds(123)
                                                         .timerName("timerName")
                                                         .build())
                                                 .setVariable(SetVariableProperty.builder()
                                                         .value("value")
                                                         .variableName("variableName")
                                                         .build())
                                                 .sns(SnsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .targetArn("targetArn")
                                                         .build())
                                                 .sqs(SqsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .queueUrl("queueUrl")
                                                         .useBase64(false)
                                                         .build())
                                                 .build()))
                                         .condition("condition")
                                         .eventName("eventName")
                                         .build()))
                                 .build())
                         .onExit(OnExitProperty.builder()
                                 .events(List.of(EventProperty.builder()
                                         .actions(List.of(ActionProperty.builder()
                                                 .clearTimer(ClearTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .dynamoDb(DynamoDBProperty.builder()
                                                         .hashKeyField("hashKeyField")
                                                         .hashKeyType("hashKeyType")
                                                         .hashKeyValue("hashKeyValue")
                                                         .operation("operation")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .payloadField("payloadField")
                                                         .rangeKeyField("rangeKeyField")
                                                         .rangeKeyType("rangeKeyType")
                                                         .rangeKeyValue("rangeKeyValue")
                                                         .tableName("tableName")
                                                         .build())
                                                 .dynamoDBv2(DynamoDBv2Property.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .tableName("tableName")
                                                         .build())
                                                 .firehose(FirehoseProperty.builder()
                                                         .deliveryStreamName("deliveryStreamName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .separator("separator")
                                                         .build())
                                                 .iotEvents(IotEventsProperty.builder()
                                                         .inputName("inputName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .iotSiteWise(IotSiteWiseProperty.builder()
                                                         .assetId("assetId")
                                                         .entryId("entryId")
                                                         .propertyAlias("propertyAlias")
                                                         .propertyId("propertyId")
                                                         .propertyValue(AssetPropertyValueProperty.builder()
                                                                 .quality("quality")
                                                                 .timestamp(AssetPropertyTimestampProperty.builder()
                                                                         .offsetInNanos("offsetInNanos")
                                                                         .timeInSeconds("timeInSeconds")
                                                                         .build())
                                                                 .value(AssetPropertyVariantProperty.builder()
                                                                         .booleanValue("booleanValue")
                                                                         .doubleValue("doubleValue")
                                                                         .integerValue("integerValue")
                                                                         .stringValue("stringValue")
                                                                         .build())
                                                                 .build())
                                                         .build())
                                                 .iotTopicPublish(IotTopicPublishProperty.builder()
                                                         .mqttTopic("mqttTopic")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .lambda(LambdaProperty.builder()
                                                         .functionArn("functionArn")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .resetTimer(ResetTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .setTimer(SetTimerProperty.builder()
                                                         .durationExpression("durationExpression")
                                                         .seconds(123)
                                                         .timerName("timerName")
                                                         .build())
                                                 .setVariable(SetVariableProperty.builder()
                                                         .value("value")
                                                         .variableName("variableName")
                                                         .build())
                                                 .sns(SnsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .targetArn("targetArn")
                                                         .build())
                                                 .sqs(SqsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .queueUrl("queueUrl")
                                                         .useBase64(false)
                                                         .build())
                                                 .build()))
                                         .condition("condition")
                                         .eventName("eventName")
                                         .build()))
                                 .build())
                         .onInput(OnInputProperty.builder()
                                 .events(List.of(EventProperty.builder()
                                         .actions(List.of(ActionProperty.builder()
                                                 .clearTimer(ClearTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .dynamoDb(DynamoDBProperty.builder()
                                                         .hashKeyField("hashKeyField")
                                                         .hashKeyType("hashKeyType")
                                                         .hashKeyValue("hashKeyValue")
                                                         .operation("operation")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .payloadField("payloadField")
                                                         .rangeKeyField("rangeKeyField")
                                                         .rangeKeyType("rangeKeyType")
                                                         .rangeKeyValue("rangeKeyValue")
                                                         .tableName("tableName")
                                                         .build())
                                                 .dynamoDBv2(DynamoDBv2Property.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .tableName("tableName")
                                                         .build())
                                                 .firehose(FirehoseProperty.builder()
                                                         .deliveryStreamName("deliveryStreamName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .separator("separator")
                                                         .build())
                                                 .iotEvents(IotEventsProperty.builder()
                                                         .inputName("inputName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .iotSiteWise(IotSiteWiseProperty.builder()
                                                         .assetId("assetId")
                                                         .entryId("entryId")
                                                         .propertyAlias("propertyAlias")
                                                         .propertyId("propertyId")
                                                         .propertyValue(AssetPropertyValueProperty.builder()
                                                                 .quality("quality")
                                                                 .timestamp(AssetPropertyTimestampProperty.builder()
                                                                         .offsetInNanos("offsetInNanos")
                                                                         .timeInSeconds("timeInSeconds")
                                                                         .build())
                                                                 .value(AssetPropertyVariantProperty.builder()
                                                                         .booleanValue("booleanValue")
                                                                         .doubleValue("doubleValue")
                                                                         .integerValue("integerValue")
                                                                         .stringValue("stringValue")
                                                                         .build())
                                                                 .build())
                                                         .build())
                                                 .iotTopicPublish(IotTopicPublishProperty.builder()
                                                         .mqttTopic("mqttTopic")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .lambda(LambdaProperty.builder()
                                                         .functionArn("functionArn")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .resetTimer(ResetTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .setTimer(SetTimerProperty.builder()
                                                         .durationExpression("durationExpression")
                                                         .seconds(123)
                                                         .timerName("timerName")
                                                         .build())
                                                 .setVariable(SetVariableProperty.builder()
                                                         .value("value")
                                                         .variableName("variableName")
                                                         .build())
                                                 .sns(SnsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .targetArn("targetArn")
                                                         .build())
                                                 .sqs(SqsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .queueUrl("queueUrl")
                                                         .useBase64(false)
                                                         .build())
                                                 .build()))
                                         .condition("condition")
                                         .eventName("eventName")
                                         .build()))
                                 .transitionEvents(List.of(TransitionEventProperty.builder()
                                         .actions(List.of(ActionProperty.builder()
                                                 .clearTimer(ClearTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .dynamoDb(DynamoDBProperty.builder()
                                                         .hashKeyField("hashKeyField")
                                                         .hashKeyType("hashKeyType")
                                                         .hashKeyValue("hashKeyValue")
                                                         .operation("operation")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .payloadField("payloadField")
                                                         .rangeKeyField("rangeKeyField")
                                                         .rangeKeyType("rangeKeyType")
                                                         .rangeKeyValue("rangeKeyValue")
                                                         .tableName("tableName")
                                                         .build())
                                                 .dynamoDBv2(DynamoDBv2Property.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .tableName("tableName")
                                                         .build())
                                                 .firehose(FirehoseProperty.builder()
                                                         .deliveryStreamName("deliveryStreamName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .separator("separator")
                                                         .build())
                                                 .iotEvents(IotEventsProperty.builder()
                                                         .inputName("inputName")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .iotSiteWise(IotSiteWiseProperty.builder()
                                                         .assetId("assetId")
                                                         .entryId("entryId")
                                                         .propertyAlias("propertyAlias")
                                                         .propertyId("propertyId")
                                                         .propertyValue(AssetPropertyValueProperty.builder()
                                                                 .quality("quality")
                                                                 .timestamp(AssetPropertyTimestampProperty.builder()
                                                                         .offsetInNanos("offsetInNanos")
                                                                         .timeInSeconds("timeInSeconds")
                                                                         .build())
                                                                 .value(AssetPropertyVariantProperty.builder()
                                                                         .booleanValue("booleanValue")
                                                                         .doubleValue("doubleValue")
                                                                         .integerValue("integerValue")
                                                                         .stringValue("stringValue")
                                                                         .build())
                                                                 .build())
                                                         .build())
                                                 .iotTopicPublish(IotTopicPublishProperty.builder()
                                                         .mqttTopic("mqttTopic")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .lambda(LambdaProperty.builder()
                                                         .functionArn("functionArn")
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .build())
                                                 .resetTimer(ResetTimerProperty.builder()
                                                         .timerName("timerName")
                                                         .build())
                                                 .setTimer(SetTimerProperty.builder()
                                                         .durationExpression("durationExpression")
                                                         .seconds(123)
                                                         .timerName("timerName")
                                                         .build())
                                                 .setVariable(SetVariableProperty.builder()
                                                         .value("value")
                                                         .variableName("variableName")
                                                         .build())
                                                 .sns(SnsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .targetArn("targetArn")
                                                         .build())
                                                 .sqs(SqsProperty.builder()
                                                         .payload(PayloadProperty.builder()
                                                                 .contentExpression("contentExpression")
                                                                 .type("type")
                                                                 .build())
                                                         .queueUrl("queueUrl")
                                                         .useBase64(false)
                                                         .build())
                                                 .build()))
                                         .condition("condition")
                                         .eventName("eventName")
                                         .nextState("nextState")
                                         .build()))
                                 .build())
                         .stateName("stateName")
                         .build()))
                 .build())
         .detectorModelDescription("detectorModelDescription")
         .detectorModelName("detectorModelName")
         .evaluationMethod("evaluationMethod")
         .key("key")
         .roleArn("roleArn")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnDetectorModelPropsMixin

      protected CfnDetectorModelPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDetectorModelPropsMixin

      protected CfnDetectorModelPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDetectorModelPropsMixin

      @Stability(Stable) public CfnDetectorModelPropsMixin(@NotNull CfnDetectorModelMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::IoTEvents::DetectorModel.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnDetectorModelPropsMixin

      @Stability(Stable) public CfnDetectorModelPropsMixin(@NotNull CfnDetectorModelMixinProps props)
      Create a mixin to apply properties to AWS::IoTEvents::DetectorModel.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnDetectorModelMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()