CodeCommit

Table of Contents

Client

class CodeCommit.Client

A low-level client representing AWS CodeCommit:

import boto3

client = boto3.client('codecommit')

These are the available methods:

batch_get_repositories(**kwargs)

Returns information about one or more repositories.

Note

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

See also: AWS API Documentation

Request Syntax

response = client.batch_get_repositories(
    repositoryNames=[
        'string',
    ]
)
Parameters
repositoryNames (list) --

[REQUIRED]

The names of the repositories to get information about.

  • (string) --
Return type
dict
Returns
Response Syntax
{
    'repositories': [
        {
            'accountId': 'string',
            'repositoryId': 'string',
            'repositoryName': 'string',
            'repositoryDescription': 'string',
            'defaultBranch': 'string',
            'lastModifiedDate': datetime(2015, 1, 1),
            'creationDate': datetime(2015, 1, 1),
            'cloneUrlHttp': 'string',
            'cloneUrlSsh': 'string',
            'Arn': 'string'
        },
    ],
    'repositoriesNotFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Represents the output of a batch get repositories operation.

    • repositories (list) --

      A list of repositories returned by the batch get repositories operation.

      • (dict) --

        Information about a repository.

        • accountId (string) --

          The ID of the AWS account associated with the repository.

        • repositoryId (string) --

          The ID of the repository.

        • repositoryName (string) --

          The repository's name.

        • repositoryDescription (string) --

          A comment or description about the repository.

        • defaultBranch (string) --

          The repository's default branch name.

        • lastModifiedDate (datetime) --

          The date and time the repository was last modified, in timestamp format.

        • creationDate (datetime) --

          The date and time the repository was created, in timestamp format.

        • cloneUrlHttp (string) --

          The URL to use for cloning the repository over HTTPS.

        • cloneUrlSsh (string) --

          The URL to use for cloning the repository over SSH.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the repository.

    • repositoriesNotFound (list) --

      Returns a list of repository names for which information could not be found.

      • (string) --
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_branch(**kwargs)

Creates a new branch in a repository and points the branch to a commit.

Note

Calling the create branch operation does not set a repository's default branch. To do this, call the update default branch operation.

See also: AWS API Documentation

Request Syntax

response = client.create_branch(
    repositoryName='string',
    branchName='string',
    commitId='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository in which you want to create the new branch.

  • branchName (string) --

    [REQUIRED]

    The name of the new branch to create.

  • commitId (string) --

    [REQUIRED]

    The ID of the commit to point the new branch to.

Returns

None

create_repository(**kwargs)

Creates a new, empty repository.

See also: AWS API Documentation

Request Syntax

response = client.create_repository(
    repositoryName='string',
    repositoryDescription='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the new repository to be created.

    Note

    The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide. The suffix ".git" is prohibited.

  • repositoryDescription (string) --

    A comment or description about the new repository.

    Note

    The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

Return type

dict

Returns

Response Syntax

{
    'repositoryMetadata': {
        'accountId': 'string',
        'repositoryId': 'string',
        'repositoryName': 'string',
        'repositoryDescription': 'string',
        'defaultBranch': 'string',
        'lastModifiedDate': datetime(2015, 1, 1),
        'creationDate': datetime(2015, 1, 1),
        'cloneUrlHttp': 'string',
        'cloneUrlSsh': 'string',
        'Arn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a create repository operation.

    • repositoryMetadata (dict) --

      Information about the newly created repository.

      • accountId (string) --

        The ID of the AWS account associated with the repository.

      • repositoryId (string) --

        The ID of the repository.

      • repositoryName (string) --

        The repository's name.

      • repositoryDescription (string) --

        A comment or description about the repository.

      • defaultBranch (string) --

        The repository's default branch name.

      • lastModifiedDate (datetime) --

        The date and time the repository was last modified, in timestamp format.

      • creationDate (datetime) --

        The date and time the repository was created, in timestamp format.

      • cloneUrlHttp (string) --

        The URL to use for cloning the repository over HTTPS.

      • cloneUrlSsh (string) --

        The URL to use for cloning the repository over SSH.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the repository.

delete_repository(**kwargs)

Deletes a repository. If a specified repository was already deleted, a null repository ID will be returned.

Warning

Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository will fail.

See also: AWS API Documentation

Request Syntax

response = client.delete_repository(
    repositoryName='string'
)
Parameters
repositoryName (string) --

[REQUIRED]

The name of the repository to delete.

Return type
dict
Returns
Response Syntax
{
    'repositoryId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a delete repository operation.

    • repositoryId (string) --

      The ID of the repository that was deleted.

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_blob(**kwargs)

Returns the base-64 encoded content of an individual blob within a repository.

See also: AWS API Documentation

Request Syntax

response = client.get_blob(
    repositoryName='string',
    blobId='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository that contains the blob.

  • blobId (string) --

    [REQUIRED]

    The ID of the blob, which is its SHA-1 pointer.

Return type

dict

Returns

Response Syntax

{
    'content': b'bytes'
}

Response Structure

  • (dict) --

    Represents the output of a get blob operation.

    • content (bytes) --

      The content of the blob, usually a file.

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'
)
Parameters
  • repositoryName (string) -- The name of the repository that contains the branch for which you want to retrieve information.
  • branchName (string) -- The name of the branch for which you want to retrieve information.
Return type

dict

Returns

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.

get_commit(**kwargs)

Returns information about a commit, including commit message and committer information.

See also: AWS API Documentation

Request Syntax

response = client.get_commit(
    repositoryName='string',
    commitId='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository to which the commit was made.

  • commitId (string) --

    [REQUIRED]

    The commit ID.

Return type

dict

Returns

Response Syntax

{
    'commit': {
        'treeId': 'string',
        'parents': [
            'string',
        ],
        'message': 'string',
        'author': {
            'name': 'string',
            'email': 'string',
            'date': 'string'
        },
        'committer': {
            'name': 'string',
            'email': 'string',
            'date': 'string'
        },
        'additionalData': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a get commit operation.

    • commit (dict) --

      A commit data type object that contains information about the specified commit.

      • treeId (string) --

        Tree information for the specified commit.

      • parents (list) --

        The parent list for the specified commit.

        • (string) --
      • message (string) --

        The commit message associated with the specified commit.

      • author (dict) --

        Information about the author of the specified commit. Information includes the date in timestamp format with GMT offset, the name of the author, and the email address for the author, as configured in Git.

        • name (string) --

          The name of the user who made the specified commit.

        • email (string) --

          The email address associated with the user who made the commit, if any.

        • date (string) --

          The date when the specified commit was pushed to the repository.

      • committer (dict) --

        Information about the person who committed the specified commit, also known as the committer. Information includes the date in timestamp format with GMT offset, the name of the committer, and the email address for the committer, as configured in Git.

        For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.

        • name (string) --

          The name of the user who made the specified commit.

        • email (string) --

          The email address associated with the user who made the commit, if any.

        • date (string) --

          The date when the specified commit was pushed to the repository.

      • additionalData (string) --

        Any additional data associated with the specified commit.

get_differences(**kwargs)

Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID or other fully qualified reference). Results can be limited to a specified path.

See also: AWS API Documentation

Request Syntax

response = client.get_differences(
    repositoryName='string',
    beforeCommitSpecifier='string',
    afterCommitSpecifier='string',
    beforePath='string',
    afterPath='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository where you want to get differences.

  • beforeCommitSpecifier (string) -- The branch, tag, HEAD, or other fully qualified reference used to identify a commit. For example, the full commit ID. Optional. If not specified, all changes prior to the afterCommitSpecifier value will be shown. If you do not use beforeCommitSpecifier in your request, consider limiting the results with maxResults .
  • afterCommitSpecifier (string) --

    [REQUIRED]

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit.

  • beforePath (string) -- The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If beforePath and afterPath are not specified, differences will be shown for all paths.
  • afterPath (string) -- The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences will be shown for all paths.
  • MaxResults (integer) -- A non-negative integer used to limit the number of returned results.
  • NextToken (string) -- An enumeration token that when provided in a request, returns the next batch of the results.
Return type

dict

Returns

Response Syntax

{
    'differences': [
        {
            'beforeBlob': {
                'blobId': 'string',
                'path': 'string',
                'mode': 'string'
            },
            'afterBlob': {
                'blobId': 'string',
                'path': 'string',
                'mode': 'string'
            },
            'changeType': 'A'|'M'|'D'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • differences (list) --

      A differences data type object that contains information about the differences, including whether the difference is added, modified, or deleted (A, D, M).

      • (dict) --

        Returns information about a set of differences for a commit specifier.

        • beforeBlob (dict) --

          Information about a beforeBlob data type object, including the ID, the file mode permission code, and the path.

          • blobId (string) --

            The full ID of the blob.

          • path (string) --

            The path to the blob and any associated file name, if any.

          • mode (string) --

            The file mode permissions of the blob. File mode permission codes include:

            • 100644 indicates read/write
            • 100755 indicates read/write/execute
            • 160000 indicates a submodule
            • 120000 indicates a symlink
        • afterBlob (dict) --

          Information about an afterBlob data type object, including the ID, the file mode permission code, and the path.

          • blobId (string) --

            The full ID of the blob.

          • path (string) --

            The path to the blob and any associated file name, if any.

          • mode (string) --

            The file mode permissions of the blob. File mode permission codes include:

            • 100644 indicates read/write
            • 100755 indicates read/write/execute
            • 160000 indicates a submodule
            • 120000 indicates a symlink
        • changeType (string) --

          Whether the change type of the difference is an addition (A), deletion (D), or modification (M).

    • NextToken (string) --

      An enumeration token that can be used in a request to return the next batch of the results.

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_repository(**kwargs)

Returns information about a repository.

Note

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

See also: AWS API Documentation

Request Syntax

response = client.get_repository(
    repositoryName='string'
)
Parameters
repositoryName (string) --

[REQUIRED]

The name of the repository to get information about.

Return type
dict
Returns
Response Syntax
{
    'repositoryMetadata': {
        'accountId': 'string',
        'repositoryId': 'string',
        'repositoryName': 'string',
        'repositoryDescription': 'string',
        'defaultBranch': 'string',
        'lastModifiedDate': datetime(2015, 1, 1),
        'creationDate': datetime(2015, 1, 1),
        'cloneUrlHttp': 'string',
        'cloneUrlSsh': 'string',
        'Arn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a get repository operation.

    • repositoryMetadata (dict) --

      Information about the repository.

      • accountId (string) --

        The ID of the AWS account associated with the repository.

      • repositoryId (string) --

        The ID of the repository.

      • repositoryName (string) --

        The repository's name.

      • repositoryDescription (string) --

        A comment or description about the repository.

      • defaultBranch (string) --

        The repository's default branch name.

      • lastModifiedDate (datetime) --

        The date and time the repository was last modified, in timestamp format.

      • creationDate (datetime) --

        The date and time the repository was created, in timestamp format.

      • cloneUrlHttp (string) --

        The URL to use for cloning the repository over HTTPS.

      • cloneUrlSsh (string) --

        The URL to use for cloning the repository over SSH.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the repository.

get_repository_triggers(**kwargs)

Gets information about triggers configured for a repository.

See also: AWS API Documentation

Request Syntax

response = client.get_repository_triggers(
    repositoryName='string'
)
Parameters
repositoryName (string) --

[REQUIRED]

The name of the repository for which the trigger is configured.

Return type
dict
Returns
Response Syntax
{
    'configurationId': 'string',
    'triggers': [
        {
            'name': 'string',
            'destinationArn': 'string',
            'customData': 'string',
            'branches': [
                'string',
            ],
            'events': [
                'all'|'updateReference'|'createReference'|'deleteReference',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a get repository triggers operation.

    • configurationId (string) --

      The system-generated unique ID for the trigger.

    • triggers (list) --

      The JSON block of configuration information for each trigger.

      • (dict) --

        Information about a trigger for a repository.

        • name (string) --

          The name of the trigger.

        • destinationArn (string) --

          The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

        • customData (string) --

          Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

        • branches (list) --

          The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.

          • (string) --
        • events (list) --

          The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

          Note

          The valid value "all" cannot be used with any other values.

          • (string) --
get_waiter(waiter_name)
list_branches(**kwargs)

Gets information about one or more branches in a repository.

See also: AWS API Documentation

Request Syntax

response = client.list_branches(
    repositoryName='string',
    nextToken='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository that contains the branches.

  • nextToken (string) -- An enumeration token that allows the operation to batch the results.
Return type

dict

Returns

Response Syntax

{
    'branches': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list branches operation.

    • branches (list) --

      The list of branch names.

      • (string) --
    • nextToken (string) --

      An enumeration token that returns the batch of the results.

list_repositories(**kwargs)

Gets information about one or more repositories.

See also: AWS API Documentation

Request Syntax

response = client.list_repositories(
    nextToken='string',
    sortBy='repositoryName'|'lastModifiedDate',
    order='ascending'|'descending'
)
Parameters
  • nextToken (string) -- An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.
  • sortBy (string) -- The criteria used to sort the results of a list repositories operation.
  • order (string) -- The order in which to sort the results of a list repositories operation.
Return type

dict

Returns

Response Syntax

{
    'repositories': [
        {
            'repositoryName': 'string',
            'repositoryId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list repositories operation.

    • repositories (list) --

      Lists the repositories called by the list repositories operation.

      • (dict) --

        Information about a repository name and ID.

        • repositoryName (string) --

          The name associated with the repository.

        • repositoryId (string) --

          The ID associated with the repository.

    • nextToken (string) --

      An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.

put_repository_triggers(**kwargs)

Replaces all triggers for a repository. This can be used to create or delete triggers.

See also: AWS API Documentation

Request Syntax

response = client.put_repository_triggers(
    repositoryName='string',
    triggers=[
        {
            'name': 'string',
            'destinationArn': 'string',
            'customData': 'string',
            'branches': [
                'string',
            ],
            'events': [
                'all'|'updateReference'|'createReference'|'deleteReference',
            ]
        },
    ]
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository where you want to create or update the trigger.

  • triggers (list) --

    [REQUIRED]

    The JSON block of configuration information for each trigger.

    • (dict) --

      Information about a trigger for a repository.

      • name (string) -- [REQUIRED]

        The name of the trigger.

      • destinationArn (string) -- [REQUIRED]

        The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

      • customData (string) --

        Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

      • branches (list) --

        The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.

        • (string) --
      • events (list) -- [REQUIRED]

        The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

        Note

        The valid value "all" cannot be used with any other values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'configurationId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a put repository triggers operation.

    • configurationId (string) --

      The system-generated unique ID for the create or update operation.

test_repository_triggers(**kwargs)

Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test will send data from the last commit. If no data is available, sample data will be generated.

See also: AWS API Documentation

Request Syntax

response = client.test_repository_triggers(
    repositoryName='string',
    triggers=[
        {
            'name': 'string',
            'destinationArn': 'string',
            'customData': 'string',
            'branches': [
                'string',
            ],
            'events': [
                'all'|'updateReference'|'createReference'|'deleteReference',
            ]
        },
    ]
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository in which to test the triggers.

  • triggers (list) --

    [REQUIRED]

    The list of triggers to test.

    • (dict) --

      Information about a trigger for a repository.

      • name (string) -- [REQUIRED]

        The name of the trigger.

      • destinationArn (string) -- [REQUIRED]

        The ARN of the resource that is the target for a trigger. For example, the ARN of a topic in Amazon Simple Notification Service (SNS).

      • customData (string) --

        Any custom data associated with the trigger that will be included in the information sent to the target of the trigger.

      • branches (list) --

        The branches that will be included in the trigger configuration. If no branches are specified, the trigger will apply to all branches.

        • (string) --
      • events (list) -- [REQUIRED]

        The repository events that will cause the trigger to run actions in another service, such as sending a notification through Amazon Simple Notification Service (SNS).

        Note

        The valid value "all" cannot be used with any other values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'successfulExecutions': [
        'string',
    ],
    'failedExecutions': [
        {
            'trigger': 'string',
            'failureMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a test repository triggers operation.

    • successfulExecutions (list) --

      The list of triggers that were successfully tested. This list provides the names of the triggers that were successfully tested, separated by commas.

      • (string) --
    • failedExecutions (list) --

      The list of triggers that were not able to be tested. This list provides the names of the triggers that could not be tested, separated by commas.

      • (dict) --

        A trigger failed to run.

        • trigger (string) --

          The name of the trigger that did not run.

        • failureMessage (string) --

          Additional message information about the trigger that did not run.

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 to set or change the default branch for.

  • defaultBranchName (string) --

    [REQUIRED]

    The name of the branch to set as the default.

Returns

None

update_repository_description(**kwargs)

Sets or changes the comment or description for a repository.

Note

The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a web page could expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a web page.

See also: AWS API Documentation

Request Syntax

response = client.update_repository_description(
    repositoryName='string',
    repositoryDescription='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository to set or change the comment or description for.

  • repositoryDescription (string) -- The new comment or description for the specified repository. Repository descriptions are limited to 1,000 characters.
Returns

None

update_repository_name(**kwargs)

Renames a repository. The repository name must be unique across the calling AWS account. In addition, repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix ".git" is prohibited. For a full description of the limits on repository names, see Limits in the AWS CodeCommit User Guide.

See also: AWS API Documentation

Request Syntax

response = client.update_repository_name(
    oldName='string',
    newName='string'
)
Parameters
  • oldName (string) --

    [REQUIRED]

    The existing name of the repository.

  • newName (string) --

    [REQUIRED]

    The new name for the repository.

Returns

None

Paginators

The available paginators are:

class CodeCommit.Paginator.ListBranches
paginator = client.get_paginator('list_branches')
paginate(**kwargs)

Creates an iterator that will paginate through responses from CodeCommit.Client.list_branches().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    repositoryName='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository that contains the branches.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'branches': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list branches operation.

    • branches (list) --

      The list of branch names.

      • (string) --
    • NextToken (string) --

      A token to resume pagination.

class CodeCommit.Paginator.ListRepositories
paginator = client.get_paginator('list_repositories')
paginate(**kwargs)

Creates an iterator that will paginate through responses from CodeCommit.Client.list_repositories().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    sortBy='repositoryName'|'lastModifiedDate',
    order='ascending'|'descending',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • sortBy (string) -- The criteria used to sort the results of a list repositories operation.
  • order (string) -- The order in which to sort the results of a list repositories operation.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'repositories': [
        {
            'repositoryName': 'string',
            'repositoryId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a list repositories operation.

    • repositories (list) --

      Lists the repositories called by the list repositories operation.

      • (dict) --

        Information about a repository name and ID.

        • repositoryName (string) --

          The name associated with the repository.

        • repositoryId (string) --

          The ID associated with the repository.

    • NextToken (string) --

      A token to resume pagination.