We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.QApps

Inherits:
AWS.Service show all
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

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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.
  • 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 to true.

  • 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

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

      • cardsrequired — (Array<map>)

        The cards that make up the Q App definition.

        • textInput — (map)

          A container for the properties of the text input card.

          • titlerequired — (String)

            The title or label of the text input card.

          • idrequired — (String)

            The unique identifier of the text input card.

          • typerequired — (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.

          • titlerequired — (String)

            The title or label of the query card.

          • idrequired — (String)

            The unique identifier of the query card.

          • typerequired — (String)

            The type of the card.

            Possible values include:
            • "text-input"
            • "q-query"
            • "file-upload"
            • "q-plugin"
          • promptrequired — (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 and stringValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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.

          • titlerequired — (String)

            The title or label of the plugin card.

          • idrequired — (String)

            The unique identifier of the plugin card.

          • typerequired — (String)

            The type of the card.

            Possible values include:
            • "text-input"
            • "q-query"
            • "file-upload"
            • "q-plugin"
          • promptrequired — (String)

            The prompt or instructions displayed for the plugin card.

          • pluginIdrequired — (String)

            The unique identifier of the plugin used by the card.

        • fileUpload — (map)

          A container for the properties of the file upload input card.

          • titlerequired — (String)

            The title or label of the file upload card.

          • idrequired — (String)

            The unique identifier of the file upload card.

          • typerequired — (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. The data 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data 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.

        • idrequired — (String)

          The unique identifier of the category.

        • titlerequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data 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.

        • appDefinitionVersionrequired — (String)

          The version of the app definition schema or specification.

        • cardsrequired — (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.

            • idrequired — (String)

              The unique identifier of the text input card.

            • titlerequired — (String)

              The title or label of the text input card.

            • dependenciesrequired — (Array<String>)

              Any dependencies or requirements for the text input card.

            • typerequired — (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.

            • idrequired — (String)

              The unique identifier of the query card.

            • titlerequired — (String)

              The title or label of the query card.

            • dependenciesrequired — (Array<String>)

              Any dependencies or requirements for the query card.

            • typerequired — (String)

              The type of the card.

              Possible values include:
              • "text-input"
              • "q-query"
              • "file-upload"
              • "q-plugin"
            • promptrequired — (String)

              The prompt or instructions displayed for the query card.

            • outputSourcerequired — (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 and stringValue.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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 and longValue.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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 and longValue.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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 and longValue.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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 and longValue.

                • namerequired — (String)

                  The identifier for the attribute.

                • valuerequired — (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.

            • idrequired — (String)

              The unique identifier of the plugin card.

            • titlerequired — (String)

              The title or label of the plugin card.

            • dependenciesrequired — (Array<String>)

              Any dependencies or requirements for the plugin card.

            • typerequired — (String)

              The type of the card.

              Possible values include:
              • "text-input"
              • "q-query"
              • "file-upload"
              • "q-plugin"
            • promptrequired — (String)

              The prompt or instructions displayed for the plugin card.

            • pluginTyperequired — (String)

              The type or category of the plugin used by the card.

              Possible values include:
              • "SERVICE_NOW"
              • "SALESFORCE"
              • "JIRA"
              • "ZENDESK"
              • "CUSTOM"
            • pluginIdrequired — (String)

              The unique identifier of the plugin used by the card.

          • fileUpload — (map)

            A container for the properties of the file upload card.

            • idrequired — (String)

              The unique identifier of the file upload card.

            • titlerequired — (String)

              The title of the file upload card.

            • dependenciesrequired — (Array<String>)

              Any dependencies or requirements for the file upload card.

            • typerequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data 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.

        • currentStaterequired — (String)

          The current state of the card.

          Possible values include:
          • "IN_PROGRESS"
          • "WAITING"
          • "COMPLETED"
        • currentValuerequired — (String)

          The current value or result associated with the card.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data object has the following properties:

      • fileId — (String)

        The unique identifier assigned to the uploaded file.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data object has the following properties:

      • libraryItems — (Array<map>)

        The list of library items meeting the request criteria.

        • libraryItemIdrequired — (String)

          The unique identifier of the library item.

        • appIdrequired — (String)

          The unique identifier of the Q App associated with the library item.

        • appVersionrequired — (Integer)

          The version of the Q App associated with the library item.

        • categoriesrequired — (Array<map>)

          The categories associated with the library item.

          • idrequired — (String)

            The unique identifier of the category.

          • titlerequired — (String)

            The title or name of the category.

        • statusrequired — (String)

          The status of the library item.

        • createdAtrequired — (Date)

          The date and time the library item was created.

        • createdByrequired — (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.

        • ratingCountrequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data object has the following properties:

      • apps — (Array<map>)

        The list of Amazon Q Apps meeting the request criteria.

        • appIdrequired — (String)

          The unique identifier of the Q App.

        • appArnrequired — (String)

          The Amazon Resource Name (ARN) of the Q App.

        • titlerequired — (String)

          The title of the Q App.

        • description — (String)

          The description of the Q App.

        • createdAtrequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data object has the following properties:

      • tags — (map<String>)

        The list of tags that are assigned to the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

        • bodyrequired — (String)

          The text content of the conversation message.

        • typerequired — (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. The data object has the following properties:

      • app — (map)

        The generated Q App definition.

        • titlerequired — (String)

          The title of the generated Q App definition.

        • description — (String)

          The description of the generated Q App definition.

        • appDefinitionrequired — (map)

          The definition specifying the cards and flow of the generated Q App.

          • cardsrequired — (Array<map>)

            The cards that make up the Q App definition.

            • textInput — (map)

              A container for the properties of the text input card.

              • titlerequired — (String)

                The title or label of the text input card.

              • idrequired — (String)

                The unique identifier of the text input card.

              • typerequired — (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.

              • titlerequired — (String)

                The title or label of the query card.

              • idrequired — (String)

                The unique identifier of the query card.

              • typerequired — (String)

                The type of the card.

                Possible values include:
                • "text-input"
                • "q-query"
                • "file-upload"
                • "q-plugin"
              • promptrequired — (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 and stringValue.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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 and longValue.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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 and longValue.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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 and longValue.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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 and longValue.

                  • namerequired — (String)

                    The identifier for the attribute.

                  • valuerequired — (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.

              • titlerequired — (String)

                The title or label of the plugin card.

              • idrequired — (String)

                The unique identifier of the plugin card.

              • typerequired — (String)

                The type of the card.

                Possible values include:
                • "text-input"
                • "q-query"
                • "file-upload"
                • "q-plugin"
              • promptrequired — (String)

                The prompt or instructions displayed for the plugin card.

              • pluginIdrequired — (String)

                The unique identifier of the plugin used by the card.

            • fileUpload — (map)

              A container for the properties of the file upload input card.

              • titlerequired — (String)

                The title or label of the file upload card.

              • idrequired — (String)

                The unique identifier of the file upload card.

              • typerequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

      • cardIdrequired — (String)

        The unique identifier of the card.

      • valuerequired — (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. The data 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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. The data 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.

        • idrequired — (String)

          The unique identifier of the category.

        • titlerequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

      • cardsrequired — (Array<map>)

        The cards that make up the Q App definition.

        • textInput — (map)

          A container for the properties of the text input card.

          • titlerequired — (String)

            The title or label of the text input card.

          • idrequired — (String)

            The unique identifier of the text input card.

          • typerequired — (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.

          • titlerequired — (String)

            The title or label of the query card.

          • idrequired — (String)

            The unique identifier of the query card.

          • typerequired — (String)

            The type of the card.

            Possible values include:
            • "text-input"
            • "q-query"
            • "file-upload"
            • "q-plugin"
          • promptrequired — (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 and stringValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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 and longValue.

              • namerequired — (String)

                The identifier for the attribute.

              • valuerequired — (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.

          • titlerequired — (String)

            The title or label of the plugin card.

          • idrequired — (String)

            The unique identifier of the plugin card.

          • typerequired — (String)

            The type of the card.

            Possible values include:
            • "text-input"
            • "q-query"
            • "file-upload"
            • "q-plugin"
          • promptrequired — (String)

            The prompt or instructions displayed for the plugin card.

          • pluginIdrequired — (String)

            The unique identifier of the plugin used by the card.

        • fileUpload — (map)

          A container for the properties of the file upload input card.

          • titlerequired — (String)

            The title or label of the file upload card.

          • idrequired — (String)

            The unique identifier of the file upload card.

          • typerequired — (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. The data 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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 the WAITING state. Data for each WAITING card can be provided as input. If inputs are not provided, the call will be accepted but session will not move forward. Inputs for cards that are not in the WAITING status will be ignored.

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.

      • cardIdrequired — (String)

        The unique identifier of the card.

      • valuerequired — (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. The data 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.