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.
- 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.
- 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.
- 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.
- 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.
- 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.
- UpdateQAppSession ( array $params = [] )
- Updates the 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', ]
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', // REQUIRED ], 'qPlugin' => [ 'id' => '<string>', // REQUIRED 'pluginId' => '<string>', // REQUIRED 'prompt' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin', // 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', // REQUIRED ], 'textInput' => [ 'defaultValue' => '<string>', 'id' => '<string>', // REQUIRED 'placeholder' => '<string>', 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin', // 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', ]);
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', ]);
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 'instanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- appId
-
- Required: Yes
- Type: string
The unique identifier of the Q App to retrieve.
- 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', ], 'qPlugin' => [ 'dependencies' => ['<string>', ...], 'id' => '<string>', 'pluginId' => '<string>', 'pluginType' => 'SERVICE_NOW|SALESFORCE|JIRA|ZENDESK|CUSTOM', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin', ], '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>', 'outputSource' => 'approved-sources|llm', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin', ], 'textInput' => [ 'defaultValue' => '<string>', 'dependencies' => ['<string>', ...], 'id' => '<string>', 'placeholder' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin', ], ], // ... ], ], '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
[ 'cardStatus' => [ '<UUID>' => [ 'currentState' => 'IN_PROGRESS|WAITING|COMPLETED', 'currentValue' => '<string>', ], // ... ], 'sessionArn' => '<string>', 'sessionId' => '<string>', 'status' => 'IN_PROGRESS|WAITING|COMPLETED', ]
Result Details
Members
- 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.
- 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.
- status
-
- Required: Yes
- Type: string
The current status of the 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: 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' => '', ], ], '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', ]
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, if applicable.
- 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 an 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==', ]
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', ], 'qPlugin' => [ 'id' => '<string>', 'pluginId' => '<string>', 'prompt' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin', ], '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', ], 'textInput' => [ 'defaultValue' => '<string>', 'id' => '<string>', 'placeholder' => '<string>', 'title' => '<string>', 'type' => 'text-input|q-query|file-upload|q-plugin', ], ], // ... ], '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 'value' => '<string>', // REQUIRED ], // ... ], 'instanceId' => '<string>', // REQUIRED '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.
- 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 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', // REQUIRED ], 'qPlugin' => [ 'id' => '<string>', // REQUIRED 'pluginId' => '<string>', // REQUIRED 'prompt' => '<string>', // REQUIRED 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin', // 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', // REQUIRED ], 'textInput' => [ 'defaultValue' => '<string>', 'id' => '<string>', // REQUIRED 'placeholder' => '<string>', 'title' => '<string>', // REQUIRED 'type' => 'text-input|q-query|file-upload|q-plugin', // 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', ]
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 '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.
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.
- 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.
- 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.
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.
- 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.
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.
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.
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.
QPluginCard
Description
A card in an Q App that integrates with a third-party plugin or service.
Members
- 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
- 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.
- 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
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
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