:doc:`WorkMail <../../workmail>` / Client / deregister_mail_domain

**********************
deregister_mail_domain
**********************



.. py:method:: WorkMail.Client.deregister_mail_domain(**kwargs)

  

  Removes a domain from WorkMail, stops email routing to WorkMail, and removes the authorization allowing WorkMail use. SES keeps the domain because other applications may use it. You must first remove any email address used by WorkMail entities before you remove the domain.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterMailDomain>`_  


  **Request Syntax**
  ::

    response = client.deregister_mail_domain(
        OrganizationId='string',
        DomainName='string'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The WorkMail organization for which the domain will be deregistered.

    

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

    The domain to deregister in WorkMail and SES.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.MailDomainInUseException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`WorkMail.Client.exceptions.InvalidCustomSesConfigurationException`

  