Skip to content

update_case_comment

update_case_comment(
    case_id: CaseId,
    comment_id: CommentId,
    body: CommentBody,
    *,
    config_overrides: Optional[SecurityIRClientConfig] = None,
) -> UpdateCaseCommentResponse

Updates an existing case comment.

Parameters:

  • case_id (CaseId) –

    Required element for UpdateCaseComment to identify the case ID containing the comment to be updated.

  • comment_id (CommentId) –

    Required element for UpdateCaseComment to identify the case ID to be updated.

  • body (CommentBody) –

    Required element for UpdateCaseComment to identify the content for the comment to be updated.

Raises:

Examples:

Invoke UpdateCaseComment

>>> client.update_case_comment(case_id='8403556009', comment_id='000000', body='Updated case comment.')
Source code in docs_src/capo_security_ir/_services/security_ir.py
def update_case_comment(
    self,
    case_id: "capo_security_ir.types.case_id.CaseId",
    comment_id: "capo_security_ir.types.comment_id.CommentId",
    body: "capo_security_ir.types.comment_body.CommentBody",
    *,
    config_overrides: Optional[SecurityIRClientConfig] = None,
) -> (
    "capo_security_ir.types.update_case_comment_response.UpdateCaseCommentResponse"
):
    """<p>Updates an existing case comment.</p>

    Args:
        case_id: <p>Required element for UpdateCaseComment to identify the case ID containing the comment to be updated. </p>
        comment_id: <p>Required element for UpdateCaseComment to identify the case ID to be updated.</p>
        body: <p>Required element for UpdateCaseComment to identify the content for the comment to be updated.</p>

    Raises:
        capo_security_ir.errors.access_denied_exception.AccessDeniedException: <p/>
        capo_security_ir.errors.conflict_exception.ConflictException: <p/>
        capo_security_ir.errors.internal_server_exception.InternalServerException: <p/>
        capo_security_ir.errors.invalid_token_exception.InvalidTokenException: <p/>
        capo_security_ir.errors.resource_not_found_exception.ResourceNotFoundException: <p/>
        capo_security_ir.errors.security_incident_response_not_active_exception.SecurityIncidentResponseNotActiveException: <p/>
        capo_security_ir.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p/>
        capo_security_ir.errors.throttling_exception.ThrottlingException: <p/>
        capo_security_ir.errors.validation_exception.ValidationException: <p/>
        capo_security_ir.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke UpdateCaseComment

        >>> client.update_case_comment(case_id='8403556009', comment_id='000000', body='Updated case comment.')
    """

    def _handler(
        req: "OperationRequest[capo_security_ir.types.update_case_comment_request.UpdateCaseCommentRequest]",
    ) -> OperationResponse[
        "capo_security_ir.types.update_case_comment_response.UpdateCaseCommentResponse"
    ]:
        import capo_security_ir._operations.security_incident_response.update_case_comment

        output, http_response = (
            capo_security_ir._operations.security_incident_response.update_case_comment.update_case_comment(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_security_ir.types.update_case_comment_request.UpdateCaseCommentRequest",
    ) -> dict[str, Any]:
        import capo_security_ir.types.update_case_comment_request

        return capo_security_ir.types.update_case_comment_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_security_ir.types.update_case_comment_response.UpdateCaseCommentResponse",
    ) -> dict[str, Any]:
        import capo_security_ir.types.update_case_comment_response

        return capo_security_ir.types.update_case_comment_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateCaseComment",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_security_ir.types.update_case_comment_request.UpdateCaseCommentRequest = {
        "case_id": case_id,
        "comment_id": comment_id,
        "body": body,
    }

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