Skip to content

list_assessments async

list_assessments(
    catalog: Catalog,
    *,
    config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
    framework_id: Optional[FrameworkId] = None,
    assessment_target_filter: Optional[AssessmentTargetFilter] = None,
    framework_filters: Optional[FrameworkFilters] = None,
    max_results: Optional[ListAssessmentsMaxResultInteger] = None,
    next_token: Optional[NextToken] = None,
) -> ListAssessmentsResponse

Returns a paginated list of assessments associated with an entity or change set in AWS Marketplace. An assessment is the result of evaluating a product or change set against a framework, such as AMI Security or Container Security.

Use the AssessmentTargetFilter to scope results to a specific entity or change set, and use FrameworkFilters to scope results to a single framework. To retrieve detailed control-level results for an individual assessment, use the DescribeAssessment action.

Results are sorted by assessment creation time in descending order.

Parameters:

  • catalog (Catalog) –

    The catalog related to the request. Fixed value: AWSMarketplace

  • framework_id (Optional[FrameworkId], default: None ) –

    The unique identifier of a framework. When specified, only assessments performed against this framework are returned. For example, AMISecurity.

  • assessment_target_filter (Optional[AssessmentTargetFilter], default: None ) –

    Filters the list of assessments to those performed against a specific entity or change set.

  • framework_filters (Optional[FrameworkFilters], default: None ) –

    Framework-specific filters. Set exactly one member to filter results to assessments performed against that framework.

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

    Specifies the upper limit of the elements on a single page. If a value isn't provided, the default value is 20. Valid values range from 1 to 100.

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

    The value of the next token, if it exists. null if there are no more results.

Raises:

Source code in docs_src/capo_marketplace_catalog/_services/async_marketplace_catalog.py
async def list_assessments(
    self,
    catalog: "capo_marketplace_catalog.types.catalog.Catalog",
    *,
    config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
    framework_id: Optional[
        "capo_marketplace_catalog.types.framework_id.FrameworkId"
    ] = None,
    assessment_target_filter: Optional[
        "capo_marketplace_catalog.types.assessment_target_filter.AssessmentTargetFilter"
    ] = None,
    framework_filters: Optional[
        "capo_marketplace_catalog.types.framework_filters.FrameworkFilters"
    ] = None,
    max_results: Optional[
        "capo_marketplace_catalog.types.list_assessments_max_result_integer.ListAssessmentsMaxResultInteger"
    ] = None,
    next_token: Optional[
        "capo_marketplace_catalog.types.next_token.NextToken"
    ] = None,
) -> "capo_marketplace_catalog.types.list_assessments_response.ListAssessmentsResponse":
    """<p>Returns a paginated list of assessments associated with an entity or change set in AWS Marketplace. An <i>assessment</i> is the result of evaluating a product or change set against a framework, such as AMI Security or Container Security.</p> <p>Use the <code>AssessmentTargetFilter</code> to scope results to a specific entity or change set, and use <code>FrameworkFilters</code> to scope results to a single framework. To retrieve detailed control-level results for an individual assessment, use the <code>DescribeAssessment</code> action.</p> <p>Results are sorted by assessment creation time in descending order.</p>

    Args:
        catalog: <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code> </p>
        framework_id: <p>The unique identifier of a framework. When specified, only assessments performed against this framework are returned. For example, <code>AMISecurity</code>.</p>
        assessment_target_filter: <p>Filters the list of assessments to those performed against a specific entity or change set.</p>
        framework_filters: <p>Framework-specific filters. Set exactly one member to filter results to assessments performed against that framework.</p>
        max_results: <p>Specifies the upper limit of the elements on a single page. If a value isn't provided, the default value is 20. Valid values range from 1 to 100.</p>
        next_token: <p>The value of the next token, if it exists. <code>null</code> if there are no more results.</p>

    Raises:
        capo_marketplace_catalog.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p> <p>HTTP status code: 403</p>
        capo_marketplace_catalog.errors.internal_service_exception.InternalServiceException: <p>There was an internal service exception.</p> <p>HTTP status code: 500</p>
        capo_marketplace_catalog.errors.throttling_exception.ThrottlingException: <p>Too many requests.</p> <p>HTTP status code: 429</p>
        capo_marketplace_catalog.errors.validation_exception.ValidationException: <p>An error occurred during validation.</p> <p>HTTP status code: 422</p>
        capo_marketplace_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_marketplace_catalog.types.list_assessments_request.ListAssessmentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_marketplace_catalog.types.list_assessments_response.ListAssessmentsResponse"
    ]:
        import capo_marketplace_catalog._operations.awsmp_seymour.list_assessments

        (
            output,
            http_response,
        ) = await capo_marketplace_catalog._operations.awsmp_seymour.list_assessments.async_list_assessments(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssessments")
    )
    input_: capo_marketplace_catalog.types.list_assessments_request.ListAssessmentsRequest = {
        "catalog": catalog
    }
    if framework_id is not None:
        input_["framework_id"] = framework_id
    if assessment_target_filter is not None:
        input_["assessment_target_filter"] = assessment_target_filter
    if framework_filters is not None:
        input_["framework_filters"] = framework_filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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