CodeCommit.Client.get_branch(**kwargs)¶Returns information about a repository branch, including its name and the last commit ID.
See also: AWS API Documentation
Request Syntax
response = client.get_branch(
repositoryName='string',
branchName='string'
)
dict
Response Syntax
{
'branch': {
'branchName': 'string',
'commitId': 'string'
}
}
Response Structure
(dict) --
Represents the output of a get branch operation.
branch (dict) --
The name of the branch.
branchName (string) --
The name of the branch.
commitId (string) --
The ID of the last commit made to the branch.
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