Class CfnDetectorModel
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IDetectorModelRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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:
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn action to be performed when theconditionis TRUE.static interfaceA structure that contains timestamp information.static interfaceA structure that contains value information.static interfaceA structure that contains an asset property value.static final classA fluent builder forCfnDetectorModel.static interfaceInformation needed to clear the timer.static interfaceInformation that defines how a detector operates.static interfaceDefines an action to write to the Amazon DynamoDB table that you created.static interfaceDefines an action to write to the Amazon DynamoDB table that you created.static interfaceSpecifies theactionsto be performed when theconditionevaluates to TRUE.static interfaceSends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.static interfaceSends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.static interfaceSends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .static interfaceInformation required to publish the MQTT message through the AWS IoT message broker.static interfaceCalls a Lambda function, passing in information about the detector model instance and the event that triggered the action.static interfaceWhen entering this state, perform theseactionsif theconditionis TRUE.static interfaceWhen exiting this state, perform theseactionsif the specifiedconditionisTRUE.static interfaceSpecifies the actions performed when theconditionevaluates to TRUE.static interfaceInformation needed to configure the payload.static interfaceInformation required to reset the timer.static interfaceInformation needed to set the timer.static interfaceInformation about the variable and its new value.static interfaceInformation required to publish the Amazon SNS message.static interfaceSends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.static interfaceInformation that defines a state of a detector.static interfaceSpecifies the actions performed and the next state entered when aconditionevaluates to TRUE.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.iotevents.IDetectorModelRef
IDetectorModelRef.Jsii$Default, IDetectorModelRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDetectorModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDetectorModel(software.amazon.jsii.JsiiObjectRef objRef) CfnDetectorModel(software.constructs.Construct scope, String id, CfnDetectorModelProps props) Create a newAWS::IoTEvents::DetectorModel. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForDetectorModel(IDetectorModelRef resource) static IDetectorModelReffromDetectorModelName(software.constructs.Construct scope, String id, String detectorModelName) Creates a new IDetectorModelRef from a detectorModelName.Information that defines how a detector operates.A brief description of the detector model.The name of the detector model.A reference to a DetectorModel resource.Information about the order in which events are evaluated and how actions are executed.getKey()The value used to identify a detector instance.The ARN of the role that grants permission to AWS IoT Events to perform its operations.getTags()Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnDetectorModel.renderProperties(Map<String, Object> props) voidInformation that defines how a detector operates.voidInformation that defines how a detector operates.voidA brief description of the detector model.voidsetDetectorModelName(String value) The name of the detector model.voidsetEvaluationMethod(String value) Information about the order in which events are evaluated and how actions are executed.voidThe value used to identify a detector instance.voidsetRoleArn(String value) The ARN of the role that grants permission to AWS IoT Events to perform its operations.voidsetTagsRaw(List<CfnTag> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::IoTEvents::DetectorModel.- 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
-
arnForDetectorModel
@Stability(Stable) @NotNull public static String arnForDetectorModel(@NotNull IDetectorModelRef resource) - Parameters:
resource- This parameter is required.
-
fromDetectorModelName
@Stability(Stable) @NotNull public static IDetectorModelRef fromDetectorModelName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String detectorModelName) Creates a new IDetectorModelRef from a detectorModelName.- Parameters:
scope- This parameter is required.id- This parameter is required.detectorModelName- This parameter is required.
-
isCfnDetectorModel
Checks whether the given object is a CfnDetectorModel.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDetectorModelRef
A reference to a DetectorModel resource.- Specified by:
getDetectorModelRefin interfaceIDetectorModelRef
-
getTags
Tag Manager which manages the tags for this resource. -
getDetectorModelDefinition
Information that defines how a detector operates.Returns union: either
IResolvableorCfnDetectorModel.DetectorModelDefinitionProperty -
setDetectorModelDefinition
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
The ARN of the role that grants permission to AWS IoT Events to perform its operations. -
setRoleArn
The ARN of the role that grants permission to AWS IoT Events to perform its operations. -
getDetectorModelDescription
A brief description of the detector model. -
setDetectorModelDescription
A brief description of the detector model. -
getDetectorModelName
The name of the detector model. -
setDetectorModelName
The name of the detector model. -
getEvaluationMethod
Information about the order in which events are evaluated and how actions are executed. -
setEvaluationMethod
Information about the order in which events are evaluated and how actions are executed. -
getKey
The value used to identify a detector instance. -
setKey
The value used to identify a detector instance. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-