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'
)
[REQUIRED]
The name of the repository to set or change the default branch for.
[REQUIRED]
The name of the branch to set as the default.
None
Exceptions
CodeCommit.Client.exceptions.RepositoryNameRequiredExceptionCodeCommit.Client.exceptions.RepositoryDoesNotExistExceptionCodeCommit.Client.exceptions.InvalidRepositoryNameExceptionCodeCommit.Client.exceptions.BranchNameRequiredExceptionCodeCommit.Client.exceptions.InvalidBranchNameExceptionCodeCommit.Client.exceptions.BranchDoesNotExistExceptionCodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedExceptionCodeCommit.Client.exceptions.EncryptionKeyAccessDeniedExceptionCodeCommit.Client.exceptions.EncryptionKeyDisabledExceptionCodeCommit.Client.exceptions.EncryptionKeyNotFoundExceptionCodeCommit.Client.exceptions.EncryptionKeyUnavailableException