ListContentAssociationsCommand

Lists the content associations.

For more information about content associations--what they are and when they are used--see Integrate Amazon Q in Connect with step-by-step guides  in the Amazon Connect Administrator Guide.

Example Syntax

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

import { QConnectClient, ListContentAssociationsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, ListContentAssociationsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // ListContentAssociationsRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  knowledgeBaseId: "STRING_VALUE", // required
  contentId: "STRING_VALUE", // required
};
const command = new ListContentAssociationsCommand(input);
const response = await client.send(command);
// { // ListContentAssociationsResponse
//   contentAssociationSummaries: [ // ContentAssociationSummaryList // required
//     { // ContentAssociationSummary
//       knowledgeBaseId: "STRING_VALUE", // required
//       knowledgeBaseArn: "STRING_VALUE", // required
//       contentId: "STRING_VALUE", // required
//       contentArn: "STRING_VALUE", // required
//       contentAssociationId: "STRING_VALUE", // required
//       contentAssociationArn: "STRING_VALUE", // required
//       associationType: "STRING_VALUE", // required
//       associationData: { // ContentAssociationContents Union: only one key present
//         amazonConnectGuideAssociation: { // AmazonConnectGuideAssociationData
//           flowId: "STRING_VALUE",
//         },
//       },
//       tags: { // Tags
//         "<keys>": "STRING_VALUE",
//       },
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListContentAssociationsCommand Input

Parameter
Type
Description
contentId
Required
string | undefined

The identifier of the content.

knowledgeBaseId
Required
string | undefined

The identifier of the knowledge base.

maxResults
number | undefined

The maximum number of results to return per page.

nextToken
string | undefined

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

ListContentAssociationsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
contentAssociationSummaries
Required
ContentAssociationSummary[] | undefined

Summary information about content associations.

nextToken
string | undefined

If there are additional results, this is the token for the next set of results.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

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.