CodeArtifact / Client / list_package_version_dependencies

list_package_version_dependencies#

CodeArtifact.Client.list_package_version_dependencies(**kwargs)#

Returns the direct dependencies for a package version. The dependencies are returned as PackageDependency objects. CodeArtifact extracts the dependencies for a package version from the metadata file for the package format (for example, the package.json file for npm packages and the pom.xml file for Maven). Any package version dependencies that are not listed in the configuration file are not returned.

See also: AWS API Documentation

Request Syntax

response = client.list_package_version_dependencies(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
    namespace='string',
    package='string',
    packageVersion='string',
    nextToken='string'
)
Parameters:
  • domain (string) –

    [REQUIRED]

    The name of the domain that contains the repository that contains the requested package version dependencies.

  • 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 package version.

  • format (string) –

    [REQUIRED]

    The format of the package with the requested dependencies.

  • namespace (string) –

    The namespace of the package version with the requested dependencies. The package version 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 package version is its scope.

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

    • The namespace of a generic package is its namespace.

  • package (string) –

    [REQUIRED]

    The name of the package versions’ package.

  • packageVersion (string) –

    [REQUIRED]

    A string that contains the package version (for example, 3.5.2).

  • nextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Return type:

dict

Returns:

Response Syntax

{
    'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
    'namespace': 'string',
    'package': 'string',
    'version': 'string',
    'versionRevision': 'string',
    'nextToken': 'string',
    'dependencies': [
        {
            'namespace': 'string',
            'package': 'string',
            'dependencyType': 'string',
            'versionRequirement': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • format (string) –

      A format that specifies the type of the package that contains the returned dependencies.

    • namespace (string) –

      The namespace of the package version that contains the returned dependencies. The package version 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 package version is its scope.

      • 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 that contains the returned package versions dependencies.

    • version (string) –

      The version of the package that is specified in the request.

    • versionRevision (string) –

      The current revision associated with the package version.

    • nextToken (string) –

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    • dependencies (list) –

      The returned list of PackageDependency objects.

      • (dict) –

        Details about a package dependency.

        • namespace (string) –

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

          • The namespace of a Maven package is its groupId.

          • The namespace of an npm package is its scope.

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

        • package (string) –

          The name of the package that this package depends on.

        • dependencyType (string) –

          The type of a package dependency. The possible values depend on the package type.

          • npm: regular, dev, peer, optional

          • maven: optional, parent, compile, runtime, test, system, provided.

          Note

          Note that parent is not a regular Maven dependency type; instead this is extracted from the <parent> element if one is defined in the package version’s POM file.

          • nuget: The dependencyType field is never set for NuGet packages.

          • pypi: Requires-Dist

        • versionRequirement (string) –

          The required version, or version range, of the package that this package depends on. The version format is specific to the package type. For example, the following are possible valid required versions: 1.2.3, ^2.3.4, or 4.x.

Exceptions

  • CodeArtifact.Client.exceptions.AccessDeniedException

  • CodeArtifact.Client.exceptions.InternalServerException

  • CodeArtifact.Client.exceptions.ResourceNotFoundException

  • CodeArtifact.Client.exceptions.ThrottlingException

  • CodeArtifact.Client.exceptions.ValidationException