Class: Aws::QApps::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb

Overview

An API client for QApps. To construct a client, you need to configure a :region and :credentials.

client = Aws::QApps::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::QApps::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::QApps::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



444
445
446
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 444

def initialize(*args)
  super
end

Instance Method Details

#associate_library_item_review(params = {}) ⇒ Struct

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.

Examples:

Example: Increase the rating counter by 1 for the related app for this user


resp = client.associate_library_item_review({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
})

Request syntax with placeholder values


resp = client.associate_library_item_review({
  instance_id: "InstanceId", # required
  library_item_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier for the Amazon Q Business application environment instance.

  • :library_item_id (required, String)

    The unique identifier of the library item to associate the review with.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



483
484
485
486
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 483

def associate_library_item_review(params = {}, options = {})
  req = build_request(:associate_library_item_review, params)
  req.send_request(options)
end

#associate_q_app_with_user(params = {}) ⇒ Struct

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.

Examples:

Example: Links an Amazon Q App to the invoker's list of apps


resp = client.associate_q_app_with_user({
  app_id: "393e77fb-0a30-4f47-ad30-75d71aeaed8a", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

Request syntax with placeholder values


resp = client.associate_q_app_with_user({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The ID of the Amazon Q App to associate with the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



521
522
523
524
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 521

def associate_q_app_with_user(params = {}, options = {})
  req = build_request(:associate_q_app_with_user, params)
  req.send_request(options)
end

#batch_create_category(params = {}) ⇒ Struct

Creates Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.

Examples:

Example: Creates the categories for the library


resp = client.batch_create_category({
  categories: [
    {
      id: "549abfe0-f5c4-45a2-bb9b-c05987a49c6d", 
      title: "HR", 
    }, 
    {
      id: "18cbebaa-196a-4aa5-a840-88d548e07f8f", 
      title: "Marketing", 
    }, 
  ], 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

Request syntax with placeholder values


resp = client.batch_create_category({
  instance_id: "InstanceId", # required
  categories: [ # required
    {
      id: "UUID",
      title: "BatchCreateCategoryInputCategoryTitleString", # required
      color: "BatchCreateCategoryInputCategoryColorString",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :categories (required, Array<Types::BatchCreateCategoryInputCategory>)

    The list of category objects to be created

Returns:

  • (Struct)

    Returns an empty response.

See Also:



578
579
580
581
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 578

def batch_create_category(params = {}, options = {})
  req = build_request(:batch_create_category, params)
  req.send_request(options)
end

#batch_delete_category(params = {}) ⇒ Struct

Deletes Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.

Examples:

Example: Deletes the categories in the library


resp = client.batch_delete_category({
  categories: [
    "9c871ed4-1c41-4065-aefe-321cd4b61cf8", 
  ], 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

Request syntax with placeholder values


resp = client.batch_delete_category({
  instance_id: "InstanceId", # required
  categories: ["UUID"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :categories (required, Array<String>)

    The list of IDs of the categories to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



622
623
624
625
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 622

def batch_delete_category(params = {}, options = {})
  req = build_request(:batch_delete_category, params)
  req.send_request(options)
end

#batch_update_category(params = {}) ⇒ Struct

Updates Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.

Examples:

Example: Updates the categories in the library


resp = client.batch_update_category({
  categories: [
    {
      id: "549abfe0-f5c4-45a2-bb9b-c05987a49c6d", 
      title: "HR Management", 
    }, 
    {
      id: "18cbebaa-196a-4aa5-a840-88d548e07f8f", 
      title: "Sales", 
    }, 
  ], 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

Request syntax with placeholder values


resp = client.batch_update_category({
  instance_id: "InstanceId", # required
  categories: [ # required
    {
      id: "UUID", # required
      title: "CategoryInputTitleString", # required
      color: "CategoryInputColorString",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :categories (required, Array<Types::CategoryInput>)

    The list of categories to be updated with their new values.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



679
680
681
682
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 679

def batch_update_category(params = {}, options = {})
  req = build_request(:batch_update_category, params)
  req.send_request(options)
end

#create_library_item(params = {}) ⇒ Types::CreateLibraryItemOutput

Creates a new library item for an Amazon Q App, allowing it to be discovered and used by other allowed users.

Examples:

Example: Create a Library Item


resp = client.create_library_item({
  app_id: "7a11f34b-42d4-4bc8-b668-ae4a788dae1e", 
  app_version: 6, 
  categories: [
    "9c871ed4-1c41-4065-aefe-321cd4b61cf8", 
  ], 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

resp.to_h outputs the following:
{
  created_at: Time.parse("2024-05-21T23:17:27.350Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  is_verified: false, 
  library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
  rating_count: 0, 
  status: "PUBLISHED", 
  updated_at: Time.parse("2024-05-21T23:17:27.350Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
}

Request syntax with placeholder values


resp = client.create_library_item({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
  app_version: 1, # required
  categories: ["UUID"], # required
})

Response structure


resp.library_item_id #=> String
resp.status #=> String
resp.created_at #=> Time
resp.created_by #=> String
resp.updated_at #=> Time
resp.updated_by #=> String
resp.rating_count #=> Integer
resp.is_verified #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Amazon Q App to publish to the library.

  • :app_version (required, Integer)

    The version of the Amazon Q App to publish to the library.

  • :categories (required, Array<String>)

    The categories to associate with the library item for easier discovery.

Returns:

See Also:



760
761
762
763
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 760

def create_library_item(params = {}, options = {})
  req = build_request(:create_library_item, params)
  req.send_request(options)
end

#create_presigned_url(params = {}) ⇒ Types::CreatePresignedUrlOutput

Creates a presigned URL for an S3 POST operation to upload a file. You can use this URL to set a default file for a FileUploadCard in a Q App definition or to provide a file for a single Q App run. The scope parameter determines how the file will be used, either at the app definition level or the app session level.

Examples:

Example: Upload a file to a specific session


resp = client.create_presigned_url({
  app_id: "4263767c-d889-4cb2-a8f6-8b649bc66af0", 
  card_id: "82f69028-22a9-4bea-8727-0eabf58e9fed", 
  file_contents_sha_256: "wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=", 
  file_name: "myFile.txt", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  scope: "SESSION", 
  session_id: "4f0e5b87-9d38-41cd-9eb4-ebce2f2917cc", 
})

resp.to_h outputs the following:
{
  file_id: "412aa1b4-341c-45af-936d-da52f8a1a3b4", 
  presigned_url: "https://qapps-uploaded-files-us-east-1-c819fab7cf78c9205158297913deb9e0.s3.us-east-1.amazonaws.com/", 
  presigned_url_expiration: Time.parse("2024-09-14T00:11:54.232Z"), 
  presigned_url_fields: {
    "x-amz-checksum-sha256" => "wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=", 
    "x-amz-server-side-encryption" => "aws:kms", 
    "x-amz-server-side-encryption-aws-kms-key-id" => "0a6a474b-f2ca-46ea-9e72-deea9077d92f", 
    "x-amz-server-side-encryption-context" => "eyJBUFBMSUNBVElPTl9JRCI6IjAxMjM0NTY3ODkwMSJ9", 
  }, 
}

Example: Upload a file into a application


resp = client.create_presigned_url({
  app_id: "4263767c-d889-4cb2-a8f6-8b649bc66af0", 
  card_id: "7a11f34b-42d4-4bc8-b668-ae4a788dae1e", 
  file_contents_sha_256: "wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=", 
  file_name: "anApplicationFile.txt", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  scope: "APPLICATION", 
})

resp.to_h outputs the following:
{
  file_id: "412aa1b4-341c-45af-936d-da52f8a1a3b4", 
  presigned_url: "https://qapps-uploaded-files-us-east-1-c819fab7cf78c9205158297913deb9e0.s3.us-east-1.amazonaws.com/", 
  presigned_url_expiration: Time.parse("2024-09-14T00:11:54.232Z"), 
  presigned_url_fields: {
    "x-amz-checksum-sha256" => "wXY7GD8m4fmHhdtuQyBdXzNQpdCseVwBcOBIlzfm+kg=", 
    "x-amz-server-side-encryption" => "aws:kms", 
    "x-amz-server-side-encryption-aws-kms-key-id" => "0a6a474b-f2ca-46ea-9e72-deea9077d92f", 
    "x-amz-server-side-encryption-context" => "eyJBUFBMSUNBVElPTl9JRCI6IjAxMjM0NTY3ODkwMSJ9", 
  }, 
}

Request syntax with placeholder values


resp = client.create_presigned_url({
  instance_id: "InstanceId", # required
  card_id: "UUID", # required
  app_id: "UUID", # required
  file_contents_sha_256: "CreatePresignedUrlInputFileContentsSha256String", # required
  file_name: "Filename", # required
  scope: "APPLICATION", # required, accepts APPLICATION, SESSION
  session_id: "UUID",
})

Response structure


resp.file_id #=> String
resp.presigned_url #=> String
resp.presigned_url_fields #=> Hash
resp.presigned_url_fields["String"] #=> String
resp.presigned_url_expiration #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :card_id (required, String)

    The unique identifier of the card the file is associated with.

  • :app_id (required, String)

    The unique identifier of the Q App the file is associated with.

  • :file_contents_sha_256 (required, String)

    The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.

  • :file_name (required, String)

    The name of the file to be uploaded.

  • :scope (required, String)

    Whether the file is associated with a Q App definition or a specific Q App session.

  • :session_id (String)

    The unique identifier of the Q App session the file is associated with, if applicable.

Returns:

See Also:



877
878
879
880
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 877

def create_presigned_url(params = {}, options = {})
  req = build_request(:create_presigned_url, params)
  req.send_request(options)
end

#create_q_app(params = {}) ⇒ Types::CreateQAppOutput

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.

Examples:

Example: A basic application with 1 text input card and 1 output card


resp = client.create_q_app({
  app_definition: {
    cards: [
      {
        text_input: {
          type: "text-input", 
          id: "4cf94d96-8819-45c2-98cc-58c56b35c72f", 
          title: "Color Base", 
        }, 
      }, 
      {
        q_query: {
          type: "q-query", 
          id: "18870b94-1e63-40e0-8c12-669c90ac5acc", 
          prompt: "Recommend me a list of colors that go well with @4cf94d96-8819-45c2-98cc-58c56b35c72f", 
          title: "Recommended Palette", 
        }, 
      }, 
    ], 
    initial_prompt: "Create an app that recommend a list of colors based on input.", 
  }, 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  title: "Color Palette Generator", 
})

resp.to_h outputs the following:
{
  app_arn: "arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_id: "7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_version: 1, 
  created_at: Time.parse("2024-05-14T00:11:54.232Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  initial_prompt: "Create an app that recommend a list of colors based on input.", 
  required_capabilities: [
    "CreatorMode", 
  ], 
  status: "DRAFT", 
  title: "Color Palette Generator", 
  updated_at: Time.parse("2024-05-14T00:13:26.168Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
}

Request syntax with placeholder values


resp = client.create_q_app({
  instance_id: "InstanceId", # required
  title: "Title", # required
  description: "Description",
  app_definition: { # required
    cards: [ # required
      {
        text_input: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          placeholder: "Placeholder",
          default_value: "Default",
        },
        q_query: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          prompt: "Prompt", # required
          output_source: "approved-sources", # accepts approved-sources, llm
          attribute_filter: {
            and_all_filters: [
              {
                # recursive AttributeFilter
              },
            ],
            or_all_filters: [
              {
                # recursive AttributeFilter
              },
            ],
            not_filter: {
              # recursive AttributeFilter
            },
            equals_to: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            contains_all: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            contains_any: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            greater_than: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            greater_than_or_equals: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            less_than: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            less_than_or_equals: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
          },
        },
        q_plugin: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          prompt: "Prompt", # required
          plugin_id: "PluginId", # required
          action_identifier: "ActionIdentifier",
        },
        file_upload: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          filename: "Filename",
          file_id: "UUID",
          allow_override: false,
        },
        form_input: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          metadata: { # required
            schema: { # required
            },
          },
          compute_mode: "append", # accepts append, replace
        },
      },
    ],
    initial_prompt: "InitialPrompt",
  },
  tags: {
    "String" => "String",
  },
})

Response structure


resp.app_id #=> String
resp.app_arn #=> String
resp.title #=> String
resp.description #=> String
resp.initial_prompt #=> String
resp.app_version #=> Integer
resp.status #=> String, one of "PUBLISHED", "DRAFT", "DELETED"
resp.created_at #=> Time
resp.created_by #=> String
resp.updated_at #=> Time
resp.updated_by #=> String
resp.required_capabilities #=> Array
resp.required_capabilities[0] #=> String, one of "FileUpload", "CreatorMode", "RetrievalMode", "PluginMode"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :title (required, String)

    The title of the new Q App.

  • :description (String)

    The description of the new Q App.

  • :app_definition (required, Types::AppDefinitionInput)

    The definition of the new Q App, specifying the cards and flow.

  • :tags (Hash<String,String>)

    Optional tags to associate with the new Q App.

Returns:

See Also:



1119
1120
1121
1122
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1119

def create_q_app(params = {}, options = {})
  req = build_request(:create_q_app, params)
  req.send_request(options)
end

#delete_library_item(params = {}) ⇒ Struct

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.

Examples:

Example: Delete a library item


resp = client.delete_library_item({
  instance_id: "3642ba81-344c-42fd-a480-9119a5a5f26b", 
  library_item_id: "72088fd4-78b6-43da-bfb8-8621323c3cfb", 
})

Request syntax with placeholder values


resp = client.delete_library_item({
  instance_id: "InstanceId", # required
  library_item_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :library_item_id (required, String)

    The unique identifier of the library item to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1155
1156
1157
1158
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1155

def delete_library_item(params = {}, options = {})
  req = build_request(:delete_library_item, params)
  req.send_request(options)
end

#delete_q_app(params = {}) ⇒ Struct

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.

Examples:

Example: Delete an Amazon Q App


resp = client.delete_q_app({
  app_id: "393e77fb-0a30-4f47-ad30-75d71aeaed8a", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

Request syntax with placeholder values


resp = client.delete_q_app({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Q App to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1191
1192
1193
1194
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1191

def delete_q_app(params = {}, options = {})
  req = build_request(:delete_q_app, params)
  req.send_request(options)
end

#describe_q_app_permissions(params = {}) ⇒ Types::DescribeQAppPermissionsOutput

Describes read permissions for a Amazon Q App in Amazon Q Business application environment instance.

Examples:

Example: Describe permissions for the app


resp = client.describe_q_app_permissions({
  app_id: "fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
  instance_id: "01793661-ad73-4c7d-8eaa-1c95a10151c2", 
})

resp.to_h outputs the following:
{
  app_id: "fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
  permissions: [
    {
      action: "write", 
      principal: {
        email: "user1@example.com", 
        user_id: "f8f15330-b091-708b-d46e-adb0d914b699", 
      }, 
    }, 
    {
      action: "read", 
      principal: {
        email: "user2@example.com", 
        user_id: "c81133d0-10d1-70eb-aaa3-d427ea6fc0f3", 
      }, 
    }, 
  ], 
  resource_arn: "arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
}

Request syntax with placeholder values


resp = client.describe_q_app_permissions({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
})

Response structure


resp.resource_arn #=> String
resp.app_id #=> String
resp.permissions #=> Array
resp.permissions[0].action #=> String, one of "read", "write"
resp.permissions[0].principal.user_id #=> String
resp.permissions[0].principal.user_type #=> String, one of "owner", "user"
resp.permissions[0].principal.email #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Amazon Q App for which to retrieve permissions.

Returns:

See Also:



1264
1265
1266
1267
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1264

def describe_q_app_permissions(params = {}, options = {})
  req = build_request(:describe_q_app_permissions, params)
  req.send_request(options)
end

#disassociate_library_item_review(params = {}) ⇒ Struct

Removes a rating or review previously submitted by the user for a library item.

Examples:

Example: Decrease the rating counter by 1 for the related app for this user


resp = client.disassociate_library_item_review({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
})

Request syntax with placeholder values


resp = client.disassociate_library_item_review({
  instance_id: "InstanceId", # required
  library_item_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :library_item_id (required, String)

    The unique identifier of the library item to remove the review from.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1300
1301
1302
1303
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1300

def disassociate_library_item_review(params = {}, options = {})
  req = build_request(:disassociate_library_item_review, params)
  req.send_request(options)
end

#disassociate_q_app_from_user(params = {}) ⇒ Struct

Disassociates a Q App from a user removing the user's access to run the Q App.

Examples:

Example: Unlinks an Amazon Q App from the invoker's list of apps


resp = client.disassociate_q_app_from_user({
  app_id: "393e77fb-0a30-4f47-ad30-75d71aeaed8a", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

Request syntax with placeholder values


resp = client.disassociate_q_app_from_user({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Q App to disassociate from the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1336
1337
1338
1339
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1336

def disassociate_q_app_from_user(params = {}, options = {})
  req = build_request(:disassociate_q_app_from_user, params)
  req.send_request(options)
end

#export_q_app_session_data(params = {}) ⇒ Types::ExportQAppSessionDataOutput

Exports the collected data of a Q App data collection session.

Examples:

Request syntax with placeholder values


resp = client.export_q_app_session_data({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
})

Response structure


resp.csv_file_link #=> String
resp.expires_at #=> Time
resp.session_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App data collection session.

Returns:

See Also:



1373
1374
1375
1376
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1373

def export_q_app_session_data(params = {}, options = {})
  req = build_request(:export_q_app_session_data, params)
  req.send_request(options)
end

#get_library_item(params = {}) ⇒ Types::GetLibraryItemOutput

Retrieves details about a library item for an Amazon Q App, including its metadata, categories, ratings, and usage statistics.

Examples:

Example: Retrieve a library item


resp = client.get_library_item({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  library_item_id: "18cbebaa-196a-4aa5-a840-88d548e07f8f", 
})

resp.to_h outputs the following:
{
  app_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  app_version: 1, 
  categories: [
    {
      id: "9c871ed4-1c41-4065-aefe-321cd4b61cf8", 
      title: "HR", 
    }, 
    {
      id: "fdc4b483-c4e2-44c9-b4b2-6c850bbdb579", 
      title: "General", 
    }, 
    {
      id: "c1c4e374-118c-446f-81fb-cba6225d88da", 
      title: "IT", 
    }, 
  ], 
  created_at: Time.parse("2024-05-08T16:09:56.080Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  is_rated_by_user: false, 
  is_verified: false, 
  library_item_id: "18cbebaa-196a-4aa5-a840-88d548e07f8f", 
  rating_count: 0, 
  status: "PUBLISHED", 
  updated_at: Time.parse("2024-05-08T16:09:56.080Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  user_count: 1, 
}

Request syntax with placeholder values


resp = client.get_library_item({
  instance_id: "InstanceId", # required
  library_item_id: "UUID", # required
  app_id: "UUID",
})

Response structure


resp.library_item_id #=> String
resp.app_id #=> String
resp.app_version #=> Integer
resp.categories #=> Array
resp.categories[0].id #=> String
resp.categories[0].title #=> String
resp.categories[0].color #=> String
resp.categories[0].app_count #=> Integer
resp.status #=> String
resp.created_at #=> Time
resp.created_by #=> String
resp.updated_at #=> Time
resp.updated_by #=> String
resp.rating_count #=> Integer
resp.is_rated_by_user #=> Boolean
resp.user_count #=> Integer
resp.is_verified #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :library_item_id (required, String)

    The unique identifier of the library item to retrieve.

  • :app_id (String)

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

Returns:

See Also:



1478
1479
1480
1481
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1478

def get_library_item(params = {}, options = {})
  req = build_request(:get_library_item, params)
  req.send_request(options)
end

#get_q_app(params = {}) ⇒ Types::GetQAppOutput

Retrieves the full details of an Q App, including its definition specifying the cards and flow.

Examples:

Example: A basic application with 1 text input card and 1 output card


resp = client.get_q_app({
  app_id: "3d110749-efc3-427c-87e8-15e966e5c168", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

resp.to_h outputs the following:
{
  app_arn: "arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_definition: {
    app_definition_version: "1", 
    cards: [
      {
        text_input: {
          type: "text-input", 
          dependencies: [
          ], 
          id: "4cf94d96-8819-45c2-98cc-58c56b35c72f", 
          title: "Color Base", 
        }, 
      }, 
      {
        q_query: {
          type: "q-query", 
          dependencies: [
            "91e4513d-6981-454a-9329-329c9302eef4", 
          ], 
          id: "18870b94-1e63-40e0-8c12-669c90ac5acc", 
          output_source: "llm", 
          prompt: "Recommend me a list of colors that go well with @91e4513d-6981-454a-9329-329c9302eef4 ", 
          title: "Recommended Palette", 
        }, 
      }, 
    ], 
  }, 
  app_id: "7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_version: 1, 
  created_at: Time.parse("2024-05-14T00:11:54.232Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  status: "DRAFT", 
  title: "Color Palette Generator", 
  updated_at: Time.parse("2024-05-14T00:13:26.168Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
}

Request syntax with placeholder values


resp = client.get_q_app({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
  app_version: 1,
})

Response structure


resp.app_id #=> String
resp.app_arn #=> String
resp.title #=> String
resp.description #=> String
resp.initial_prompt #=> String
resp.app_version #=> Integer
resp.status #=> String, one of "PUBLISHED", "DRAFT", "DELETED"
resp.created_at #=> Time
resp.created_by #=> String
resp.updated_at #=> Time
resp.updated_by #=> String
resp.required_capabilities #=> Array
resp.required_capabilities[0] #=> String, one of "FileUpload", "CreatorMode", "RetrievalMode", "PluginMode"
resp.app_definition.app_definition_version #=> String
resp.app_definition.cards #=> Array
resp.app_definition.cards[0].text_input.id #=> String
resp.app_definition.cards[0].text_input.title #=> String
resp.app_definition.cards[0].text_input.dependencies #=> Array
resp.app_definition.cards[0].text_input.dependencies[0] #=> String
resp.app_definition.cards[0].text_input.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app_definition.cards[0].text_input.placeholder #=> String
resp.app_definition.cards[0].text_input.default_value #=> String
resp.app_definition.cards[0].q_query.id #=> String
resp.app_definition.cards[0].q_query.title #=> String
resp.app_definition.cards[0].q_query.dependencies #=> Array
resp.app_definition.cards[0].q_query.dependencies[0] #=> String
resp.app_definition.cards[0].q_query.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app_definition.cards[0].q_query.prompt #=> String
resp.app_definition.cards[0].q_query.output_source #=> String, one of "approved-sources", "llm"
resp.app_definition.cards[0].q_query.attribute_filter.and_all_filters #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.and_all_filters[0] #=> Types::AttributeFilter
resp.app_definition.cards[0].q_query.attribute_filter.or_all_filters #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.or_all_filters[0] #=> Types::AttributeFilter
resp.app_definition.cards[0].q_query.attribute_filter.not_filter #=> Types::AttributeFilter
resp.app_definition.cards[0].q_query.attribute_filter.equals_to.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.equals_to.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.equals_to.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.equals_to.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.equals_to.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.equals_to.value.date_value #=> Time
resp.app_definition.cards[0].q_query.attribute_filter.contains_all.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.contains_all.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.contains_all.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.contains_all.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.contains_all.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.contains_all.value.date_value #=> Time
resp.app_definition.cards[0].q_query.attribute_filter.contains_any.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.contains_any.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.contains_any.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.contains_any.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.contains_any.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.contains_any.value.date_value #=> Time
resp.app_definition.cards[0].q_query.attribute_filter.greater_than.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.greater_than.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.greater_than.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.greater_than.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.greater_than.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.greater_than.value.date_value #=> Time
resp.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.date_value #=> Time
resp.app_definition.cards[0].q_query.attribute_filter.less_than.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.less_than.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.less_than.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.less_than.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.less_than.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.less_than.value.date_value #=> Time
resp.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.name #=> String
resp.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.string_value #=> String
resp.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.string_list_value #=> Array
resp.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.string_list_value[0] #=> String
resp.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.long_value #=> Integer
resp.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.date_value #=> Time
resp.app_definition.cards[0].q_query.memory_references #=> Array
resp.app_definition.cards[0].q_query.memory_references[0] #=> String
resp.app_definition.cards[0].q_plugin.id #=> String
resp.app_definition.cards[0].q_plugin.title #=> String
resp.app_definition.cards[0].q_plugin.dependencies #=> Array
resp.app_definition.cards[0].q_plugin.dependencies[0] #=> String
resp.app_definition.cards[0].q_plugin.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app_definition.cards[0].q_plugin.prompt #=> String
resp.app_definition.cards[0].q_plugin.plugin_type #=> String, one of "SERVICE_NOW", "SALESFORCE", "JIRA", "ZENDESK", "CUSTOM", "ASANA", "ATLASSIAN_CONFLUENCE", "GOOGLE_CALENDAR", "JIRA_CLOUD", "MICROSOFT_EXCHANGE", "MICROSOFT_TEAMS", "PAGERDUTY_ADVANCE", "SALESFORCE_CRM", "SERVICENOW_NOW_PLATFORM", "SMARTSHEET", "ZENDESK_SUITE"
resp.app_definition.cards[0].q_plugin.plugin_id #=> String
resp.app_definition.cards[0].q_plugin.action_identifier #=> String
resp.app_definition.cards[0].file_upload.id #=> String
resp.app_definition.cards[0].file_upload.title #=> String
resp.app_definition.cards[0].file_upload.dependencies #=> Array
resp.app_definition.cards[0].file_upload.dependencies[0] #=> String
resp.app_definition.cards[0].file_upload.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app_definition.cards[0].file_upload.filename #=> String
resp.app_definition.cards[0].file_upload.file_id #=> String
resp.app_definition.cards[0].file_upload.allow_override #=> Boolean
resp.app_definition.cards[0].form_input.id #=> String
resp.app_definition.cards[0].form_input.title #=> String
resp.app_definition.cards[0].form_input.dependencies #=> Array
resp.app_definition.cards[0].form_input.dependencies[0] #=> String
resp.app_definition.cards[0].form_input.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app_definition.cards[0].form_input.compute_mode #=> String, one of "append", "replace"
resp.app_definition.can_edit #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Q App to retrieve.

  • :app_version (Integer)

    The version of the Q App.

Returns:

See Also:



1676
1677
1678
1679
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1676

def get_q_app(params = {}, options = {})
  req = build_request(:get_q_app, params)
  req.send_request(options)
end

#get_q_app_session(params = {}) ⇒ Types::GetQAppSessionOutput

Retrieves the current state and results for an active session of an Amazon Q App.

Examples:

Request syntax with placeholder values


resp = client.get_q_app_session({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
})

Response structure


resp.session_id #=> String
resp.session_arn #=> String
resp.session_name #=> String
resp.app_version #=> Integer
resp.latest_published_app_version #=> Integer
resp.status #=> String, one of "IN_PROGRESS", "WAITING", "COMPLETED", "ERROR"
resp.card_status #=> Hash
resp.card_status["UUID"].current_state #=> String, one of "IN_PROGRESS", "WAITING", "COMPLETED", "ERROR"
resp.card_status["UUID"].current_value #=> String
resp.card_status["UUID"].submissions #=> Array
resp.card_status["UUID"].submissions[0].submission_id #=> String
resp.card_status["UUID"].submissions[0].timestamp #=> Time
resp.user_is_host #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App session to retrieve.

Returns:

See Also:



1729
1730
1731
1732
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1729

def get_q_app_session(params = {}, options = {})
  req = build_request(:get_q_app_session, params)
  req.send_request(options)
end

#get_q_app_session_metadata(params = {}) ⇒ Types::GetQAppSessionMetadataOutput

Retrieves the current configuration of a Q App session.

Examples:

Example: Retrieves an existing session metadata for an Amazon Q App


resp = client.({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  session_id: "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", 
})

resp.to_h outputs the following:
{
  session_arn: "arn:aws:qapps:us-west-2:0123456789012:application/cbea8329-41c0-4566-a112-19250921a220/qapp/387ccac9-4717-489f-841f-729b7d7de355/session/56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", 
  session_id: "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", 
  session_name: "Trip itinerary collection session", 
  session_owner: true, 
  sharing_configuration: {
    accept_responses: true, 
    enabled: true, 
    reveal_cards: false, 
  }, 
}

Request syntax with placeholder values


resp = client.({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
})

Response structure


resp.session_id #=> String
resp.session_arn #=> String
resp.session_name #=> String
resp.sharing_configuration.enabled #=> Boolean
resp.sharing_configuration.accept_responses #=> Boolean
resp.sharing_configuration.reveal_cards #=> Boolean
resp.session_owner #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App session.

Returns:

See Also:



1793
1794
1795
1796
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1793

def (params = {}, options = {})
  req = build_request(:get_q_app_session_metadata, params)
  req.send_request(options)
end

#import_document(params = {}) ⇒ Types::ImportDocumentOutput

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.

Examples:

Example: Upload a file to a specific session


resp = client.import_document({
  app_id: "4263767c-d889-4cb2-a8f6-8b649bc66af0", 
  card_id: "82f69028-22a9-4bea-8727-0eabf58e9fed", 
  file_contents_base_64: "data:text/plain;base64,SomeFileEncodedInBase64", 
  file_name: "myFile.txt", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  scope: "SESSION", 
  session_id: "4f0e5b87-9d38-41cd-9eb4-ebce2f2917cc", 
})

resp.to_h outputs the following:
{
  file_id: "412aa1b4-341c-45af-936d-da52f8a1a3b4", 
}

Example: Upload a file into a application


resp = client.import_document({
  app_id: "4263767c-d889-4cb2-a8f6-8b649bc66af0", 
  card_id: "7a11f34b-42d4-4bc8-b668-ae4a788dae1e", 
  file_contents_base_64: "data:text/plain;base64,SomeFileEncodedInBase64", 
  file_name: "anApplicationFile.txt", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  scope: "APPLICATION", 
})

resp.to_h outputs the following:
{
  file_id: "bc1a0cc9-076a-4e82-9a6c-f4d2d8a22489", 
}

Request syntax with placeholder values


resp = client.import_document({
  instance_id: "InstanceId", # required
  card_id: "UUID", # required
  app_id: "UUID", # required
  file_contents_base_64: "String", # required
  file_name: "Filename", # required
  scope: "APPLICATION", # required, accepts APPLICATION, SESSION
  session_id: "UUID",
})

Response structure


resp.file_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :card_id (required, String)

    The unique identifier of the card the file is associated with.

  • :app_id (required, String)

    The unique identifier of the Q App the file is associated with.

  • :file_contents_base_64 (required, String)

    The base64-encoded contents of the file to upload.

  • :file_name (required, String)

    The name of the file being uploaded.

  • :scope (required, String)

    Whether the file is associated with a Q App definition or a specific Q App session.

  • :session_id (String)

    The unique identifier of the Q App session the file is associated with, if applicable.

Returns:

See Also:



1886
1887
1888
1889
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1886

def import_document(params = {}, options = {})
  req = build_request(:import_document, params)
  req.send_request(options)
end

#list_categories(params = {}) ⇒ Types::ListCategoriesOutput

Lists the categories of a Amazon Q Business application environment instance. For more information, see Custom labels for Amazon Q Apps.

Examples:

Example: List categories available for the library items in this instance


resp = client.list_categories({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

resp.to_h outputs the following:
{
  categories: [
    {
      app_count: 10, 
      color: "#FF6600", 
      id: "549abfe0-f5c4-45a2-bb9b-c05987a49c6d", 
      title: "HR", 
    }, 
    {
      app_count: 11, 
      color: "#FFFF00", 
      id: "18cbebaa-196a-4aa5-a840-88d548e07f8f", 
      title: "Marketing", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_categories({
  instance_id: "InstanceId", # required
})

Response structure


resp.categories #=> Array
resp.categories[0].id #=> String
resp.categories[0].title #=> String
resp.categories[0].color #=> String
resp.categories[0].app_count #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

Returns:

See Also:



1950
1951
1952
1953
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 1950

def list_categories(params = {}, options = {})
  req = build_request(:list_categories, params)
  req.send_request(options)
end

#list_library_items(params = {}) ⇒ Types::ListLibraryItemsOutput

Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Example: List at most 3 library items for this instance


resp = client.list_library_items({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  limit: 3, 
})

resp.to_h outputs the following:
{
  library_items: [
    {
      app_id: "7a11f34b-42d4-4bc8-b668-ae4a788dae1e", 
      app_version: 6, 
      categories: [
        {
          id: "9c871ed4-1c41-4065-aefe-321cd4b61cf8", 
          title: "HR", 
        }, 
        {
          id: "c1c4e374-118c-446f-81fb-cba6225d88da", 
          title: "IT", 
        }, 
      ], 
      created_at: Time.parse("2024-05-21T23:17:27.350Z"), 
      created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
      is_rated_by_user: true, 
      is_verified: false, 
      library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
      rating_count: 3, 
      status: "PUBLISHED", 
      updated_at: Time.parse("2024-05-21T23:17:27.350Z"), 
      updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
      user_count: 5, 
    }, 
    {
      app_id: "201272ac-d474-4a97-991c-5520dae04026", 
      app_version: 1, 
      categories: [
        {
          id: "fdc4b483-c4e2-44c9-b4b2-6c850bbdb579", 
          title: "General", 
        }, 
      ], 
      created_at: Time.parse("2024-05-08T16:09:56.080Z"), 
      created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
      is_rated_by_user: false, 
      is_verified: false, 
      library_item_id: "18cbebaa-196a-4aa5-a840-88d548e07f8f", 
      rating_count: 5, 
      status: "PUBLISHED", 
      updated_at: Time.parse("2024-05-08T16:09:56.080Z"), 
      updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
      user_count: 8, 
    }, 
    {
      app_id: "1802f57f-079a-4b5b-839a-79bbe2e21b3c", 
      app_version: 1, 
      categories: [
        {
          id: "fdc4b483-c4e2-44c9-b4b2-6c850bbdb579", 
          title: "General", 
        }, 
      ], 
      created_at: Time.parse("2024-05-07T22:57:59.327Z"), 
      created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
      is_rated_by_user: false, 
      is_verified: false, 
      library_item_id: "549abfe0-f5c4-45a2-bb9b-c05987a49c6d", 
      rating_count: 8, 
      status: "PUBLISHED", 
      updated_at: Time.parse("2024-05-07T22:57:59.327Z"), 
      updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
      user_count: 12, 
    }, 
  ], 
  next_token: "YW5vdGhlclRva2VuIQ==", 
}

Request syntax with placeholder values


resp = client.list_library_items({
  instance_id: "InstanceId", # required
  limit: 1,
  next_token: "PaginationToken",
  category_id: "UUID",
})

Response structure


resp.library_items #=> Array
resp.library_items[0].library_item_id #=> String
resp.library_items[0].app_id #=> String
resp.library_items[0].app_version #=> Integer
resp.library_items[0].categories #=> Array
resp.library_items[0].categories[0].id #=> String
resp.library_items[0].categories[0].title #=> String
resp.library_items[0].categories[0].color #=> String
resp.library_items[0].categories[0].app_count #=> Integer
resp.library_items[0].status #=> String
resp.library_items[0].created_at #=> Time
resp.library_items[0].created_by #=> String
resp.library_items[0].updated_at #=> Time
resp.library_items[0].updated_by #=> String
resp.library_items[0].rating_count #=> Integer
resp.library_items[0].is_rated_by_user #=> Boolean
resp.library_items[0].user_count #=> Integer
resp.library_items[0].is_verified #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, 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.

  • :next_token (String)

    The token to request the next page of results.

  • :category_id (String)

    Optional category to filter the library items by.

Returns:

See Also:



2092
2093
2094
2095
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2092

def list_library_items(params = {}, options = {})
  req = build_request(:list_library_items, params)
  req.send_request(options)
end

#list_q_app_session_data(params = {}) ⇒ Types::ListQAppSessionDataOutput

Lists the collected data of a Q App data collection session.

Examples:

Request syntax with placeholder values


resp = client.list_q_app_session_data({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
})

Response structure


resp.session_id #=> String
resp.session_arn #=> String
resp.session_data #=> Array
resp.session_data[0].card_id #=> String
resp.session_data[0].user.user_id #=> String
resp.session_data[0].submission_id #=> String
resp.session_data[0].timestamp #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App data collection session.

Returns:

See Also:



2135
2136
2137
2138
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2135

def list_q_app_session_data(params = {}, options = {})
  req = build_request(:list_q_app_session_data, params)
  req.send_request(options)
end

#list_q_apps(params = {}) ⇒ Types::ListQAppsOutput

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Example: List at most 3 Amazon Q Apps in an Q Business application


resp = client.list_q_apps({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  limit: 3, 
})

resp.to_h outputs the following:
{
  apps: [
    {
      app_arn: "arn:aws:qapps:us-west-2:..../7b9fe303-18bb-4643-952c-bfcf9f4c427f", 
      app_id: "7b9fe303-18bb-4643-952c-bfcf9f4c427f", 
      created_at: Time.parse("2024-05-21T04:09:10.401Z"), 
      description: "Description 1", 
      is_verified: false, 
      status: "DRAFT", 
      title: "App 1", 
    }, 
    {
      app_arn: "arn:aws:qapps:us-west-2:..../dd178fd6-ad3d-49b3-a32d-e915cf423e37", 
      app_id: "dd178fd6-ad3d-49b3-a32d-e915cf423e37", 
      created_at: Time.parse("2024-05-21T04:09:10.401Z"), 
      description: "Description 2", 
      is_verified: true, 
      status: "PUBLISHED", 
      title: "App 2", 
    }, 
    {
      app_arn: "arn:aws:qapps:us-west-2:..../3274b744-1a13-4aad-953f-eda2e4149e6e", 
      app_id: "3274b744-1a13-4aad-953f-eda2e4149e6e", 
      created_at: Time.parse("2024-05-21T04:09:10.401Z"), 
      description: "Description 3", 
      is_verified: false, 
      status: "DRAFT", 
      title: "App 3", 
    }, 
  ], 
  next_token: "bXlzdGVyaW91c1BhZ2luYXRpb25Ub2tlbg==", 
}

Example: Retrieve the next page of Amazon Q Apps


resp = client.list_q_apps({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  limit: 3, 
  next_token: "bXlzdGVyaW91c1BhZ2luYXRpb25Ub2tlbg==", 
})

resp.to_h outputs the following:
{
  apps: [
    {
      app_arn: "arn:aws:qapps:us-west-2:..../bec8ee64-2635-41e8-aace-e1e418f4f295", 
      app_id: "bec8ee64-2635-41e8-aace-e1e418f4f295", 
      created_at: Time.parse("2024-05-21T04:09:10.401Z"), 
      description: "Description 4", 
      is_verified: true, 
      status: "PUBLISHED", 
      title: "App 4", 
    }, 
    {
      app_arn: "arn:aws:qapps:us-west-2:..../c380a45d-bd77-45b0-a0e5-8a266c1d8bc4", 
      app_id: "c380a45d-bd77-45b0-a0e5-8a266c1d8bc4", 
      created_at: Time.parse("2024-05-21T04:09:10.401Z"), 
      description: "Description 5", 
      is_verified: false, 
      status: "PUBLISHED", 
      title: "App 5", 
    }, 
    {
      app_arn: "arn:aws:qapps:us-west-2:..../afc4ee80-9722-4396-85a6-7aeaff52c177", 
      app_id: "afc4ee80-9722-4396-85a6-7aeaff52c177", 
      created_at: Time.parse("2024-05-21T04:09:10.401Z"), 
      description: "Description 6", 
      is_verified: false, 
      status: "PUBLISHED", 
      title: "App 6", 
    }, 
  ], 
  next_token: "YW5vdGhlclRva2VuIQ==", 
}

Request syntax with placeholder values


resp = client.list_q_apps({
  instance_id: "InstanceId", # required
  limit: 1,
  next_token: "PaginationToken",
})

Response structure


resp.apps #=> Array
resp.apps[0].app_id #=> String
resp.apps[0].app_arn #=> String
resp.apps[0].title #=> String
resp.apps[0].description #=> String
resp.apps[0].created_at #=> Time
resp.apps[0].can_edit #=> Boolean
resp.apps[0].status #=> String
resp.apps[0].is_verified #=> Boolean
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, 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.

  • :next_token (String)

    The token to request the next page of results.

Returns:

See Also:



2271
2272
2273
2274
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2271

def list_q_apps(params = {}, options = {})
  req = build_request(:list_q_apps, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags associated with an Amazon Q Apps resource.

Examples:

Example: A call to list tags for a resource


resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
})

resp.to_h outputs the following:
{
  tags: {
    "department" => "HR", 
  }, 
}

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "AmazonResourceName", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource whose tags should be listed.

Returns:

See Also:



2315
2316
2317
2318
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2315

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#predict_q_app(params = {}) ⇒ Types::PredictQAppOutput

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.

Examples:

Request syntax with placeholder values


resp = client.predict_q_app({
  instance_id: "InstanceId", # required
  options: {
    conversation: [
      {
        body: "ConversationMessageBodyString", # required
        type: "USER", # required, accepts USER, SYSTEM
      },
    ],
    problem_statement: "PredictQAppInputOptionsProblemStatementString",
  },
})

Response structure


resp.app.title #=> String
resp.app.description #=> String
resp.app.app_definition.cards #=> Array
resp.app.app_definition.cards[0].text_input.title #=> String
resp.app.app_definition.cards[0].text_input.id #=> String
resp.app.app_definition.cards[0].text_input.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app.app_definition.cards[0].text_input.placeholder #=> String
resp.app.app_definition.cards[0].text_input.default_value #=> String
resp.app.app_definition.cards[0].q_query.title #=> String
resp.app.app_definition.cards[0].q_query.id #=> String
resp.app.app_definition.cards[0].q_query.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app.app_definition.cards[0].q_query.prompt #=> String
resp.app.app_definition.cards[0].q_query.output_source #=> String, one of "approved-sources", "llm"
resp.app.app_definition.cards[0].q_query.attribute_filter.and_all_filters #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.and_all_filters[0] #=> Types::AttributeFilter
resp.app.app_definition.cards[0].q_query.attribute_filter.or_all_filters #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.or_all_filters[0] #=> Types::AttributeFilter
resp.app.app_definition.cards[0].q_query.attribute_filter.not_filter #=> Types::AttributeFilter
resp.app.app_definition.cards[0].q_query.attribute_filter.equals_to.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.equals_to.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.equals_to.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.equals_to.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.equals_to.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.equals_to.value.date_value #=> Time
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_all.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_all.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_all.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_all.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_all.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_all.value.date_value #=> Time
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_any.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_any.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_any.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_any.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_any.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.contains_any.value.date_value #=> Time
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than.value.date_value #=> Time
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.greater_than_or_equals.value.date_value #=> Time
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than.value.date_value #=> Time
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.name #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.string_value #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.string_list_value #=> Array
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.string_list_value[0] #=> String
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.long_value #=> Integer
resp.app.app_definition.cards[0].q_query.attribute_filter.less_than_or_equals.value.date_value #=> Time
resp.app.app_definition.cards[0].q_plugin.title #=> String
resp.app.app_definition.cards[0].q_plugin.id #=> String
resp.app.app_definition.cards[0].q_plugin.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app.app_definition.cards[0].q_plugin.prompt #=> String
resp.app.app_definition.cards[0].q_plugin.plugin_id #=> String
resp.app.app_definition.cards[0].q_plugin.action_identifier #=> String
resp.app.app_definition.cards[0].file_upload.title #=> String
resp.app.app_definition.cards[0].file_upload.id #=> String
resp.app.app_definition.cards[0].file_upload.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app.app_definition.cards[0].file_upload.filename #=> String
resp.app.app_definition.cards[0].file_upload.file_id #=> String
resp.app.app_definition.cards[0].file_upload.allow_override #=> Boolean
resp.app.app_definition.cards[0].form_input.title #=> String
resp.app.app_definition.cards[0].form_input.id #=> String
resp.app.app_definition.cards[0].form_input.type #=> String, one of "text-input", "q-query", "file-upload", "q-plugin", "form-input"
resp.app.app_definition.cards[0].form_input.compute_mode #=> String, one of "append", "replace"
resp.app.app_definition.initial_prompt #=> String
resp.problem_statement #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :options (Types::PredictQAppInputOptions)

    The input to generate the Q App definition from, either a conversation or problem statement.

Returns:

See Also:



2438
2439
2440
2441
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2438

def predict_q_app(params = {}, options = {})
  req = build_request(:predict_q_app, params)
  req.send_request(options)
end

#start_q_app_session(params = {}) ⇒ Types::StartQAppSessionOutput

Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.

Each Q App session will be condensed into a single conversation in the web experience.

Examples:

Example: Start a session for an Amazon Q App using version 1, passing in initial values for one card


resp = client.start_q_app_session({
  app_id: "65e7dce7-226a-47f9-b689-22850becef89", 
  app_version: 1, 
  initial_values: [
    {
      value: "What is the circumference of Earth?", 
      card_id: "6fb5b404-3b7b-48a4-8a8b-56406922a606", 
    }, 
  ], 
  instance_id: "4cc5e4c2-d2a2-4188-a114-9ca125b4aedc", 
})

resp.to_h outputs the following:
{
  session_arn: "arn:aws:qapps:us-west-2:0123456789012:application/a929ecd6-5765-4ec7-bd3e-2ca90098b18e/qapp/65e7dce7-226a-47f9-b689-22850becef89/session/1fca878e-64c5-4dc4-b1d9-c93effed4e82", 
  session_id: "1fca878e-64c5-4dc4-b1d9-c93effed4e82", 
}

Request syntax with placeholder values


resp = client.start_q_app_session({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
  app_version: 1, # required
  initial_values: [
    {
      card_id: "UUID", # required
      value: "CardValueValueString", # required
      submission_mutation: {
        submission_id: "UUID", # required
        mutation_type: "edit", # required, accepts edit, delete, add
      },
    },
  ],
  session_id: "String",
  tags: {
    "String" => "String",
  },
})

Response structure


resp.session_id #=> String
resp.session_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Q App to start a session for.

  • :app_version (required, Integer)

    The version of the Q App to use for the session.

  • :initial_values (Array<Types::CardValue>)

    Optional initial input values to provide for the Q App session.

  • :session_id (String)

    The unique identifier of the a Q App session.

  • :tags (Hash<String,String>)

    Optional tags to associate with the new Q App session.

Returns:

See Also:



2527
2528
2529
2530
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2527

def start_q_app_session(params = {}, options = {})
  req = build_request(:start_q_app_session, params)
  req.send_request(options)
end

#stop_q_app_session(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.stop_q_app_session({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App session to stop.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2556
2557
2558
2559
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2556

def stop_q_app_session(params = {}, options = {})
  req = build_request(:stop_q_app_session, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Associates tags with an Amazon Q Apps resource.

Examples:

Example: A call to tag a resource


resp = client.tag_resource({
  resource_arn: "arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  tags: {
    "department" => "HR", 
  }, 
})

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to tag.

  • :tags (required, Hash<String,String>)

    The tags to associate with the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2594
2595
2596
2597
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2594

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Disassociates tags from an Amazon Q Apps resource.

Examples:

Example: A call to untag a resource


resp = client.untag_resource({
  resource_arn: "arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  tag_keys: [
    "department", 
  ], 
})

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "AmazonResourceName", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to disassociate the tag from.

  • :tag_keys (required, Array<String>)

    The keys of the tags to disassociate from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2631
2632
2633
2634
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2631

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_library_item(params = {}) ⇒ Types::UpdateLibraryItemOutput

Updates the library item for an Amazon Q App.

Examples:

Example: Sets the status of a library item to DISABLED


resp = client.update_library_item({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
  status: "DISABLED", 
})

resp.to_h outputs the following:
{
  app_id: "7a11f34b-42d4-4bc8-b668-ae4a788dae1e", 
  app_version: 6, 
  categories: [
    {
      id: "9c871ed4-1c41-4065-aefe-321cd4b61cf8", 
      title: "HR", 
    }, 
    {
      id: "fdc4b483-c4e2-44c9-b4b2-6c850bbdb579", 
      title: "General", 
    }, 
    {
      id: "c1c4e374-118c-446f-81fb-cba6225d88da", 
      title: "IT", 
    }, 
  ], 
  created_at: Time.parse("2024-05-21T23:17:27.350Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  is_verified: false, 
  library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
  rating_count: 24, 
  status: "DISABLED", 
  updated_at: Time.parse("2024-05-28T19:43:48.577Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
}

Request syntax with placeholder values


resp = client.update_library_item({
  instance_id: "InstanceId", # required
  library_item_id: "UUID", # required
  status: "PUBLISHED", # accepts PUBLISHED, DISABLED
  categories: ["UUID"],
})

Response structure


resp.library_item_id #=> String
resp.app_id #=> String
resp.app_version #=> Integer
resp.categories #=> Array
resp.categories[0].id #=> String
resp.categories[0].title #=> String
resp.categories[0].color #=> String
resp.categories[0].app_count #=> Integer
resp.status #=> String
resp.created_at #=> Time
resp.created_by #=> String
resp.updated_at #=> Time
resp.updated_by #=> String
resp.rating_count #=> Integer
resp.is_rated_by_user #=> Boolean
resp.user_count #=> Integer
resp.is_verified #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :library_item_id (required, 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".

  • :categories (Array<String>)

    The new categories to associate with the library item.

Returns:

See Also:



2738
2739
2740
2741
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2738

def update_library_item(params = {}, options = {})
  req = build_request(:update_library_item, params)
  req.send_request(options)
end

#update_library_item_metadata(params = {}) ⇒ Struct

Updates the verification status of a library item for an Amazon Q App.

Examples:

Example: Update a library item to be verified


resp = client.({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  is_verified: true, 
  library_item_id: "cb9ecf72-8563-450d-9db9-994f98297316", 
})

Request syntax with placeholder values


resp = client.({
  instance_id: "InstanceId", # required
  library_item_id: "UUID", # required
  is_verified: false,
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :library_item_id (required, String)

    The unique identifier of the updated library item.

  • :is_verified (Boolean)

    The verification status of the library item

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2778
2779
2780
2781
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 2778

def (params = {}, options = {})
  req = build_request(:update_library_item_metadata, params)
  req.send_request(options)
end

#update_q_app(params = {}) ⇒ Types::UpdateQAppOutput

Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.

Examples:

Example: Updating the title of an app


resp = client.update_q_app({
  app_id: "7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  title: "This is the new title", 
})

resp.to_h outputs the following:
{
  app_arn: "arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_id: "7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_version: 2, 
  created_at: Time.parse("2024-05-14T00:11:54.232Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  required_capabilities: [
    "CreatorMode", 
  ], 
  status: "DRAFT", 
  title: "This is the new title", 
  updated_at: Time.parse("2024-05-17T23:15:08.571Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
}

Example: Updating the app so it has a single q-query card


resp = client.update_q_app({
  app_definition: {
    cards: [
      {
        q_query: {
          type: "q-query", 
          id: "18870b94-1e63-40e0-8c12-669c90ac5acc", 
          prompt: "Recommend me an itinerary for a trip", 
          title: "Trip Ideas", 
        }, 
      }, 
    ], 
  }, 
  app_id: "7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
})

resp.to_h outputs the following:
{
  app_arn: "arn:aws:qapps:us-west-2:123456789012:app/7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_id: "7212ff04-de7b-4831-bd80-45d6975ba1b0", 
  app_version: 99, 
  created_at: Time.parse("2024-05-14T00:11:54.232Z"), 
  created_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
  required_capabilities: [
    "CreatorMode", 
  ], 
  status: "DRAFT", 
  title: "Previous Title Stays the Same", 
  updated_at: Time.parse("2024-05-17T23:15:08.571Z"), 
  updated_by: "a841e300-40c1-7062-fa34-5b46dadbbaac", 
}

Request syntax with placeholder values


resp = client.update_q_app({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
  title: "Title",
  description: "Description",
  app_definition: {
    cards: [ # required
      {
        text_input: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          placeholder: "Placeholder",
          default_value: "Default",
        },
        q_query: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          prompt: "Prompt", # required
          output_source: "approved-sources", # accepts approved-sources, llm
          attribute_filter: {
            and_all_filters: [
              {
                # recursive AttributeFilter
              },
            ],
            or_all_filters: [
              {
                # recursive AttributeFilter
              },
            ],
            not_filter: {
              # recursive AttributeFilter
            },
            equals_to: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            contains_all: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            contains_any: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            greater_than: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            greater_than_or_equals: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            less_than: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
            less_than_or_equals: {
              name: "DocumentAttributeKey", # required
              value: { # required
                string_value: "DocumentAttributeValueStringValueString",
                string_list_value: ["PlatoString"],
                long_value: 1,
                date_value: Time.now,
              },
            },
          },
        },
        q_plugin: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          prompt: "Prompt", # required
          plugin_id: "PluginId", # required
          action_identifier: "ActionIdentifier",
        },
        file_upload: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          filename: "Filename",
          file_id: "UUID",
          allow_override: false,
        },
        form_input: {
          title: "Title", # required
          id: "UUID", # required
          type: "text-input", # required, accepts text-input, q-query, file-upload, q-plugin, form-input
          metadata: { # required
            schema: { # required
            },
          },
          compute_mode: "append", # accepts append, replace
        },
      },
    ],
    initial_prompt: "InitialPrompt",
  },
})

Response structure


resp.app_id #=> String
resp.app_arn #=> String
resp.title #=> String
resp.description #=> String
resp.initial_prompt #=> String
resp.app_version #=> Integer
resp.status #=> String, one of "PUBLISHED", "DRAFT", "DELETED"
resp.created_at #=> Time
resp.created_by #=> String
resp.updated_at #=> Time
resp.updated_by #=> String
resp.required_capabilities #=> Array
resp.required_capabilities[0] #=> String, one of "FileUpload", "CreatorMode", "RetrievalMode", "PluginMode"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, 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.

  • :app_definition (Types::AppDefinitionInput)

    The new definition specifying the cards and flow for the Q App.

Returns:

See Also:



3031
3032
3033
3034
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 3031

def update_q_app(params = {}, options = {})
  req = build_request(:update_q_app, params)
  req.send_request(options)
end

#update_q_app_permissions(params = {}) ⇒ Types::UpdateQAppPermissionsOutput

Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.

Examples:

Example: Grant permissions for the app


resp = client.update_q_app_permissions({
  app_id: "fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
  grant_permissions: [
    {
      action: "read", 
      principal: "user2@example.com", 
    }, 
  ], 
  instance_id: "01793661-ad73-4c7d-8eaa-1c95a10151c2", 
})

resp.to_h outputs the following:
{
  app_id: "fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
  permissions: [
    {
      action: "write", 
      principal: {
        email: "user1@example.com", 
        user_id: "f8f15330-b091-708b-d46e-adb0d914b699", 
      }, 
    }, 
    {
      action: "read", 
      principal: {
        email: "user2@example.com", 
        user_id: "c81133d0-10d1-70eb-aaa3-d427ea6fc0f3", 
      }, 
    }, 
  ], 
  resource_arn: "arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
}

Example: Revoke permissions for the app


resp = client.update_q_app_permissions({
  app_id: "fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
  instance_id: "01793661-ad73-4c7d-8eaa-1c95a10151c2", 
  revoke_permissions: [
    {
      action: "read", 
      principal: "user2@example.com", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  app_id: "fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
  permissions: [
    {
      action: "write", 
      principal: {
        email: "user1@example.com", 
        user_id: "f8f15330-b091-708b-d46e-adb0d914b699", 
      }, 
    }, 
  ], 
  resource_arn: "arn:aws:qapps:us-west-2:111111111111:application/01793661-ad73-4c7d-8eaa-1c95a10151c2/qapp/fe0acf86-49e5-4def-a0c2-40ce0cafee14", 
}

Request syntax with placeholder values


resp = client.update_q_app_permissions({
  instance_id: "InstanceId", # required
  app_id: "UUID", # required
  grant_permissions: [
    {
      action: "read", # required, accepts read, write
      principal: "PermissionInputPrincipalString", # required
    },
  ],
  revoke_permissions: [
    {
      action: "read", # required, accepts read, write
      principal: "PermissionInputPrincipalString", # required
    },
  ],
})

Response structure


resp.resource_arn #=> String
resp.app_id #=> String
resp.permissions #=> Array
resp.permissions[0].action #=> String, one of "read", "write"
resp.permissions[0].principal.user_id #=> String
resp.permissions[0].principal.user_type #=> String, one of "owner", "user"
resp.permissions[0].principal.email #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :app_id (required, String)

    The unique identifier of the Amazon Q App for which permissions are being updated.

  • :grant_permissions (Array<Types::PermissionInput>)

    The list of permissions to grant for the Amazon Q App.

  • :revoke_permissions (Array<Types::PermissionInput>)

    The list of permissions to revoke for the Amazon Q App.

Returns:

See Also:



3156
3157
3158
3159
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 3156

def update_q_app_permissions(params = {}, options = {})
  req = build_request(:update_q_app_permissions, params)
  req.send_request(options)
end

#update_q_app_session(params = {}) ⇒ Types::UpdateQAppSessionOutput

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.

Examples:

Request syntax with placeholder values


resp = client.update_q_app_session({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
  values: [
    {
      card_id: "UUID", # required
      value: "CardValueValueString", # required
      submission_mutation: {
        submission_id: "UUID", # required
        mutation_type: "edit", # required, accepts edit, delete, add
      },
    },
  ],
})

Response structure


resp.session_id #=> String
resp.session_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App session to provide input for.

  • :values (Array<Types::CardValue>)

    The input values to provide for the current state of the Q App session.

Returns:

See Also:



3209
3210
3211
3212
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 3209

def update_q_app_session(params = {}, options = {})
  req = build_request(:update_q_app_session, params)
  req.send_request(options)
end

#update_q_app_session_metadata(params = {}) ⇒ Types::UpdateQAppSessionMetadataOutput

Updates the configuration metadata of a session for a given Q App sessionId.

Examples:

Example: Updates an existing session metadata for an Amazon Q App


resp = client.({
  instance_id: "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f", 
  session_id: "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", 
  session_name: "Trip itinerary collection session", 
  sharing_configuration: {
    accept_responses: true, 
    enabled: true, 
    reveal_cards: false, 
  }, 
})

resp.to_h outputs the following:
{
  session_arn: "arn:aws:qapps:us-west-2:0123456789012:application/cbea8329-41c0-4566-a112-19250921a220/qapp/387ccac9-4717-489f-841f-729b7d7de355/session/56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", 
  session_id: "56ae47c3-10bc-4c2c-8b27-9b9fe23b3edb", 
  session_name: "Trip itinerary collection session", 
  sharing_configuration: {
    accept_responses: true, 
    enabled: true, 
    reveal_cards: false, 
  }, 
}

Request syntax with placeholder values


resp = client.({
  instance_id: "InstanceId", # required
  session_id: "UUID", # required
  session_name: "SessionName",
  sharing_configuration: { # required
    enabled: false, # required
    accept_responses: false,
    reveal_cards: false,
  },
})

Response structure


resp.session_id #=> String
resp.session_arn #=> String
resp.session_name #=> String
resp.sharing_configuration.enabled #=> Boolean
resp.sharing_configuration.accept_responses #=> Boolean
resp.sharing_configuration.reveal_cards #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The unique identifier of the Amazon Q Business application environment instance.

  • :session_id (required, String)

    The unique identifier of the Q App session to update configuration for.

  • :session_name (String)

    The new name for the Q App session.

  • :sharing_configuration (required, Types::SessionSharingConfiguration)

    The new sharing configuration for the Q App data collection session.

Returns:

See Also:



3290
3291
3292
3293
# File 'gems/aws-sdk-qapps/lib/aws-sdk-qapps/client.rb', line 3290

def (params = {}, options = {})
  req = build_request(:update_q_app_session_metadata, params)
  req.send_request(options)
end