code: @Override
      public DeregisterManagedInstanceResult deregisterManagedInstance(DeregisterManagedInstanceRequest request) {
          request = beforeClientExecution(request);
          return executeDeregisterManagedInstance(request);
      }
docs: <p>
  Removes the server or virtual machine from the list of registered servers. You can reregister the instance again
  at any time. If you don't plan to use Run Command on the server, we suggest uninstalling SSM Agent first.
  </p>
  
  @param deregisterManagedInstanceRequest
  @return Result of the DeregisterManagedInstance operation returned by the service.
  @throws InvalidInstanceIdException
  The following problems can cause this exception:</p>
  <p>
  You do not have permission to access the instance.
  </p>
  <p>
  SSM Agent is not running. On managed instances and Linux instances, verify that the SSM Agent is running.
  On EC2 Windows instances, verify that the EC2Config service is running.
  </p>
  <p>
  SSM Agent or EC2Config service is not registered to the SSM endpoint. Try reinstalling SSM Agent or
  EC2Config service.
  </p>
  <p>
  The instance is not in valid state. Valid states are: Running, Pending, Stopped, Stopping. Invalid states
  are: Shutting-down and Terminated.
  @throws InternalServerErrorException
  An error occurred on the server side.
  @sample AWSSimpleSystemsManagement.DeregisterManagedInstance
  @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance" target="_top">AWS
  API Documentation</a>