- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteUserCommand
Deletes the specified user from a Simple AD or Microsoft AD directory.
Deleting a user immediately and permanently deletes all content in that user's folder structure. Site retention policies do NOT apply to this type of deletion.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, DeleteUserCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, DeleteUserCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // DeleteUserRequest
AuthenticationToken: "STRING_VALUE",
UserId: "STRING_VALUE", // required
};
const command = new DeleteUserCommand(input);
const response = await client.send(command);
// {};
DeleteUserCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
UserId Required | string | undefined | The ID of the user. |
AuthenticationToken | string | undefined | Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using Amazon Web Services credentials. |
DeleteUserCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotExistsException | client | The resource does not exist. |
FailedDependencyException | client | The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory. |
ServiceUnavailableException | server | One or more of the dependencies is unavailable. |
UnauthorizedOperationException | client | The operation is not permitted. |
UnauthorizedResourceAccessException | client | The caller does not have access to perform the action on the resource. |
WorkDocsServiceException | Base exception class for all service exceptions from WorkDocs service. |