Class CfnDetectorModel

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:53.045Z") @Stability(Stable) public class CfnDetectorModel extends CfnResource implements IInspectable, ITaggable
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 AWS 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 AWS 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 AWS 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 AWS 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:

 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnDetectorModel

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

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

      @Stability(Stable) public CfnDetectorModel(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDetectorModelProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDetectorModelDefinition

      @Stability(Stable) @NotNull public Object getDetectorModelDefinition()
      Information that defines how a detector operates.
    • setDetectorModelDefinition

      @Stability(Stable) public void setDetectorModelDefinition(@NotNull IResolvable value)
      Information that defines how a detector operates.
    • setDetectorModelDefinition

      @Stability(Stable) public void setDetectorModelDefinition(@NotNull CfnDetectorModel.DetectorModelDefinitionProperty value)
      Information that defines how a detector operates.
    • getRoleArn

      @Stability(Stable) @NotNull public String getRoleArn()
      The ARN of the role that grants permission to AWS IoT Events to perform its operations.
    • setRoleArn

      @Stability(Stable) public void setRoleArn(@NotNull String value)
      The ARN of the role that grants permission to AWS IoT Events to perform its operations.
    • getDetectorModelDescription

      @Stability(Stable) @Nullable public String getDetectorModelDescription()
      A brief description of the detector model.
    • setDetectorModelDescription

      @Stability(Stable) public void setDetectorModelDescription(@Nullable String value)
      A brief description of the detector model.
    • getDetectorModelName

      @Stability(Stable) @Nullable public String getDetectorModelName()
      The name of the detector model.
    • setDetectorModelName

      @Stability(Stable) public void setDetectorModelName(@Nullable String value)
      The name of the detector model.
    • getEvaluationMethod

      @Stability(Stable) @Nullable public String getEvaluationMethod()
      Information about the order in which events are evaluated and how actions are executed.
    • setEvaluationMethod

      @Stability(Stable) public void setEvaluationMethod(@Nullable String value)
      Information about the order in which events are evaluated and how actions are executed.
    • getKey

      @Stability(Stable) @Nullable public String getKey()
      The value used to identify a detector instance.
    • setKey

      @Stability(Stable) public void setKey(@Nullable String value)
      The value used to identify a detector instance.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.