ECR / Client / list_image_referrers

list_image_referrers

ECR.Client.list_image_referrers(**kwargs)

Lists the artifacts associated with a specified subject image.

See also: AWS API Documentation

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
)
Parameters:
  • registryId (string) – 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.

  • repositoryName (string) –

    [REQUIRED]

    The name of the repository that contains the subject image.

  • subjectId (dict) –

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

  • filter (dict) –

    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.

  • nextToken (string) –

    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.

  • maxResults (integer) – 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.

Return type:

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