- 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.
UpdateDocumentCommand
Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, UpdateDocumentCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, UpdateDocumentCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // UpdateDocumentRequest
AuthenticationToken: "STRING_VALUE",
DocumentId: "STRING_VALUE", // required
Name: "STRING_VALUE",
ParentFolderId: "STRING_VALUE",
ResourceState: "ACTIVE" || "RESTORING" || "RECYCLING" || "RECYCLED",
};
const command = new UpdateDocumentCommand(input);
const response = await client.send(command);
// {};
UpdateDocumentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DocumentId Required | string | undefined | The ID of the document. |
AuthenticationToken | string | undefined | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
Name | string | undefined | The name of the document. |
ParentFolderId | string | undefined | The ID of the parent folder. |
ResourceState | ResourceStateType | undefined | The resource state of the document. Only ACTIVE and RECYCLED are supported. |
UpdateDocumentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentModificationException | client | The resource hierarchy is changing. |
ConflictingOperationException | client | Another operation is in progress on the resource that conflicts with the current operation. |
EntityAlreadyExistsException | client | The resource already exists. |
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. |
LimitExceededException | client | The maximum of 100,000 files and folders under the parent folder has been exceeded. |
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. |