Skip to content

delete_agent_space async

delete_agent_space(
    agent_space_id: AgentSpaceId,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> DeleteAgentSpaceOutput

Deletes an agent space and all of its associated resources, including pentests, findings, and artifacts.

Parameters:

  • agent_space_id (AgentSpaceId) –

    The unique identifier of the agent space to delete.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def delete_agent_space(
    self,
    agent_space_id: "capo_securityagent.types.agent_space_id.AgentSpaceId",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.delete_agent_space_output.DeleteAgentSpaceOutput":
    """<p>Deletes an agent space and all of its associated resources, including pentests, findings, and artifacts.</p>

    Args:
        agent_space_id: <p>The unique identifier of the agent space 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.delete_agent_space_input.DeleteAgentSpaceInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.delete_agent_space_output.DeleteAgentSpaceOutput"
    ]:
        import capo_securityagent._operations.security_agent.delete_agent_space

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAgentSpace")
    )
    input_: capo_securityagent.types.delete_agent_space_input.DeleteAgentSpaceInput = {
        "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