AmplifyGen3 / Client / list_branches

list_branches

AmplifyGen3.Client.list_branches(**kwargs)

Returns a list of the branches for an environment.

See also: AWS API Documentation

Request Syntax

response = client.list_branches(
    AppName='string',
    EnvironmentName='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • AppName (string) –

    [REQUIRED]

    The name of the app.

  • EnvironmentName (string) –

    [REQUIRED]

    The name of the environment.

  • NextToken (string) – The pagination token returned in a previous response, used to retrieve the next page of results.

  • MaxResults (integer) – The maximum number of results to return in a single response.

Return type:

dict

Returns:

Response Syntax

{
    'Branches': [
        {
            'BranchName': 'string',
            'BranchArn': 'string',
            'GitBranchName': 'string',
            'CreatedAt': datetime(2015, 1, 1),
            'SourceBranch': {
                'BranchName': 'string',
                'BranchArn': 'string',
                'RestoreToTime': datetime(2015, 1, 1)
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Branches (list) –

      The branches for the environment.

      • (dict) –

        Summary information about a branch.

        • BranchName (string) –

          The name of the branch.

        • BranchArn (string) –

          The Amazon Resource Name (ARN) of the branch.

        • GitBranchName (string) –

          The name of the Git branch that the branch was created for. Present only for a branch that was created for a Git branch.

        • CreatedAt (datetime) –

          The time at which the branch was created. The value is in ISO-8601 format.

        • SourceBranch (dict) –

          The branch that this branch was restored from. Present only for a branch that was created by RestoreBranch.

          • BranchName (string) –

            The name of the branch that the data was restored from.

          • BranchArn (string) –

            The Amazon Resource Name (ARN) of the branch that the data was restored from.

          • RestoreToTime (datetime) –

            The point in time that the data was restored to.

    • NextToken (string) –

      The pagination token to use to retrieve the next page of results. This value is null when there are no more results to return.

Exceptions

  • AmplifyGen3.Client.exceptions.ThrottlingException

  • AmplifyGen3.Client.exceptions.AccessDeniedException

  • AmplifyGen3.Client.exceptions.ResourceNotFoundException

  • AmplifyGen3.Client.exceptions.ValidationException

  • AmplifyGen3.Client.exceptions.InternalServerException