View a markdown version of this page

CreateBranch - Amazon Relational Database Service

CreateBranch

Creates a branch of an Amazon Aurora PostgreSQL DB cluster, called the root DB cluster of the branch. Amazon Relational Database Service (Amazon RDS) creates the branch as an isolated, writable copy of the DB cluster with its own endpoint, for development and testing.

Every branch has a time to live (TTL). When the TTL ends, Amazon RDS deletes the branch.

A DB cluster can have up to 50 branches, or up to 10 branches for a free plan account. Branches that are being deleted count toward this quota. For the quota on branches per account, see Quotas for Amazon Aurora in the Amazon Aurora User Guide.

CreateBranch returns the branch with the status creating.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

BranchName

The name of the branch. The name must be unique among the branches of the root DB cluster.

Branch names aren't case-sensitive. Amazon RDS keeps the name in the case that you specify, but a DB cluster can't have two branches whose names differ only in case.

The following constraints apply to this parameter:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.

  • First character must be a letter.

Example: my-feature-branch

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Required: Yes

SourceDBClusterIdentifier

The identifier of the DB cluster to create the branch from. If you specify SourceBranchName, this is the root DB cluster of the source branch.

You can specify either of the following:

  • The name of the DB cluster.

  • The Amazon Resource Name (ARN) of the DB cluster.

You can't specify the DB cluster of a branch.

The following constraints apply to this parameter:

  • Must match the identifier of an existing DB cluster.

  • The DB cluster and its writer DB instance must be available.

  • A DB cluster ARN must be the ARN of a DB cluster in your AWS account and AWS Region.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

ScalingConfiguration

The capacity settings of the branch.

Type: BranchScalingConfiguration object

Required: No

SourceBranchName

The name or Amazon Resource Name (ARN) of the branch to create the branch from. The source branch must belong to the DB cluster that you specify in SourceDBClusterIdentifier.

If you don't specify this parameter, Amazon RDS creates the branch from the DB cluster.

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.

  • The source branch must be available.

  • The source branch can't itself have been created from a branch.

  • The source branch must expire in at least 3600 seconds (1 hour).

  • Can't be specified with TtlSeconds.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

Tags.Tag.N

Tags to assign to the branch.

Type: Array of Tag objects

Required: No

TtlSeconds

The number of seconds after the branch is created that Amazon RDS deletes it.

Default: 86400 (24 hours)

The following constraints apply to this parameter:

  • Must be a value from 3600 (1 hour) to 7776000 (90 days).

  • Can't be specified with SourceBranchName. A branch created from a branch expires when its source branch expires.

Type: Long

Required: No

Response Elements

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 object

Errors

For information about the errors that are common to all actions, see Common Error Types.

BranchAlreadyExists

The DB cluster already has a branch with the specified name.

HTTP Status Code: 400

BranchNotFound

The specified branch doesn't exist.

HTTP Status Code: 404

BranchQuotaExceeded

You can't create the branch because the quota for branches of the DB cluster, or for branches of the account, has been reached.

HTTP Status Code: 400

DBClusterNotFoundFault

DBClusterIdentifier doesn't refer to an existing DB cluster.

HTTP Status Code: 404

InsufficientCapacity

There isn't enough capacity to create the branch. Try again later.

HTTP Status Code: 400

InvalidBranchSource

You can't create a branch from the specified source because its configuration doesn't support branches.

HTTP Status Code: 400

InvalidBranchState

The branch isn't in a valid state for the operation.

HTTP Status Code: 400

InvalidDBClusterStateFault

The requested operation can't be performed while the cluster is in this state.

HTTP Status Code: 400

InvalidVPCNetworkStateFault

The DB subnet group doesn't cover all Availability Zones after it's created because of users' change.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: