Menu
Amazon WorkSpaces Service
API Reference (API Version 2015-04-08)

TerminateWorkspaces

Terminates the specified WorkSpaces.

Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is not maintained and will be destroyed. If you need to archive any user data, contact Amazon Web Services before terminating the WorkSpace.

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

Note

This operation is asynchronous and returns before the WorkSpaces have been completely terminated.

Request Syntax

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

Request Parameters

The request accepts the following data in JSON format.

TerminateWorkspaceRequests

An array of structures that specify the WorkSpaces to terminate.

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

An array of structures representing any 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: