DeleteCustomMetadataCommand

Deletes custom metadata from the specified resource.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WorkDocsClient, DeleteCustomMetadataCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, DeleteCustomMetadataCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // DeleteCustomMetadataRequest
  AuthenticationToken: "STRING_VALUE",
  ResourceId: "STRING_VALUE", // required
  VersionId: "STRING_VALUE",
  Keys: [ // CustomMetadataKeyList
    "STRING_VALUE",
  ],
  DeleteAll: true || false,
};
const command = new DeleteCustomMetadataCommand(input);
const response = await client.send(command);
// {};

DeleteCustomMetadataCommand Input

Parameter
Type
Description
ResourceId
Required
string | undefined

The ID of the resource, either a document or folder.

AuthenticationToken
string | undefined

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DeleteAll
boolean | undefined

Flag to indicate removal of all custom metadata properties from the specified resource.

Keys
string[] | undefined

List of properties to remove.

VersionId
string | undefined

The ID of the version, if the custom metadata is being deleted from a document version.

DeleteCustomMetadataCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

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.

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.