

# TraversalStrategy

The traversal settings for TraverseAgentContext: which edge types to follow, in which direction, and how deep.

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

 ** direction **   <a name="context-Type-TraversalStrategy-direction"></a>
Direction of edge traversal.  
Valid values:  
+  `OUTGOING` - Follow edges pointing away from the current node (source -> target).
+  `INCOMING` - Follow edges pointing toward the current node (target -> source).
+  `BOTH` - Follow edges in both directions.
Type: String  
Valid Values: `OUTGOING | INCOMING | BOTH`   
Required: Yes

 ** maxDepth **   <a name="context-Type-TraversalStrategy-maxDepth"></a>
The maximum traversal depth from the seed node, from 1 to 3.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 3.  
Required: Yes

 ** edgeTypes **   <a name="context-Type-TraversalStrategy-edgeTypes"></a>
Edge types to follow. When omitted, all edge types are traversed.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 500 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[A-Z][A-Z0-9_]*(::[A-Z][A-Z0-9_]*)*`   
Required: No

## See Also
<a name="API_TraversalStrategy_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/context-2022-07-26/TraversalStrategy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/context-2022-07-26/TraversalStrategy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/context-2022-07-26/TraversalStrategy) 