Skip to content

batch_get_threat_model_jobs async

batch_get_threat_model_jobs(
    threat_model_job_ids: ThreatModelJobIdList,
    agent_space_id: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> BatchGetThreatModelJobsOutput

Retrieves information about one or more threat model jobs in an agent space.

Parameters:

  • threat_model_job_ids (ThreatModelJobIdList) –

    The list of threat model job identifiers to retrieve.

  • agent_space_id (str) –

    The unique identifier of the agent space that contains the threat model jobs.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def batch_get_threat_model_jobs(
    self,
    threat_model_job_ids: "capo_securityagent.types.threat_model_job_id_list.ThreatModelJobIdList",
    agent_space_id: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_get_threat_model_jobs_output.BatchGetThreatModelJobsOutput":
    """<p>Retrieves information about one or more threat model jobs in an agent space.</p>

    Args:
        threat_model_job_ids: <p>The list of threat model job identifiers to retrieve.</p>
        agent_space_id: <p>The unique identifier of the agent space that contains the threat model jobs.</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_threat_model_jobs_input.BatchGetThreatModelJobsInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.batch_get_threat_model_jobs_output.BatchGetThreatModelJobsOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_get_threat_model_jobs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetThreatModelJobs")
    )
    input_: capo_securityagent.types.batch_get_threat_model_jobs_input.BatchGetThreatModelJobsInput = {
        "threat_model_job_ids": threat_model_job_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