create_source_repository_branch(**kwargs)¶Creates a branch in a specified source repository in Amazon CodeCatalyst.
Note
This API only creates a branch in a source repository hosted in Amazon CodeCatalyst. You cannot use this API to create a branch in a linked repository.
See also: AWS API Documentation
Request Syntax
response = client.create_source_repository_branch(
spaceName='string',
projectName='string',
sourceRepositoryName='string',
name='string',
headCommitId='string'
)
[REQUIRED]
The name of the space.
[REQUIRED]
The name of the project in the space.
[REQUIRED]
The name of the repository where you want to create a branch.
[REQUIRED]
The name for the branch you're creating.
dict
Response Syntax
{
'ref': 'string',
'name': 'string',
'lastUpdatedTime': datetime(2015, 1, 1),
'headCommitId': 'string'
}
Response Structure
(dict) --
ref (string) --
The Git reference name of the branch.
name (string) --
The name of the newly created branch.
lastUpdatedTime (datetime) --
The time the branch was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
headCommitId (string) --
The commit ID of the tip of the newly created branch.
Exceptions
CodeCatalyst.Client.exceptions.ThrottlingExceptionCodeCatalyst.Client.exceptions.ConflictExceptionCodeCatalyst.Client.exceptions.ValidationExceptionCodeCatalyst.Client.exceptions.ServiceQuotaExceededExceptionCodeCatalyst.Client.exceptions.ResourceNotFoundExceptionCodeCatalyst.Client.exceptions.AccessDeniedException