

# PrepareMigration
<a name="API_PrepareMigration"></a>

Prepares the serverless cache for data migration by validating the configuration and setting up the migration resources.

## Request Parameters
<a name="API_PrepareMigration_RequestParameters"></a>

 For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

 **CustomerNodeEndpointList.member.N**   
The list of endpoints from which to migrate data. For serverless cache migrations, the list should have only one element.  
Type: Array of [CustomerNodeEndpoint](API_CustomerNodeEndpoint.md) objects  
Required: Yes

 ** ServerlessCacheName **   
The name of the serverless cache to prepare for migration.  
Type: String  
Required: Yes

 ** SourceAuthenticationConfiguration **   
The authentication configuration for connecting to the source during migration.  
Type: [SourceAuthenticationConfiguration](API_SourceAuthenticationConfiguration.md) object  
Required: No

 ** SourceTlsConfiguration **   
The TLS configuration for connecting to the source during migration.  
Type: [SourceTlsConfiguration](API_SourceTlsConfiguration.md) object  
Required: No

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

The following element is returned by the service.

 ** ServerlessCache **   
Provides the details of the serverless cache prepared for migration.  
Type: [ServerlessCache](API_ServerlessCache.md) object

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

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

 ** InvalidParameterValue **   
The value for a parameter is invalid.    
 ** message **   
A parameter value is invalid.
HTTP Status Code: 400

 ** InvalidServerlessCacheStateFault **   
The account for these credentials is not currently active.  
HTTP Status Code: 400

 ** ServerlessCacheAlreadyUnderMigrationFault **   
A migration is already in progress for this serverless cache. You cannot start another migration until the current one completes.  
HTTP Status Code: 400

 ** ServerlessCacheNotFoundFault **   
The serverless cache was not found or does not exist.  
HTTP Status Code: 404

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

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for C\+\+](https://docs.amazonaws.cn/goto/SdkForCpp/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for Python (Boto3)](https://docs.amazonaws.cn/goto/boto3/elasticache-2015-02-02/PrepareMigration) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/elasticache-2015-02-02/PrepareMigration) 