- 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.
DescribeRootFoldersCommand
Describes the current user's special folders; the RootFolder
and the RecycleBin
. RootFolder
is the root of user's files and folders and RecycleBin
is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.
This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see Authentication and Access Control for User Applications in the Amazon WorkDocs Developer Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, DescribeRootFoldersCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, DescribeRootFoldersCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // DescribeRootFoldersRequest
AuthenticationToken: "STRING_VALUE", // required
Limit: Number("int"),
Marker: "STRING_VALUE",
};
const command = new DescribeRootFoldersCommand(input);
const response = await client.send(command);
// { // DescribeRootFoldersResponse
// Folders: [ // FolderMetadataList
// { // FolderMetadata
// Id: "STRING_VALUE",
// Name: "STRING_VALUE",
// CreatorId: "STRING_VALUE",
// ParentFolderId: "STRING_VALUE",
// CreatedTimestamp: new Date("TIMESTAMP"),
// ModifiedTimestamp: new Date("TIMESTAMP"),
// ResourceState: "ACTIVE" || "RESTORING" || "RECYCLING" || "RECYCLED",
// Signature: "STRING_VALUE",
// Labels: [ // SharedLabels
// "STRING_VALUE",
// ],
// Size: Number("long"),
// LatestVersionSize: Number("long"),
// },
// ],
// Marker: "STRING_VALUE",
// };
DescribeRootFoldersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AuthenticationToken Required | string | undefined | Amazon WorkDocs authentication token. |
Limit | number | undefined | The maximum number of items to return. |
Marker | string | undefined | The marker for the next set of results. (You received this marker from a previous call.) |
DescribeRootFoldersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Folders | FolderMetadata[] | undefined | The user's special folders. |
Marker | string | undefined | The marker for the next set of results. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
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. |
InvalidArgumentException | client | The pagination marker or limit fields are not valid. |
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. |