CodeArtifact / Paginator / ListPackages

ListPackages#

class CodeArtifact.Paginator.ListPackages#
paginator = client.get_paginator('list_packages')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from CodeArtifact.Client.list_packages().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
    namespace='string',
    packagePrefix='string',
    publish='ALLOW'|'BLOCK',
    upstream='ALLOW'|'BLOCK',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • domain (string) –

    [REQUIRED]

    The name of the domain that contains the repository that contains the requested packages.

  • domainOwner (string) – The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

  • repository (string) –

    [REQUIRED]

    The name of the repository that contains the requested packages.

  • format (string) – The format used to filter requested packages. Only packages from the provided format will be returned.

  • namespace (string) –

    The namespace prefix used to filter requested packages. Only packages with a namespace that starts with the provided string value are returned. Note that although this option is called --namespace and not --namespace-prefix, it has prefix-matching behavior.

    Each package format uses namespace as follows:

    • The namespace of a Maven package version is its groupId.

    • The namespace of an npm or Swift package version is its scope.

    • The namespace of a generic package is its namespace.

    • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

  • packagePrefix (string) – A prefix used to filter requested packages. Only packages with names that start with packagePrefix are returned.

  • publish (string) – The value of the Publish package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.

  • upstream (string) – The value of the Upstream package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.

  • 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

{
    'packages': [
        {
            'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
            'namespace': 'string',
            'package': 'string',
            'originConfiguration': {
                'restrictions': {
                    'publish': 'ALLOW'|'BLOCK',
                    'upstream': 'ALLOW'|'BLOCK'
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • packages (list) –

      The list of returned PackageSummary objects.

      • (dict) –

        Details about a package, including its format, namespace, and name.

        • format (string) –

          The format of the package.

        • namespace (string) –

          The namespace of the package. The package component that specifies its namespace depends on its type. For example:

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package (string) –

          The name of the package.

        • originConfiguration (dict) –

          A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions.

          • restrictions (dict) –

            A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

            • publish (string) –

              The package origin configuration that determines if new versions of the package can be published directly to the repository.

            • upstream (string) –

              The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

    • NextToken (string) –

      A token to resume pagination.