

# MoveDataGroup

Runs one step of moving a data group from its DB cluster to another Aurora DB cluster in the same AWS account and AWS Region.

A move has two steps. First, run `prepare-move`. When the data group status is `ready-to-move`, run `execute-move` with the same target DB cluster to complete the move. To cancel a move before you execute it, run `cancel-move`.

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

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

 ** DataGroupIdentifier **   
The data group to move. You can specify:  
+ The data group identifier.
+ The data group ARN.
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Pattern: `(arn:aws[a-z\-]*:rds(-[a-z]*)?:[a-z0-9\-]*:[0-9]*:data-group:)?dg-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`   
Required: Yes

 ** MoveOperation **   
The move step to run.  
Valid Values:  
+  `prepare-move` – Prepares the target DB cluster for the data group. The data group status changes to `preparing-for-move`, and then to `ready-to-move`.
+  `execute-move` – Moves the data group to the target DB cluster. Specify the same `TargetDBClusterIdentifier` that you specified for `prepare-move`.
+  `cancel-move` – Cancels a move before you execute it, when the data group status is `preparing-for-move` or `ready-to-move`. The data group returns to `active` on its current DB cluster. You can't cancel a move after the status is `move-in-progress`.
Type: String  
Valid Values: `prepare-move | execute-move | cancel-move`   
Required: Yes

 ** TargetDBClusterIdentifier **   
The identifier of the DB cluster to move the data group to.  
Required for `prepare-move` and `execute-move`. For `execute-move`, specify the same DB cluster that you specified for `prepare-move`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Pattern: `[A-Za-z][0-9A-Za-z-:._]*`   
Required: No

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

The following element is returned by the service.

 ** DataGroup **   
Describes a data group. A data group is a container for one or more databases in an Aurora DB cluster that you manage as a single unit.  
This data type is used as a response element in the `CreateDataGroup`, `DeleteDataGroup`, `DescribeDataGroups`, `ModifyDataGroup`, and `MoveDataGroup` actions.  
Type: [DataGroup](API_DataGroup.md) object

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

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

 ** DataGroupEndpointQuotaExceededFault **   
The request would result in you exceeding the allowed number of data group endpoints.  
HTTP Status Code: 400

 ** DataGroupNameInUseFault **   
The specified data group name is already in use on the DB cluster. For a move, the name is in use on the target DB cluster.  
HTTP Status Code: 400

 ** DataGroupNotFoundFault **   
Amazon RDS couldn't find the specified data group. Verify that the data group identifier is correct.  
HTTP Status Code: 404

 ** DataGroupQuotaExceededFault **   
The DB cluster already has the maximum number of data groups. For a move, the target DB cluster already has the maximum number of data groups.  
HTTP Status Code: 400

 ** DBClusterNotFoundFault **   
 `DBClusterIdentifier` doesn't refer to an existing DB cluster.  
HTTP Status Code: 404

 ** InvalidDataGroupStateFault **   
The data group isn't in a valid state for the requested operation. Wait until the data group is in a valid state and try again.  
HTTP Status Code: 400

 ** InvalidDBClusterStateFault **   
The requested operation can't be performed while the cluster is in this state.  
HTTP Status Code: 400

 ** KMSKeyNotAccessibleFault **   
An error occurred accessing an AWS KMS key.  
HTTP Status Code: 400

## See Also
<a name="API_MoveDataGroup_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/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/rds-2014-10-31/MoveDataGroup) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/rds-2014-10-31/MoveDataGroup) 