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

*******************
delete_organization
*******************



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

  

  Deletes an WorkMail organization and all underlying AWS resources managed by WorkMail as part of the organization. You can choose whether to delete the associated directory. For more information, see `Removing an organization <https://docs.aws.amazon.com/workmail/latest/adminguide/remove_organization.html>`__ in the *WorkMail Administrator Guide*.

  

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


  **Request Syntax**
  ::

    response = client.delete_organization(
        ClientToken='string',
        OrganizationId='string',
        DeleteDirectory=True|False,
        ForceDelete=True|False,
        DeleteIdentityCenterApplication=True|False
    )
    
  :type ClientToken: string
  :param ClientToken: 

    The idempotency token associated with the request.

    This field is autopopulated if not provided.

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

    The organization ID.

    

  
  :type DeleteDirectory: boolean
  :param DeleteDirectory: **[REQUIRED]** 

    If true, deletes the AWS Directory Service directory associated with the organization.

    

  
  :type ForceDelete: boolean
  :param ForceDelete: 

    Deletes a WorkMail organization even if the organization has enabled users.

    

  
  :type DeleteIdentityCenterApplication: boolean
  :param DeleteIdentityCenterApplication: 

    Deletes IAM Identity Center application for WorkMail. This action does not affect authentication settings for any organization.

    

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

    
    ::

      {
          'OrganizationId': 'string',
          'State': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **OrganizationId** *(string) --* 

        The organization ID.

        
      

      - **State** *(string) --* 

        The state of the organization.

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

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

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

  