AWS.QBusiness reference
Application
Section titled “Application”Source:
packages/aws/src/QBusiness/Application.ts
An Amazon Q Business application — the top-level container that indices, retrievers, data sources, and web experiences attach to.
Application: Creating Applications
Section titled “Application: Creating Applications”Identity Center Application
import * as AWS from "@alchemy.run/aws";
const app = yield* AWS.QBusiness.Application("Assistant", { identityCenterInstanceArn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", description: "Company knowledge assistant",});Anonymous Application
const app = yield* AWS.QBusiness.Application("PublicAssistant", { identityType: "ANONYMOUS",});Application: Looking up an existing application
Section titled “Application: Looking up an existing application”Application.lookup references an application Alchemy doesn’t manage (created in the
console or by another stack), found by applicationId or displayName. It is read during
plan/deploy and never created, updated or deleted.
const assistant = AWS.QBusiness.Application.lookup({ displayName: "assistant" });AssociatePermission
Section titled “AssociatePermission”Source:
packages/aws/src/QBusiness/AssociatePermission.ts
Runtime binding for the AssociatePermission operation (IAM action
qbusiness:AssociatePermission), scoped to one Application.
Adds a statement to the application’s permission policy, granting
a principal (e.g. an ISV data accessor) cross-account access to Q
Business actions.
Provide the implementation with
Effect.provide(AWS.QBusiness.AssociatePermissionHttp).
AssociatePermission: Cross-Account Permissions
Section titled “AssociatePermission: Cross-Account Permissions”const associate = yield* AWS.QBusiness.AssociatePermission(app);
yield* associate({ statementId: "isv-search", actions: ["qbusiness:SearchRelevantContent"], principal: "arn:aws:iam::123456789012:role/IsvRole",});BatchDeleteDocument
Section titled “BatchDeleteDocument”Source:
packages/aws/src/QBusiness/BatchDeleteDocument.ts
Runtime binding for the BatchDeleteDocument operation (IAM action
qbusiness:BatchDeleteDocument), scoped to one Index.
Removes documents from the index by document id.
Provide the implementation with
Effect.provide(AWS.QBusiness.BatchDeleteDocumentHttp).
BatchDeleteDocument: Document Ingestion
Section titled “BatchDeleteDocument: Document Ingestion”const deleteDocuments = yield* AWS.QBusiness.BatchDeleteDocument(index);
yield* deleteDocuments({ documents: [{ documentId: "welcome" }] });BatchPutDocument
Section titled “BatchPutDocument”Source:
packages/aws/src/QBusiness/BatchPutDocument.ts
Runtime binding for the BatchPutDocument operation (IAM action
qbusiness:BatchPutDocument), scoped to one Index.
Adds or updates documents in the index directly (the CUSTOM data
source path), with optional access controls and enrichment.
Provide the implementation with
Effect.provide(AWS.QBusiness.BatchPutDocumentHttp).
BatchPutDocument: Document Ingestion
Section titled “BatchPutDocument: Document Ingestion”const putDocuments = yield* AWS.QBusiness.BatchPutDocument(index);
const { failedDocuments } = yield* putDocuments({ documents: [ { id: "welcome", title: "Welcome", content: { blob: new TextEncoder().encode("Hello Q!") }, contentType: "PLAIN_TEXT", }, ],});CancelSubscription
Section titled “CancelSubscription”Source:
packages/aws/src/QBusiness/CancelSubscription.ts
Runtime binding for the CancelSubscription operation (IAM action
qbusiness:CancelSubscription), scoped to one Application.
Unsubscribes a user or group; the change takes effect at the next
month boundary.
Provide the implementation with
Effect.provide(AWS.QBusiness.CancelSubscriptionHttp).
CancelSubscription: Subscriptions
Section titled “CancelSubscription: Subscriptions”const cancel = yield* AWS.QBusiness.CancelSubscription(app);
yield* cancel({ subscriptionId });ChatSync
Section titled “ChatSync”Source:
packages/aws/src/QBusiness/ChatSync.ts
Runtime binding for the ChatSync operation (IAM action
qbusiness:ChatSync), scoped to one Application.
Sends a user message to the application and returns the full
AI-generated answer in one response, including source attributions
and any suggested plugin actions.
Provide the implementation with
Effect.provide(AWS.QBusiness.ChatSyncHttp).
ChatSync: Chat
Section titled “ChatSync: Chat”const chat = yield* AWS.QBusiness.ChatSync(app);
const reply = yield* chat({ userMessage: "What is our travel policy?" });console.log(reply.systemMessage);CheckDocumentAccess
Section titled “CheckDocumentAccess”Source:
packages/aws/src/QBusiness/CheckDocumentAccess.ts
Runtime binding for the CheckDocumentAccess operation (IAM action
qbusiness:CheckDocumentAccess), scoped to one Index.
Checks whether a specific user can access a document, returning
the user’s groups/aliases and the document’s ACL evaluation.
Provide the implementation with
Effect.provide(AWS.QBusiness.CheckDocumentAccessHttp).
CheckDocumentAccess: Document Ingestion
Section titled “CheckDocumentAccess: Document Ingestion”const checkAccess = yield* AWS.QBusiness.CheckDocumentAccess(index);
const { hasAccess } = yield* checkAccess({ userId: "user@example.com", documentId: "welcome",});CreateAnonymousWebExperienceUrl
Section titled “CreateAnonymousWebExperienceUrl”Source:
packages/aws/src/QBusiness/CreateAnonymousWebExperienceUrl.ts
Runtime binding for the CreateAnonymousWebExperienceUrl operation (IAM action
qbusiness:CreateAnonymousWebExperienceUrl), scoped to one WebExperience.
Mints a short-lived URL that opens the web experience without
authentication (applications created with the ANONYMOUS
identity type).
Provide the implementation with
Effect.provide(AWS.QBusiness.CreateAnonymousWebExperienceUrlHttp).
CreateAnonymousWebExperienceUrl: Anonymous Access
Section titled “CreateAnonymousWebExperienceUrl: Anonymous Access”const createUrl = yield* AWS.QBusiness.CreateAnonymousWebExperienceUrl(web);
const { anonymousUrl } = yield* createUrl({ sessionDuration: "30 minutes",});CreateSubscription
Section titled “CreateSubscription”Source:
packages/aws/src/QBusiness/CreateSubscription.ts
Runtime binding for the CreateSubscription operation (IAM action
qbusiness:CreateSubscription), scoped to one Application.
Subscribes an IAM Identity Center user or group to a Q Business
pricing tier (Q_LITE or Q_BUSINESS).
Provide the implementation with
Effect.provide(AWS.QBusiness.CreateSubscriptionHttp).
CreateSubscription: Subscriptions
Section titled “CreateSubscription: Subscriptions”const subscribe = yield* AWS.QBusiness.CreateSubscription(app);
yield* subscribe({ principal: { user: idcUserId }, type: "Q_BUSINESS",});CreateUser
Section titled “CreateUser”Source:
packages/aws/src/QBusiness/CreateUser.ts
Runtime binding for the CreateUser operation (IAM action
qbusiness:CreateUser), scoped to one Application.
Creates a user in the application’s user store, mapping the user
id to data-source-specific aliases used for document access
control.
Provide the implementation with
Effect.provide(AWS.QBusiness.CreateUserHttp).
CreateUser: User Management
Section titled “CreateUser: User Management”const createUser = yield* AWS.QBusiness.CreateUser(app);
yield* createUser({ userId: "user@example.com", userAliases: [{ userId: "corp\\user" }],});DataSource
Section titled “DataSource”Source:
packages/aws/src/QBusiness/DataSource.ts
An Amazon Q Business data source — a connector that syncs documents from a repository (S3 bucket, website, SharePoint, …) into an index.
DataSource: Creating Data Sources
Section titled “DataSource: Creating Data Sources”S3 Data Source
import * as AWS from "@alchemy.run/aws";
const source = yield* AWS.QBusiness.DataSource("Docs", { applicationId: app.applicationId, indexId: index.indexId, roleArn: dataSourceRole.roleArn, configuration: { type: "S3", syncMode: "FORCED_FULL_CRAWL", connectionConfiguration: { repositoryEndpointMetadata: { BucketName: bucket.bucketName }, }, repositoryConfigurations: { document: { fieldMappings: [{ indexFieldName: "s3_document_id", indexFieldType: "STRING", dataSourceFieldName: "s3_document_id", }], }, }, },});Scheduled Sync
const source = yield* AWS.QBusiness.DataSource("Docs", { applicationId: app.applicationId, indexId: index.indexId, roleArn: dataSourceRole.roleArn, syncSchedule: "cron(0 12 * * ? *)", configuration: { ... },});DataSource: Looking up an existing data source
Section titled “DataSource: Looking up an existing data source”DataSource.lookup references a data source Alchemy doesn’t manage (created in the
console or by another stack), found by applicationId and indexId, with dataSourceId or
displayName. It is read during
plan/deploy and never created, updated or deleted.
const wiki = AWS.QBusiness.DataSource.lookup({ applicationId, indexId, displayName: "wiki" });DeleteAttachment
Section titled “DeleteAttachment”Source:
packages/aws/src/QBusiness/DeleteAttachment.ts
Runtime binding for the DeleteAttachment operation (IAM action
qbusiness:DeleteAttachment), scoped to one Application.
Deletes an attachment associated with a chat conversation.
Provide the implementation with
Effect.provide(AWS.QBusiness.DeleteAttachmentHttp).
DeleteAttachment: Conversations
Section titled “DeleteAttachment: Conversations”const deleteAttachment = yield* AWS.QBusiness.DeleteAttachment(app);
yield* deleteAttachment({ conversationId, attachmentId });DeleteChatControlsConfiguration
Section titled “DeleteChatControlsConfiguration”Source:
packages/aws/src/QBusiness/DeleteChatControlsConfiguration.ts
Runtime binding for the DeleteChatControlsConfiguration operation (IAM action
qbusiness:DeleteChatControlsConfiguration), scoped to one Application.
Deletes the application’s chat controls configuration.
Provide the implementation with
Effect.provide(AWS.QBusiness.DeleteChatControlsConfigurationHttp).
DeleteChatControlsConfiguration: Admin Controls
Section titled “DeleteChatControlsConfiguration: Admin Controls”const deleteControls = yield* AWS.QBusiness.DeleteChatControlsConfiguration(app);
yield* deleteControls();DeleteConversation
Section titled “DeleteConversation”Source:
packages/aws/src/QBusiness/DeleteConversation.ts
Runtime binding for the DeleteConversation operation (IAM action
qbusiness:DeleteConversation), scoped to one Application.
Deletes a chat conversation and its messages.
Provide the implementation with
Effect.provide(AWS.QBusiness.DeleteConversationHttp).
DeleteConversation: Conversations
Section titled “DeleteConversation: Conversations”const deleteConversation = yield* AWS.QBusiness.DeleteConversation(app);
yield* deleteConversation({ conversationId });DeleteGroup
Section titled “DeleteGroup”Source:
packages/aws/src/QBusiness/DeleteGroup.ts
Runtime binding for the DeleteGroup operation (IAM action
qbusiness:DeleteGroup), scoped to one Index.
Deletes a mapped group so its members lose group-scoped document
access on the next query.
Provide the implementation with
Effect.provide(AWS.QBusiness.DeleteGroupHttp).
DeleteGroup: Principal Mapping
Section titled “DeleteGroup: Principal Mapping”const deleteGroup = yield* AWS.QBusiness.DeleteGroup(index);
yield* deleteGroup({ groupName: "engineering" });DeleteUser
Section titled “DeleteUser”Source:
packages/aws/src/QBusiness/DeleteUser.ts
Runtime binding for the DeleteUser operation (IAM action
qbusiness:DeleteUser), scoped to one Application.
Deletes a user from the application user store.
Provide the implementation with
Effect.provide(AWS.QBusiness.DeleteUserHttp).
DeleteUser: User Management
Section titled “DeleteUser: User Management”const deleteUser = yield* AWS.QBusiness.DeleteUser(app);
yield* deleteUser({ userId: "user@example.com" });DisassociatePermission
Section titled “DisassociatePermission”Source:
packages/aws/src/QBusiness/DisassociatePermission.ts
Runtime binding for the DisassociatePermission operation (IAM action
qbusiness:DisassociatePermission), scoped to one Application.
Removes a statement from the application’s permission policy.
Provide the implementation with
Effect.provide(AWS.QBusiness.DisassociatePermissionHttp).
DisassociatePermission: Cross-Account Permissions
Section titled “DisassociatePermission: Cross-Account Permissions”const disassociate = yield* AWS.QBusiness.DisassociatePermission(app);
yield* disassociate({ statementId: "isv-search" });GetChatControlsConfiguration
Section titled “GetChatControlsConfiguration”Source:
packages/aws/src/QBusiness/GetChatControlsConfiguration.ts
Runtime binding for the GetChatControlsConfiguration operation (IAM action
qbusiness:GetChatControlsConfiguration), scoped to one Application.
Reads the application’s chat controls: response scope, blocked
phrases, topic rules, and creator mode.
Provide the implementation with
Effect.provide(AWS.QBusiness.GetChatControlsConfigurationHttp).
GetChatControlsConfiguration: Admin Controls
Section titled “GetChatControlsConfiguration: Admin Controls”const getControls = yield* AWS.QBusiness.GetChatControlsConfiguration(app);
const { responseScope, blockedPhrases } = yield* getControls();GetDocumentContent
Section titled “GetDocumentContent”Source:
packages/aws/src/QBusiness/GetDocumentContent.ts
Runtime binding for the GetDocumentContent operation (IAM action
qbusiness:GetDocumentContent), scoped to one Index.
Returns a presigned URL for an indexed document’s content, in the
raw uploaded format or the extracted text.
Provide the implementation with
Effect.provide(AWS.QBusiness.GetDocumentContentHttp).
GetDocumentContent: Document Ingestion
Section titled “GetDocumentContent: Document Ingestion”const getContent = yield* AWS.QBusiness.GetDocumentContent(index);
const { presignedUrl } = yield* getContent({ documentId: "welcome" });GetGroup
Section titled “GetGroup”Source:
packages/aws/src/QBusiness/GetGroup.ts
Runtime binding for the GetGroup operation (IAM action
qbusiness:GetGroup), scoped to one Index.
Reads a mapped group’s processing status.
Provide the implementation with
Effect.provide(AWS.QBusiness.GetGroupHttp).
GetGroup: Principal Mapping
Section titled “GetGroup: Principal Mapping”const getGroup = yield* AWS.QBusiness.GetGroup(index);
const { status } = yield* getGroup({ groupName: "engineering" });GetMedia
Section titled “GetMedia”Source:
packages/aws/src/QBusiness/GetMedia.ts
Runtime binding for the GetMedia operation (IAM action
qbusiness:GetMedia), scoped to one Application.
Fetches the media object (e.g. an extracted image) associated with
a chat message.
Provide the implementation with
Effect.provide(AWS.QBusiness.GetMediaHttp).
GetMedia: Conversations
Section titled “GetMedia: Conversations”const getMedia = yield* AWS.QBusiness.GetMedia(app);
const media = yield* getMedia({ conversationId, messageId, mediaId });GetPolicy
Section titled “GetPolicy”Source:
packages/aws/src/QBusiness/GetPolicy.ts
Runtime binding for the GetPolicy operation (IAM action
qbusiness:GetPolicy), scoped to one Application.
Reads the application’s resource-based permission policy (the
statements ISV data accessors were granted).
Provide the implementation with
Effect.provide(AWS.QBusiness.GetPolicyHttp).
GetPolicy: Cross-Account Permissions
Section titled “GetPolicy: Cross-Account Permissions”const getPolicy = yield* AWS.QBusiness.GetPolicy(app);
const { policy } = yield* getPolicy();GetUser
Section titled “GetUser”Source:
packages/aws/src/QBusiness/GetUser.ts
Runtime binding for the GetUser operation (IAM action
qbusiness:GetUser), scoped to one Application.
Reads a user’s alias mappings from the application user store.
Provide the implementation with
Effect.provide(AWS.QBusiness.GetUserHttp).
GetUser: User Management
Section titled “GetUser: User Management”const getUser = yield* AWS.QBusiness.GetUser(app);
const { userAliases } = yield* getUser({ userId: "user@example.com" });ListAttachments
Section titled “ListAttachments”Source:
packages/aws/src/QBusiness/ListAttachments.ts
Runtime binding for the ListAttachments operation (IAM action
qbusiness:ListAttachments), scoped to one Application.
Lists the files attached to chat conversations.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListAttachmentsHttp).
ListAttachments: Conversations
Section titled “ListAttachments: Conversations”const listAttachments = yield* AWS.QBusiness.ListAttachments(app);
const { attachments } = yield* listAttachments({ conversationId });ListConversations
Section titled “ListConversations”Source:
packages/aws/src/QBusiness/ListConversations.ts
Runtime binding for the ListConversations operation (IAM action
qbusiness:ListConversations), scoped to one Application.
Lists a user’s chat conversations in the application.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListConversationsHttp).
ListConversations: Conversations
Section titled “ListConversations: Conversations”const listConversations = yield* AWS.QBusiness.ListConversations(app);
const { conversations } = yield* listConversations();ListDataSourceSyncJobs
Section titled “ListDataSourceSyncJobs”Source:
packages/aws/src/QBusiness/ListDataSourceSyncJobs.ts
Runtime binding for the ListDataSourceSyncJobs operation (IAM action
qbusiness:ListDataSourceSyncJobs), scoped to one DataSource.
Lists the data source’s synchronization job history.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListDataSourceSyncJobsHttp).
ListDataSourceSyncJobs: Data Source Sync
Section titled “ListDataSourceSyncJobs: Data Source Sync”const listSyncJobs = yield* AWS.QBusiness.ListDataSourceSyncJobs(source);
const { history } = yield* listSyncJobs();ListDocuments
Section titled “ListDocuments”Source:
packages/aws/src/QBusiness/ListDocuments.ts
Runtime binding for the ListDocuments operation (IAM action
qbusiness:ListDocuments), scoped to one Index.
Lists the documents the index holds and their ingestion status.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListDocumentsHttp).
ListDocuments: Document Ingestion
Section titled “ListDocuments: Document Ingestion”const listDocuments = yield* AWS.QBusiness.ListDocuments(index);
const { documentDetailList } = yield* listDocuments();ListGroups
Section titled “ListGroups”Source:
packages/aws/src/QBusiness/ListGroups.ts
Runtime binding for the ListGroups operation (IAM action
qbusiness:ListGroups), scoped to one Index.
Lists the groups mapped into the index before a given time.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListGroupsHttp).
ListGroups: Principal Mapping
Section titled “ListGroups: Principal Mapping”const listGroups = yield* AWS.QBusiness.ListGroups(index);
const { items } = yield* listGroups({ updatedEarlierThan: new Date() });ListMessages
Section titled “ListMessages”Source:
packages/aws/src/QBusiness/ListMessages.ts
Runtime binding for the ListMessages operation (IAM action
qbusiness:ListMessages), scoped to one Application.
Lists the messages of a chat conversation.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListMessagesHttp).
ListMessages: Conversations
Section titled “ListMessages: Conversations”const listMessages = yield* AWS.QBusiness.ListMessages(app);
const { messages } = yield* listMessages({ conversationId });ListSubscriptions
Section titled “ListSubscriptions”Source:
packages/aws/src/QBusiness/ListSubscriptions.ts
Runtime binding for the ListSubscriptions operation (IAM action
qbusiness:ListSubscriptions), scoped to one Application.
Lists the application’s user and group subscriptions.
Provide the implementation with
Effect.provide(AWS.QBusiness.ListSubscriptionsHttp).
ListSubscriptions: Subscriptions
Section titled “ListSubscriptions: Subscriptions”const listSubscriptions = yield* AWS.QBusiness.ListSubscriptions(app);
const { subscriptions } = yield* listSubscriptions();PutFeedback
Section titled “PutFeedback”Source:
packages/aws/src/QBusiness/PutFeedback.ts
Runtime binding for the PutFeedback operation (IAM action
qbusiness:PutFeedback), scoped to one Application.
Records end-user usefulness feedback (thumbs up/down and reasons)
for a chat message, which Amazon Q Business uses to improve
response quality.
Provide the implementation with
Effect.provide(AWS.QBusiness.PutFeedbackHttp).
PutFeedback: Chat
Section titled “PutFeedback: Chat”const feedback = yield* AWS.QBusiness.PutFeedback(app);
yield* feedback({ conversationId: reply.conversationId!, messageId: reply.systemMessageId!, messageUsefulness: { usefulness: "USEFUL", submittedAt: new Date(), },});PutGroup
Section titled “PutGroup”Source:
packages/aws/src/QBusiness/PutGroup.ts
Runtime binding for the PutGroup operation (IAM action
qbusiness:PutGroup), scoped to one Index.
Creates or replaces a group’s membership (users and sub groups)
used to enforce document access control at query time.
Provide the implementation with
Effect.provide(AWS.QBusiness.PutGroupHttp).
PutGroup: Principal Mapping
Section titled “PutGroup: Principal Mapping”const putGroup = yield* AWS.QBusiness.PutGroup(index);
yield* putGroup({ groupName: "engineering", type: "INDEX", groupMembers: { memberUsers: [{ userId: "user@example.com", type: "INDEX" }], },});Retriever
Section titled “Retriever”Source:
packages/aws/src/QBusiness/Retriever.ts
An Amazon Q Business retriever — the query engine that fetches relevant passages from an index (native or Kendra) to ground chat responses.
Retriever: Creating Retrievers
Section titled “Retriever: Creating Retrievers”Native Index Retriever
import * as AWS from "@alchemy.run/aws";
const retriever = yield* AWS.QBusiness.Retriever("Docs", { applicationId: app.applicationId, type: "NATIVE_INDEX", configuration: { nativeIndexConfiguration: { indexId: index.indexId }, },});Kendra Index Retriever
const retriever = yield* AWS.QBusiness.Retriever("Kendra", { applicationId: app.applicationId, type: "KENDRA_INDEX", roleArn: role.roleArn, configuration: { kendraIndexConfiguration: { indexId: kendraIndex.id }, },});Retriever: Looking up an existing retriever
Section titled “Retriever: Looking up an existing retriever”Retriever.lookup references a retriever Alchemy doesn’t manage (created in the
console or by another stack), found by applicationId with retrieverId or displayName. It is read during
plan/deploy and never created, updated or deleted.
const existing = AWS.QBusiness.Retriever.lookup({ applicationId, displayName: "main" });Source:
packages/aws/src/QBusiness/SearchIndex.ts
An Amazon Q Business index — the document store that data sources sync content into and retrievers query.
Index: Creating Indexes
Section titled “Index: Creating Indexes”Starter Index
import * as AWS from "@alchemy.run/aws";
const index = yield* AWS.QBusiness.Index("Docs", { applicationId: app.applicationId,});Enterprise Index with Extra Capacity
const index = yield* AWS.QBusiness.Index("Docs", { applicationId: app.applicationId, type: "ENTERPRISE", capacityConfiguration: { units: 2 },});Index: Looking up an existing index
Section titled “Index: Looking up an existing index”Index.lookup references an index Alchemy doesn’t manage (created in the
console or by another stack), found by applicationId with indexId or displayName. It is read during
plan/deploy and never created, updated or deleted.
const existing = AWS.QBusiness.Index.lookup({ applicationId, displayName: "main" });SearchRelevantContent
Section titled “SearchRelevantContent”Source:
packages/aws/src/QBusiness/SearchRelevantContent.ts
Runtime binding for the SearchRelevantContent operation (IAM action
qbusiness:SearchRelevantContent), scoped to one Application.
Searches an application’s indexed content through a retriever and
returns the relevant passages without generating an answer — the
RAG retrieval half on its own.
Provide the implementation with
Effect.provide(AWS.QBusiness.SearchRelevantContentHttp).
SearchRelevantContent: Content Retrieval
Section titled “SearchRelevantContent: Content Retrieval”const search = yield* AWS.QBusiness.SearchRelevantContent(app);
const results = yield* search({ queryText: "expense reimbursement deadline", contentSource: { retriever: { retrieverId: retriever.retrieverId } },});StartDataSourceSyncJob
Section titled “StartDataSourceSyncJob”Source:
packages/aws/src/QBusiness/StartDataSourceSyncJob.ts
Runtime binding for the StartDataSourceSyncJob operation (IAM action
qbusiness:StartDataSourceSyncJob), scoped to one DataSource.
Starts a synchronization job that crawls the connector and ingests
its content into the index.
Provide the implementation with
Effect.provide(AWS.QBusiness.StartDataSourceSyncJobHttp).
StartDataSourceSyncJob: Data Source Sync
Section titled “StartDataSourceSyncJob: Data Source Sync”const startSync = yield* AWS.QBusiness.StartDataSourceSyncJob(source);
const { executionId } = yield* startSync();StopDataSourceSyncJob
Section titled “StopDataSourceSyncJob”Source:
packages/aws/src/QBusiness/StopDataSourceSyncJob.ts
Runtime binding for the StopDataSourceSyncJob operation (IAM action
qbusiness:StopDataSourceSyncJob), scoped to one DataSource.
Stops the data source’s running synchronization job.
Provide the implementation with
Effect.provide(AWS.QBusiness.StopDataSourceSyncJobHttp).
StopDataSourceSyncJob: Data Source Sync
Section titled “StopDataSourceSyncJob: Data Source Sync”const stopSync = yield* AWS.QBusiness.StopDataSourceSyncJob(source);
yield* stopSync();UpdateChatControlsConfiguration
Section titled “UpdateChatControlsConfiguration”Source:
packages/aws/src/QBusiness/UpdateChatControlsConfiguration.ts
Runtime binding for the UpdateChatControlsConfiguration operation (IAM action
qbusiness:UpdateChatControlsConfiguration), scoped to one Application.
Updates the application’s chat controls — response scope, blocked
phrases, topic rules, creator mode, and hallucination reduction.
Provide the implementation with
Effect.provide(AWS.QBusiness.UpdateChatControlsConfigurationHttp).
UpdateChatControlsConfiguration: Admin Controls
Section titled “UpdateChatControlsConfiguration: Admin Controls”const updateControls = yield* AWS.QBusiness.UpdateChatControlsConfiguration(app);
yield* updateControls({ responseScope: "ENTERPRISE_CONTENT_ONLY" });UpdateSubscription
Section titled “UpdateSubscription”Source:
packages/aws/src/QBusiness/UpdateSubscription.ts
Runtime binding for the UpdateSubscription operation (IAM action
qbusiness:UpdateSubscription), scoped to one Application.
Changes an existing subscription’s pricing tier.
Provide the implementation with
Effect.provide(AWS.QBusiness.UpdateSubscriptionHttp).
UpdateSubscription: Subscriptions
Section titled “UpdateSubscription: Subscriptions”const updateSubscription = yield* AWS.QBusiness.UpdateSubscription(app);
yield* updateSubscription({ subscriptionId, type: "Q_LITE" });UpdateUser
Section titled “UpdateUser”Source:
packages/aws/src/QBusiness/UpdateUser.ts
Runtime binding for the UpdateUser operation (IAM action
qbusiness:UpdateUser), scoped to one Application.
Adds and removes alias mappings for a user.
Provide the implementation with
Effect.provide(AWS.QBusiness.UpdateUserHttp).
UpdateUser: User Management
Section titled “UpdateUser: User Management”const updateUser = yield* AWS.QBusiness.UpdateUser(app);
yield* updateUser({ userId: "user@example.com", userAliasesToUpdate: [{ userId: "corp\\user" }],});WebExperience
Section titled “WebExperience”Source:
packages/aws/src/QBusiness/WebExperience.ts
An Amazon Q Business web experience — the hosted chat UI end users open to converse with an application.
WebExperience: Creating Web Experiences
Section titled “WebExperience: Creating Web Experiences”Basic Web Experience
import * as AWS from "@alchemy.run/aws";
const web = yield* AWS.QBusiness.WebExperience("Chat", { applicationId: app.applicationId, title: "Company Assistant", welcomeMessage: "Ask me anything about our docs.",});Embeddable Web Experience
const web = yield* AWS.QBusiness.WebExperience("Chat", { applicationId: app.applicationId, origins: ["https://intranet.example.com"], samplePromptsControlMode: "ENABLED",});WebExperience: Looking up an existing web experience
Section titled “WebExperience: Looking up an existing web experience”WebExperience.lookup references a web experience Alchemy doesn’t manage (created in the
console or by another stack), found by applicationId and webExperienceId. It is read during
plan/deploy and never created, updated or deleted.
const chat = AWS.QBusiness.WebExperience.lookup({ applicationId, webExperienceId });