Skip to content

update_comment

update_comment(
    environment_arn: EnvironmentArn,
    project: ProjectName,
    framework: FrameworkName,
    framework_version: FrameworkVersion,
    control_id: ControlID,
    comment_id: CommentId,
    *,
    config_overrides: Optional[AssuranceClientConfig] = None,
    content: Optional[CommentContent] = None,
) -> UpdateCommentOutput

Modifies the content of an existing comment.

Parameters:

  • environment_arn (EnvironmentArn) –

    The ARN of this governance environment.

  • project (ProjectName) –

    The name of the project.

  • framework (FrameworkName) –

    The name of the compliance framework.

  • framework_version (FrameworkVersion) –

    The version of the compliance framework.

  • control_id (ControlID) –

    The control identifier. Optional. If omitted, the operation applies to the full framework.

  • comment_id (CommentId) –

    The unique identifier of the comment.

  • content (Optional[CommentContent], default: None ) –

    The replacement free-text content of the comment.

Raises:

Examples:

Update a comment on a control Revises an existing reviewer note on a control after the requested evidence is attached.

>>> client.update_comment(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', framework='AWS:PCI-DSS', framework_version='4', control_id='8.2.1', comment_id='1773484200000', content='Evidence attached; the Q1 cardholder data environment scan is complete.')
Source code in docs_src/capo_assurance/_services/assurance.py
def update_comment(
    self,
    environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
    project: "capo_assurance.types.project_name.ProjectName",
    framework: "capo_assurance.types.framework_name.FrameworkName",
    framework_version: "capo_assurance.types.framework_version.FrameworkVersion",
    control_id: "capo_assurance.types.control_id.ControlID",
    comment_id: "capo_assurance.types.comment_id.CommentId",
    *,
    config_overrides: Optional[AssuranceClientConfig] = None,
    content: Optional["capo_assurance.types.comment_content.CommentContent"] = None,
) -> "capo_assurance.types.update_comment_output.UpdateCommentOutput":
    """<p>Modifies the content of an existing comment.</p>

    Args:
        environment_arn: <p>The ARN of this governance environment.</p>
        project: <p>The name of the project.</p>
        framework: <p>The name of the compliance framework.</p>
        framework_version: <p>The version of the compliance framework.</p>
        control_id: <p>The control identifier. Optional. If omitted, the operation applies to the full framework.</p>
        comment_id: <p>The unique identifier of the comment.</p>
        content: <p>The replacement free-text content of the comment.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.conflict_exception.ConflictException: <p>A conflict occurred (for example, resource already exists).</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Update a comment on a control
        Revises an existing reviewer note on a control after the requested evidence is attached.

        >>> client.update_comment(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', framework='AWS:PCI-DSS', framework_version='4', control_id='8.2.1', comment_id='1773484200000', content='Evidence attached; the Q1 cardholder data environment scan is complete.')
    """

    def _handler(
        req: "OperationRequest[capo_assurance.types.update_comment_input.UpdateCommentInput]",
    ) -> OperationResponse[
        "capo_assurance.types.update_comment_output.UpdateCommentOutput"
    ]:
        import capo_assurance._operations.assurance.update_comment

        output, http_response = (
            capo_assurance._operations.assurance.update_comment.update_comment(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_assurance.types.update_comment_input.UpdateCommentInput",
    ) -> dict[str, Any]:
        import capo_assurance.types.update_comment_input

        return capo_assurance.types.update_comment_input.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateComment", redact_input=_redact_input),
    )
    input_: capo_assurance.types.update_comment_input.UpdateCommentInput = {
        "environment_arn": environment_arn,
        "project": project,
        "framework": framework,
        "framework_version": framework_version,
        "control_id": control_id,
        "comment_id": comment_id,
    }
    if content is not None:
        input_["content"] = content

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