Stops a running code review job. The job transitions to a stopping state and then to stopped after cleanup completes.
Parameters:
-
agent_space_id
(str)
–
The unique identifier of the agent space.
-
code_review_job_id
(str)
–
The unique identifier of the code review job to stop.
Raises:
Source code in docs_src/capo_securityagent/_services/async_security_agent.py
| async def stop_code_review_job(
self,
agent_space_id: str,
code_review_job_id: str,
*,
config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.stop_code_review_job_output.StopCodeReviewJobOutput":
"""<p>Stops a running code review job. The job transitions to a stopping state and then to stopped after cleanup completes.</p>
Args:
agent_space_id: <p>The unique identifier of the agent space.</p>
code_review_job_id: <p>The unique identifier of the code review job to stop.</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.stop_code_review_job_input.StopCodeReviewJobInput]",
) -> AsyncOperationResponse[
"capo_securityagent.types.stop_code_review_job_output.StopCodeReviewJobOutput"
]:
import capo_securityagent._operations.security_agent.stop_code_review_job
(
output,
http_response,
) = await capo_securityagent._operations.security_agent.stop_code_review_job.async_stop_code_review_job(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopCodeReviewJob")
)
input_: capo_securityagent.types.stop_code_review_job_input.StopCodeReviewJobInput = {
"agent_space_id": agent_space_id,
"code_review_job_id": code_review_job_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|