:doc:`DataSync <../../datasync>` / Client / delete_agent

************
delete_agent
************



.. py:method:: DataSync.Client.delete_agent(**kwargs)

  

  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 <https://docs.aws.amazon.com/datasync/latest/userguide/activate-agent.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent>`_  


  **Request Syntax**
  ::

    response = client.delete_agent(
        AgentArn='string'
    )
    
  :type AgentArn: string
  :param AgentArn: **[REQUIRED]** 

    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.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`DataSync.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`DataSync.Client.exceptions.InternalException`

  