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

*****************************************
deregister_target_from_maintenance_window
*****************************************



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

  

  Removes a target from a maintenance window.

  

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


  **Request Syntax**
  ::

    response = client.deregister_target_from_maintenance_window(
        WindowId='string',
        WindowTargetId='string',
        Safe=True|False
    )
    
  :type WindowId: string
  :param WindowId: **[REQUIRED]** 

    The ID of the maintenance window the target should be removed from.

    

  
  :type WindowTargetId: string
  :param WindowTargetId: **[REQUIRED]** 

    The ID of the target definition to remove.

    

  
  :type Safe: boolean
  :param Safe: 

    The system checks if the target is being referenced by a task. If the target is being referenced, the system returns an error and doesn't deregister the target from the maintenance window.

    

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

    
    ::

      {
          'WindowId': 'string',
          'WindowTargetId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **WindowId** *(string) --* 

        The ID of the maintenance window the target was removed from.

        
      

      - **WindowTargetId** *(string) --* 

        The ID of the removed target definition.

        
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.DoesNotExistException`

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

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

  