Starts a new threat model job for a threat model configuration.
Parameters:
-
agent_space_id
(str)
–
The unique identifier of the agent space.
-
threat_model_id
(str)
–
The unique identifier of the threat model to start a job for.
Raises:
Source code in docs_src/capo_securityagent/_services/async_security_agent.py
| async def start_threat_model_job(
self,
agent_space_id: str,
threat_model_id: str,
*,
config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.start_threat_model_job_output.StartThreatModelJobOutput":
"""<p>Starts a new threat model job for a threat model configuration.</p>
Args:
agent_space_id: <p>The unique identifier of the agent space.</p>
threat_model_id: <p>The unique identifier of the threat model to start a job for.</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.start_threat_model_job_input.StartThreatModelJobInput]",
) -> AsyncOperationResponse[
"capo_securityagent.types.start_threat_model_job_output.StartThreatModelJobOutput"
]:
import capo_securityagent._operations.security_agent.start_threat_model_job
(
output,
http_response,
) = await capo_securityagent._operations.security_agent.start_threat_model_job.async_start_threat_model_job(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartThreatModelJob")
)
input_: capo_securityagent.types.start_threat_model_job_input.StartThreatModelJobInput = {
"agent_space_id": agent_space_id,
"threat_model_id": threat_model_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|