Skip to content

batch_disassociate_finding_issue

batch_disassociate_finding_issue(
    agent_space_id: str,
    finding_ids: FindingIdList,
    *,
    config_overrides: Optional[SecurityAgentClientConfig] = None,
    pentest_job_id: Optional[str] = None,
    code_review_job_id: Optional[str] = None,
) -> BatchDisassociateFindingIssueOutput

Disassociates a batch of findings from their linked issues.

Parameters:

  • agent_space_id (str) –

    The identifier of the agent space where the job exists.

  • pentest_job_id (Optional[str], default: None ) –

    The identifier of the penetration test job. This parameter is mutually exclusive with codeReviewJobId.

  • code_review_job_id (Optional[str], default: None ) –

    The identifier of the code review job. This parameter is mutually exclusive with pentestJobId.

  • finding_ids (FindingIdList) –

    The identifiers of the findings to disassociate from their issues. Each must belong to the specified job.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource.

  • InternalServerException –

    An unexpected error occurred during the processing of your request.

  • ResourceNotFoundException –

    The specified resource was not found. Verify that the resource identifier is correct and that the resource exists in the specified agent space or account.

  • ServiceQuotaExceededException –

    The request exceeds a service quota. Review your current usage and request a quota increase if needed.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by the service.

  • UnknownServiceError –

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

Source code in docs_src/capo_securityagent/_services/security_agent.py
def batch_disassociate_finding_issue(
    self,
    agent_space_id: str,
    finding_ids: "capo_securityagent.types.finding_id_list.FindingIdList",
    *,
    config_overrides: Optional[SecurityAgentClientConfig] = None,
    pentest_job_id: Optional[str] = None,
    code_review_job_id: Optional[str] = None,
) -> "capo_securityagent.types.batch_disassociate_finding_issue_output.BatchDisassociateFindingIssueOutput":
    """<p>Disassociates a batch of findings from their linked issues.</p>

    Args:
        agent_space_id: <p>The identifier of the agent space where the job exists.</p>
        pentest_job_id: <p>The identifier of the penetration test job. This parameter is mutually exclusive with <code>codeReviewJobId</code>.</p>
        code_review_job_id: <p>The identifier of the code review job. This parameter is mutually exclusive with <code>pentestJobId</code>.</p>
        finding_ids: <p>The identifiers of the findings to disassociate from their issues. Each must belong to the specified job.</p>

    Raises:
        capo_securityagent.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_securityagent.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
        capo_securityagent.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of your request.</p>
        capo_securityagent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource identifier is correct and that the resource exists in the specified agent space or account.</p>
        capo_securityagent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds a service quota. Review your current usage and request a quota increase if needed.</p>
        capo_securityagent.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_securityagent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_securityagent.types.batch_disassociate_finding_issue_input.BatchDisassociateFindingIssueInput]",
    ) -> OperationResponse[
        "capo_securityagent.types.batch_disassociate_finding_issue_output.BatchDisassociateFindingIssueOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_disassociate_finding_issue

        output, http_response = (
            capo_securityagent._operations.security_agent.batch_disassociate_finding_issue.batch_disassociate_finding_issue(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDisassociateFindingIssue")
    )
    input_: capo_securityagent.types.batch_disassociate_finding_issue_input.BatchDisassociateFindingIssueInput = {
        "agent_space_id": agent_space_id,
        "finding_ids": finding_ids,
    }
    if pentest_job_id is not None:
        input_["pentest_job_id"] = pentest_job_id
    if code_review_job_id is not None:
        input_["code_review_job_id"] = code_review_job_id

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