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

DescribeWorkspaces

Obtains information about the specified WorkSpaces.

Only one of the filter parameters, such as BundleId, DirectoryId, or WorkspaceIds, can be specified at a time.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Request Syntax

{
   "BundleId": "string",
   "DirectoryId": "string",
   "Limit": number,
   "NextToken": "string",
   "UserName": "string",
   "WorkspaceIds": [ "string" ]
}

Request Parameters

The request accepts the following data in JSON format.

BundleId

The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that are created from this bundle will be retrieved. This parameter cannot be combined with any other filter parameter.

Type: String

Pattern: ^wsb-[0-9a-z]{8,63}$

Required: No

DirectoryId

Specifies the directory identifier to which to limit the WorkSpaces. Optionally, you can specify a specific directory user with the UserName parameter. This parameter cannot be combined with any other filter parameter.

Type: String

Pattern: ^d-[0-9a-f]{8,63}$

Required: No

Limit

The maximum number of items to return.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 25.

Required: No

NextToken

The NextToken value from a previous call to this operation. Pass null if this is the first call.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Required: No

UserName

Used with the DirectoryId parameter to specify the directory user for whom to obtain the WorkSpace.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Required: No

WorkspaceIds

An array of strings that contain the identifiers of the WorkSpaces for which to retrieve information. This parameter cannot be combined with any other filter parameter.

Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.

Type: Array of strings

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

Pattern: ^ws-[0-9a-z]{8,63}$

Required: No

Response Syntax

{
   "NextToken": "string",
   "Workspaces": [ 
      { 
         "BundleId": "string",
         "ComputerName": "string",
         "DirectoryId": "string",
         "ErrorCode": "string",
         "ErrorMessage": "string",
         "IpAddress": "string",
         "RootVolumeEncryptionEnabled": boolean,
         "State": "string",
         "SubnetId": "string",
         "UserName": "string",
         "UserVolumeEncryptionEnabled": boolean,
         "VolumeEncryptionKey": "string",
         "WorkspaceId": "string",
         "WorkspaceProperties": { 
            "RunningMode": "string",
            "RunningModeAutoStopTimeoutInMinutes": number
         }
      }
   ]
}

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.

NextToken

If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to this operation to retrieve the next set of items. This token is valid for one day and must be used within that time frame.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Workspaces

An array of structures that contain the information about the WorkSpaces.

Because the CreateWorkspaces operation is asynchronous, some of this information may be incomplete for a newly-created WorkSpace.

Type: Array of Workspace objects

Errors

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

InvalidParameterValuesException

One or more parameter values are not valid.

HTTP Status Code: 400

ResourceUnavailableException

The specified resource is not available.

HTTP Status Code: 400

See Also

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