Skip to content

batch_delete_code_reviews async

batch_delete_code_reviews(
    code_review_ids: CodeReviewIdList,
    agent_space_id: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> BatchDeleteCodeReviewsOutput

Deletes one or more code reviews from an agent space.

Parameters:

  • code_review_ids (CodeReviewIdList) –

    The list of code review identifiers to delete.

  • agent_space_id (str) –

    The unique identifier of the agent space that contains the code reviews to delete.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def batch_delete_code_reviews(
    self,
    code_review_ids: "capo_securityagent.types.code_review_id_list.CodeReviewIdList",
    agent_space_id: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_delete_code_reviews_output.BatchDeleteCodeReviewsOutput":
    """<p>Deletes one or more code reviews from an agent space.</p>

    Args:
        code_review_ids: <p>The list of code review identifiers to delete.</p>
        agent_space_id: <p>The unique identifier of the agent space that contains the code reviews to delete.</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_delete_code_reviews_input.BatchDeleteCodeReviewsInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.batch_delete_code_reviews_output.BatchDeleteCodeReviewsOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_delete_code_reviews

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteCodeReviews")
    )
    input_: capo_securityagent.types.batch_delete_code_reviews_input.BatchDeleteCodeReviewsInput = {
        "code_review_ids": code_review_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