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

************************
list_associated_packages
************************



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

  

  Returns a list of packages associated with the requested package group. For information package group association and matching, see `Package group definition syntax and matching behavior <https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-definition-syntax-matching-behavior.html>`__ in the *CodeArtifact User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/ListAssociatedPackages>`_  


  **Request Syntax**
  ::

    response = client.list_associated_packages(
        domain='string',
        domainOwner='string',
        packageGroup='string',
        maxResults=123,
        nextToken='string',
        preview=True|False
    )
    
  :type domain: string
  :param domain: **[REQUIRED]** 

    The name of the domain that contains the package group from which to list associated packages.

    

  
  :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 packageGroup: string
  :param packageGroup: **[REQUIRED]** 

    The pattern of the package group from which to list associated packages.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return per page.

    

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

    

  
  :type preview: boolean
  :param preview: 

    When this flag is included, ``ListAssociatedPackages`` will return a list of packages that would be associated with a package group, even if it does not exist.

    

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

    
    ::

      {
          'packages': [
              {
                  'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
                  'namespace': 'string',
                  'package': 'string',
                  'associationType': 'STRONG'|'WEAK'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **packages** *(list) --* 

        The list of packages associated with the requested package group.

        
        

        - *(dict) --* 

          A package associated with a package group.

          
          

          - **format** *(string) --* 

            A format that specifies the type of the associated package.

            
          

          - **namespace** *(string) --* 

            The namespace of the associated 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, 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 associated package.

            
          

          - **associationType** *(string) --* 

            Describes the strength of the association between the package and package group. A strong match can be thought of as an exact match, and a weak match can be thought of as a variation match, for example, the package name matches a variation of the package group pattern. For more information about package group pattern matching, including strong and weak matches, see `Package group definition syntax and matching behavior <https://docs.aws.amazon.com/codeartifact/latest/ug/package-group-definition-syntax-matching-behavior.html>`__ in the *CodeArtifact User Guide*.

            
      
    
      

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

        
  
  **Exceptions**
  
  *   :py:class:`CodeArtifact.Client.exceptions.AccessDeniedException`

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

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

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

  