:doc:`DirectoryService <../../ds>` / Client / delete_directory

****************
delete_directory
****************



.. py:method:: DirectoryService.Client.delete_directory(**kwargs)

  

  Deletes an Directory Service directory.

   

  Before you call ``DeleteDirectory``, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the ``DeleteDirectory`` operation, see `Directory Service API Permissions\: Actions, Resources, and Conditions Reference <http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteDirectory>`_  


  **Request Syntax**
  ::

    response = client.delete_directory(
        DirectoryId='string'
    )
    
  :type DirectoryId: string
  :param DirectoryId: **[REQUIRED]** 

    The identifier of the directory to delete.

    

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

    
    ::

      {
          'DirectoryId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the results of the  DeleteDirectory operation.

      
      

      - **DirectoryId** *(string) --* 

        The directory identifier.

        
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.EntityDoesNotExistException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ClientException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ServiceException`

  