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.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