Skip to content

batch_get_findings async

batch_get_findings(
    finding_ids: FindingIdList,
    agent_space_id: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> BatchGetFindingsOutput

Retrieves information about one or more security findings in an agent space.

Parameters:

  • finding_ids (FindingIdList) –

    The list of finding identifiers to retrieve.

  • agent_space_id (str) –

    The unique identifier of the agent space that contains the findings.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def batch_get_findings(
    self,
    finding_ids: "capo_securityagent.types.finding_id_list.FindingIdList",
    agent_space_id: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_get_findings_output.BatchGetFindingsOutput":
    """<p>Retrieves information about one or more security findings in an agent space.</p>

    Args:
        finding_ids: <p>The list of finding identifiers to retrieve.</p>
        agent_space_id: <p>The unique identifier of the agent space that contains the findings.</p>

    Raises:
        capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securityagent.types.batch_get_findings_input.BatchGetFindingsInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.batch_get_findings_output.BatchGetFindingsOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_get_findings

        (
            output,
            http_response,
        ) = await capo_securityagent._operations.security_agent.batch_get_findings.async_batch_get_findings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetFindings")
    )
    input_: capo_securityagent.types.batch_get_findings_input.BatchGetFindingsInput = {
        "finding_ids": finding_ids,
        "agent_space_id": agent_space_id,
    }

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