DirectoryService / Client / delete_directory

delete_directory#

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_directory(
    DirectoryId='string'
)
Parameters:

DirectoryId (string) –

[REQUIRED]

The identifier of the directory to delete.

Return type:

dict

Returns:

Response Syntax

{
    'DirectoryId': 'string'
}

Response Structure

  • (dict) –

    Contains the results of the DeleteDirectory operation.

    • DirectoryId (string) –

      The directory identifier.

Exceptions

  • DirectoryService.Client.exceptions.EntityDoesNotExistException

  • DirectoryService.Client.exceptions.ClientException

  • DirectoryService.Client.exceptions.ServiceException