QApps 2023-11-27
- Client: Aws\QApps\QAppsClient
- Service ID: qapps
- Version: 2023-11-27
This page describes the parameters and results for the operations of the QApps (2023-11-27), and shows how to use the Aws\QApps\QAppsClient object to call the described operations. This documentation is specific to the 2023-11-27 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- AssociateLibraryItemReview ( array $params = [] )
- Associates a rating or review for a library item with the user submitting the request.
- AssociateQAppWithUser ( array $params = [] )
- This operation creates a link between the user's identity calling the operation and a specific Q App.
- BatchCreateCategory ( array $params = [] )
- Creates Categories for the Amazon Q Business application environment instance.
- BatchDeleteCategory ( array $params = [] )
- Deletes Categories for the Amazon Q Business application environment instance.
- BatchUpdateCategory ( array $params = [] )
- Updates Categories for the Amazon Q Business application environment instance.
- CreateLibraryItem ( array $params = [] )
- Creates a new library item for an Amazon Q App, allowing it to be discovered and used by other allowed users.
- CreatePresignedUrl ( array $params = [] )
- Creates a presigned URL for an S3 POST operation to upload a file.
- CreateQApp ( array $params = [] )
- Creates a new Amazon Q App based on the provided definition.
- DeleteLibraryItem ( array $params = [] )
- Deletes a library item for an Amazon Q App, removing it from the library so it can no longer be discovered or used by other users.
- DeleteQApp ( array $params = [] )
- Deletes an Amazon Q App owned by the user.
- DescribeQAppPermissions ( array $params = [] )
- Describes read permissions for a Amazon Q App in Amazon Q Business application environment instance.
- DisassociateLibraryItemReview ( array $params = [] )
- Removes a rating or review previously submitted by the user for a library item.
- DisassociateQAppFromUser ( array $params = [] )
- Disassociates a Q App from a user removing the user's access to run the Q App.
- ExportQAppSessionData ( array $params = [] )
- Exports the collected data of a Q App data collection session.
- GetLibraryItem ( array $params = [] )
- Retrieves details about a library item for an Amazon Q App, including its metadata, categories, ratings, and usage statistics.
- GetQApp ( array $params = [] )
- Retrieves the full details of an Q App, including its definition specifying the cards and flow.
- GetQAppSession ( array $params = [] )
- Retrieves the current state and results for an active session of an Amazon Q App.
- GetQAppSessionMetadata ( array $params = [] )
- Retrieves the current configuration of a Q App session.
- ImportDocument ( array $params = [] )
- Uploads a file that can then be used either as a default in a FileUploadCard from Q App definition or as a file that is used inside a single Q App run.
- ListCategories ( array $params = [] )
- Lists the categories of a Amazon Q Business application environment instance.
- ListLibraryItems ( array $params = [] )
- Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.
- ListQAppSessionData ( array $params = [] )
- Lists the collected data of a Q App data collection session.
- ListQApps ( array $params = [] )
- Lists the Amazon Q Apps owned by or associated with the user either because they created it or because they used it from the library in the past.
- ListTagsForResource ( array $params = [] )
- Lists the tags associated with an Amazon Q Apps resource.
- PredictQApp ( array $params = [] )
- Generates an Amazon Q App definition based on either a conversation or a problem statement provided as input.
- StartQAppSession ( array $params = [] )
- Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.
- StopQAppSession ( array $params = [] )
- Stops an active session for an Amazon Q App.
- TagResource ( array $params = [] )
- Associates tags with an Amazon Q Apps resource.
- UntagResource ( array $params = [] )
- Disassociates tags from an Amazon Q Apps resource.
- UpdateLibraryItem ( array $params = [] )
- Updates the library item for an Amazon Q App.
- UpdateLibraryItemMetadata ( array $params = [] )
- Updates the verification status of a library item for an Amazon Q App.
- UpdateQApp ( array $params = [] )
- Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.
- UpdateQAppPermissions ( array $params = [] )
- Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.
- UpdateQAppSession ( array $params = [] )
- Updates the session for a given Q App sessionId.
- UpdateQAppSessionMetadata ( array $params = [] )
- Updates the configuration metadata of a session for a given Q App sessionId.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
AssociateLibraryItemReview
$result = $client->associateLibraryItemReview
([/* ... */]); $promise = $client->associateLibraryItemReviewAsync
([/* ... */]);
Associates a rating or review for a library item with the user submitting the request. This increments the rating count for the specified library item.
Parameter Syntax
$result = $client->associateLibraryItemReview([ 'instanceId' => '<string>', // REQUIRED 'libraryItemId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier for the Amazon Q Business application environment instance.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item to associate the review with.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Increase the rating counter by 1 for the related app for this user
$result = $client->associateLibraryItemReview([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', ]);
AssociateQAppWithUser
$result = $client->associateQAppWithUser
([/* ... */]); $promise = $client->associateQAppWithUserAsync
([/* ... */]);
This operation creates a link between the user's identity calling the operation and a specific Q App. This is useful to mark the Q App as a favorite for the user if the user doesn't own the Amazon Q App so they can still run it and see it in their inventory of Q Apps.
Parameter Syntax
$result = $client->associateQAppWithUser([ 'appId' => '<string>', // REQUIRED 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The ID of the Amazon Q App to associate with the user.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Links an Amazon Q App to the invoker's list of apps
$result = $client->associateQAppWithUser([ 'appId' => '393e77fb-0a30-4f47-ad30-75d71aeaed8a', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
BatchCreateCategory
$result = $client->batchCreateCategory
([/* ... */]); $promise = $client->batchCreateCategoryAsync
([/* ... */]);
Creates Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.
Parameter Syntax
$result = $client->batchCreateCategory([ 'categories' => [ // REQUIRED [ 'color' => '<string>', 'id' => '<string>', 'title' => '<string>', // REQUIRED ], // ... ], 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- categories
-
- Required: Yes
- Type: Array of BatchCreateCategoryInputCategory structures
The list of category objects to be created
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Creates the categories for the library
$result = $client->batchCreateCategory([ 'categories' => [ [ 'id' => '549abfe0-f5c4-45a2-bb9b-c05987a49c6d', 'title' => 'HR', ], [ 'id' => '18cbebaa-196a-4aa5-a840-88d548e07f8f', 'title' => 'Marketing', ], ], 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
BatchDeleteCategory
$result = $client->batchDeleteCategory
([/* ... */]); $promise = $client->batchDeleteCategoryAsync
([/* ... */]);
Deletes Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.
Parameter Syntax
$result = $client->batchDeleteCategory([ 'categories' => ['<string>', ...], // REQUIRED 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- categories
-
- Required: Yes
- Type: Array of strings
The list of IDs of the categories to be deleted.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Deletes the categories in the library
$result = $client->batchDeleteCategory([ 'categories' => [ '9c871ed4-1c41-4065-aefe-321cd4b61cf8', ], 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
BatchUpdateCategory
$result = $client->batchUpdateCategory
([/* ... */]); $promise = $client->batchUpdateCategoryAsync
([/* ... */]);
Updates Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.
Parameter Syntax
$result = $client->batchUpdateCategory([ 'categories' => [ // REQUIRED [ 'color' => '<string>', 'id' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED ], // ... ], 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- categories
-
- Required: Yes
- Type: Array of CategoryInput structures
The list of categories to be updated with their new values.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Updates the categories in the library
$result = $client->batchUpdateCategory([ 'categories' => [ [ 'id' => '549abfe0-f5c4-45a2-bb9b-c05987a49c6d', 'title' => 'HR Management', ], [ 'id' => '18cbebaa-196a-4aa5-a840-88d548e07f8f', 'title' => 'Sales', ], ], 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
CreateLibraryItem
$result = $client->createLibraryItem
([/* ... */]); $promise = $client->createLibraryItemAsync
([/* ... */]);
Creates a new library item for an Amazon Q App, allowing it to be discovered and used by other allowed users.
Parameter Syntax
$result = $client->createLibraryItem([ 'appId' => '<string>', // REQUIRED 'appVersion' => <integer>, // REQUIRED 'categories' => ['<string>', ...], // REQUIRED 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q App to publish to the library.
- appVersion
-
- Required: Yes
- Type: int
The version of the Amazon Q App to publish to the library.
- categories
-
- Required: Yes
- Type: Array of strings
The categories to associate with the library item for easier discovery.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[ 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'isVerified' => true || false, 'libraryItemId' => '<string>', 'ratingCount' => <integer>, 'status' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', ]
Result Details
Members
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was created.
- createdBy
-
- Required: Yes
- Type: string
The user who created the library item.
- isVerified
-
- Type: boolean
Indicates whether the library item has been verified.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the new library item.
- ratingCount
-
- Required: Yes
- Type: int
The number of ratings the library item has received from users.
- status
-
- Required: Yes
- Type: string
The status of the new library item, such as "Published".
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was last updated.
- updatedBy
-
- Type: string
The user who last updated the library item.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Create a Library Item
$result = $client->createLibraryItem([ 'appId' => '7a11f34b-42d4-4bc8-b668-ae4a788dae1e', 'appVersion' => 6, 'categories' => [ '9c871ed4-1c41-4065-aefe-321cd4b61cf8', ], 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
Result syntax:
[ 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'isVerified' => , 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', 'ratingCount' => 0, 'status' => 'PUBLISHED', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', ]
CreatePresignedUrl
$result = $client->createPresignedUrl
([/* ... */]); $promise = $client->createPresignedUrlAsync
([/* ... */]);
Creates a presigned URL for an S3 POST operation to upload a file. You can use this URL to set a default file for a FileUploadCard
in a Q App definition or to provide a file for a single Q App run. The scope
parameter determines how the file will be used, either at the app definition level or the app session level.
Parameter Syntax
$result = $client->createPresignedUrl([ 'appId' => '<string>', // REQUIRED 'cardId' => '<string>', // REQUIRED 'fileContentsSha256' => '<string>', // REQUIRED 'fileName' => '<string>', // REQUIRED 'instanceId' => '<string>', // REQUIRED 'scope' => 'APPLICATION|SESSION', // REQUIRED 'sessionId' => '<string>', ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App the file is associated with.
- cardId
-
- Required: Yes
- Type: string
The unique identifier of the card the file is associated with.
- fileContentsSha256
-
- Required: Yes
- Type: string
The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.
- fileName
-
- Required: Yes
- Type: string
The name of the file to be uploaded.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- scope
-
- Required: Yes
- Type: string
Whether the file is associated with a Q App definition or a specific Q App session.
- sessionId
-
- Type: string
The unique identifier of the Q App session the file is associated with, if applicable.
Result Syntax
[ 'fileId' => '<string>', 'presignedUrl' => '<string>', 'presignedUrlExpiration' => <DateTime>, 'presignedUrlFields' => ['<string>', ...], ]
Result Details
Members
- fileId
-
- Required: Yes
- Type: string
The unique identifier assigned to the file to be uploaded.
- presignedUrl
-
- Required: Yes
- Type: string
The URL for a presigned S3 POST operation used to upload a file.
- presignedUrlExpiration
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the presigned URL will expire in ISO 8601 format.
- presignedUrlFields
-
- Required: Yes
- Type: Associative array of custom strings keys (String) to strings
The form fields to include in the presigned S3 POST operation used to upload a file.
Errors
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Upload a file to a specific session
$result = $client->createPresignedUrl([ 'appId' => '4263767c-d889-4cb2-a8f6-8b649bc66af0', 'cardId' => '82f69028-22a9-4bea-8727-0eabf58e9fed', 'fileContentsSha256' => 'wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=', 'fileName' => 'myFile.txt', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'scope' => 'SESSION', 'sessionId' => '4f0e5b87-9d38-41cd-9eb4-ebce2f2917cc', ]);
Result syntax:
[ 'fileId' => '412aa1b4-341c-45af-936d-da52f8a1a3b4', 'presignedUrl' => 'https://qapps-uploaded-files-us-east-1-c819fab7cf78c9205158297913deb9e0.s3.us-east-1.amazonaws.com/', 'presignedUrlExpiration' =>, 'presignedUrlFields' => [ 'x-amz-checksum-sha256' => 'wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=', 'x-amz-server-side-encryption' => 'aws:kms', 'x-amz-server-side-encryption-aws-kms-key-id' => '0a6a474b-f2ca-46ea-9e72-deea9077d92f', 'x-amz-server-side-encryption-context' => 'eyJBUFBMSUNBVElPTl9JRCI6IjAxMjM0NTY3ODkwMSJ9', ], ]
Example 2: Upload a file into a application
$result = $client->createPresignedUrl([ 'appId' => '4263767c-d889-4cb2-a8f6-8b649bc66af0', 'cardId' => '7a11f34b-42d4-4bc8-b668-ae4a788dae1e', 'fileContentsSha256' => 'wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=', 'fileName' => 'anApplicationFile.txt', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'scope' => 'APPLICATION', ]);
Result syntax:
[ 'fileId' => '412aa1b4-341c-45af-936d-da52f8a1a3b4', 'presignedUrl' => 'https://qapps-uploaded-files-us-east-1-c819fab7cf78c9205158297913deb9e0.s3.us-east-1.amazonaws.com/', 'presignedUrlExpiration' =>, 'presignedUrlFields' => [ 'x-amz-checksum-sha256' => 'wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=', 'x-amz-server-side-encryption' => 'aws:kms', 'x-amz-server-side-encryption-aws-kms-key-id' => '0a6a474b-f2ca-46ea-9e72-deea9077d92f', 'x-amz-server-side-encryption-context' => 'eyJBUFBMSUNBVElPTl9JRCI6IjAxMjM0NTY3ODkwMSJ9', ], ]
CreateQApp
$result = $client->createQApp
([/* ... */]); $promise = $client->createQAppAsync
([/* ... */]);
Creates a new Amazon Q App based on the provided definition. The Q App definition specifies the cards and flow of the Q App. This operation also calculates the dependencies between the cards by inspecting the references in the prompts.
Parameter Syntax
$result = $client->createQApp([ 'appDefinition' => [ // REQUIRED 'cards' => [ // REQUIRED [ 'fileUpload' => [ 'allowOverride' => true || false, 'fileId' => '<string>', 'filename' => '<string>', 'id' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'formInput' => [ 'computeMode' => 'append|replace', 'id' => '<string>', // REQUIRED 'metadata' => [ // REQUIRED 'schema' => [ // REQUIRED ], ], 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'qPlugin' => [ 'actionIdentifier' => '<string>', 'id' => '<string>', // REQUIRED 'pluginId' => '<string>', // REQUIRED 'prompt' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'qQuery' => [ 'attributeFilter' => [ 'andAllFilters' => [ [...], // RECURSIVE // ... ], 'containsAll' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'containsAny' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'equalsTo' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThan' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThanOrEquals' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThan' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThanOrEquals' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'notFilter' => [...], // RECURSIVE 'orAllFilters' => [ [...], // RECURSIVE // ... ], ], 'id' => '<string>', // REQUIRED 'outputSource' => 'approved-sources|llm', 'prompt' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'textInput' => [ 'defaultValue' => '<string>', 'id' => '<string>', // REQUIRED 'placeholder' => '<string>', 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], ], // ... ], 'initialPrompt' => '<string>', ], 'description' => '<string>', 'instanceId' => '<string>', // REQUIRED 'tags' => ['<string>', ...], 'title' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appDefinition
-
- Required: Yes
- Type: AppDefinitionInput structure
The definition of the new Q App, specifying the cards and flow.
- description
-
- Type: string
The description of the new Q App.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- tags
-
- Type: Associative array of custom strings keys (String) to strings
Optional tags to associate with the new Q App.
- title
-
- Required: Yes
- Type: string
The title of the new Q App.
Result Syntax
[ 'appArn' => '<string>', 'appId' => '<string>', 'appVersion' => <integer>, 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'description' => '<string>', 'initialPrompt' => '<string>', 'requiredCapabilities' => ['<string>', ...], 'status' => 'PUBLISHED|DRAFT|DELETED', 'title' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', ]
Result Details
Members
- appArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the new Q App.
- appId
-
- Required: Yes
- Type: string
The unique identifier of the new Q App.
- appVersion
-
- Required: Yes
- Type: int
The version of the new Q App.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Q App was created.
- createdBy
-
- Required: Yes
- Type: string
The user who created the Q App.
- description
-
- Type: string
The description of the new Q App.
- initialPrompt
-
- Type: string
The initial prompt displayed when the Q App is started.
- requiredCapabilities
-
- Type: Array of strings
The capabilities required to run the Q App, such as file upload or third-party integrations.
- status
-
- Required: Yes
- Type: string
The status of the new Q App, such as "Created".
- title
-
- Required: Yes
- Type: string
The title of the new Q App.
- updatedAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Q App was last updated.
- updatedBy
-
- Required: Yes
- Type: string
The user who last updated the Q App.
Errors
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ContentTooLargeException:
The requested operation could not be completed because the content exceeds the maximum allowed size.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: A basic application with 1 text input card and 1 output card
$result = $client->createQApp([ 'appDefinition' => [ 'cards' => [ [ 'textInput' => [ 'type' => 'text-input', 'id' => '4cf94d96-8819-45c2-98cc-58c56b35c72f', 'title' => 'Color Base', ], ], [ 'qQuery' => [ 'type' => 'q-query', 'id' => '18870b94-1e63-40e0-8c12-669c90ac5acc', 'prompt' => 'Recommend me a list of colors that go well with @4cf94d96-8819-45c2-98cc-58c56b35c72f', 'title' => 'Recommended Palette', ], ], ], 'initialPrompt' => 'Create an app that recommend a list of colors based on input.', ], 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'title' => 'Color Palette Generator', ]);
Result syntax:
[ 'appArn' => 'arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appId' => '7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appVersion' => 1, 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'initialPrompt' => 'Create an app that recommend a list of colors based on input.', 'requiredCapabilities' => [ 'CreatorMode', ], 'status' => 'DRAFT', 'title' => 'Color Palette Generator', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', ]
DeleteLibraryItem
$result = $client->deleteLibraryItem
([/* ... */]); $promise = $client->deleteLibraryItemAsync
([/* ... */]);
Deletes a library item for an Amazon Q App, removing it from the library so it can no longer be discovered or used by other users.
Parameter Syntax
$result = $client->deleteLibraryItem([ 'instanceId' => '<string>', // REQUIRED 'libraryItemId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item to delete.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Delete a library item
$result = $client->deleteLibraryItem([ 'instanceId' => '3642ba81-344c-42fd-a480-9119a5a5f26b', 'libraryItemId' => '72088fd4-78b6-43da-bfb8-8621323c3cfb', ]);
DeleteQApp
$result = $client->deleteQApp
([/* ... */]); $promise = $client->deleteQAppAsync
([/* ... */]);
Deletes an Amazon Q App owned by the user. If the Q App was previously published to the library, it is also removed from the library.
Parameter Syntax
$result = $client->deleteQApp([ 'appId' => '<string>', // REQUIRED 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App to delete.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Delete an Amazon Q App
$result = $client->deleteQApp([ 'appId' => '393e77fb-0a30-4f47-ad30-75d71aeaed8a', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
DescribeQAppPermissions
$result = $client->describeQAppPermissions
([/* ... */]); $promise = $client->describeQAppPermissionsAsync
([/* ... */]);
Describes read permissions for a Amazon Q App in Amazon Q Business application environment instance.
Parameter Syntax
$result = $client->describeQAppPermissions([ 'appId' => '<string>', // REQUIRED 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q App for which to retrieve permissions.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[ 'appId' => '<string>', 'permissions' => [ [ 'action' => 'read|write', 'principal' => [ 'email' => '<string>', 'userId' => '<string>', 'userType' => 'owner|user', ], ], // ... ], 'resourceArn' => '<string>', ]
Result Details
Members
- appId
-
- Type: string
The unique identifier of the Amazon Q App for which permissions are returned.
- permissions
-
- Type: Array of PermissionOutput structures
The list of permissions granted for the Amazon Q App.
- resourceArn
-
- Type: string
The Amazon Resource Name (ARN) of the Amazon Q App for which permissions are returned.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Describe permissions for the app
$result = $client->describeQAppPermissions([ 'appId' => 'fe0acf86-49e5-4def-a0c2-40ce0cafee14', 'instanceId' => '01793661-ad73-4c7d-8eaa-1c95a10151c2', ]);
Result syntax:
[ 'appId' => 'fe0acf86-49e5-4def-a0c2-40ce0cafee14', 'permissions' => [ [ 'action' => 'write', 'principal' => [ 'email' => 'user1@example.com', 'userId' => 'f8f15330-b091-708b-d46e-adb0d914b699', ], ], [ 'action' => 'read', 'principal' => [ 'email' => 'user2@example.com', 'userId' => 'c81133d0-10d1-70eb-aaa3-d427ea6fc0f3', ], ], ], 'resourceArn' => 'arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14', ]
DisassociateLibraryItemReview
$result = $client->disassociateLibraryItemReview
([/* ... */]); $promise = $client->disassociateLibraryItemReviewAsync
([/* ... */]);
Removes a rating or review previously submitted by the user for a library item.
Parameter Syntax
$result = $client->disassociateLibraryItemReview([ 'instanceId' => '<string>', // REQUIRED 'libraryItemId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item to remove the review from.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Decrease the rating counter by 1 for the related app for this user
$result = $client->disassociateLibraryItemReview([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', ]);
DisassociateQAppFromUser
$result = $client->disassociateQAppFromUser
([/* ... */]); $promise = $client->disassociateQAppFromUserAsync
([/* ... */]);
Disassociates a Q App from a user removing the user's access to run the Q App.
Parameter Syntax
$result = $client->disassociateQAppFromUser([ 'appId' => '<string>', // REQUIRED 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App to disassociate from the user.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Unlinks an Amazon Q App from the invoker's list of apps
$result = $client->disassociateQAppFromUser([ 'appId' => '393e77fb-0a30-4f47-ad30-75d71aeaed8a', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
ExportQAppSessionData
$result = $client->exportQAppSessionData
([/* ... */]); $promise = $client->exportQAppSessionDataAsync
([/* ... */]);
Exports the collected data of a Q App data collection session.
Parameter Syntax
$result = $client->exportQAppSessionData([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App data collection session.
Result Syntax
[ 'csvFileLink' => '<string>', 'expiresAt' => <DateTime>, 'sessionArn' => '<string>', ]
Result Details
Members
- csvFileLink
-
- Required: Yes
- Type: string
The link where the exported Q App session data can be downloaded from.
- expiresAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time when the link for the exported Q App session data expires.
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the Q App data collection session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
GetLibraryItem
$result = $client->getLibraryItem
([/* ... */]); $promise = $client->getLibraryItemAsync
([/* ... */]);
Retrieves details about a library item for an Amazon Q App, including its metadata, categories, ratings, and usage statistics.
Parameter Syntax
$result = $client->getLibraryItem([ 'appId' => '<string>', 'instanceId' => '<string>', // REQUIRED 'libraryItemId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Type: string
The unique identifier of the Amazon Q App associated with the library item.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item to retrieve.
Result Syntax
[ 'appId' => '<string>', 'appVersion' => <integer>, 'categories' => [ [ 'appCount' => <integer>, 'color' => '<string>', 'id' => '<string>', 'title' => '<string>', ], // ... ], 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'isRatedByUser' => true || false, 'isVerified' => true || false, 'libraryItemId' => '<string>', 'ratingCount' => <integer>, 'status' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', 'userCount' => <integer>, ]
Result Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App associated with the library item.
- appVersion
-
- Required: Yes
- Type: int
The version of the Q App associated with the library item.
- categories
-
- Required: Yes
- Type: Array of Category structures
The categories associated with the library item for discovery.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was created.
- createdBy
-
- Required: Yes
- Type: string
The user who created the library item.
- isRatedByUser
-
- Type: boolean
Whether the current user has rated the library item.
- isVerified
-
- Type: boolean
Indicates whether the library item has been verified.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item.
- ratingCount
-
- Required: Yes
- Type: int
The number of ratings the library item has received from users.
- status
-
- Required: Yes
- Type: string
The status of the library item, such as "Published".
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was last updated.
- updatedBy
-
- Type: string
The user who last updated the library item.
- userCount
-
- Type: int
The number of users who have associated the Q App with their account.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Retrieve a library item
$result = $client->getLibraryItem([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'libraryItemId' => '18cbebaa-196a-4aa5-a840-88d548e07f8f', ]);
Result syntax:
[ 'appId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'appVersion' => 1, 'categories' => [ [ 'id' => '9c871ed4-1c41-4065-aefe-321cd4b61cf8', 'title' => 'HR', ], [ 'id' => 'fdc4b483-c4e2-44c9-b4b2-6c850bbdb579', 'title' => 'General', ], [ 'id' => 'c1c4e374-118c-446f-81fb-cba6225d88da', 'title' => 'IT', ], ], 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'isRatedByUser' => , 'isVerified' => , 'libraryItemId' => '18cbebaa-196a-4aa5-a840-88d548e07f8f', 'ratingCount' => 0, 'status' => 'PUBLISHED', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'userCount' => 1, ]
GetQApp
$result = $client->getQApp
([/* ... */]); $promise = $client->getQAppAsync
([/* ... */]);
Retrieves the full details of an Q App, including its definition specifying the cards and flow.
Parameter Syntax
$result = $client->getQApp([ 'appId' => '<string>', // REQUIRED 'appVersion' => <integer>, 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App to retrieve.
- appVersion
-
- Type: int
The version of the Q App.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[ 'appArn' => '<string>', 'appDefinition' => [ 'appDefinitionVersion' => '<string>', 'canEdit' => true || false, 'cards' => [ [ 'fileUpload' => [ 'allowOverride' => true || false, 'dependencies' => ['<string>', ...], 'fileId' => '<string>', 'filename' => '<string>', 'id' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'formInput' => [ 'computeMode' => 'append|replace', 'dependencies' => ['<string>', ...], 'id' => '<string>', 'metadata' => [ 'schema' => [ ], ], 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'qPlugin' => [ 'actionIdentifier' => '<string>', 'dependencies' => ['<string>', ...], 'id' => '<string>', 'pluginId' => '<string>', 'pluginType' => 'SERVICE_NOW|SALESFORCE|JIRA|ZENDESK|CUSTOM|ASANA|ATLASSIAN_CONFLUENCE|GOOGLE_CALENDAR|JIRA_CLOUD|MICROSOFT_EXCHANGE|MICROSOFT_TEAMS|PAGERDUTY_ADVANCE|SALESFORCE_CRM|SERVICENOW_NOW_PLATFORM|SMARTSHEET|ZENDESK_SUITE', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'qQuery' => [ 'attributeFilter' => [ 'andAllFilters' => [ [...], // RECURSIVE // ... ], 'containsAll' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'containsAny' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'equalsTo' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThan' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThanOrEquals' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThan' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThanOrEquals' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'notFilter' => [...], // RECURSIVE 'orAllFilters' => [ [...], // RECURSIVE // ... ], ], 'dependencies' => ['<string>', ...], 'id' => '<string>', 'memoryReferences' => ['<string>', ...], 'outputSource' => 'approved-sources|llm', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'textInput' => [ 'defaultValue' => '<string>', 'dependencies' => ['<string>', ...], 'id' => '<string>', 'placeholder' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], ], // ... ], ], 'appId' => '<string>', 'appVersion' => <integer>, 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'description' => '<string>', 'initialPrompt' => '<string>', 'requiredCapabilities' => ['<string>', ...], 'status' => 'PUBLISHED|DRAFT|DELETED', 'title' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', ]
Result Details
Members
- appArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the Q App.
- appDefinition
-
- Required: Yes
- Type: AppDefinition structure
The full definition of the Q App, specifying the cards and flow.
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App.
- appVersion
-
- Required: Yes
- Type: int
The version of the Q App.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Q App was created.
- createdBy
-
- Required: Yes
- Type: string
The user who created the Q App.
- description
-
- Type: string
The description of the Q App.
- initialPrompt
-
- Type: string
The initial prompt displayed when the Q App is started.
- requiredCapabilities
-
- Type: Array of strings
The capabilities required to run the Q App, such as file upload or third-party integrations.
- status
-
- Required: Yes
- Type: string
The status of the Q App.
- title
-
- Required: Yes
- Type: string
The title of the Q App.
- updatedAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Q App was last updated.
- updatedBy
-
- Required: Yes
- Type: string
The user who last updated the Q App.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: A basic application with 1 text input card and 1 output card
$result = $client->getQApp([ 'appId' => '3d110749-efc3-427c-87e8-15e966e5c168', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
Result syntax:
[ 'appArn' => 'arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appDefinition' => [ 'appDefinitionVersion' => '1', 'cards' => [ [ 'textInput' => [ 'type' => 'text-input', 'dependencies' => [ ], 'id' => '4cf94d96-8819-45c2-98cc-58c56b35c72f', 'title' => 'Color Base', ], ], [ 'qQuery' => [ 'type' => 'q-query', 'dependencies' => [ '91e4513d-6981-454a-9329-329c9302eef4', ], 'id' => '18870b94-1e63-40e0-8c12-669c90ac5acc', 'outputSource' => 'llm', 'prompt' => 'Recommend me a list of colors that go well with @91e4513d-6981-454a-9329-329c9302eef4 ', 'title' => 'Recommended Palette', ], ], ], ], 'appId' => '7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appVersion' => 1, 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'status' => 'DRAFT', 'title' => 'Color Palette Generator', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', ]
GetQAppSession
$result = $client->getQAppSession
([/* ... */]); $promise = $client->getQAppSessionAsync
([/* ... */]);
Retrieves the current state and results for an active session of an Amazon Q App.
Parameter Syntax
$result = $client->getQAppSession([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session to retrieve.
Result Syntax
[ 'appVersion' => <integer>, 'cardStatus' => [ '<UUID>' => [ 'currentState' => 'IN_PROGRESS|WAITING|COMPLETED|ERROR', 'currentValue' => '<string>', 'submissions' => [ [ 'submissionId' => '<string>', 'timestamp' => <DateTime>, 'value' => [ ], ], // ... ], ], // ... ], 'latestPublishedAppVersion' => <integer>, 'sessionArn' => '<string>', 'sessionId' => '<string>', 'sessionName' => '<string>', 'status' => 'IN_PROGRESS|WAITING|COMPLETED|ERROR', 'userIsHost' => true || false, ]
Result Details
Members
- appVersion
-
- Type: int
The version of the Q App used for the session.
- cardStatus
-
- Required: Yes
- Type: Associative array of custom strings keys (UUID) to CardStatus structures
The current status for each card in the Q App session.
- latestPublishedAppVersion
-
- Type: int
The latest published version of the Q App used for the session.
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the Q App session.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session.
- sessionName
-
- Type: string
The name of the Q App session.
- status
-
- Required: Yes
- Type: string
The current status of the Q App session.
- userIsHost
-
- Type: boolean
Indicates whether the current user is the owner of the Q App data collection session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Retrieves an existing session for an Amazon Q App
$result = $client->getQAppSession([ 'instanceId' => '288ae830-1df2-4871-b6c0-4314d74dadef', 'sessionId' => '1fca878e-64c5-4dc4-b1d9-c93effed4e82', ]);
Result syntax:
[ 'cardStatus' => [ '1e6caeac-b481-45ff-a082-8b9a4a0b72e8' => [ 'currentState' => 'COMPLETED', 'currentValue' => 'Based on the responses, the most popular color is red, with 1 vote from the user "user1".', ], '6fb5b404-3b7b-48a4-8a8b-56406922a606' => [ 'currentState' => 'COMPLETED', 'currentValue' => '', 'submissions' => [ [ 'value' => [ ], 'submissionId' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'timestamp' =>, ], ], ], ], 'sessionArn' => 'arn:aws:qapps:us-west-2:0123456789012:application/a929ecd6-5765-4ec7-bd3e-2ca90098b18e/qapp/65e7dce7-226a-47f9-b689-22850becef89/session/1fca878e-64c5-4dc4-b1d9-c93effed4e82', 'sessionId' => '1fca878e-64c5-4dc4-b1d9-c93effed4e82', 'status' => 'COMPLETED', ]
GetQAppSessionMetadata
$result = $client->getQAppSessionMetadata
([/* ... */]); $promise = $client->getQAppSessionMetadataAsync
([/* ... */]);
Retrieves the current configuration of a Q App session.
Parameter Syntax
$result = $client->getQAppSessionMetadata([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session.
Result Syntax
[ 'sessionArn' => '<string>', 'sessionId' => '<string>', 'sessionName' => '<string>', 'sessionOwner' => true || false, 'sharingConfiguration' => [ 'acceptResponses' => true || false, 'enabled' => true || false, 'revealCards' => true || false, ], ]
Result Details
Members
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the Q App session.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session.
- sessionName
-
- Type: string
The name of the Q App session.
- sessionOwner
-
- Type: boolean
Indicates whether the current user is the owner of the Q App session.
- sharingConfiguration
-
- Required: Yes
- Type: SessionSharingConfiguration structure
The sharing configuration of the Q App data collection session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Retrieves an existing session metadata for an Amazon Q App
$result = $client->getQAppSessionMetadata([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'sessionId' => '56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb', ]);
Result syntax:
[ 'sessionArn' => 'arn:aws:qapps:us-west-2:0123456789012:application/cbea8329-41c0-4566-a112-19250921a220/qapp/387ccac9-4717-489f-841f-729b7d7de355/session/56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb', 'sessionId' => '56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb', 'sessionName' => 'Trip itinerary collection session', 'sessionOwner' => 1, 'sharingConfiguration' => [ 'acceptResponses' => 1, 'enabled' => 1, 'revealCards' => , ], ]
ImportDocument
$result = $client->importDocument
([/* ... */]); $promise = $client->importDocumentAsync
([/* ... */]);
Uploads a file that can then be used either as a default in a FileUploadCard
from Q App definition or as a file that is used inside a single Q App run. The purpose of the document is determined by a scope parameter that indicates whether it is at the app definition level or at the app session level.
Parameter Syntax
$result = $client->importDocument([ 'appId' => '<string>', // REQUIRED 'cardId' => '<string>', // REQUIRED 'fileContentsBase64' => '<string>', // REQUIRED 'fileName' => '<string>', // REQUIRED 'instanceId' => '<string>', // REQUIRED 'scope' => 'APPLICATION|SESSION', // REQUIRED 'sessionId' => '<string>', ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App the file is associated with.
- cardId
-
- Required: Yes
- Type: string
The unique identifier of the card the file is associated with.
- fileContentsBase64
-
- Required: Yes
- Type: string
The base64-encoded contents of the file to upload.
- fileName
-
- Required: Yes
- Type: string
The name of the file being uploaded.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- scope
-
- Required: Yes
- Type: string
Whether the file is associated with a Q App definition or a specific Q App session.
- sessionId
-
- Type: string
The unique identifier of the Q App session the file is associated with, if applicable.
Result Syntax
[ 'fileId' => '<string>', ]
Result Details
Members
- fileId
-
- Type: string
The unique identifier assigned to the uploaded file.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ContentTooLargeException:
The requested operation could not be completed because the content exceeds the maximum allowed size.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Upload a file to a specific session
$result = $client->importDocument([ 'appId' => '4263767c-d889-4cb2-a8f6-8b649bc66af0', 'cardId' => '82f69028-22a9-4bea-8727-0eabf58e9fed', 'fileContentsBase64' => 'data:text/plain;base64,SomeFileEncodedInBase64', 'fileName' => 'myFile.txt', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'scope' => 'SESSION', 'sessionId' => '4f0e5b87-9d38-41cd-9eb4-ebce2f2917cc', ]);
Result syntax:
[ 'fileId' => '412aa1b4-341c-45af-936d-da52f8a1a3b4', ]
Example 2: Upload a file into a application
$result = $client->importDocument([ 'appId' => '4263767c-d889-4cb2-a8f6-8b649bc66af0', 'cardId' => '7a11f34b-42d4-4bc8-b668-ae4a788dae1e', 'fileContentsBase64' => 'data:text/plain;base64,SomeFileEncodedInBase64', 'fileName' => 'anApplicationFile.txt', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'scope' => 'APPLICATION', ]);
Result syntax:
[ 'fileId' => 'bc1a0cc9-076a-4e82-9a6c-f4d2d8a22489', ]
ListCategories
$result = $client->listCategories
([/* ... */]); $promise = $client->listCategoriesAsync
([/* ... */]);
Lists the categories of a Amazon Q Business application environment instance. For more information, see Custom labels for Amazon Q Apps.
Parameter Syntax
$result = $client->listCategories([ 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
Result Syntax
[ 'categories' => [ [ 'appCount' => <integer>, 'color' => '<string>', 'id' => '<string>', 'title' => '<string>', ], // ... ], ]
Result Details
Members
- categories
-
- Type: Array of Category structures
The categories of a Amazon Q Business application environment instance.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: List categories available for the library items in this instance
$result = $client->listCategories([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
Result syntax:
[ 'categories' => [ [ 'appCount' => 10, 'color' => '#FF6600', 'id' => '549abfe0-f5c4-45a2-bb9b-c05987a49c6d', 'title' => 'HR', ], [ 'appCount' => 11, 'color' => '#FFFF00', 'id' => '18cbebaa-196a-4aa5-a840-88d548e07f8f', 'title' => 'Marketing', ], ], ]
ListLibraryItems
$result = $client->listLibraryItems
([/* ... */]); $promise = $client->listLibraryItemsAsync
([/* ... */]);
Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.
Parameter Syntax
$result = $client->listLibraryItems([ 'categoryId' => '<string>', 'instanceId' => '<string>', // REQUIRED 'limit' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- categoryId
-
- Type: string
Optional category to filter the library items by.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- limit
-
- Type: int
The maximum number of library items to return in the response.
- nextToken
-
- Type: string
The token to request the next page of results.
Result Syntax
[ 'libraryItems' => [ [ 'appId' => '<string>', 'appVersion' => <integer>, 'categories' => [ [ 'appCount' => <integer>, 'color' => '<string>', 'id' => '<string>', 'title' => '<string>', ], // ... ], 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'isRatedByUser' => true || false, 'isVerified' => true || false, 'libraryItemId' => '<string>', 'ratingCount' => <integer>, 'status' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', 'userCount' => <integer>, ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- libraryItems
-
- Type: Array of LibraryItemMember structures
The list of library items meeting the request criteria.
- nextToken
-
- Type: string
The token to use to request the next page of results.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: List at most 3 library items for this instance
$result = $client->listLibraryItems([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'limit' => 3, ]);
Result syntax:
[ 'libraryItems' => [ [ 'appId' => '7a11f34b-42d4-4bc8-b668-ae4a788dae1e', 'appVersion' => 6, 'categories' => [ [ 'id' => '9c871ed4-1c41-4065-aefe-321cd4b61cf8', 'title' => 'HR', ], [ 'id' => 'c1c4e374-118c-446f-81fb-cba6225d88da', 'title' => 'IT', ], ], 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'isRatedByUser' => 1, 'isVerified' => , 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', 'ratingCount' => 3, 'status' => 'PUBLISHED', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'userCount' => 5, ], [ 'appId' => '201272ac-d474-4a97-991c-5520dae04026', 'appVersion' => 1, 'categories' => [ [ 'id' => 'fdc4b483-c4e2-44c9-b4b2-6c850bbdb579', 'title' => 'General', ], ], 'createdAt' => , 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'isRatedByUser' => , 'isVerified' => , 'libraryItemId' => '18cbebaa-196a-4aa5-a840-88d548e07f8f', 'ratingCount' => 5, 'status' => 'PUBLISHED', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'userCount' => 8, ], [ 'appId' => '1802f57f-079a-4b5b-839a-79bbe2e21b3c', 'appVersion' => 1, 'categories' => [ [ 'id' => 'fdc4b483-c4e2-44c9-b4b2-6c850bbdb579', 'title' => 'General', ], ], 'createdAt' => , 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'isRatedByUser' => , 'isVerified' => , 'libraryItemId' => '549abfe0-f5c4-45a2-bb9b-c05987a49c6d', 'ratingCount' => 8, 'status' => 'PUBLISHED', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'userCount' => 12, ], ], 'nextToken' => 'YW5vdGhlclRva2VuIQ==', ]
ListQAppSessionData
$result = $client->listQAppSessionData
([/* ... */]); $promise = $client->listQAppSessionDataAsync
([/* ... */]);
Lists the collected data of a Q App data collection session.
Parameter Syntax
$result = $client->listQAppSessionData([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App data collection session.
Result Syntax
[ 'nextToken' => '<string>', 'sessionArn' => '<string>', 'sessionData' => [ [ 'cardId' => '<string>', 'submissionId' => '<string>', 'timestamp' => <DateTime>, 'user' => [ 'userId' => '<string>', ], 'value' => [ ], ], // ... ], 'sessionId' => '<string>', ]
Result Details
Members
- nextToken
-
- Type: string
The pagination token that indicates the next set of results to retrieve.
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the Q App data collection session.
- sessionData
-
- Type: Array of QAppSessionData structures
The collected responses of a Q App session.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App data collection session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
ListQApps
$result = $client->listQApps
([/* ... */]); $promise = $client->listQAppsAsync
([/* ... */]);
Lists the Amazon Q Apps owned by or associated with the user either because they created it or because they used it from the library in the past. The user identity is extracted from the credentials used to invoke this operation..
Parameter Syntax
$result = $client->listQApps([ 'instanceId' => '<string>', // REQUIRED 'limit' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- limit
-
- Type: int
The maximum number of Q Apps to return in the response.
- nextToken
-
- Type: string
The token to request the next page of results.
Result Syntax
[ 'apps' => [ [ 'appArn' => '<string>', 'appId' => '<string>', 'canEdit' => true || false, 'createdAt' => <DateTime>, 'description' => '<string>', 'isVerified' => true || false, 'status' => '<string>', 'title' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- apps
-
- Required: Yes
- Type: Array of UserAppItem structures
The list of Amazon Q Apps meeting the request criteria.
- nextToken
-
- Type: string
The token to use to request the next page of results.
Errors
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: List at most 3 Amazon Q Apps in an Q Business application
$result = $client->listQApps([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'limit' => 3, ]);
Result syntax:
[ 'apps' => [ [ 'appArn' => 'arn:aws:qapps:us-west-2:..../7b9fe303-18bb-4643-952c-bfcf9f4c427f', 'appId' => '7b9fe303-18bb-4643-952c-bfcf9f4c427f', 'createdAt' =>, 'description' => 'Description 1', 'isVerified' => , 'status' => 'DRAFT', 'title' => 'App 1', ], [ 'appArn' => 'arn:aws:qapps:us-west-2:..../dd178fd6-ad3d-49b3-a32d-e915cf423e37', 'appId' => 'dd178fd6-ad3d-49b3-a32d-e915cf423e37', 'createdAt' => , 'description' => 'Description 2', 'isVerified' => 1, 'status' => 'PUBLISHED', 'title' => 'App 2', ], [ 'appArn' => 'arn:aws:qapps:us-west-2:..../3274b744-1a13-4aad-953f-eda2e4149e6e', 'appId' => '3274b744-1a13-4aad-953f-eda2e4149e6e', 'createdAt' => , 'description' => 'Description 3', 'isVerified' => , 'status' => 'DRAFT', 'title' => 'App 3', ], ], 'nextToken' => 'bXlzdGVyaW91c1BhZ2luYXRpb25Ub2tlbg==', ]
Example 2: Retrieve the next page of Amazon Q Apps
$result = $client->listQApps([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'limit' => 3, 'nextToken' => 'bXlzdGVyaW91c1BhZ2luYXRpb25Ub2tlbg==', ]);
Result syntax:
[ 'apps' => [ [ 'appArn' => 'arn:aws:qapps:us-west-2:..../bec8ee64-2635-41e8-aace-e1e418f4f295', 'appId' => 'bec8ee64-2635-41e8-aace-e1e418f4f295', 'createdAt' =>, 'description' => 'Description 4', 'isVerified' => 1, 'status' => 'PUBLISHED', 'title' => 'App 4', ], [ 'appArn' => 'arn:aws:qapps:us-west-2:..../c380a45d-bd77-45b0-a0e5-8a266c1d8bc4', 'appId' => 'c380a45d-bd77-45b0-a0e5-8a266c1d8bc4', 'createdAt' => , 'description' => 'Description 5', 'isVerified' => , 'status' => 'PUBLISHED', 'title' => 'App 5', ], [ 'appArn' => 'arn:aws:qapps:us-west-2:..../afc4ee80-9722-4396-85a6-7aeaff52c177', 'appId' => 'afc4ee80-9722-4396-85a6-7aeaff52c177', 'createdAt' => , 'description' => 'Description 6', 'isVerified' => , 'status' => 'PUBLISHED', 'title' => 'App 6', ], ], 'nextToken' => 'YW5vdGhlclRva2VuIQ==', ]
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
Lists the tags associated with an Amazon Q Apps resource.
Parameter Syntax
$result = $client->listTagsForResource([ 'resourceARN' => '<string>', // REQUIRED ]);
Parameter Details
Members
- resourceARN
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource whose tags should be listed.
Result Syntax
[ 'tags' => ['<string>', ...], ]
Result Details
Members
- tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
The list of tags that are assigned to the resource.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: A call to list tags for a resource
$result = $client->listTagsForResource([ 'resourceARN' => 'arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0', ]);
Result syntax:
[ 'tags' => [ 'department' => 'HR', ], ]
PredictQApp
$result = $client->predictQApp
([/* ... */]); $promise = $client->predictQAppAsync
([/* ... */]);
Generates an Amazon Q App definition based on either a conversation or a problem statement provided as input.The resulting app definition can be used to call CreateQApp
. This API doesn't create Amazon Q Apps directly.
Parameter Syntax
$result = $client->predictQApp([ 'instanceId' => '<string>', // REQUIRED 'options' => [ 'conversation' => [ [ 'body' => '<string>', // REQUIRED 'type' => 'USER|SYSTEM', // REQUIRED ], // ... ], 'problemStatement' => '<string>', ], ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- options
-
- Type: PredictQAppInputOptions structure
The input to generate the Q App definition from, either a conversation or problem statement.
Result Syntax
[ 'app' => [ 'appDefinition' => [ 'cards' => [ [ 'fileUpload' => [ 'allowOverride' => true || false, 'fileId' => '<string>', 'filename' => '<string>', 'id' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'formInput' => [ 'computeMode' => 'append|replace', 'id' => '<string>', 'metadata' => [ 'schema' => [ ], ], 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'qPlugin' => [ 'actionIdentifier' => '<string>', 'id' => '<string>', 'pluginId' => '<string>', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'qQuery' => [ 'attributeFilter' => [ 'andAllFilters' => [ [...], // RECURSIVE // ... ], 'containsAll' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'containsAny' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'equalsTo' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThan' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThanOrEquals' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThan' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThanOrEquals' => [ 'name' => '<string>', 'value' => [ 'dateValue' => <DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'notFilter' => [...], // RECURSIVE 'orAllFilters' => [ [...], // RECURSIVE // ... ], ], 'id' => '<string>', 'outputSource' => 'approved-sources|llm', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], 'textInput' => [ 'defaultValue' => '<string>', 'id' => '<string>', 'placeholder' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', ], ], // ... ], 'initialPrompt' => '<string>', ], 'description' => '<string>', 'title' => '<string>', ], 'problemStatement' => '<string>', ]
Result Details
Members
- app
-
- Required: Yes
- Type: PredictAppDefinition structure
The generated Q App definition.
- problemStatement
-
- Required: Yes
- Type: string
The problem statement extracted from the input conversation, if provided.
Errors
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
StartQAppSession
$result = $client->startQAppSession
([/* ... */]); $promise = $client->startQAppSessionAsync
([/* ... */]);
Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.
Each Q App session will be condensed into a single conversation in the web experience.
Parameter Syntax
$result = $client->startQAppSession([ 'appId' => '<string>', // REQUIRED 'appVersion' => <integer>, // REQUIRED 'initialValues' => [ [ 'cardId' => '<string>', // REQUIRED 'submissionMutation' => [ 'mutationType' => 'edit|delete|add', // REQUIRED 'submissionId' => '<string>', // REQUIRED ], 'value' => '<string>', // REQUIRED ], // ... ], 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', 'tags' => ['<string>', ...], ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App to start a session for.
- appVersion
-
- Required: Yes
- Type: int
The version of the Q App to use for the session.
- initialValues
-
- Type: Array of CardValue structures
Optional initial input values to provide for the Q App session.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Type: string
The unique identifier of the a Q App session.
- tags
-
- Type: Associative array of custom strings keys (String) to strings
Optional tags to associate with the new Q App session.
Result Syntax
[ 'sessionArn' => '<string>', 'sessionId' => '<string>', ]
Result Details
Members
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the new Q App session.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the new or retrieved Q App session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Start a session for an Amazon Q App using version 1, passing in initial values for one card
$result = $client->startQAppSession([ 'appId' => '65e7dce7-226a-47f9-b689-22850becef89', 'appVersion' => 1, 'initialValues' => [ [ 'value' => 'What is the circumference of Earth?', 'cardId' => '6fb5b404-3b7b-48a4-8a8b-56406922a606', ], ], 'instanceId' => '4cc5e4c2-d2a2-4188-a114-9ca125b4aedc', ]);
Result syntax:
[ 'sessionArn' => 'arn:aws:qapps:us-west-2:0123456789012:application/a929ecd6-5765-4ec7-bd3e-2ca90098b18e/qapp/65e7dce7-226a-47f9-b689-22850becef89/session/1fca878e-64c5-4dc4-b1d9-c93effed4e82', 'sessionId' => '1fca878e-64c5-4dc4-b1d9-c93effed4e82', ]
StopQAppSession
$result = $client->stopQAppSession
([/* ... */]); $promise = $client->stopQAppSessionAsync
([/* ... */]);
Stops an active session for an Amazon Q App.This deletes all data related to the session and makes it invalid for future uses. The results of the session will be persisted as part of the conversation.
Parameter Syntax
$result = $client->stopQAppSession([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session to stop.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Associates tags with an Amazon Q Apps resource.
Parameter Syntax
$result = $client->tagResource([ 'resourceARN' => '<string>', // REQUIRED 'tags' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- resourceARN
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to tag.
- tags
-
- Required: Yes
- Type: Associative array of custom strings keys (TagKey) to strings
The tags to associate with the resource.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: A call to tag a resource
$result = $client->tagResource([ 'resourceARN' => 'arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0', 'tags' => [ 'department' => 'HR', ], ]);
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Disassociates tags from an Amazon Q Apps resource.
Parameter Syntax
$result = $client->untagResource([ 'resourceARN' => '<string>', // REQUIRED 'tagKeys' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- resourceARN
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to disassociate the tag from.
- tagKeys
-
- Required: Yes
- Type: Array of strings
The keys of the tags to disassociate from the resource.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: A call to untag a resource
$result = $client->untagResource([ 'resourceARN' => 'arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0', 'tagKeys' => [ 'department', ], ]);
UpdateLibraryItem
$result = $client->updateLibraryItem
([/* ... */]); $promise = $client->updateLibraryItemAsync
([/* ... */]);
Updates the library item for an Amazon Q App.
Parameter Syntax
$result = $client->updateLibraryItem([ 'categories' => ['<string>', ...], 'instanceId' => '<string>', // REQUIRED 'libraryItemId' => '<string>', // REQUIRED 'status' => 'PUBLISHED|DISABLED', ]);
Parameter Details
Members
- categories
-
- Type: Array of strings
The new categories to associate with the library item.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item to update.
- status
-
- Type: string
The new status to set for the library item, such as "Published" or "Hidden".
Result Syntax
[ 'appId' => '<string>', 'appVersion' => <integer>, 'categories' => [ [ 'appCount' => <integer>, 'color' => '<string>', 'id' => '<string>', 'title' => '<string>', ], // ... ], 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'isRatedByUser' => true || false, 'isVerified' => true || false, 'libraryItemId' => '<string>', 'ratingCount' => <integer>, 'status' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', 'userCount' => <integer>, ]
Result Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App associated with the library item.
- appVersion
-
- Required: Yes
- Type: int
The version of the Q App associated with the library item.
- categories
-
- Required: Yes
- Type: Array of Category structures
The categories associated with the updated library item.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was originally created.
- createdBy
-
- Required: Yes
- Type: string
The user who originally created the library item.
- isRatedByUser
-
- Type: boolean
Whether the current user has rated the library item.
- isVerified
-
- Type: boolean
Indicates whether the library item has been verified.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the updated library item.
- ratingCount
-
- Required: Yes
- Type: int
The number of ratings the library item has received.
- status
-
- Required: Yes
- Type: string
The new status of the updated library item.
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was last updated.
- updatedBy
-
- Type: string
The user who last updated the library item.
- userCount
-
- Type: int
The number of users who have the associated Q App.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Sets the status of a library item to DISABLED
$result = $client->updateLibraryItem([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', 'status' => 'DISABLED', ]);
Result syntax:
[ 'appId' => '7a11f34b-42d4-4bc8-b668-ae4a788dae1e', 'appVersion' => 6, 'categories' => [ [ 'id' => '9c871ed4-1c41-4065-aefe-321cd4b61cf8', 'title' => 'HR', ], [ 'id' => 'fdc4b483-c4e2-44c9-b4b2-6c850bbdb579', 'title' => 'General', ], [ 'id' => 'c1c4e374-118c-446f-81fb-cba6225d88da', 'title' => 'IT', ], ], 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'isVerified' => , 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', 'ratingCount' => 24, 'status' => 'DISABLED', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', ]
UpdateLibraryItemMetadata
$result = $client->updateLibraryItemMetadata
([/* ... */]); $promise = $client->updateLibraryItemMetadataAsync
([/* ... */]);
Updates the verification status of a library item for an Amazon Q App.
Parameter Syntax
$result = $client->updateLibraryItemMetadata([ 'instanceId' => '<string>', // REQUIRED 'isVerified' => true || false, 'libraryItemId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- isVerified
-
- Type: boolean
The verification status of the library item
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the updated library item.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ConflictException:
The requested operation could not be completed due to a conflict with the current state of the resource.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Update a library item to be verified
$result = $client->updateLibraryItemMetadata([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'isVerified' => 1, 'libraryItemId' => 'cb9ecf72-8563-450d-9db9-994f98297316', ]);
UpdateQApp
$result = $client->updateQApp
([/* ... */]); $promise = $client->updateQAppAsync
([/* ... */]);
Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.
Parameter Syntax
$result = $client->updateQApp([ 'appDefinition' => [ 'cards' => [ // REQUIRED [ 'fileUpload' => [ 'allowOverride' => true || false, 'fileId' => '<string>', 'filename' => '<string>', 'id' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'formInput' => [ 'computeMode' => 'append|replace', 'id' => '<string>', // REQUIRED 'metadata' => [ // REQUIRED 'schema' => [ // REQUIRED ], ], 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'qPlugin' => [ 'actionIdentifier' => '<string>', 'id' => '<string>', // REQUIRED 'pluginId' => '<string>', // REQUIRED 'prompt' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'qQuery' => [ 'attributeFilter' => [ 'andAllFilters' => [ [...], // RECURSIVE // ... ], 'containsAll' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'containsAny' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'equalsTo' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThan' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'greaterThanOrEquals' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThan' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'lessThanOrEquals' => [ 'name' => '<string>', // REQUIRED 'value' => [ // REQUIRED 'dateValue' => <integer || string || DateTime>, 'longValue' => <integer>, 'stringListValue' => ['<string>', ...], 'stringValue' => '<string>', ], ], 'notFilter' => [...], // RECURSIVE 'orAllFilters' => [ [...], // RECURSIVE // ... ], ], 'id' => '<string>', // REQUIRED 'outputSource' => 'approved-sources|llm', 'prompt' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], 'textInput' => [ 'defaultValue' => '<string>', 'id' => '<string>', // REQUIRED 'placeholder' => '<string>', 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin|form-input', // REQUIRED ], ], // ... ], 'initialPrompt' => '<string>', ], 'appId' => '<string>', // REQUIRED 'description' => '<string>', 'instanceId' => '<string>', // REQUIRED 'title' => '<string>', ]);
Parameter Details
Members
- appDefinition
-
- Type: AppDefinitionInput structure
The new definition specifying the cards and flow for the Q App.
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App to update.
- description
-
- Type: string
The new description for the Q App.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- title
-
- Type: string
The new title for the Q App.
Result Syntax
[ 'appArn' => '<string>', 'appId' => '<string>', 'appVersion' => <integer>, 'createdAt' => <DateTime>, 'createdBy' => '<string>', 'description' => '<string>', 'initialPrompt' => '<string>', 'requiredCapabilities' => ['<string>', ...], 'status' => 'PUBLISHED|DRAFT|DELETED', 'title' => '<string>', 'updatedAt' => <DateTime>, 'updatedBy' => '<string>', ]
Result Details
Members
- appArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the updated Q App.
- appId
-
- Required: Yes
- Type: string
The unique identifier of the updated Q App.
- appVersion
-
- Required: Yes
- Type: int
The new version of the updated Q App.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Q App was originally created.
- createdBy
-
- Required: Yes
- Type: string
The user who originally created the Q App.
- description
-
- Type: string
The new description of the updated Q App.
- initialPrompt
-
- Type: string
The initial prompt for the updated Q App.
- requiredCapabilities
-
- Type: Array of strings
The capabilities required for the updated Q App.
- status
-
- Required: Yes
- Type: string
The status of the updated Q App.
- title
-
- Required: Yes
- Type: string
The new title of the updated Q App.
- updatedAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Q App was last updated.
- updatedBy
-
- Required: Yes
- Type: string
The user who last updated the Q App.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ContentTooLargeException:
The requested operation could not be completed because the content exceeds the maximum allowed size.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Updating the title of an app
$result = $client->updateQApp([ 'appId' => '7212ff04-de7b-4831-bd80-45d6975ba1b0', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'title' => 'This is the new title', ]);
Result syntax:
[ 'appArn' => 'arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appId' => '7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appVersion' => 2, 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'requiredCapabilities' => [ 'CreatorMode', ], 'status' => 'DRAFT', 'title' => 'This is the new title', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', ]
Example 2: Updating the app so it has a single q-query card
$result = $client->updateQApp([ 'appDefinition' => [ 'cards' => [ [ 'qQuery' => [ 'type' => 'q-query', 'id' => '18870b94-1e63-40e0-8c12-669c90ac5acc', 'prompt' => 'Recommend me an itinerary for a trip', 'title' => 'Trip Ideas', ], ], ], ], 'appId' => '7212ff04-de7b-4831-bd80-45d6975ba1b0', 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', ]);
Result syntax:
[ 'appArn' => 'arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appId' => '7212ff04-de7b-4831-bd80-45d6975ba1b0', 'appVersion' => 99, 'createdAt' =>, 'createdBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', 'requiredCapabilities' => [ 'CreatorMode', ], 'status' => 'DRAFT', 'title' => 'Previous Title Stays the Same', 'updatedAt' => , 'updatedBy' => 'a841e300-40c1-7062-fa34-5b46dadbbaac', ]
UpdateQAppPermissions
$result = $client->updateQAppPermissions
([/* ... */]); $promise = $client->updateQAppPermissionsAsync
([/* ... */]);
Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.
Parameter Syntax
$result = $client->updateQAppPermissions([ 'appId' => '<string>', // REQUIRED 'grantPermissions' => [ [ 'action' => 'read|write', // REQUIRED 'principal' => '<string>', // REQUIRED ], // ... ], 'instanceId' => '<string>', // REQUIRED 'revokePermissions' => [ [ 'action' => 'read|write', // REQUIRED 'principal' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q App for which permissions are being updated.
- grantPermissions
-
- Type: Array of PermissionInput structures
The list of permissions to grant for the Amazon Q App.
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- revokePermissions
-
- Type: Array of PermissionInput structures
The list of permissions to revoke for the Amazon Q App.
Result Syntax
[ 'appId' => '<string>', 'permissions' => [ [ 'action' => 'read|write', 'principal' => [ 'email' => '<string>', 'userId' => '<string>', 'userType' => 'owner|user', ], ], // ... ], 'resourceArn' => '<string>', ]
Result Details
Members
- appId
-
- Type: string
The unique identifier of the Amazon Q App for which permissions were updated.
- permissions
-
- Type: Array of PermissionOutput structures
The updated list of permissions for the Amazon Q App.
- resourceArn
-
- Type: string
The Amazon Resource Name (ARN) of the Amazon Q App for which permissions were updated.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Grant permissions for the app
$result = $client->updateQAppPermissions([ 'appId' => 'fe0acf86-49e5-4def-a0c2-40ce0cafee14', 'grantPermissions' => [ [ 'action' => 'read', 'principal' => 'user2@example.com', ], ], 'instanceId' => '01793661-ad73-4c7d-8eaa-1c95a10151c2', ]);
Result syntax:
[ 'appId' => 'fe0acf86-49e5-4def-a0c2-40ce0cafee14', 'permissions' => [ [ 'action' => 'write', 'principal' => [ 'email' => 'user1@example.com', 'userId' => 'f8f15330-b091-708b-d46e-adb0d914b699', ], ], [ 'action' => 'read', 'principal' => [ 'email' => 'user2@example.com', 'userId' => 'c81133d0-10d1-70eb-aaa3-d427ea6fc0f3', ], ], ], 'resourceArn' => 'arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14', ]
Example 2: Revoke permissions for the app
$result = $client->updateQAppPermissions([ 'appId' => 'fe0acf86-49e5-4def-a0c2-40ce0cafee14', 'instanceId' => '01793661-ad73-4c7d-8eaa-1c95a10151c2', 'revokePermissions' => [ [ 'action' => 'read', 'principal' => 'user2@example.com', ], ], ]);
Result syntax:
[ 'appId' => 'fe0acf86-49e5-4def-a0c2-40ce0cafee14', 'permissions' => [ [ 'action' => 'write', 'principal' => [ 'email' => 'user1@example.com', 'userId' => 'f8f15330-b091-708b-d46e-adb0d914b699', ], ], ], 'resourceArn' => 'arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14', ]
UpdateQAppSession
$result = $client->updateQAppSession
([/* ... */]); $promise = $client->updateQAppSessionAsync
([/* ... */]);
Updates the session for a given Q App sessionId
. This is only valid when at least one card of the session is in the WAITING
state. Data for each WAITING
card can be provided as input. If inputs are not provided, the call will be accepted but session will not move forward. Inputs for cards that are not in the WAITING
status will be ignored.
Parameter Syntax
$result = $client->updateQAppSession([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED 'values' => [ [ 'cardId' => '<string>', // REQUIRED 'submissionMutation' => [ 'mutationType' => 'edit|delete|add', // REQUIRED 'submissionId' => '<string>', // REQUIRED ], 'value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session to provide input for.
- values
-
- Type: Array of CardValue structures
The input values to provide for the current state of the Q App session.
Result Syntax
[ 'sessionArn' => '<string>', 'sessionId' => '<string>', ]
Result Details
Members
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the updated Q App session.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the updated Q App session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
UpdateQAppSessionMetadata
$result = $client->updateQAppSessionMetadata
([/* ... */]); $promise = $client->updateQAppSessionMetadataAsync
([/* ... */]);
Updates the configuration metadata of a session for a given Q App sessionId
.
Parameter Syntax
$result = $client->updateQAppSessionMetadata([ 'instanceId' => '<string>', // REQUIRED 'sessionId' => '<string>', // REQUIRED 'sessionName' => '<string>', 'sharingConfiguration' => [ // REQUIRED 'acceptResponses' => true || false, 'enabled' => true || false, // REQUIRED 'revealCards' => true || false, ], ]);
Parameter Details
Members
- instanceId
-
- Required: Yes
- Type: string
The unique identifier of the Amazon Q Business application environment instance.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the Q App session to update configuration for.
- sessionName
-
- Type: string
The new name for the Q App session.
- sharingConfiguration
-
- Required: Yes
- Type: SessionSharingConfiguration structure
The new sharing configuration for the Q App data collection session.
Result Syntax
[ 'sessionArn' => '<string>', 'sessionId' => '<string>', 'sessionName' => '<string>', 'sharingConfiguration' => [ 'acceptResponses' => true || false, 'enabled' => true || false, 'revealCards' => true || false, ], ]
Result Details
Members
- sessionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the updated Q App session.
- sessionId
-
- Required: Yes
- Type: string
The unique identifier of the updated Q App session.
- sessionName
-
- Type: string
The new name of the updated Q App session.
- sharingConfiguration
-
- Required: Yes
- Type: SessionSharingConfiguration structure
The new sharing configuration of the updated Q App data collection session.
Errors
- ResourceNotFoundException:
The requested resource could not be found.
- AccessDeniedException:
The client is not authorized to perform the requested operation.
- ValidationException:
The input failed to satisfy the constraints specified by the service.
- InternalServerException:
An internal service error occurred while processing the request.
- UnauthorizedException:
The client is not authenticated or authorized to perform the requested operation.
- ServiceQuotaExceededException:
The requested operation could not be completed because it would exceed the service's quota or limit.
- ThrottlingException:
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Examples
Example 1: Updates an existing session metadata for an Amazon Q App
$result = $client->updateQAppSessionMetadata([ 'instanceId' => '0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', 'sessionId' => '56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb', 'sessionName' => 'Trip itinerary collection session', 'sharingConfiguration' => [ 'acceptResponses' => 1, 'enabled' => 1, 'revealCards' => , ], ]);
Result syntax:
[ 'sessionArn' => 'arn:aws:qapps:us-west-2:0123456789012:application/cbea8329-41c0-4566-a112-19250921a220/qapp/387ccac9-4717-489f-841f-729b7d7de355/session/56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb', 'sessionId' => '56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb', 'sessionName' => 'Trip itinerary collection session', 'sharingConfiguration' => [ 'acceptResponses' => 1, 'enabled' => 1, 'revealCards' => , ], ]
Shapes
AccessDeniedException
Description
The client is not authorized to perform the requested operation.
Members
- message
-
- Required: Yes
- Type: string
AppDefinition
Description
The definition of the Q App, specifying the cards and flow.
Members
- appDefinitionVersion
-
- Required: Yes
- Type: string
The version of the app definition schema or specification.
- canEdit
-
- Type: boolean
A flag indicating whether the Q App's definition can be edited by the user.
- cards
-
- Required: Yes
- Type: Array of Card structures
The cards that make up the Q App, such as text input, file upload, or query cards.
AppDefinitionInput
Description
The input for defining an Q App.
Members
- cards
-
- Required: Yes
- Type: Array of CardInput structures
The cards that make up the Q App definition.
- initialPrompt
-
- Type: string
The initial prompt displayed when the Q App is started.
AttributeFilter
Description
The filter criteria used on responses based on document attributes or metadata fields.
Members
- andAllFilters
-
- Type: Array of AttributeFilter structures
Performs a logical
AND
operation on all supplied filters. - containsAll
-
- Type: DocumentAttribute structure
Returns
true
when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
. - containsAny
-
- Type: DocumentAttribute structure
Returns
true
when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
. - equalsTo
-
- Type: DocumentAttribute structure
Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
,longValue
,stringListValue
andstringValue
. - greaterThan
-
- Type: DocumentAttribute structure
Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
. - greaterThanOrEquals
-
- Type: DocumentAttribute structure
Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
. - lessThan
-
- Type: DocumentAttribute structure
Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
. - lessThanOrEquals
-
- Type: DocumentAttribute structure
Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type:
dateValue
andlongValue
. - notFilter
-
- Type: AttributeFilter structure
Performs a logical
NOT
operation on all supplied filters. - orAllFilters
-
- Type: Array of AttributeFilter structures
Performs a logical
OR
operation on all supplied filters.
BatchCreateCategoryInputCategory
Description
The category object to be created.
Members
- color
-
- Type: string
The color to be associated with a category. The color must be a hexadecimal value of either 3 or 6 digits.
- id
-
- Type: string
The unique identifier to be associated with a category. If you don't include a value, the category is automatically assigned a unique identifier.
- title
-
- Required: Yes
- Type: string
The name of the category.
Card
Description
A card representing a component or step in an Amazon Q App's flow.
Members
- fileUpload
-
- Type: FileUploadCard structure
A container for the properties of the file upload card.
- formInput
-
- Type: FormInputCard structure
A container for the properties of the form input card.
- qPlugin
-
- Type: QPluginCard structure
A container for the properties of the plugin card.
- qQuery
-
- Type: QQueryCard structure
A container for the properties of the query card.
- textInput
-
- Type: TextInputCard structure
A container for the properties of the text input card.
CardInput
Description
The properties defining an input card in an Amazon Q App.
Members
- fileUpload
-
- Type: FileUploadCardInput structure
A container for the properties of the file upload input card.
- formInput
-
- Type: FormInputCardInput structure
A container for the properties of the form input card.
- qPlugin
-
- Type: QPluginCardInput structure
A container for the properties of the plugin input card.
- qQuery
-
- Type: QQueryCardInput structure
A container for the properties of the query input card.
- textInput
-
- Type: TextInputCardInput structure
A container for the properties of the text input card.
CardStatus
Description
The current status and value of a card in an active Amazon Q App session.
Members
- currentState
-
- Required: Yes
- Type: string
The current state of the card.
- currentValue
-
- Required: Yes
- Type: string
The current value or result associated with the card.
- submissions
-
- Type: Array of Submission structures
A list of previous submissions, if the card is a form card.
CardValue
Description
The value or result associated with a card in a Amazon Q App session.
Members
- cardId
-
- Required: Yes
- Type: string
The unique identifier of the card.
- submissionMutation
-
- Type: SubmissionMutation structure
The structure that describes how the current form card value is mutated. Only applies for form cards when multiple responses are allowed.
- value
-
- Required: Yes
- Type: string
The value or result associated with the card.
Category
Description
A category used to classify and filter library items for Amazon Q Apps.
Members
- appCount
-
- Type: int
The number of published Amazon Q Apps associated with a category
- color
-
- Type: string
The color of the category
- id
-
- Required: Yes
- Type: string
The unique identifier of the category.
- title
-
- Required: Yes
- Type: string
The title or name of the category.
CategoryInput
Description
A label that web experience users associate with a library item. Web experience users use Categories to tag and filter library items.
Members
- color
-
- Type: string
The color of the category, represented as a hexadecimal value of either 3 or 6 digits.
- id
-
- Required: Yes
- Type: string
The unique identifier of the category.
- title
-
- Required: Yes
- Type: string
The name of the category.
ConflictException
Description
The requested operation could not be completed due to a conflict with the current state of the resource.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Required: Yes
- Type: string
The unique identifier of the resource
- resourceType
-
- Required: Yes
- Type: string
The type of the resource
ContentTooLargeException
Description
The requested operation could not be completed because the content exceeds the maximum allowed size.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Required: Yes
- Type: string
The unique identifier of the resource
- resourceType
-
- Required: Yes
- Type: string
The type of the resource
ConversationMessage
Description
A message in a conversation, used as input for generating an Amazon Q App definition.
Members
- body
-
- Required: Yes
- Type: string
The text content of the conversation message.
- type
-
- Required: Yes
- Type: string
The type of the conversation message.
Document
Members
DocumentAttribute
Description
A document attribute or metadata field.
Members
- name
-
- Required: Yes
- Type: string
The identifier for the attribute.
- value
-
- Required: Yes
- Type: DocumentAttributeValue structure
The value of the attribute.
DocumentAttributeValue
Description
The value of a document attribute. You can only provide one value for a document attribute.
Members
- dateValue
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
- longValue
-
- Type: long (int|float)
A long integer value.
- stringListValue
-
- Type: Array of strings
A list of strings.
- stringValue
-
- Type: string
A string.
FileUploadCard
Description
A card in an Amazon Q App that allows the user to upload a file.
Members
- allowOverride
-
- Type: boolean
A flag indicating if the user can override the default file for the upload card.
- dependencies
-
- Required: Yes
- Type: Array of strings
Any dependencies or requirements for the file upload card.
- fileId
-
- Type: string
The unique identifier of the file associated with the card.
- filename
-
- Type: string
The name of the file being uploaded.
- id
-
- Required: Yes
- Type: string
The unique identifier of the file upload card.
- title
-
- Required: Yes
- Type: string
The title of the file upload card.
- type
-
- Required: Yes
- Type: string
The type of the card.
FileUploadCardInput
Description
Represents a file upload card. It can optionally receive a filename
and fileId
to set a default file. If not received, the user must provide the file when the Q App runs.
Members
- allowOverride
-
- Type: boolean
A flag indicating if the user can override the default file for the upload card.
- fileId
-
- Type: string
The identifier of a pre-uploaded file associated with the card.
- filename
-
- Type: string
The default filename to use for the file upload card.
- id
-
- Required: Yes
- Type: string
The unique identifier of the file upload card.
- title
-
- Required: Yes
- Type: string
The title or label of the file upload card.
- type
-
- Required: Yes
- Type: string
The type of the card.
FormInputCard
Description
A card in an Amazon Q App that allows the user to submit a response.
Members
- computeMode
-
- Type: string
The compute mode of the form input card. This property determines whether individual participants of a data collection session can submit multiple response or one response. A compute mode of
append
shall allow participants to submit the same form multiple times with different values. A compute mode ofreplace
code> shall overwrite the current value for each participant. - dependencies
-
- Required: Yes
- Type: Array of strings
Any dependencies or requirements for the form input card.
- id
-
- Required: Yes
- Type: string
The unique identifier of the form input card.
- metadata
-
- Required: Yes
- Type: FormInputCardMetadata structure
The metadata that defines the form input card data.
- title
-
- Required: Yes
- Type: string
The title of the form input card.
- type
-
- Required: Yes
- Type: string
The type of the card.
FormInputCardInput
Description
Represents a form input card for an Amazon Q App.
Members
- computeMode
-
- Type: string
The compute mode of the form input card. This property determines whether individual participants of a data collection session can submit multiple response or one response. A compute mode of
append
shall allow participants to submit the same form multiple times with different values. A compute mode ofreplace
code> shall overwrite the current value for each participant. - id
-
- Required: Yes
- Type: string
The unique identifier of the form input card.
- metadata
-
- Required: Yes
- Type: FormInputCardMetadata structure
The metadata that defines the form input card data.
- title
-
- Required: Yes
- Type: string
The title or label of the form input card.
- type
-
- Required: Yes
- Type: string
The type of the card.
FormInputCardMetadata
Description
The metadata of the form input card.
Members
- schema
-
- Required: Yes
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The JSON schema that defines the shape of the response data.
FormInputCardMetadataSchema
Members
InternalServerException
Description
An internal service error occurred while processing the request.
Members
- message
-
- Required: Yes
- Type: string
- retryAfterSeconds
-
- Type: int
The number of seconds to wait before retrying the operation
LibraryItemMember
Description
A library item is a snapshot of an Amazon Q App that can be published so the users in their Amazon Q Apps library can discover it, clone it, and run it.
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App associated with the library item.
- appVersion
-
- Required: Yes
- Type: int
The version of the Q App associated with the library item.
- categories
-
- Required: Yes
- Type: Array of Category structures
The categories associated with the library item.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was created.
- createdBy
-
- Required: Yes
- Type: string
The user who created the library item.
- isRatedByUser
-
- Type: boolean
Whether the current user has rated the library item.
- isVerified
-
- Type: boolean
Indicates whether the library item has been verified.
- libraryItemId
-
- Required: Yes
- Type: string
The unique identifier of the library item.
- ratingCount
-
- Required: Yes
- Type: int
The number of ratings the library item has received.
- status
-
- Required: Yes
- Type: string
The status of the library item.
- updatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the library item was last updated.
- updatedBy
-
- Type: string
The user who last updated the library item.
- userCount
-
- Type: int
The number of users who have the associated Q App.
PermissionInput
Description
The permission to grant or revoke for a Amazon Q App.
Members
- action
-
- Required: Yes
- Type: string
The action associated with the permission.
- principal
-
- Required: Yes
- Type: string
The principal user to which the permission applies.
PermissionOutput
Description
The permission granted to the Amazon Q App.
Members
- action
-
- Required: Yes
- Type: string
The action associated with the permission.
- principal
-
- Required: Yes
- Type: PrincipalOutput structure
The principal user to which the permission applies.
PredictAppDefinition
Description
The definition of an Amazon Q App generated based on input such as a conversation or problem statement.
Members
- appDefinition
-
- Required: Yes
- Type: AppDefinitionInput structure
The definition specifying the cards and flow of the generated Q App.
- description
-
- Type: string
The description of the generated Q App definition.
- title
-
- Required: Yes
- Type: string
The title of the generated Q App definition.
PredictQAppInputOptions
Description
The input options for generating an Q App definition.
Members
- conversation
-
- Type: Array of ConversationMessage structures
A conversation to use as input for generating the Q App definition.
- problemStatement
-
- Type: string
A problem statement to use as input for generating the Q App definition.
PrincipalOutput
Description
The principal for which the permission applies.
Members
-
- Type: string
The email address associated with the user.
- userId
-
- Type: string
The unique identifier of the user.
- userType
-
- Type: string
The type of the user.
QAppSessionData
Description
The response collected for a Amazon Q App session. This container represents a single response to a Q App session.
Members
- cardId
-
- Required: Yes
- Type: string
The card Id associated with the response submitted for a Q App session.
- submissionId
-
- Type: string
The unique identifier of the submission.
- timestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time when the session data is submitted.
- user
-
- Required: Yes
- Type: User structure
The user who submitted the response for a Q App session.
- value
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The response submitted for a Q App session.
QPluginCard
Description
A card in an Q App that integrates with a third-party plugin or service.
Members
- actionIdentifier
-
- Type: string
The action identifier of the action to be performed by the plugin card.
- dependencies
-
- Required: Yes
- Type: Array of strings
Any dependencies or requirements for the plugin card.
- id
-
- Required: Yes
- Type: string
The unique identifier of the plugin card.
- pluginId
-
- Required: Yes
- Type: string
The unique identifier of the plugin used by the card.
- pluginType
-
- Required: Yes
- Type: string
The type or category of the plugin used by the card.
- prompt
-
- Required: Yes
- Type: string
The prompt or instructions displayed for the plugin card.
- title
-
- Required: Yes
- Type: string
The title or label of the plugin card.
- type
-
- Required: Yes
- Type: string
The type of the card.
QPluginCardInput
Description
The input shape for defining a plugin card in an Amazon Q App.
Members
- actionIdentifier
-
- Type: string
The action identifier of the action to be performed by the plugin card.
- id
-
- Required: Yes
- Type: string
The unique identifier of the plugin card.
- pluginId
-
- Required: Yes
- Type: string
The unique identifier of the plugin used by the card.
- prompt
-
- Required: Yes
- Type: string
The prompt or instructions displayed for the plugin card.
- title
-
- Required: Yes
- Type: string
The title or label of the plugin card.
- type
-
- Required: Yes
- Type: string
The type of the card.
QQueryCard
Description
A card in a Amazon Q App that generates a response based on the Amazon Q Business service.
Members
- attributeFilter
-
- Type: AttributeFilter structure
The Amazon Q Business filters applied in this query card when resolving data sources
- dependencies
-
- Required: Yes
- Type: Array of strings
Any dependencies or requirements for the query card.
- id
-
- Required: Yes
- Type: string
The unique identifier of the query card.
- memoryReferences
-
- Type: Array of strings
Any dependencies for the query card, where the dependencies are references to the collected responses.
- outputSource
-
- Required: Yes
- Type: string
The source or type of output generated by the query card.
- prompt
-
- Required: Yes
- Type: string
The prompt or instructions displayed for the query card.
- title
-
- Required: Yes
- Type: string
The title or label of the query card.
- type
-
- Required: Yes
- Type: string
The type of the card.
QQueryCardInput
Description
The input shape for defining a query card in an Amazon Q App.
Members
- attributeFilter
-
- Type: AttributeFilter structure
Turns on filtering of responses based on document attributes or metadata fields.
- id
-
- Required: Yes
- Type: string
The unique identifier of the query card.
- outputSource
-
- Type: string
The source or type of output to generate for the query card.
- prompt
-
- Required: Yes
- Type: string
The prompt or instructions displayed for the query card.
- title
-
- Required: Yes
- Type: string
The title or label of the query card.
- type
-
- Required: Yes
- Type: string
The type of the card.
ResourceNotFoundException
Description
The requested resource could not be found.
Members
- message
-
- Required: Yes
- Type: string
- resourceId
-
- Required: Yes
- Type: string
The unique identifier of the resource
- resourceType
-
- Required: Yes
- Type: string
The type of the resource
ServiceQuotaExceededException
Description
The requested operation could not be completed because it would exceed the service's quota or limit.
Members
- message
-
- Required: Yes
- Type: string
- quotaCode
-
- Required: Yes
- Type: string
The code of the quota that was exceeded
- resourceId
-
- Required: Yes
- Type: string
The unique identifier of the resource
- resourceType
-
- Required: Yes
- Type: string
The type of the resource
- serviceCode
-
- Required: Yes
- Type: string
The code for the service where the quota was exceeded
SessionSharingConfiguration
Description
The sharing configuration of an Amazon Q App data collection session.
Members
- acceptResponses
-
- Type: boolean
Indicates whether an Q App session can accept responses from users.
- enabled
-
- Required: Yes
- Type: boolean
Indicates whether an Q App session is shareable with other users.
- revealCards
-
- Type: boolean
Indicates whether collected responses for an Q App session are revealed for all users.
Submission
Description
A record created when a user submits a form card.
Members
- submissionId
-
- Type: string
The unique identifier of the submission.
- timestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time when the card is submitted.
- value
-
- Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents
The data submitted by the user.
SubmissionMutation
Description
Represents an action performed on a submission.
Members
- mutationType
-
- Required: Yes
- Type: string
The operation that is performed on a submission.
- submissionId
-
- Required: Yes
- Type: string
The unique identifier of the submission.
TextInputCard
Description
A card in an Amazon Q App that allows the user to input text.
Members
- defaultValue
-
- Type: string
The default value to pre-populate in the text input field.
- dependencies
-
- Required: Yes
- Type: Array of strings
Any dependencies or requirements for the text input card.
- id
-
- Required: Yes
- Type: string
The unique identifier of the text input card.
- placeholder
-
- Type: string
The placeholder text to display in the text input field.
- title
-
- Required: Yes
- Type: string
The title or label of the text input card.
- type
-
- Required: Yes
- Type: string
The type of the card.
TextInputCardInput
Description
The input shape for defining a text input card in an Amazon Q App.
Members
- defaultValue
-
- Type: string
The default value to pre-populate in the text input field.
- id
-
- Required: Yes
- Type: string
The unique identifier of the text input card.
- placeholder
-
- Type: string
The placeholder text to display in the text input field.
- title
-
- Required: Yes
- Type: string
The title or label of the text input card.
- type
-
- Required: Yes
- Type: string
The type of the card.
ThrottlingException
Description
The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.
Members
- message
-
- Required: Yes
- Type: string
- quotaCode
-
- Required: Yes
- Type: string
The code of the quota that was exceeded
- retryAfterSeconds
-
- Type: int
The number of seconds to wait before retrying the operation
- serviceCode
-
- Required: Yes
- Type: string
The code for the service where the quota was exceeded
UnauthorizedException
Description
The client is not authenticated or authorized to perform the requested operation.
Members
- message
-
- Required: Yes
- Type: string
User
Description
A user of an Amazon Q App.
Members
- userId
-
- Type: string
The unique identifier of a user.
UserAppItem
Description
An Amazon Q App associated with a user, either owned by the user or favorited.
Members
- appArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the Q App.
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App.
- canEdit
-
- Type: boolean
A flag indicating whether the user can edit the Q App.
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the user's association with the Q App was created.
- description
-
- Type: string
The description of the Q App.
- isVerified
-
- Type: boolean
Indicates whether the Q App has been verified.
- status
-
- Type: string
The status of the user's association with the Q App.
- title
-
- Required: Yes
- Type: string
The title of the Q App.
ValidationException
Description
The input failed to satisfy the constraints specified by the service.
Members
- message
-
- Required: Yes
- Type: string