

# DeleteBranch

Deletes a branch. Amazon RDS sets the status of the branch to `deleting` and deletes it asynchronously.

You can't delete a branch that other branches were created from. Delete those branches first.

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

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

 ** BranchName **   
The name or Amazon Resource Name (ARN) of the branch to delete. The branch must belong to the DB cluster that you specify in `DBClusterIdentifier`.  
The following constraints apply to this parameter:  
+ A branch name must contain from 1 to 63 alphanumeric characters or hyphens, and start with a letter.
+ A branch ARN must be the ARN of a branch in your AWS account and AWS Region.
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Required: Yes

 ** DBClusterIdentifier **   
The name of the root DB cluster of the branch.  
Constraints: Must match the name of an existing DB cluster.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Required: Yes

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

The following element is returned by the service.

 ** Branch **   
Contains the details of a branch of an Aurora PostgreSQL DB cluster.  
This data type is used as a response element in the `CreateBranch`, `DeleteBranch`, and `DescribeBranches` actions.  
Type: [Branch](API_Branch.md) object

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

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

 ** BranchNotFound **   
The specified branch doesn't exist.  
HTTP Status Code: 404

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

 ** InvalidBranchState **   
The branch isn't in a valid state for the operation.  
HTTP Status Code: 400

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