- 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.
UpdateContentCommand
Updates information about the content.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, UpdateContentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, UpdateContentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // UpdateContentRequest
knowledgeBaseId: "STRING_VALUE", // required
contentId: "STRING_VALUE", // required
revisionId: "STRING_VALUE",
title: "STRING_VALUE",
overrideLinkOutUri: "STRING_VALUE",
removeOverrideLinkOutUri: true || false,
metadata: { // ContentMetadata
"<keys>": "STRING_VALUE",
},
uploadId: "STRING_VALUE",
};
const command = new UpdateContentCommand(input);
const response = await client.send(command);
// { // UpdateContentResponse
// content: { // ContentData
// contentArn: "STRING_VALUE", // required
// contentId: "STRING_VALUE", // required
// knowledgeBaseArn: "STRING_VALUE", // required
// knowledgeBaseId: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// revisionId: "STRING_VALUE", // required
// title: "STRING_VALUE", // required
// contentType: "STRING_VALUE", // required
// status: "STRING_VALUE", // required
// metadata: { // ContentMetadata // required
// "<keys>": "STRING_VALUE",
// },
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// linkOutUri: "STRING_VALUE",
// url: "STRING_VALUE", // required
// urlExpiry: new Date("TIMESTAMP"), // required
// },
// };
UpdateContentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
contentId Required | string | undefined | The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN. |
knowledgeBaseId Required | string | undefined | The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN |
metadata | Record<string, string> | undefined | A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift. |
overrideLinkOutUri | string | undefined | The URI for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content. To remove an existing |
removeOverrideLinkOutUri | boolean | undefined | Unset the existing |
revisionId | string | undefined | The |
title | string | undefined | The title of the content. |
uploadId | string | undefined | A pointer to the uploaded asset. This value is returned by StartContentUpload . |
UpdateContentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
content | ContentData | undefined | The content. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
PreconditionFailedException | client | The provided |
ResourceNotFoundException | client | The specified resource does not exist. |
ValidationException | client | The input fails to satisfy the constraints specified by a service. |
QConnectServiceException | Base exception class for all service exceptions from QConnect service. |