StopDataCollectionByAgentIds - AWS Application Discovery Service

StopDataCollectionByAgentIds

Instructs the specified agents to stop collecting data.

Request Syntax

{ "agentIds": [ "string" ] }

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.

agentIds

The IDs of the agents from which to stop collecting data.

Type: Array of strings

Length Constraints: Minimum length of 10. Maximum length of 20.

Pattern: \S+

Required: Yes

Response Syntax

{ "agentsConfigurationStatus": [ { "agentId": "string", "description": "string", "operationSucceeded": boolean } ] }

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.

agentsConfigurationStatus

Information about the agents that were instructed to stop collecting data. Information includes the agent ID, a description of the operation performed, and whether the agent configuration was updated.

Type: Array of AgentConfigurationStatus objects

Errors

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

AuthorizationErrorException

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

HTTP Status Code: 400

HomeRegionNotSetException

The home Region is not set. Set the home Region to continue.

HTTP Status Code: 400

InvalidParameterException

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

HTTP Status Code: 400

InvalidParameterValueException

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

ServerInternalErrorException

The server experienced an internal error. Try again.

HTTP Status Code: 500

Examples

Stop data collection by agent ids for two agents

In the following example, multiple agent ids are passed to the required parameter agentIds to stop two agents. In the response, it is reported that both agents were stopped successfully.

Sample Request

{ "agentIds": [ "i-0afec73de85777dd0","i-0b30b932b328cbd73" ] }

Sample Response

{ "agentsConfigurationStatus": [ { "agentId": "i-0afec73de85777dd0", "operationSucceeded": true, "description": "Succeeded" }, { "agentId": "i-0b30b932b328cbd73", "operationSucceeded": true, "description": "Succeeded" } ] }

See Also

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