Skip to content

describe_images async

describe_images(
    repository_name: RepositoryName,
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
    image_ids: Optional[ImageIdentifierList] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeImagesResponse

Returns metadata that's related to the images in a repository in a public registry.

Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size. Therefore, it might return a larger image size than the image sizes that are returned by DescribeImages.

Parameters:

  • registry_id (Optional[RegistryId], default: None ) –

    The Amazon Web Services account ID that's associated with the public registry that contains the repository where images are described. If you do not specify a registry, the default public registry is assumed.

  • repository_name (RepositoryName) –

    The repository that contains the images to describe.

  • image_ids (Optional[ImageIdentifierList], default: None ) –

    The list of image IDs for the requested repository.

  • next_token (Optional[NextToken], default: None ) –

    The nextToken value that's returned from a previous paginated DescribeImages 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. If there are no more results to return, this value is null. If you specify images with imageIds, you can't use this option.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of repository results that's returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter isn't used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. If you specify images with imageIds, you can't use this option.

Raises:

Source code in docs_src/capo_ecr_public/_services/async_ecrpublic.py
async def describe_images(
    self,
    repository_name: "capo_ecr_public.types.repository_name.RepositoryName",
    *,
    config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
    registry_id: Optional["capo_ecr_public.types.registry_id.RegistryId"] = None,
    image_ids: Optional[
        "capo_ecr_public.types.image_identifier_list.ImageIdentifierList"
    ] = None,
    next_token: Optional["capo_ecr_public.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ecr_public.types.max_results.MaxResults"] = None,
) -> "capo_ecr_public.types.describe_images_response.DescribeImagesResponse":
    """<p>Returns metadata that's related to the images in a repository in a public registry.</p> <note> <p>Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the <code>docker images</code> command shows the uncompressed image size. Therefore, it might return a larger image size than the image sizes that are returned by <a>DescribeImages</a>.</p> </note>

    Args:
        registry_id: <p>The Amazon Web Services account ID that's associated with the public registry that contains the repository where images are described. If you do not specify a registry, the default public registry is assumed.</p>
        repository_name: <p>The repository that contains the images to describe.</p>
        image_ids: <p>The list of image IDs for the requested repository.</p>
        next_token: <p>The <code>nextToken</code> value that's returned from a previous paginated <code>DescribeImages</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. If there are no more results to return, this value is <code>null</code>. If you specify images with <code>imageIds</code>, you can't use this option.</p>
        max_results: <p>The maximum number of repository results that's returned by <code>DescribeImages</code> in paginated output. When this parameter is used, <code>DescribeImages</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. You can see the remaining results of the initial request by sending another <code>DescribeImages</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter isn't used, then <code>DescribeImages</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. If you specify images with <code>imageIds</code>, you can't use this option.</p>

    Raises:
        capo_ecr_public.errors.image_not_found_exception.ImageNotFoundException: <p>The image requested doesn't exist in the specified repository.</p>
        capo_ecr_public.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_ecr_public.errors.repository_not_found_exception.RepositoryNotFoundException: <p>The specified repository can't be found. Check the spelling of the specified repository and ensure that you're performing operations on the correct registry.</p>
        capo_ecr_public.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_ecr_public.errors.unsupported_command_exception.UnsupportedCommandException: <p>The action isn't supported in this Region.</p>
        capo_ecr_public.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr_public.types.describe_images_request.DescribeImagesRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr_public.types.describe_images_response.DescribeImagesResponse"
    ]:
        import capo_ecr_public._operations.spencer_frontend_service.describe_images

        (
            output,
            http_response,
        ) = await capo_ecr_public._operations.spencer_frontend_service.describe_images.async_describe_images(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeImages")
    )
    input_: capo_ecr_public.types.describe_images_request.DescribeImagesRequest = {
        "repository_name": repository_name
    }
    if registry_id is not None:
        input_["registry_id"] = registry_id
    if image_ids is not None:
        input_["image_ids"] = image_ids
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output