DirectoryServiceData / Client / delete_user

delete_user#

DirectoryServiceData.Client.delete_user(**kwargs)#

Deletes a user.

See also: AWS API Documentation

Request Syntax

response = client.delete_user(
    ClientToken='string',
    DirectoryId='string',
    SAMAccountName='string'
)
Parameters:
  • ClientToken (string) –

    A unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.

    A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.

    If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an ConflictException.

    Note

    This parameter is optional when using the CLI or SDK.

    This field is autopopulated if not provided.

  • DirectoryId (string) –

    [REQUIRED]

    The identifier (ID) of the directory that’s associated with the user.

  • SAMAccountName (string) –

    [REQUIRED]

    The name of the user.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • DirectoryServiceData.Client.exceptions.ResourceNotFoundException

  • DirectoryServiceData.Client.exceptions.AccessDeniedException

  • DirectoryServiceData.Client.exceptions.InternalServerException

  • DirectoryServiceData.Client.exceptions.ValidationException

  • DirectoryServiceData.Client.exceptions.DirectoryUnavailableException

  • DirectoryServiceData.Client.exceptions.ConflictException

  • DirectoryServiceData.Client.exceptions.ThrottlingException