:doc:`ECR <../../ecr>` / Client / list_image_referrers

********************
list_image_referrers
********************



.. py:method:: ECR.Client.list_image_referrers(**kwargs)

  

  Lists the artifacts associated with a specified subject image.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImageReferrers>`_  


  **Request Syntax**
  ::

    response = client.list_image_referrers(
        registryId='string',
        repositoryName='string',
        subjectId={
            'imageDigest': 'string'
        },
        filter={
            'artifactTypes': [
                'string',
            ],
            'artifactStatus': 'ACTIVE'|'ARCHIVED'|'ACTIVATING'|'ANY'
        },
        nextToken='string',
        maxResults=123
    )
    
  :type registryId: string
  :param registryId: 

    The Amazon Web Services account ID associated with the registry that contains the repository in which to list image referrers. If you do not specify a registry, the default registry is assumed.

    

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

    The name of the repository that contains the subject image.

    

  
  :type subjectId: dict
  :param subjectId: **[REQUIRED]** 

    An object containing the image digest of the subject image for which to retrieve associated artifacts.

    

  
    - **imageDigest** *(string) --* **[REQUIRED]** 

      The digest of the image.

      

    
  
  :type filter: dict
  :param filter: 

    The filter key and value with which to filter your ``ListImageReferrers`` results. If no filter is specified, only artifacts with ``ACTIVE`` status are returned.

    

  
    - **artifactTypes** *(list) --* 

      The artifact types with which to filter your  ListImageReferrers results.

      

    
      - *(string) --* 

      
  
    - **artifactStatus** *(string) --* 

      The artifact status with which to filter your  ListImageReferrers results. Valid values are ``ACTIVE``, ``ARCHIVED``, ``ACTIVATING``, or ``ANY``. If not specified, only artifacts with ``ACTIVE`` status are returned.

      

    
  
  :type nextToken: string
  :param nextToken: 

    The ``nextToken`` value returned from a previous paginated ``ListImageReferrers`` request where ``maxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``nextToken`` value. This value is ``null`` when there are no more results to return.

     

    .. note::

      

      This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

      

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of image referrer results returned by ``ListImageReferrers`` in paginated output. When this parameter is used, ``ListImageReferrers`` only returns ``maxResults`` results in a single page along with a ``nextToken`` response element. The remaining results of the initial request can be seen by sending another ``ListImageReferrers`` request with the returned ``nextToken`` value. This value can be between 1 and 50. If this parameter is not used, then ``ListImageReferrers`` returns up to 50 results and a ``nextToken`` value, if applicable.

    

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

    
    ::

      {
          'referrers': [
              {
                  'digest': 'string',
                  'mediaType': 'string',
                  'artifactType': 'string',
                  'size': 123,
                  'annotations': {
                      'string': 'string'
                  },
                  'artifactStatus': 'ACTIVE'|'ARCHIVED'|'ACTIVATING'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **referrers** *(list) --* 

        The list of artifacts associated with the subject image.

        
        

        - *(dict) --* 

          An object representing an artifact associated with a subject image.

          
          

          - **digest** *(string) --* 

            The digest of the artifact manifest.

            
          

          - **mediaType** *(string) --* 

            The media type of the artifact manifest.

            
          

          - **artifactType** *(string) --* 

            A string identifying the type of artifact.

            
          

          - **size** *(integer) --* 

            The size, in bytes, of the artifact.

            
          

          - **annotations** *(dict) --* 

            A map of annotations associated with the artifact.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **artifactStatus** *(string) --* 

            The status of the artifact. Valid values are ``ACTIVE``, ``ARCHIVED``, or ``ACTIVATING``.

            
      
    
      

      - **nextToken** *(string) --* 

        The ``nextToken`` value to include in a future ``ListImageReferrers`` request. When the results of a ``ListImageReferrers`` request exceed ``maxResults``, this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

        
  
  **Exceptions**
  
  *   :py:class:`ECR.Client.exceptions.ServerException`

  
  *   :py:class:`ECR.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECR.Client.exceptions.RepositoryNotFoundException`

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

  