Skip to content

start_assessment async

start_assessment(
    catalog: Catalog,
    framework_id: FrameworkId,
    entity_id: ResourceId,
    *,
    config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
    client_token: Optional[ClientRequestToken] = None,
    controls: Optional[ControlInputList] = None,
    tags: Optional[TagMap] = None,
) -> StartAssessmentResponse

Starts an assessment of a product entity against a framework. An assessment is the result of evaluating an entity against the controls of a framework. You choose the controls to run and provide the input that each control needs.

The assessment runs asynchronously. This action returns the ID of the assessment immediately. To get its status and the results of each control, use the DescribeAssessment action. To find assessments that you started earlier, use the ListAssessments action.

Parameters:

  • catalog (Catalog) –

    The catalog related to the request. Fixed value: AWSMarketplace

  • client_token (Optional[ClientRequestToken], default: None ) –

    A unique token to identify the request to ensure idempotency.

  • framework_id (FrameworkId) –

    The unique identifier of the framework that defines the controls to run.

  • entity_id (ResourceId) –

    The unique ID of the product entity to assess.

  • controls (Optional[ControlInputList], default: None ) –

    The controls to provide input for. Every control in the framework is included in the assessment, and a control that you don't specify gets no input. You can specify 1–100 controls.

  • tags (Optional[TagMap], default: None ) –

    A map of tags to apply to the assessment when you create it. Each tag is a key-value pair. You can specify 1–200 tags.

Raises:

Source code in docs_src/capo_marketplace_catalog/_services/async_marketplace_catalog.py
async def start_assessment(
    self,
    catalog: "capo_marketplace_catalog.types.catalog.Catalog",
    framework_id: "capo_marketplace_catalog.types.framework_id.FrameworkId",
    entity_id: "capo_marketplace_catalog.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
    client_token: Optional[
        "capo_marketplace_catalog.types.client_request_token.ClientRequestToken"
    ] = None,
    controls: Optional[
        "capo_marketplace_catalog.types.control_input_list.ControlInputList"
    ] = None,
    tags: Optional["capo_marketplace_catalog.types.tag_map.TagMap"] = None,
) -> "capo_marketplace_catalog.types.start_assessment_response.StartAssessmentResponse":
    """<p>Starts an assessment of a product entity against a framework. An <i>assessment</i> is the result of evaluating an entity against the controls of a framework. You choose the controls to run and provide the input that each control needs.</p> <p>The assessment runs asynchronously. This action returns the ID of the assessment immediately. To get its status and the results of each control, use the <code>DescribeAssessment</code> action. To find assessments that you started earlier, use the <code>ListAssessments</code> action.</p>

    Args:
        catalog: <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code> </p>
        client_token: <p>A unique token to identify the request to ensure idempotency.</p>
        framework_id: <p>The unique identifier of the framework that defines the controls to run.</p>
        entity_id: <p>The unique ID of the product entity to assess.</p>
        controls: <p>The controls to provide input for. Every control in the framework is included in the assessment, and a control that you don't specify gets no input. You can specify 1–100 controls.</p>
        tags: <p>A map of tags to apply to the assessment when you create it. Each tag is a key-value pair. You can specify 1–200 tags.</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.resource_in_use_exception.ResourceInUseException: <p>The resource is currently in use.</p>
        capo_marketplace_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource wasn't found.</p> <p>HTTP status code: 404</p>
        capo_marketplace_catalog.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The maximum number of open requests per account has been exceeded.</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.start_assessment_request.StartAssessmentRequest]",
    ) -> AsyncOperationResponse[
        "capo_marketplace_catalog.types.start_assessment_response.StartAssessmentResponse"
    ]:
        import capo_marketplace_catalog._operations.awsmp_seymour.start_assessment

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartAssessment")
    )
    input_: capo_marketplace_catalog.types.start_assessment_request.StartAssessmentRequest = {
        "catalog": catalog,
        "framework_id": framework_id,
        "entity_id": entity_id,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if controls is not None:
        input_["controls"] = controls
    if tags is not None:
        input_["tags"] = tags

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