v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1477523442.5 KB

Sets or changes the default branch name for the specified repository.

If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.

post/#X-Amz-Target=CodeCommit_20150413.UpdateDefaultBranch

Headers

X-Amz-Target'CodeCommit_20150413.UpdateDefaultBranch' required

Request body

repositoryNamestring required

The name of the repository to set or change the default branch for.

defaultBranchNamestring required

The name of the branch to set as the default.

Response

Success