Class: AWS.QApps
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.QApps
- Identifier:
- qapps
- API Version:
- 2023-11-27
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
The Amazon Q Apps feature capability within Amazon Q Business allows web experience users to create lightweight, purpose-built AI apps to fulfill specific tasks from within their web experience. For example, users can create an Q Appthat exclusively generates marketing-related content to improve your marketing team's productivity or a Q App for marketing content-generation like writing customer emails and creating promotional content using a certain style of voice, tone, and branding. For more information, see Amazon Q App in the Amazon Q Business User Guide.
Sending a Request Using QApps
var qapps = new AWS.QApps();
qapps.associateLibraryItemReview(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the QApps object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var qapps = new AWS.QApps({apiVersion: '2023-11-27'});
You can also set the API version globally in AWS.config.apiVersions
using
the qapps service identifier:
AWS.config.apiVersions = {
qapps: '2023-11-27',
// other service API versions
};
var qapps = new AWS.QApps();
Version:
-
2023-11-27
Constructor Summary collapse
-
new AWS.QApps(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
associateLibraryItemReview(params = {}, callback) ⇒ AWS.Request
Associates a rating or review for a library item with the user submitting the request.
-
associateQAppWithUser(params = {}, callback) ⇒ AWS.Request
This operation creates a link between the user's identity calling the operation and a specific Q App.
-
createLibraryItem(params = {}, callback) ⇒ AWS.Request
Creates a new library item for an Amazon Q App, allowing it to be discovered and used by other allowed users.
-
createQApp(params = {}, callback) ⇒ AWS.Request
Creates a new Amazon Q App based on the provided definition.
-
deleteLibraryItem(params = {}, callback) ⇒ AWS.Request
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(params = {}, callback) ⇒ AWS.Request
Deletes an Amazon Q App owned by the user.
-
disassociateLibraryItemReview(params = {}, callback) ⇒ AWS.Request
Removes a rating or review previously submitted by the user for a library item.
.
-
disassociateQAppFromUser(params = {}, callback) ⇒ AWS.Request
Disassociates a Q App from a user removing the user's access to run the Q App.
.
-
getLibraryItem(params = {}, callback) ⇒ AWS.Request
Retrieves details about a library item for an Amazon Q App, including its metadata, categories, ratings, and usage statistics.
.
-
getQApp(params = {}, callback) ⇒ AWS.Request
Retrieves the full details of an Q App, including its definition specifying the cards and flow.
.
-
getQAppSession(params = {}, callback) ⇒ AWS.Request
Retrieves the current state and results for an active session of an Amazon Q App.
.
-
importDocument(params = {}, callback) ⇒ AWS.Request
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. -
listLibraryItems(params = {}, callback) ⇒ AWS.Request
Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.
.
-
listQApps(params = {}, callback) ⇒ AWS.Request
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(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with an Amazon Q Apps resource.
.
-
predictQApp(params = {}, callback) ⇒ AWS.Request
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
. -
startQAppSession(params = {}, callback) ⇒ AWS.Request
Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.
Note: Each Q App session will be condensed into a single conversation in the web experience.- stopQAppSession(params = {}, callback) ⇒ AWS.Request
Stops an active session for an Amazon Q App.This deletes all data related to the session and makes it invalid for future uses.
- tagResource(params = {}, callback) ⇒ AWS.Request
Associates tags with an Amazon Q Apps resource.
.
- untagResource(params = {}, callback) ⇒ AWS.Request
Disassociates tags from an Amazon Q Apps resource.
.
- updateLibraryItem(params = {}, callback) ⇒ AWS.Request
Updates the metadata and status of a library item for an Amazon Q App.
.
- updateQApp(params = {}, callback) ⇒ AWS.Request
Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.
.
- updateQAppSession(params = {}, callback) ⇒ AWS.Request
Updates the session for a given Q App
sessionId
.- waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given QApps resource.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService
Constructor Details
new AWS.QApps(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Examples:
Constructing a QApps object
var qapps = new AWS.QApps({apiVersion: '2023-11-27'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String|AWS.Endpoint)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
or an Endpoint object. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.QApps.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.QApps.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.QApps.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
computeChecksums
(Boolean)
—
whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)
-
convertResponseTypes
(Boolean)
—
whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to
true
. -
correctClockSkew
(Boolean)
—
whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to
false
. -
s3ForcePathStyle
(Boolean)
—
whether to force path style URLs for S3 objects.
-
s3BucketEndpoint
(Boolean)
—
whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an
endpoint
to be provided explicitly to the service constructor. -
s3DisableBodySigning
(Boolean)
—
whether S3 body signing should be disabled when using signature version
v4
. Body signing can only be disabled when using https. Defaults totrue
. -
s3UsEast1RegionalEndpoint
('legacy'|'regional')
—
when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to
legacy
-
s3UseArnRegion
(Boolean)
—
whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to
true
-
retryDelayOptions
(map)
—
A set of options to configure the retry delay on retryable errors. Currently supported options are:
- base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
- customBackoff [function] — A custom function that accepts a
retry count and error and returns the amount of time to delay in
milliseconds. If the result is a non-zero negative value, no further
retry attempts will be made. The
base
option will be ignored if this option is supplied. The function is only called for retryable errors.
-
httpOptions
(map)
—
A set of options to pass to the low-level HTTP request. Currently supported options are:
- proxy [String] — the URL to proxy requests through
- agent [http.Agent, https.Agent] — the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (
http.globalAgent
) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment. - connectTimeout [Integer] — Sets the socket to timeout after
failing to establish a connection with the server after
connectTimeout
milliseconds. This timeout has no effect once a socket connection has been established. - timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
- xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
- xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
-
apiVersion
(String, Date)
—
a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by
apiVersions
). Specify 'latest' to use the latest possible version. -
apiVersions
(map<String, String|Date>)
—
a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
-
logger
(#write, #log)
—
an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests
-
systemClockOffset
(Number)
—
an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global
AWS.config
object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds. -
signatureVersion
(String)
—
the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.
-
signatureCache
(Boolean)
—
whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to
true
. -
dynamoDbCrc32
(Boolean)
—
whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default:
true
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean|undefined)
—
whether to call operations with endpoints given by service dynamically. Setting this
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
. -
stsRegionalEndpoints
('legacy'|'regional')
—
whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.
-
useFipsEndpoint
(Boolean)
—
Enables FIPS compatible endpoints. Defaults to
false
. -
useDualstackEndpoint
(Boolean)
—
Enables IPv6 dualstack endpoint. Defaults to
false
.
Property Details
Method Details
associateLibraryItemReview(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the associateLibraryItemReview operation
var params = { instanceId: 'STRING_VALUE', /* required */ libraryItemId: 'STRING_VALUE' /* required */ }; qapps.associateLibraryItemReview(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier for the Amazon Q Business application environment instance.
libraryItemId
— (String
)The unique identifier of the library item to associate the review with.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
associateQAppWithUser(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the associateQAppWithUser operation
var params = { appId: 'STRING_VALUE', /* required */ instanceId: 'STRING_VALUE' /* required */ }; qapps.associateQAppWithUser(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The ID of the Amazon Q App to associate with the user.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
createLibraryItem(params = {}, callback) ⇒ AWS.Request
Creates a new library item for an Amazon Q App, allowing it to be discovered and used by other allowed users.
Service Reference:
Examples:
Calling the createLibraryItem operation
var params = { appId: 'STRING_VALUE', /* required */ appVersion: 'NUMBER_VALUE', /* required */ categories: [ /* required */ 'STRING_VALUE', /* more items */ ], instanceId: 'STRING_VALUE' /* required */ }; qapps.createLibraryItem(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The unique identifier of the Amazon Q App to publish to the library.
appVersion
— (Integer
)The version of the Amazon Q App to publish to the library.
categories
— (Array<String>
)The categories to associate with the library item for easier discovery.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:libraryItemId
— (String
)The unique identifier of the new library item.
status
— (String
)The status of the new library item, such as "Published".
createdAt
— (Date
)The date and time the library item was created.
createdBy
— (String
)The user who created the library item.
updatedAt
— (Date
)The date and time the library item was last updated.
updatedBy
— (String
)The user who last updated the library item.
ratingCount
— (Integer
)The number of ratings the library item has received from users.
-
(AWS.Response)
—
Returns:
createQApp(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the createQApp operation
var params = { appDefinition: { /* required */ cards: [ /* required */ { fileUpload: { id: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin, /* required */ allowOverride: true || false, fileId: 'STRING_VALUE', filename: 'STRING_VALUE' }, qPlugin: { id: 'STRING_VALUE', /* required */ pluginId: 'STRING_VALUE', /* required */ prompt: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin /* required */ }, qQuery: { id: 'STRING_VALUE', /* required */ prompt: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin, /* required */ attributeFilter: { /* AttributeFilter */ andAllFilters: [ /* recursive AttributeFilter */, /* more items */ ], containsAll: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, containsAny: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, equalsTo: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, greaterThan: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, greaterThanOrEquals: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, lessThan: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, lessThanOrEquals: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, notFilter: /* recursive AttributeFilter */, orAllFilters: [ /* recursive AttributeFilter */, /* more items */ ] }, outputSource: approved-sources | llm }, textInput: { id: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin, /* required */ defaultValue: 'STRING_VALUE', placeholder: 'STRING_VALUE' } }, /* more items */ ], initialPrompt: 'STRING_VALUE' }, instanceId: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ description: 'STRING_VALUE', tags: { '<String>': 'STRING_VALUE', /* '<String>': ... */ } }; qapps.createQApp(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
title
— (String
)The title of the new Q App.
description
— (String
)The description of the new Q App.
appDefinition
— (map
)The definition of the new Q App, specifying the cards and flow.
cards
— required — (Array<map>
)The cards that make up the Q App definition.
textInput
— (map
)A container for the properties of the text input card.
title
— required — (String
)The title or label of the text input card.
id
— required — (String
)The unique identifier of the text input card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
placeholder
— (String
)The placeholder text to display in the text input field.
defaultValue
— (String
)The default value to pre-populate in the text input field.
qQuery
— (map
)A container for the properties of the query input card.
title
— required — (String
)The title or label of the query card.
id
— required — (String
)The unique identifier of the query card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the query card.
outputSource
— (String
)The source or type of output to generate for the query card.
Possible values include:"approved-sources"
"llm"
attributeFilter
— (map
)Turns on filtering of responses based on document attributes or metadata fields.
andAllFilters
— (Array<map>
)Performs a logical
AND
operation on all supplied filters.orAllFilters
— (Array<map>
)Performs a logical
OR
operation on all supplied filters.equalsTo
— (map
)Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
,longValue
,stringListValue
andstringValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAll
— (map
)Returns
true
when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAny
— (map
)Returns
true
when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThan
— (map
)Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThanOrEquals
— (map
)Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThan
— (map
)Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThanOrEquals
— (map
)Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
qPlugin
— (map
)A container for the properties of the plugin input card.
title
— required — (String
)The title or label of the plugin card.
id
— required — (String
)The unique identifier of the plugin card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the plugin card.
pluginId
— required — (String
)The unique identifier of the plugin used by the card.
fileUpload
— (map
)A container for the properties of the file upload input card.
title
— required — (String
)The title or label of the file upload card.
id
— required — (String
)The unique identifier of the file upload card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
filename
— (String
)The default filename to use for the file upload card.
fileId
— (String
)The identifier of a pre-uploaded file associated with the card.
allowOverride
— (Boolean
)A flag indicating if the user can override the default file for the upload card.
initialPrompt
— (String
)The initial prompt displayed when the Q App is started.
tags
— (map<String>
)Optional tags to associate with the new Q App.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:appId
— (String
)The unique identifier of the new Q App.
appArn
— (String
)The Amazon Resource Name (ARN) of the new Q App.
title
— (String
)The title of the new Q App.
description
— (String
)The description of the new Q App.
initialPrompt
— (String
)The initial prompt displayed when the Q App is started.
appVersion
— (Integer
)The version of the new Q App.
status
— (String
)The status of the new Q App, such as "Created".
Possible values include:"PUBLISHED"
"DRAFT"
"DELETED"
createdAt
— (Date
)The date and time the Q App was created.
createdBy
— (String
)The user who created the Q App.
updatedAt
— (Date
)The date and time the Q App was last updated.
updatedBy
— (String
)The user who last updated the Q App.
requiredCapabilities
— (Array<String>
)The capabilities required to run the Q App, such as file upload or third-party integrations.
-
(AWS.Response)
—
Returns:
deleteLibraryItem(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the deleteLibraryItem operation
var params = { instanceId: 'STRING_VALUE', /* required */ libraryItemId: 'STRING_VALUE' /* required */ }; qapps.deleteLibraryItem(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
libraryItemId
— (String
)The unique identifier of the library item to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteQApp(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the deleteQApp operation
var params = { appId: 'STRING_VALUE', /* required */ instanceId: 'STRING_VALUE' /* required */ }; qapps.deleteQApp(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The unique identifier of the Q App to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
disassociateLibraryItemReview(params = {}, callback) ⇒ AWS.Request
Removes a rating or review previously submitted by the user for a library item.
Service Reference:
Examples:
Calling the disassociateLibraryItemReview operation
var params = { instanceId: 'STRING_VALUE', /* required */ libraryItemId: 'STRING_VALUE' /* required */ }; qapps.disassociateLibraryItemReview(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
libraryItemId
— (String
)The unique identifier of the library item to remove the review from.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
disassociateQAppFromUser(params = {}, callback) ⇒ AWS.Request
Disassociates a Q App from a user removing the user's access to run the Q App.
Service Reference:
Examples:
Calling the disassociateQAppFromUser operation
var params = { appId: 'STRING_VALUE', /* required */ instanceId: 'STRING_VALUE' /* required */ }; qapps.disassociateQAppFromUser(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The unique identifier of the Q App to disassociate from the user.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
getLibraryItem(params = {}, callback) ⇒ AWS.Request
Retrieves details about a library item for an Amazon Q App, including its metadata, categories, ratings, and usage statistics.
Service Reference:
Examples:
Calling the getLibraryItem operation
var params = { instanceId: 'STRING_VALUE', /* required */ libraryItemId: 'STRING_VALUE', /* required */ appId: 'STRING_VALUE' }; qapps.getLibraryItem(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
libraryItemId
— (String
)The unique identifier of the library item to retrieve.
appId
— (String
)The unique identifier of the Amazon Q App associated with the library item.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:libraryItemId
— (String
)The unique identifier of the library item.
appId
— (String
)The unique identifier of the Q App associated with the library item.
appVersion
— (Integer
)The version of the Q App associated with the library item.
categories
— (Array<map>
)The categories associated with the library item for discovery.
id
— required — (String
)The unique identifier of the category.
title
— required — (String
)The title or name of the category.
status
— (String
)The status of the library item, such as "Published".
createdAt
— (Date
)The date and time the library item was created.
createdBy
— (String
)The user who created the library item.
updatedAt
— (Date
)The date and time the library item was last updated.
updatedBy
— (String
)The user who last updated the library item.
ratingCount
— (Integer
)The number of ratings the library item has received from users.
isRatedByUser
— (Boolean
)Whether the current user has rated the library item.
userCount
— (Integer
)The number of users who have associated the Q App with their account.
-
(AWS.Response)
—
Returns:
getQApp(params = {}, callback) ⇒ AWS.Request
Retrieves the full details of an Q App, including its definition specifying the cards and flow.
Service Reference:
Examples:
Calling the getQApp operation
var params = { appId: 'STRING_VALUE', /* required */ instanceId: 'STRING_VALUE' /* required */ }; qapps.getQApp(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The unique identifier of the Q App to retrieve.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:appId
— (String
)The unique identifier of the Q App.
appArn
— (String
)The Amazon Resource Name (ARN) of the Q App.
title
— (String
)The title of the Q App.
description
— (String
)The description of the Q App.
initialPrompt
— (String
)The initial prompt displayed when the Q App is started.
appVersion
— (Integer
)The version of the Q App.
status
— (String
)The status of the Q App.
Possible values include:"PUBLISHED"
"DRAFT"
"DELETED"
createdAt
— (Date
)The date and time the Q App was created.
createdBy
— (String
)The user who created the Q App.
updatedAt
— (Date
)The date and time the Q App was last updated.
updatedBy
— (String
)The user who last updated the Q App.
requiredCapabilities
— (Array<String>
)The capabilities required to run the Q App, such as file upload or third-party integrations.
appDefinition
— (map
)The full definition of the Q App, specifying the cards and flow.
appDefinitionVersion
— required — (String
)The version of the app definition schema or specification.
cards
— required — (Array<map>
)The cards that make up the Q App, such as text input, file upload, or query cards.
textInput
— (map
)A container for the properties of the text input card.
id
— required — (String
)The unique identifier of the text input card.
title
— required — (String
)The title or label of the text input card.
dependencies
— required — (Array<String>
)Any dependencies or requirements for the text input card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
placeholder
— (String
)The placeholder text to display in the text input field.
defaultValue
— (String
)The default value to pre-populate in the text input field.
qQuery
— (map
)A container for the properties of the query card.
id
— required — (String
)The unique identifier of the query card.
title
— required — (String
)The title or label of the query card.
dependencies
— required — (Array<String>
)Any dependencies or requirements for the query card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the query card.
outputSource
— required — (String
)The source or type of output generated by the query card.
Possible values include:"approved-sources"
"llm"
attributeFilter
— (map
)The Amazon Q Business filters applied in this query card when resolving data sources
andAllFilters
— (Array<map>
)Performs a logical
AND
operation on all supplied filters.orAllFilters
— (Array<map>
)Performs a logical
OR
operation on all supplied filters.equalsTo
— (map
)Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
,longValue
,stringListValue
andstringValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAll
— (map
)Returns
true
when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAny
— (map
)Returns
true
when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThan
— (map
)Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThanOrEquals
— (map
)Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThan
— (map
)Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThanOrEquals
— (map
)Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
qPlugin
— (map
)A container for the properties of the plugin card.
id
— required — (String
)The unique identifier of the plugin card.
title
— required — (String
)The title or label of the plugin card.
dependencies
— required — (Array<String>
)Any dependencies or requirements for the plugin card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the plugin card.
pluginType
— required — (String
)The type or category of the plugin used by the card.
Possible values include:"SERVICE_NOW"
"SALESFORCE"
"JIRA"
"ZENDESK"
"CUSTOM"
pluginId
— required — (String
)The unique identifier of the plugin used by the card.
fileUpload
— (map
)A container for the properties of the file upload card.
id
— required — (String
)The unique identifier of the file upload card.
title
— required — (String
)The title of the file upload card.
dependencies
— required — (Array<String>
)Any dependencies or requirements for the file upload card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
filename
— (String
)The name of the file being uploaded.
fileId
— (String
)The unique identifier of the file associated with the card.
allowOverride
— (Boolean
)A flag indicating if the user can override the default file for the upload card.
canEdit
— (Boolean
)A flag indicating whether the Q App's definition can be edited by the user.
-
(AWS.Response)
—
Returns:
getQAppSession(params = {}, callback) ⇒ AWS.Request
Retrieves the current state and results for an active session of an Amazon Q App.
Service Reference:
Examples:
Calling the getQAppSession operation
var params = { instanceId: 'STRING_VALUE', /* required */ sessionId: 'STRING_VALUE' /* required */ }; qapps.getQAppSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
sessionId
— (String
)The unique identifier of the Q App session to retrieve.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:sessionId
— (String
)The unique identifier of the Q App session.
sessionArn
— (String
)The Amazon Resource Name (ARN) of the Q App session.
status
— (String
)The current status of the Q App session.
Possible values include:"IN_PROGRESS"
"WAITING"
"COMPLETED"
cardStatus
— (map<map>
)The current status for each card in the Q App session.
currentState
— required — (String
)The current state of the card.
Possible values include:"IN_PROGRESS"
"WAITING"
"COMPLETED"
currentValue
— required — (String
)The current value or result associated with the card.
-
(AWS.Response)
—
Returns:
importDocument(params = {}, callback) ⇒ AWS.Request
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.Service Reference:
Examples:
Calling the importDocument operation
var params = { appId: 'STRING_VALUE', /* required */ cardId: 'STRING_VALUE', /* required */ fileContentsBase64: 'STRING_VALUE', /* required */ fileName: 'STRING_VALUE', /* required */ instanceId: 'STRING_VALUE', /* required */ scope: APPLICATION | SESSION, /* required */ sessionId: 'STRING_VALUE' }; qapps.importDocument(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
cardId
— (String
)The unique identifier of the card the file is associated with, if applicable.
appId
— (String
)The unique identifier of the Q App the file is associated with.
fileContentsBase64
— (String
)The base64-encoded contents of the file to upload.
fileName
— (String
)The name of the file being uploaded.
scope
— (String
)Whether the file is associated with an Q App definition or a specific Q App session.
Possible values include:"APPLICATION"
"SESSION"
sessionId
— (String
)The unique identifier of the Q App session the file is associated with, if applicable.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:fileId
— (String
)The unique identifier assigned to the uploaded file.
-
(AWS.Response)
—
Returns:
listLibraryItems(params = {}, callback) ⇒ AWS.Request
Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.
Service Reference:
Examples:
Calling the listLibraryItems operation
var params = { instanceId: 'STRING_VALUE', /* required */ categoryId: 'STRING_VALUE', limit: 'NUMBER_VALUE', nextToken: 'STRING_VALUE' }; qapps.listLibraryItems(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
limit
— (Integer
)The maximum number of library items to return in the response.
nextToken
— (String
)The token to request the next page of results.
categoryId
— (String
)Optional category to filter the library items by.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:libraryItems
— (Array<map>
)The list of library items meeting the request criteria.
libraryItemId
— required — (String
)The unique identifier of the library item.
appId
— required — (String
)The unique identifier of the Q App associated with the library item.
appVersion
— required — (Integer
)The version of the Q App associated with the library item.
categories
— required — (Array<map>
)The categories associated with the library item.
id
— required — (String
)The unique identifier of the category.
title
— required — (String
)The title or name of the category.
status
— required — (String
)The status of the library item.
createdAt
— required — (Date
)The date and time the library item was created.
createdBy
— required — (String
)The user who created the library item.
updatedAt
— (Date
)The date and time the library item was last updated.
updatedBy
— (String
)The user who last updated the library item.
ratingCount
— required — (Integer
)The number of ratings the library item has received.
isRatedByUser
— (Boolean
)Whether the current user has rated the library item.
userCount
— (Integer
)The number of users who have the associated Q App.
nextToken
— (String
)The token to use to request the next page of results.
-
(AWS.Response)
—
Returns:
listQApps(params = {}, callback) ⇒ AWS.Request
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..
Service Reference:
Examples:
Calling the listQApps operation
var params = { instanceId: 'STRING_VALUE', /* required */ limit: 'NUMBER_VALUE', nextToken: 'STRING_VALUE' }; qapps.listQApps(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
limit
— (Integer
)The maximum number of Q Apps to return in the response.
nextToken
— (String
)The token to request the next page of results.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:apps
— (Array<map>
)The list of Amazon Q Apps meeting the request criteria.
appId
— required — (String
)The unique identifier of the Q App.
appArn
— required — (String
)The Amazon Resource Name (ARN) of the Q App.
title
— required — (String
)The title of the Q App.
description
— (String
)The description of the Q App.
createdAt
— required — (Date
)The date and time the user's association with the Q App was created.
canEdit
— (Boolean
)A flag indicating whether the user can edit the Q App.
status
— (String
)The status of the user's association with the Q App.
nextToken
— (String
)The token to use to request the next page of results.
-
(AWS.Response)
—
Returns:
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with an Amazon Q Apps resource.
Service Reference:
Examples:
Calling the listTagsForResource operation
var params = { resourceARN: 'STRING_VALUE' /* required */ }; qapps.listTagsForResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
resourceARN
— (String
)The Amazon Resource Name (ARN) of the resource whose tags should be listed.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:tags
— (map<String>
)The list of tags that are assigned to the resource.
-
(AWS.Response)
—
Returns:
predictQApp(params = {}, callback) ⇒ AWS.Request
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.Service Reference:
Examples:
Calling the predictQApp operation
var params = { instanceId: 'STRING_VALUE', /* required */ options: { conversation: [ { body: 'STRING_VALUE', /* required */ type: USER | SYSTEM /* required */ }, /* more items */ ], problemStatement: 'STRING_VALUE' } }; qapps.predictQApp(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
options
— (map
)The input to generate the Q App definition from, either a conversation or problem statement.
conversation
— (Array<map>
)A conversation to use as input for generating the Q App definition.
body
— required — (String
)The text content of the conversation message.
type
— required — (String
)The type of the conversation message.
Possible values include:"USER"
"SYSTEM"
problemStatement
— (String
)A problem statement to use as input for generating the Q App definition.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:app
— (map
)The generated Q App definition.
title
— required — (String
)The title of the generated Q App definition.
description
— (String
)The description of the generated Q App definition.
appDefinition
— required — (map
)The definition specifying the cards and flow of the generated Q App.
cards
— required — (Array<map>
)The cards that make up the Q App definition.
textInput
— (map
)A container for the properties of the text input card.
title
— required — (String
)The title or label of the text input card.
id
— required — (String
)The unique identifier of the text input card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
placeholder
— (String
)The placeholder text to display in the text input field.
defaultValue
— (String
)The default value to pre-populate in the text input field.
qQuery
— (map
)A container for the properties of the query input card.
title
— required — (String
)The title or label of the query card.
id
— required — (String
)The unique identifier of the query card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the query card.
outputSource
— (String
)The source or type of output to generate for the query card.
Possible values include:"approved-sources"
"llm"
attributeFilter
— (map
)Turns on filtering of responses based on document attributes or metadata fields.
andAllFilters
— (Array<map>
)Performs a logical
AND
operation on all supplied filters.orAllFilters
— (Array<map>
)Performs a logical
OR
operation on all supplied filters.equalsTo
— (map
)Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
,longValue
,stringListValue
andstringValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAll
— (map
)Returns
true
when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAny
— (map
)Returns
true
when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThan
— (map
)Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThanOrEquals
— (map
)Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThan
— (map
)Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThanOrEquals
— (map
)Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
qPlugin
— (map
)A container for the properties of the plugin input card.
title
— required — (String
)The title or label of the plugin card.
id
— required — (String
)The unique identifier of the plugin card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the plugin card.
pluginId
— required — (String
)The unique identifier of the plugin used by the card.
fileUpload
— (map
)A container for the properties of the file upload input card.
title
— required — (String
)The title or label of the file upload card.
id
— required — (String
)The unique identifier of the file upload card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
filename
— (String
)The default filename to use for the file upload card.
fileId
— (String
)The identifier of a pre-uploaded file associated with the card.
allowOverride
— (Boolean
)A flag indicating if the user can override the default file for the upload card.
initialPrompt
— (String
)The initial prompt displayed when the Q App is started.
problemStatement
— (String
)The problem statement extracted from the input conversation, if provided.
-
(AWS.Response)
—
Returns:
startQAppSession(params = {}, callback) ⇒ AWS.Request
Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.
Note: Each Q App session will be condensed into a single conversation in the web experience.Service Reference:
Examples:
Calling the startQAppSession operation
var params = { appId: 'STRING_VALUE', /* required */ appVersion: 'NUMBER_VALUE', /* required */ instanceId: 'STRING_VALUE', /* required */ initialValues: [ { cardId: 'STRING_VALUE', /* required */ value: 'STRING_VALUE' /* required */ }, /* more items */ ], tags: { '<String>': 'STRING_VALUE', /* '<String>': ... */ } }; qapps.startQAppSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The unique identifier of the Q App to start a session for.
appVersion
— (Integer
)The version of the Q App to use for the session.
initialValues
— (Array<map>
)Optional initial input values to provide for the Q App session.
cardId
— required — (String
)The unique identifier of the card.
value
— required — (String
)The value or result associated with the card.
tags
— (map<String>
)Optional tags to associate with the new Q App session.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:sessionId
— (String
)The unique identifier of the new Q App session.
sessionArn
— (String
)The Amazon Resource Name (ARN) of the new Q App session.
-
(AWS.Response)
—
Returns:
stopQAppSession(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the stopQAppSession operation
var params = { instanceId: 'STRING_VALUE', /* required */ sessionId: 'STRING_VALUE' /* required */ }; qapps.stopQAppSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
sessionId
— (String
)The unique identifier of the Q App session to stop.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
tagResource(params = {}, callback) ⇒ AWS.Request
Associates tags with an Amazon Q Apps resource.
Service Reference:
Examples:
Calling the tagResource operation
var params = { resourceARN: 'STRING_VALUE', /* required */ tags: { /* required */ '<TagKey>': 'STRING_VALUE', /* '<TagKey>': ... */ } }; qapps.tagResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
resourceARN
— (String
)The Amazon Resource Name (ARN) of the resource to tag.
tags
— (map<String>
)The tags to associate with the resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
untagResource(params = {}, callback) ⇒ AWS.Request
Disassociates tags from an Amazon Q Apps resource.
Service Reference:
Examples:
Calling the untagResource operation
var params = { resourceARN: 'STRING_VALUE', /* required */ tagKeys: [ /* required */ 'STRING_VALUE', /* more items */ ] }; qapps.untagResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
resourceARN
— (String
)The Amazon Resource Name (ARN) of the resource to disassociate the tag from.
tagKeys
— (Array<String>
)The keys of the tags to disassociate from the resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateLibraryItem(params = {}, callback) ⇒ AWS.Request
Updates the metadata and status of a library item for an Amazon Q App.
Service Reference:
Examples:
Calling the updateLibraryItem operation
var params = { instanceId: 'STRING_VALUE', /* required */ libraryItemId: 'STRING_VALUE', /* required */ categories: [ 'STRING_VALUE', /* more items */ ], status: PUBLISHED | DISABLED }; qapps.updateLibraryItem(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
libraryItemId
— (String
)The unique identifier of the library item to update.
status
— (String
)The new status to set for the library item, such as "Published" or "Hidden".
Possible values include:"PUBLISHED"
"DISABLED"
categories
— (Array<String>
)The new categories to associate with the library item.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:libraryItemId
— (String
)The unique identifier of the updated library item.
appId
— (String
)The unique identifier of the Q App associated with the library item.
appVersion
— (Integer
)The version of the Q App associated with the library item.
categories
— (Array<map>
)The categories associated with the updated library item.
id
— required — (String
)The unique identifier of the category.
title
— required — (String
)The title or name of the category.
status
— (String
)The new status of the updated library item.
createdAt
— (Date
)The date and time the library item was originally created.
createdBy
— (String
)The user who originally created the library item.
updatedAt
— (Date
)The date and time the library item was last updated.
updatedBy
— (String
)The user who last updated the library item.
ratingCount
— (Integer
)The number of ratings the library item has received.
isRatedByUser
— (Boolean
)Whether the current user has rated the library item.
userCount
— (Integer
)The number of users who have the associated Q App.
-
(AWS.Response)
—
Returns:
updateQApp(params = {}, callback) ⇒ AWS.Request
Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.
Service Reference:
Examples:
Calling the updateQApp operation
var params = { appId: 'STRING_VALUE', /* required */ instanceId: 'STRING_VALUE', /* required */ appDefinition: { cards: [ /* required */ { fileUpload: { id: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin, /* required */ allowOverride: true || false, fileId: 'STRING_VALUE', filename: 'STRING_VALUE' }, qPlugin: { id: 'STRING_VALUE', /* required */ pluginId: 'STRING_VALUE', /* required */ prompt: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin /* required */ }, qQuery: { id: 'STRING_VALUE', /* required */ prompt: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin, /* required */ attributeFilter: { /* AttributeFilter */ andAllFilters: [ /* recursive AttributeFilter */, /* more items */ ], containsAll: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, containsAny: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, equalsTo: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, greaterThan: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, greaterThanOrEquals: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, lessThan: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, lessThanOrEquals: { name: 'STRING_VALUE', /* required */ value: { /* required */ dateValue: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, longValue: 'NUMBER_VALUE', stringListValue: [ 'STRING_VALUE', /* more items */ ], stringValue: 'STRING_VALUE' } }, notFilter: /* recursive AttributeFilter */, orAllFilters: [ /* recursive AttributeFilter */, /* more items */ ] }, outputSource: approved-sources | llm }, textInput: { id: 'STRING_VALUE', /* required */ title: 'STRING_VALUE', /* required */ type: text-input | q-query | file-upload | q-plugin, /* required */ defaultValue: 'STRING_VALUE', placeholder: 'STRING_VALUE' } }, /* more items */ ], initialPrompt: 'STRING_VALUE' }, description: 'STRING_VALUE', title: 'STRING_VALUE' }; qapps.updateQApp(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
appId
— (String
)The unique identifier of the Q App to update.
title
— (String
)The new title for the Q App.
description
— (String
)The new description for the Q App.
appDefinition
— (map
)The new definition specifying the cards and flow for the Q App.
cards
— required — (Array<map>
)The cards that make up the Q App definition.
textInput
— (map
)A container for the properties of the text input card.
title
— required — (String
)The title or label of the text input card.
id
— required — (String
)The unique identifier of the text input card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
placeholder
— (String
)The placeholder text to display in the text input field.
defaultValue
— (String
)The default value to pre-populate in the text input field.
qQuery
— (map
)A container for the properties of the query input card.
title
— required — (String
)The title or label of the query card.
id
— required — (String
)The unique identifier of the query card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the query card.
outputSource
— (String
)The source or type of output to generate for the query card.
Possible values include:"approved-sources"
"llm"
attributeFilter
— (map
)Turns on filtering of responses based on document attributes or metadata fields.
andAllFilters
— (Array<map>
)Performs a logical
AND
operation on all supplied filters.orAllFilters
— (Array<map>
)Performs a logical
OR
operation on all supplied filters.equalsTo
— (map
)Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
,longValue
,stringListValue
andstringValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAll
— (map
)Returns
true
when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
containsAny
— (map
)Returns
true
when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types:stringListValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThan
— (map
)Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
greaterThanOrEquals
— (map
)Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThan
— (map
)Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
lessThanOrEquals
— (map
)Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type:
dateValue
andlongValue
.name
— required — (String
)The identifier for the attribute.
value
— required — (map
)The value of the attribute.
stringValue
— (String
)A string.
stringListValue
— (Array<String>
)A list of strings.
longValue
— (Integer
)A long integer value.
dateValue
— (Date
)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.
qPlugin
— (map
)A container for the properties of the plugin input card.
title
— required — (String
)The title or label of the plugin card.
id
— required — (String
)The unique identifier of the plugin card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
prompt
— required — (String
)The prompt or instructions displayed for the plugin card.
pluginId
— required — (String
)The unique identifier of the plugin used by the card.
fileUpload
— (map
)A container for the properties of the file upload input card.
title
— required — (String
)The title or label of the file upload card.
id
— required — (String
)The unique identifier of the file upload card.
type
— required — (String
)The type of the card.
Possible values include:"text-input"
"q-query"
"file-upload"
"q-plugin"
filename
— (String
)The default filename to use for the file upload card.
fileId
— (String
)The identifier of a pre-uploaded file associated with the card.
allowOverride
— (Boolean
)A flag indicating if the user can override the default file for the upload card.
initialPrompt
— (String
)The initial prompt displayed when the Q App is started.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:appId
— (String
)The unique identifier of the updated Q App.
appArn
— (String
)The Amazon Resource Name (ARN) of the updated Q App.
title
— (String
)The new title of the updated Q App.
description
— (String
)The new description of the updated Q App.
initialPrompt
— (String
)The initial prompt for the updated Q App.
appVersion
— (Integer
)The new version of the updated Q App.
status
— (String
)The status of the updated Q App.
Possible values include:"PUBLISHED"
"DRAFT"
"DELETED"
createdAt
— (Date
)The date and time the Q App was originally created.
createdBy
— (String
)The user who originally created the Q App.
updatedAt
— (Date
)The date and time the Q App was last updated.
updatedBy
— (String
)The user who last updated the Q App.
requiredCapabilities
— (Array<String>
)The capabilities required for the updated Q App.
-
(AWS.Response)
—
Returns:
updateQAppSession(params = {}, callback) ⇒ AWS.Request
Updates the session for a given Q App
sessionId
. This is only valid when at least one card of the session is in theWAITING
state. Data for eachWAITING
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 theWAITING
status will be ignored.Service Reference:
Examples:
Calling the updateQAppSession operation
var params = { instanceId: 'STRING_VALUE', /* required */ sessionId: 'STRING_VALUE', /* required */ values: [ { cardId: 'STRING_VALUE', /* required */ value: 'STRING_VALUE' /* required */ }, /* more items */ ] }; qapps.updateQAppSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
instanceId
— (String
)The unique identifier of the Amazon Q Business application environment instance.
sessionId
— (String
)The unique identifier of the Q App session to provide input for.
values
— (Array<map>
)The input values to provide for the current state of the Q App session.
cardId
— required — (String
)The unique identifier of the card.
value
— required — (String
)The value or result associated with the card.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:sessionId
— (String
)The unique identifier of the updated Q App session.
sessionArn
— (String
)The Amazon Resource Name (ARN) of the updated Q App session.
-
(AWS.Response)
—
Returns:
waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given QApps resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.
Parameters:
-
state
(String)
—
the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.
-
params
(map)
(defaults to: {})
—
a list of parameters for the given state. See each waiter resource state for required parameters.
Callback (callback):
-
function(err, data) { ... }
Callback containing error and data information. See the respective resource state for the expected error or data information.
If the waiter times out its requests, it will return a
ResourceNotReady
error.
Returns:
Generated on Thu Aug 22 18:45:13 2024 by yard 0.9.36 (ruby-2.5.1). - stopQAppSession(params = {}, callback) ⇒ AWS.Request