

# ListCoreNetworkDryRunRoutes

Returns the routes that a core network policy version produces in a segment or network function group at an edge location. Each route shows how it changes compared to the current routes of the core network.

Before you call this operation, use `StartCoreNetworkPolicyDryRun` to start a dry run of the policy version, and wait for the dry run to reach the `AVAILABLE` state.

## Request Syntax
<a name="API_ListCoreNetworkDryRunRoutes_RequestSyntax"></a>

```
POST /core-networks/{{coreNetworkId}}/core-network-dry-run-routes?maxResults={{MaxResults}}&nextToken={{NextToken}} HTTP/1.1
Content-type: application/json

{
   "DestinationFilters": { 
      "{{string}}" : [ "{{string}}" ]
   },
   "DryRunChangeStates": [ "{{string}}" ],
   "EdgeLocation": "{{string}}",
   "ExactCidrMatches": [ "{{string}}" ],
   "IsOverlappingRoute": {{boolean}},
   "LongestPrefixMatches": [ "{{string}}" ],
   "NetworkFunctionGroupName": "{{string}}",
   "PolicyVersionId": {{number}},
   "PrefixListIds": [ "{{string}}" ],
   "SegmentName": "{{string}}",
   "States": [ "{{string}}" ],
   "SubnetOfMatches": [ "{{string}}" ],
   "SupernetOfMatches": [ "{{string}}" ],
   "Types": [ "{{string}}" ]
}
```

## URI Request Parameters
<a name="API_ListCoreNetworkDryRunRoutes_RequestParameters"></a>

The request uses the following URI parameters.

 ** [coreNetworkId](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-uri-CoreNetworkId"></a>
The ID of the core network.  
Length Constraints: Minimum length of 0. Maximum length of 50.  
Pattern: `^core-network-([0-9a-f]{8,17})$`   
Required: Yes

 ** [MaxResults](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-uri-MaxResults"></a>
The maximum number of results to return.  
Valid Range: Minimum value of 1. Maximum value of 500.

 ** [NextToken](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-uri-NextToken"></a>
The token for the next page of results.  
Length Constraints: Minimum length of 0. Maximum length of 2048.  
Pattern: `[\s\S]*` 

## Request Body
<a name="API_ListCoreNetworkDryRunRoutes_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [DestinationFilters](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-DestinationFilters"></a>
Filters the routes by destination. Possible values: `TRANSIT_GATEWAY_ATTACHMENT_ID`, `RESOURCE_ID`, or `RESOURCE_TYPE`. You can specify up to 20 filters, with up to 20 values for each filter.  
Type: String to array of strings map  
Map Entries: Minimum number of 0 items. Maximum number of 20 items.  
Key Length Constraints: Maximum length of 128.  
Key Pattern: `^[0-9a-zA-Z\.-]*$`   
Array Members: Minimum number of 0 items. Maximum number of 20 items.  
Length Constraints: Maximum length of 255.  
Pattern: `^[0-9a-zA-Z\*\.\\/\?-]*$`   
Required: No

 ** [DryRunChangeStates](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-DryRunChangeStates"></a>
The change states that the routes must have. For a description of each change state, see `NetworkRoute$DryRunChangeState`.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 4 items.  
Valid Values: `ADDED | REMOVED | UPDATED | NO_CHANGES`   
Required: No

 ** [EdgeLocation](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-EdgeLocation"></a>
The edge location to return routes for.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 63.  
Pattern: `[\s\S]*`   
Required: Yes

 ** [ExactCidrMatches](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-ExactCidrMatches"></a>
The Classless Inter-Domain Routing (CIDR) blocks that the routes must exactly match. You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [IsOverlappingRoute](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-IsOverlappingRoute"></a>
Specifies whether to return only overlapping routes.  
Type: Boolean  
Required: No

 ** [LongestPrefixMatches](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-LongestPrefixMatches"></a>
The CIDR blocks for which to return the most specific route (longest prefix match). You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [NetworkFunctionGroupName](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-NetworkFunctionGroupName"></a>
The name of the network function group to return routes for. You must specify either `SegmentName` or `NetworkFunctionGroupName`, but not both.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [PolicyVersionId](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-PolicyVersionId"></a>
The ID of the policy version that the dry run was started for.  
Type: Integer  
Required: Yes

 ** [PrefixListIds](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-PrefixListIds"></a>
The IDs of the prefix lists that the routes must belong to. You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [SegmentName](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-SegmentName"></a>
The name of the segment to return routes for. You must specify either `SegmentName` or `NetworkFunctionGroupName`, but not both.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [States](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-States"></a>
The states of the routes to return. You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Valid Values: `ACTIVE | BLACKHOLE | PENDING_DEPLOYMENT`   
Required: No

 ** [SubnetOfMatches](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-SubnetOfMatches"></a>
The CIDR blocks that the CIDR blocks of the routes must be subnets of. You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [SupernetOfMatches](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-SupernetOfMatches"></a>
The CIDR blocks that the CIDR blocks of the routes must encompass. For example, if you specify 10.24.34.0/23, the results include 10.24.34.0/22. You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Length Constraints: Minimum length of 0. Maximum length of 256.  
Pattern: `[\s\S]*`   
Required: No

 ** [Types](#API_ListCoreNetworkDryRunRoutes_RequestSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-request-Types"></a>
The types of the routes to return. You can specify up to 10 values.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 10 items.  
Valid Values: `PROPAGATED | STATIC | SYSTEM`   
Required: No

## Response Syntax
<a name="API_ListCoreNetworkDryRunRoutes_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "NetworkRoutes": [ 
      { 
         "DestinationCidrBlock": "string",
         "Destinations": [ 
            { 
               "CoreNetworkAttachmentId": "string",
               "EdgeLocation": "string",
               "NetworkFunctionGroupName": "string",
               "ResourceId": "string",
               "ResourceType": "string",
               "SegmentName": "string",
               "TransitGatewayAttachmentId": "string"
            }
         ],
         "DryRunChangeState": "string",
         "IsOverlappingRoute": boolean,
         "PrefixListId": "string",
         "State": "string",
         "Type": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListCoreNetworkDryRunRoutes_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NetworkRoutes](#API_ListCoreNetworkDryRunRoutes_ResponseSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-response-NetworkRoutes"></a>
The routes that the policy version produces.  
Type: Array of [NetworkRoute](API_NetworkRoute.md) objects

 ** [NextToken](#API_ListCoreNetworkDryRunRoutes_ResponseSyntax) **   <a name="networkmanager-ListCoreNetworkDryRunRoutes-response-NextToken"></a>
The token for the next page of results.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 2048.  
Pattern: `[\s\S]*` 

## Errors
<a name="API_ListCoreNetworkDryRunRoutes_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You do not have sufficient access to perform this action.    
 ** ReasonCode **   
A prerequisite that you must complete before you retry the request. Only the network scope operations return this value. Branch on this value rather than on `Message`. These are the same codes that a network scope and a network scope principal carry in `StateReason`, so a prerequisite that is missing when you make the request and one that is found to be missing later are reported the same way.
HTTP Status Code: 403

 ** InternalServerException **   
The request has failed due to an internal error.    
 ** RetryAfterSeconds **   
Indicates when to retry the request.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified resource could not be found.    
 ** Context **   
The specified resource could not be found.  
 ** ResourceId **   
The ID of the resource.  
 ** ResourceType **   
The resource type.
HTTP Status Code: 404

 ** ThrottlingException **   
The request was denied due to request throttling.    
 ** RetryAfterSeconds **   
Indicates when to retry the request.
HTTP Status Code: 429

 ** ValidationException **   
The input fails to satisfy the constraints.    
 ** Fields **   
The fields that caused the error, if applicable.  
 ** Reason **   
The reason for the error.  
 ** ReasonCode **   
A prerequisite that you must complete before you retry the request. Only the network scope operations return this value. Branch on this value rather than on `Message`. These are the same codes that a network scope and a network scope principal carry in `StateReason`, so a prerequisite that is missing when you make the request and one that is found to be missing later are reported the same way.
HTTP Status Code: 400

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

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/networkmanager-2019-07-05/ListCoreNetworkDryRunRoutes) 