unshare_directory

unshare_directory(**kwargs)

Stops the directory sharing between the directory owner and consumer accounts.

See also: AWS API Documentation

Request Syntax

response = client.unshare_directory(
    DirectoryId='string',
    UnshareTarget={
        'Id': 'string',
        'Type': 'ACCOUNT'
    }
)
Parameters
  • DirectoryId (string) --

    [REQUIRED]

    The identifier of the Managed Microsoft AD directory that you want to stop sharing.

  • UnshareTarget (dict) --

    [REQUIRED]

    Identifier for the directory consumer account with whom the directory has to be unshared.

    • Id (string) -- [REQUIRED]

      Identifier of the directory consumer account.

    • Type (string) -- [REQUIRED]

      Type of identifier to be used in the Id field.

Return type

dict

Returns

Response Syntax

{
    'SharedDirectoryId': 'string'
}

Response Structure

  • (dict) --

    • SharedDirectoryId (string) --

      Identifier of the directory stored in the directory consumer account that is to be unshared from the specified directory ( DirectoryId ).

Exceptions

  • DirectoryService.Client.exceptions.EntityDoesNotExistException
  • DirectoryService.Client.exceptions.InvalidTargetException
  • DirectoryService.Client.exceptions.DirectoryNotSharedException
  • DirectoryService.Client.exceptions.ClientException
  • DirectoryService.Client.exceptions.ServiceException