

# RuleDefinition
<a name="API_RuleDefinition"></a>

Contains the detection logic for a custom detection rule.

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

 ** expression **   <a name="guardduty-Type-RuleDefinition-expression"></a>
The detection logic expression for the rule.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 4096.  
Required: Yes

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

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/guardduty-2017-11-28/RuleDefinition) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/guardduty-2017-11-28/RuleDefinition) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/guardduty-2017-11-28/RuleDefinition) 