

# DeleteDataGroup

Deletes a data group. Before you delete a data group, drop the databases in it.

You can delete a data group only when its status is `active`, `create-failed`, or `inaccessible-encryption-credentials`.

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

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

 ** DataGroupIdentifier **   
The data group to delete. 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

## Response Elements
<a name="API_DeleteDataGroup_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_DeleteDataGroup_Errors"></a>

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

 ** DataGroupNotFoundFault **   
Amazon RDS couldn't find the specified data group. Verify that the data group identifier is correct.  
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

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