Skip to content

batch_delete_agents

batch_delete_agents(
    delete_agents: DeleteAgents,
    *,
    config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
) -> BatchDeleteAgentsResponse

Deletes one or more agents or collectors as specified by ID. Deleting an agent or collector does not delete the previously discovered data. To delete the data collected, use StartBatchDeleteConfigurationTask.

Parameters:

  • delete_agents (DeleteAgents) –

    The list of agents to delete.

Raises:

Source code in docs_src/capo_application_discovery_service/_services/application_discovery_service.py
def batch_delete_agents(
    self,
    delete_agents: "capo_application_discovery_service.types.delete_agents.DeleteAgents",
    *,
    config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
) -> "capo_application_discovery_service.types.batch_delete_agents_response.BatchDeleteAgentsResponse":
    """<p> Deletes one or more agents or collectors as specified by ID. Deleting an agent or collector does not delete the previously discovered data. To delete the data collected, use <code>StartBatchDeleteConfigurationTask</code>. </p>

    Args:
        delete_agents: <p> The list of agents to delete. </p>

    Raises:
        capo_application_discovery_service.errors.authorization_error_exception.AuthorizationErrorException: <p>The user does not have permission to perform the action. Check the IAM policy associated with this user.</p>
        capo_application_discovery_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid. Verify the parameters and try again.</p>
        capo_application_discovery_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.</p>
        capo_application_discovery_service.errors.server_internal_error_exception.ServerInternalErrorException: <p>The server experienced an internal error. Try again.</p>
        capo_application_discovery_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_application_discovery_service.types.batch_delete_agents_request.BatchDeleteAgentsRequest]",
    ) -> OperationResponse[
        "capo_application_discovery_service.types.batch_delete_agents_response.BatchDeleteAgentsResponse"
    ]:
        import capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.batch_delete_agents

        output, http_response = (
            capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.batch_delete_agents.batch_delete_agents(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteAgents")
    )
    input_: capo_application_discovery_service.types.batch_delete_agents_request.BatchDeleteAgentsRequest = {
        "delete_agents": delete_agents
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output