

# State
<a name="API_State"></a>

Information that defines a state of a detector.

## Contents
<a name="API_State_Contents"></a>

 ** stateName **   <a name="iotevents-Type-State-stateName"></a>
The name of the state.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Required: Yes

 ** onEnter **   <a name="iotevents-Type-State-onEnter"></a>
When entering this state, perform these `actions` if the `condition` is TRUE.  
Type: [OnEnterLifecycle](API_OnEnterLifecycle.md) object  
Required: No

 ** onExit **   <a name="iotevents-Type-State-onExit"></a>
When exiting this state, perform these `actions` if the specified `condition` is `TRUE`.  
Type: [OnExitLifecycle](API_OnExitLifecycle.md) object  
Required: No

 ** onInput **   <a name="iotevents-Type-State-onInput"></a>
When an input is received and the `condition` is TRUE, perform the specified `actions`.  
Type: [OnInputLifecycle](API_OnInputLifecycle.md) object  
Required: No

## See Also
<a name="API_State_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotevents-2018-07-27/State) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotevents-2018-07-27/State) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotevents-2018-07-27/State) 