- 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.
GetFolderCommand
Retrieves the metadata of the specified folder.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, GetFolderCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, GetFolderCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // GetFolderRequest
AuthenticationToken: "STRING_VALUE",
FolderId: "STRING_VALUE", // required
IncludeCustomMetadata: true || false,
};
const command = new GetFolderCommand(input);
const response = await client.send(command);
// { // GetFolderResponse
// Metadata: { // 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"),
// },
// CustomMetadata: { // CustomMetadataMap
// "<keys>": "STRING_VALUE",
// },
// };
GetFolderCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
FolderId Required | string | undefined | The ID of the folder. |
AuthenticationToken | string | undefined | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
IncludeCustomMetadata | boolean | undefined | Set to TRUE to include custom metadata in the response. |
GetFolderCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CustomMetadata | Record<string, string> | undefined | The custom metadata on the folder. |
Metadata | FolderMetadata | undefined | The metadata of the folder. |
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. |
InvalidArgumentException | client | The pagination marker or limit fields are not valid. |
ProhibitedStateException | client | The specified document version is not in the INITIALIZED state. |
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. |