CodeCatalyst / Client / create_source_repository_branch

create_source_repository_branch#

CodeCatalyst.Client.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'
)
Parameters:
  • spaceName (string) –

    [REQUIRED]

    The name of the space.

  • projectName (string) –

    [REQUIRED]

    The name of the project in the space.

  • sourceRepositoryName (string) –

    [REQUIRED]

    The name of the repository where you want to create a branch.

  • name (string) –

    [REQUIRED]

    The name for the branch you’re creating.

  • headCommitId (string) – The commit ID in an existing branch from which you want to create the new branch.

Return type:

dict

Returns:

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