TerminateWorkspaces - Amazon WorkSpaces Service

TerminateWorkspaces

Terminates the specified WorkSpaces.

Important

Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is destroyed. If you need to archive any user data, contact AWS Support before terminating the WorkSpace.

You can terminate a WorkSpace that is in any state except SUSPENDED.

This operation is asynchronous and returns before the WorkSpaces have been completely terminated. After a WorkSpace is terminated, the TERMINATED state is returned only briefly before the WorkSpace directory metadata is cleaned up, so this state is rarely returned. To confirm that a WorkSpace is terminated, check for the WorkSpace ID by using DescribeWorkSpaces. If the WorkSpace ID isn't returned, then the WorkSpace has been successfully terminated.

Note

Simple AD and AD Connector are made available to you free of charge to use with WorkSpaces. If there are no WorkSpaces being used with your Simple AD or AD Connector directory for 30 consecutive days, this directory will be automatically deregistered for use with Amazon WorkSpaces, and you will be charged for this directory as per the AWS Directory Service pricing terms.

To delete empty directories, see Delete the Directory for Your WorkSpaces. If you delete your Simple AD or AD Connector directory, you can always create a new one when you want to start using WorkSpaces again.

Request Syntax

{ "TerminateWorkspaceRequests": [ { "WorkspaceId": "string" } ] }

Request Parameters

The request accepts the following data in JSON format.

TerminateWorkspaceRequests

The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.

Type: Array of TerminateRequest objects

Array Members: Minimum number of 1 item. Maximum number of 25 items.

Required: Yes

Response Syntax

{ "FailedRequests": [ { "ErrorCode": "string", "ErrorMessage": "string", "WorkspaceId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

FailedRequests

Information about the WorkSpaces that could not be terminated.

Type: Array of FailedWorkspaceChangeRequest objects

Errors

For information about the errors that are common to all actions, see Common Errors.

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: