Skip to content

update_case

update_case(
    domain_id: DomainId,
    case_id: CaseId,
    fields: FieldValueList,
    *,
    config_overrides: Optional[ConnectCasesClientConfig] = None,
    performed_by: Optional[UserUnion] = None,
) -> UpdateCaseResponse

If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide

Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the CreateCase input .

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Parameters:

  • domain_id (DomainId) –

    The unique identifier of the Cases domain.

  • case_id (CaseId) –

    A unique identifier of the case.

  • fields (FieldValueList) –

    An array of objects with fieldId (matching ListFields/DescribeField) and value union data, structured identical to CreateCase.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • InternalServerException –

    We couldn't process your request because of an issue with the server. Try again later.

  • ResourceNotFoundException –

    We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.

  • ThrottlingException –

    The rate has been exceeded for this API. Please try again after a few minutes.

  • ValidationException –

    The request isn't valid. Check the syntax and try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_connectcases/_services/connect_cases.py
def update_case(
    self,
    domain_id: "capo_connectcases.types.domain_id.DomainId",
    case_id: "capo_connectcases.types.case_id.CaseId",
    fields: "capo_connectcases.types.field_value_list.FieldValueList",
    *,
    config_overrides: Optional[ConnectCasesClientConfig] = None,
    performed_by: Optional["capo_connectcases.types.user_union.UserUnion"] = None,
) -> "capo_connectcases.types.update_case_response.UpdateCaseResponse":
    """<note> <p>If you provide a value for <code>PerformedBy.UserArn</code> you must also have <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html">connect:DescribeUser</a> permission on the User ARN resource that you provide</p> </note> <p>Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the <code>CreateCase</code> input .</p> <p>If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.</p>

    Args:
        domain_id: <p>The unique identifier of the Cases domain. </p>
        case_id: <p>A unique identifier of the case.</p>
        fields: <p>An array of objects with <code>fieldId</code> (matching ListFields/DescribeField) and value union data, structured identical to <code>CreateCase</code>.</p>

    Raises:
        capo_connectcases.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_connectcases.errors.internal_server_exception.InternalServerException: <p>We couldn't process your request because of an issue with the server. Try again later.</p>
        capo_connectcases.errors.resource_not_found_exception.ResourceNotFoundException: <p>We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.</p>
        capo_connectcases.errors.throttling_exception.ThrottlingException: <p>The rate has been exceeded for this API. Please try again after a few minutes.</p>
        capo_connectcases.errors.validation_exception.ValidationException: <p>The request isn't valid. Check the syntax and try again.</p>
        capo_connectcases.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connectcases.types.update_case_request.UpdateCaseRequest]",
    ) -> OperationResponse[
        "capo_connectcases.types.update_case_response.UpdateCaseResponse"
    ]:
        import capo_connectcases._operations.amazon_connect_cases.update_case

        output, http_response = (
            capo_connectcases._operations.amazon_connect_cases.update_case.update_case(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_connectcases.types.update_case_request.UpdateCaseRequest",
    ) -> dict[str, Any]:
        import capo_connectcases.types.update_case_request

        return capo_connectcases.types.update_case_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCase", redact_input=_redact_input)
    )
    input_: capo_connectcases.types.update_case_request.UpdateCaseRequest = {
        "domain_id": domain_id,
        "case_id": case_id,
        "fields": fields,
    }
    if performed_by is not None:
        input_["performed_by"] = performed_by

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output