:doc:`SSM <../../ssm>` / Client / deregister_managed_instance

***************************
deregister_managed_instance
***************************



.. py:method:: SSM.Client.deregister_managed_instance(**kwargs)

  

  Removes the server or virtual machine from the list of registered servers.

   

  If you want to reregister an on-premises server, edge device, or VM, you must use a different Activation Code and Activation ID than used to register the machine previously. The Activation Code and Activation ID must not have already been used on the maximum number of activations specified when they were created. For more information, see `Deregistering managed nodes in a hybrid and multicloud environment <https://docs.aws.amazon.com/systems-manager/latest/userguide/fleet-manager-deregister-hybrid-nodes.html>`__ in the *Amazon Web Services Systems Manager User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance>`_  


  **Request Syntax**
  ::

    response = client.deregister_managed_instance(
        InstanceId='string'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The ID assigned to the managed node when you registered it using the activation process.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.InvalidInstanceId`

  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  