deleteAgent method
Removes an DataSync agent resource from your Amazon Web Services account.
Keep in mind that this operation (which can't be undone) doesn't remove the agent's virtual machine (VM) or Amazon EC2 instance from your storage environment. For next steps, you can delete the VM or instance from your storage environment or reuse it to activate a new agent.
May throw InternalException.
May throw InvalidRequestException.
Parameter agentArn :
The Amazon Resource Name (ARN) of the agent to delete. Use the
ListAgents operation to return a list of agents for your
account and Amazon Web Services Region.
Implementation
Future<void> deleteAgent({
required String agentArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'FmrsService.DeleteAgent'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AgentArn': agentArn,
},
);
}