Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Calling the SearchRelevantContent API to an Amazon Q index with an IAM Identity Center application environment

Focus mode
Calling the SearchRelevantContent API to an Amazon Q index with an IAM Identity Center application environment - Amazon Q Business

Before end users can retrieve content from the Amazon Q index that you have been granted access to, you need to be able to make authenticated Amazon Q Business API calls, like the SearchRelevantContent API operation.

To do this you, must complete the steps in Make authenticated Amazon Q Business API calls using IAM Identity Center.

Note

Use the instructions from the previous topic, but modify the QBusinessConversationPermission permission by adding the additional action , "qbusiness:SearchRelevantContent" to the list of allowed actions, as shown in the following sample snippet of the full permission.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "QBusinessConversationPermission", "Effect": "Allow", "Action": [ "qbusiness:Chat", ... , "qbusiness:SearchRelevantContent" ], ... }

"When configuring access scopes for your Amazon Q Businessapplication environment, add the following using the AWS CLI to enable calling the SearchRelevantContent API:"

aws sso-admin put-application-access-scope \ --application-arn identity-center-custom-application-arn \ --scope "qbusiness:conversations:access" aws sso-admin put-application-access-scope \ --application-arn identity-center-custom-application-arn \ --scope "qbusiness:content:access"

The following AWS CLI example shows how to call this SearchRelevantContent API operation after you have these credentials.

aws qbusiness search-relevant-content \ --application-id ${qbusiness_application_id} \ --query-text "What is Amazon Q?" \ --content-source '{"retriever": {"retrieverId": "${retriever_id"}}'
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.