Skip to content

describe_image_scan_findings async

describe_image_scan_findings(
    repository_name: RepositoryName,
    image_id: ImageIdentifier,
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
    registry_id: Optional[RegistryId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeImageScanFindingsResponse

Returns the scan findings for the specified image.

Parameters:

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

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

  • repository_name (RepositoryName) –

    The repository for the image for which to describe the scan findings.

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

    The nextToken value returned from a previous paginated DescribeImageScanFindings 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.

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

    The maximum number of image scan results returned by DescribeImageScanFindings in paginated output. When this parameter is used, DescribeImageScanFindings 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 DescribeImageScanFindings request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageScanFindings returns up to 100 results and a nextToken value, if applicable.

Raises:

  • ImageNotFoundException –

    The image requested does not exist in the specified repository.

  • InvalidParameterException –

    The specified parameter is invalid. Review the available parameters for the API request.

  • RepositoryNotFoundException –

    The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

  • ScanNotFoundException –

    The specified image scan could not be found. Ensure that image scanning is enabled on the repository and try again.

  • ServerException –

    These errors are usually caused by a server-side issue.

  • ValidationException –

    There was an exception validating this request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ecr/_services/async_ecr.py
async def describe_image_scan_findings(
    self,
    repository_name: "capo_ecr.types.repository_name.RepositoryName",
    image_id: "capo_ecr.types.image_identifier.ImageIdentifier",
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
    registry_id: Optional["capo_ecr.types.registry_id.RegistryId"] = None,
    next_token: Optional["capo_ecr.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ecr.types.max_results.MaxResults"] = None,
) -> "capo_ecr.types.describe_image_scan_findings_response.DescribeImageScanFindingsResponse":
    """<p>Returns the scan findings for the specified image.</p>

    Args:
        registry_id: <p>The Amazon Web Services account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.</p>
        repository_name: <p>The repository for the image for which to describe the scan findings.</p>
        next_token: <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeImageScanFindings</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. This value is null when there are no more results to return.</p>
        max_results: <p>The maximum number of image scan results returned by <code>DescribeImageScanFindings</code> in paginated output. When this parameter is used, <code>DescribeImageScanFindings</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeImageScanFindings</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribeImageScanFindings</code> returns up to 100 results and a <code>nextToken</code> value, if applicable.</p>

    Raises:
        capo_ecr.errors.image_not_found_exception.ImageNotFoundException: <p>The image requested does not exist in the specified repository.</p>
        capo_ecr.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_ecr.errors.repository_not_found_exception.RepositoryNotFoundException: <p>The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.</p>
        capo_ecr.errors.scan_not_found_exception.ScanNotFoundException: <p>The specified image scan could not be found. Ensure that image scanning is enabled on the repository and try again.</p>
        capo_ecr.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_ecr.errors.validation_exception.ValidationException: <p>There was an exception validating this request.</p>
        capo_ecr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr.types.describe_image_scan_findings_request.DescribeImageScanFindingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr.types.describe_image_scan_findings_response.DescribeImageScanFindingsResponse"
    ]:
        import capo_ecr._operations.amazon_ec2_container_registry_v20150921.describe_image_scan_findings

        (
            output,
            http_response,
        ) = await capo_ecr._operations.amazon_ec2_container_registry_v20150921.describe_image_scan_findings.async_describe_image_scan_findings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeImageScanFindings")
    )
    input_: capo_ecr.types.describe_image_scan_findings_request.DescribeImageScanFindingsRequest = {
        "repository_name": repository_name,
        "image_id": image_id,
    }
    if registry_id is not None:
        input_["registry_id"] = registry_id
    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