:doc:`CodeArtifact <../../codeartifact>` / Client / list_package_version_dependencies

*********************************
list_package_version_dependencies
*********************************



.. py:method:: CodeArtifact.Client.list_package_version_dependencies(**kwargs)

  

  Returns the direct dependencies for a package version. The dependencies are returned as `PackageDependency <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDependency.html>`__ 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 <https://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/ListPackageVersionDependencies>`_  


  **Request Syntax**
  ::

    response = client.list_package_version_dependencies(
        domain='string',
        domainOwner='string',
        repository='string',
        format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
        namespace='string',
        package='string',
        packageVersion='string',
        nextToken='string'
    )
    
  :type domain: string
  :param domain: **[REQUIRED]** 

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

    

  
  :type domainOwner: string
  :param domainOwner: 

    The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

    

  
  :type repository: string
  :param repository: **[REQUIRED]** 

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

    

  
  :type format: string
  :param format: **[REQUIRED]** 

    The format of the package with the requested dependencies.

    

  
  :type namespace: string
  :param namespace: 

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

     

    .. note::

      

      The namespace is required when listing dependencies from package versions of the following formats:

       

      
      * Maven
      

      

     

    
    * 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.
    

    

  
  :type package: string
  :param package: **[REQUIRED]** 

    The name of the package versions' package.

    

  
  :type packageVersion: string
  :param packageVersion: **[REQUIRED]** 

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

    

  
  :type nextToken: string
  :param nextToken: 

    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.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
          '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 component that specifies its namespace depends on its type. For example:

         

        .. note::

          

          The namespace is required when listing dependencies from package versions of the following formats:

           

          
          * Maven
          

          

         

        
        * 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 <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDependency.html>`__ 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 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, NuGet, Ruby, and Cargo 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 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**
  
  *   :py:class:`CodeArtifact.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CodeArtifact.Client.exceptions.InternalServerException`

  
  *   :py:class:`CodeArtifact.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CodeArtifact.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CodeArtifact.Client.exceptions.ValidationException`

  