CodeCommit / Client / update_default_branch

update_default_branch#

CodeCommit.Client.update_default_branch(**kwargs)#

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

Note

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.

See also: AWS API Documentation

Request Syntax

response = client.update_default_branch(
    repositoryName='string',
    defaultBranchName='string'
)
Parameters:
  • repositoryName (string) –

    [REQUIRED]

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

  • defaultBranchName (string) –

    [REQUIRED]

    The name of the branch to set as the default branch.

Returns:

None

Exceptions

  • CodeCommit.Client.exceptions.RepositoryNameRequiredException

  • CodeCommit.Client.exceptions.RepositoryDoesNotExistException

  • CodeCommit.Client.exceptions.InvalidRepositoryNameException

  • CodeCommit.Client.exceptions.BranchNameRequiredException

  • CodeCommit.Client.exceptions.InvalidBranchNameException

  • CodeCommit.Client.exceptions.BranchDoesNotExistException

  • CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException

  • CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException

  • CodeCommit.Client.exceptions.EncryptionKeyDisabledException

  • CodeCommit.Client.exceptions.EncryptionKeyNotFoundException

  • CodeCommit.Client.exceptions.EncryptionKeyUnavailableException