Stops a running threat model job.
Parameters:
-
agent_space_id
(str)
–
The unique identifier of the agent space.
-
threat_model_job_id
(str)
–
The unique identifier of the threat model job to stop.
Raises:
Source code in docs_src/capo_securityagent/_services/security_agent.py
| def stop_threat_model_job(
self,
agent_space_id: str,
threat_model_job_id: str,
*,
config_overrides: Optional[SecurityAgentClientConfig] = None,
) -> (
"capo_securityagent.types.stop_threat_model_job_output.StopThreatModelJobOutput"
):
"""<p>Stops a running threat model job.</p>
Args:
agent_space_id: <p>The unique identifier of the agent space.</p>
threat_model_job_id: <p>The unique identifier of the threat model job to stop.</p>
Raises:
capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_securityagent.types.stop_threat_model_job_input.StopThreatModelJobInput]",
) -> OperationResponse[
"capo_securityagent.types.stop_threat_model_job_output.StopThreatModelJobOutput"
]:
import capo_securityagent._operations.security_agent.stop_threat_model_job
output, http_response = (
capo_securityagent._operations.security_agent.stop_threat_model_job.stop_threat_model_job(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopThreatModelJob")
)
input_: capo_securityagent.types.stop_threat_model_job_input.StopThreatModelJobInput = {
"agent_space_id": agent_space_id,
"threat_model_job_id": threat_model_job_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|