Skip to content

update_contact_evaluation async

update_contact_evaluation(
    instance_id: InstanceId,
    evaluation_id: ResourceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    answers: Optional[EvaluationAnswersInputMap] = None,
    notes: Optional[EvaluationNotesMap] = None,
    updated_by: Optional[EvaluatorUserUnion] = None,
) -> UpdateContactEvaluationResponse

Updates details about a contact evaluation in the specified Connect Customer instance. A contact evaluation must be in draft state. Answers included in the request are merged with existing answers for the given evaluation. An answer or note can be deleted by passing an empty object ({}) to the question identifier.

Parameters:

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def update_contact_evaluation(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    evaluation_id: "capo_connect.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    answers: Optional[
        "capo_connect.types.evaluation_answers_input_map.EvaluationAnswersInputMap"
    ] = None,
    notes: Optional[
        "capo_connect.types.evaluation_notes_map.EvaluationNotesMap"
    ] = None,
    updated_by: Optional[
        "capo_connect.types.evaluator_user_union.EvaluatorUserUnion"
    ] = None,
) -> "capo_connect.types.update_contact_evaluation_response.UpdateContactEvaluationResponse":
    """<p>Updates details about a contact evaluation in the specified Connect Customer instance. A contact evaluation must be in draft state. Answers included in the request are merged with existing answers for the given evaluation. An answer or note can be deleted by passing an empty object (<code>{}</code>) to the question identifier. </p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        evaluation_id: <p>A unique identifier for the contact evaluation.</p>
        answers: <p>A map of question identifiers to answer value.</p>
        notes: <p>A map of question identifiers to note value.</p>
        updated_by: <p>The ID of the user who updated the contact evaluation.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.resource_conflict_exception.ResourceConflictException: <p>A resource already has that name.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.update_contact_evaluation_request.UpdateContactEvaluationRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.update_contact_evaluation_response.UpdateContactEvaluationResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.update_contact_evaluation

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.update_contact_evaluation.async_update_contact_evaluation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateContactEvaluation")
    )
    input_: capo_connect.types.update_contact_evaluation_request.UpdateContactEvaluationRequest = {
        "instance_id": instance_id,
        "evaluation_id": evaluation_id,
    }
    if answers is not None:
        input_["answers"] = answers
    if notes is not None:
        input_["notes"] = notes
    if updated_by is not None:
        input_["updated_by"] = updated_by

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