BatchDeleteAgents - AWS Application Discovery Service


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.

Request Syntax

{ "deleteAgents": [ { "agentId": "string", "force": boolean } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


The list of agents to delete.

Type: Array of DeleteAgent objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Required: Yes

Response Syntax

{ "errors": [ { "agentId": "string", "errorCode": "string", "errorMessage": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


A list of agent IDs that failed to delete during the deletion task, each paired with an error message.

Type: Array of BatchDeleteAgentError objects


For information about the errors that are common to all actions, see Common Errors.


The user does not have permission to perform the action. Check the IAM policy associated with this user.

HTTP Status Code: 400


One or more parameters are not valid. Verify the parameters and try again.

HTTP Status Code: 400


The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.

HTTP Status Code: 400


The server experienced an internal error. Try again.

HTTP Status Code: 500


The following example shows the request syntax for a BatchDeleteAgents API call that deletes an agent from the account provided by the agentId.

Sample Request

{ "deleteAgents": [{ "agentId": "o-3i7dc2x5a020kaq4s", "force": true }] }

The following example shows the response for a successful BatchDeleteAgents API call.

Sample Response

{ "errors": [] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: