Class: Aws::Kendra::Client

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

Overview

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

client = Aws::Kendra::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):

  • :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, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.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::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts.
  • :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)
  • :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.

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

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

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

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

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

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

  • :validate_params (Boolean) — default: true

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. 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_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_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

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



334
335
336
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 334

def initialize(*args)
  super
end

Instance Method Details

#batch_delete_document(params = {}) ⇒ Types::BatchDeleteDocumentResponse

Removes one or more documents from an index. The documents must have been added with the BatchPutDocument operation.

The documents are deleted asynchronously. You can see the progress of the deletion by using Amazon Web Services CloudWatch. Any error messages related to the processing of the batch are sent to you CloudWatch log.

Examples:

Request syntax with placeholder values


resp = client.batch_delete_document({
  index_id: "IndexId", # required
  document_id_list: ["DocumentId"], # required
  data_source_sync_job_metric_target: {
    data_source_id: "DataSourceId", # required
    data_source_sync_job_id: "DataSourceSyncJobId",
  },
})

Response structure


resp.failed_documents #=> Array
resp.failed_documents[0].id #=> String
resp.failed_documents[0].error_code #=> String, one of "InternalError", "InvalidRequest"
resp.failed_documents[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index that contains the documents to delete.

  • :document_id_list (required, Array<String>)

    One or more identifiers for documents to delete from the index.

  • :data_source_sync_job_metric_target (Types::DataSourceSyncJobMetricTarget)

    Maps a particular data source sync job to a particular data source.

Returns:

See Also:



383
384
385
386
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 383

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

#batch_get_document_status(params = {}) ⇒ Types::BatchGetDocumentStatusResponse

Returns the indexing status for one or more documents submitted with the BatchPutDocument operation.

When you use the BatchPutDocument operation, documents are indexed asynchronously. You can use the BatchGetDocumentStatus operation to get the current status of a list of documents so that you can determine if they have been successfully indexed.

You can also use the BatchGetDocumentStatus operation to check the status of the BatchDeleteDocument operation. When a document is deleted from the index, Amazon Kendra returns NOT_FOUND as the status.

Examples:

Request syntax with placeholder values


resp = client.batch_get_document_status({
  index_id: "IndexId", # required
  document_info_list: [ # required
    {
      document_id: "DocumentId", # required
      attributes: [
        {
          key: "DocumentAttributeKey", # required
          value: { # required
            string_value: "DocumentAttributeStringValue",
            string_list_value: ["String"],
            long_value: 1,
            date_value: Time.now,
          },
        },
      ],
    },
  ],
})

Response structure


resp.errors #=> Array
resp.errors[0].document_id #=> String
resp.errors[0].error_code #=> String, one of "InternalError", "InvalidRequest"
resp.errors[0].error_message #=> String
resp.document_status_list #=> Array
resp.document_status_list[0].document_id #=> String
resp.document_status_list[0].document_status #=> String, one of "NOT_FOUND", "PROCESSING", "INDEXED", "UPDATED", "FAILED", "UPDATE_FAILED"
resp.document_status_list[0].failure_code #=> String
resp.document_status_list[0].failure_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index to add documents to. The index ID is returned by the CreateIndex operation.

  • :document_info_list (required, Array<Types::DocumentInfo>)

    A list of DocumentInfo objects that identify the documents for which to get the status. You identify the documents by their document ID and optional attributes.

Returns:

See Also:



462
463
464
465
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 462

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

#batch_put_document(params = {}) ⇒ Types::BatchPutDocumentResponse

Adds one or more documents to an index.

The BatchPutDocument operation enables you to ingest inline documents or a set of documents stored in an Amazon S3 bucket. Use this operation to ingest your text and unstructured text into an index, add custom attributes to the documents, and to attach an access control list to the documents added to the index.

The documents are indexed asynchronously. You can see the progress of the batch using Amazon Web Services CloudWatch. Any error messages related to processing the batch are sent to your Amazon Web Services CloudWatch log.

Examples:

Request syntax with placeholder values


resp = client.batch_put_document({
  index_id: "IndexId", # required
  role_arn: "RoleArn",
  documents: [ # required
    {
      id: "DocumentId", # required
      title: "Title",
      blob: "data",
      s3_path: {
        bucket: "S3BucketName", # required
        key: "S3ObjectKey", # required
      },
      attributes: [
        {
          key: "DocumentAttributeKey", # required
          value: { # required
            string_value: "DocumentAttributeStringValue",
            string_list_value: ["String"],
            long_value: 1,
            date_value: Time.now,
          },
        },
      ],
      access_control_list: [
        {
          name: "PrincipalName", # required
          type: "USER", # required, accepts USER, GROUP
          access: "ALLOW", # required, accepts ALLOW, DENY
          data_source_id: "DataSourceId",
        },
      ],
      hierarchical_access_control_list: [
        {
          principal_list: [ # required
            {
              name: "PrincipalName", # required
              type: "USER", # required, accepts USER, GROUP
              access: "ALLOW", # required, accepts ALLOW, DENY
              data_source_id: "DataSourceId",
            },
          ],
        },
      ],
      content_type: "PDF", # accepts PDF, HTML, MS_WORD, PLAIN_TEXT, PPT
    },
  ],
})

Response structure


resp.failed_documents #=> Array
resp.failed_documents[0].id #=> String
resp.failed_documents[0].error_code #=> String, one of "InternalError", "InvalidRequest"
resp.failed_documents[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index to add the documents to. You need to create the index first using the CreateIndex operation.

  • :role_arn (String)

    The Amazon Resource Name (ARN) of a role that is allowed to run the BatchPutDocument operation. For more information, see IAM Roles for Amazon Kendra.

  • :documents (required, Array<Types::Document>)

    One or more documents to add to the index.

    Documents can include custom attributes. For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.

    Documents have the following file size limits.

    • 5 MB total size for inline documents

    • 50 MB total size for files from an S3 bucket

    • 5 MB extracted text for any file

    For more information about file size and transaction per second quotas, see Quotas.

Returns:

See Also:



582
583
584
585
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 582

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

#clear_query_suggestions(params = {}) ⇒ Struct

Clears existing query suggestions from an index.

This deletes existing suggestions only, not the queries in the query log. After you clear suggestions, Amazon Kendra learns new suggestions based on new queries added to the query log from the time you cleared suggestions. If you do not see any new suggestions, then please allow Amazon Kendra to collect enough queries to learn new suggestions.

Examples:

Request syntax with placeholder values


resp = client.clear_query_suggestions({
  index_id: "IndexId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to clear query suggestions from.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



610
611
612
613
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 610

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

#create_data_source(params = {}) ⇒ Types::CreateDataSourceResponse

Creates a data source that you want to use with an Amazon Kendra index.

You specify a name, data source connector type and description for your data source. You also specify configuration information for the data source connector.

CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.

Examples:

Request syntax with placeholder values


resp = client.create_data_source({
  name: "DataSourceName", # required
  index_id: "IndexId", # required
  type: "S3", # required, accepts S3, SHAREPOINT, DATABASE, SALESFORCE, ONEDRIVE, SERVICENOW, CUSTOM, CONFLUENCE, GOOGLEDRIVE, WEBCRAWLER, WORKDOCS
  configuration: {
    s3_configuration: {
      bucket_name: "S3BucketName", # required
      inclusion_prefixes: ["DataSourceInclusionsExclusionsStringsMember"],
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      documents_metadata_configuration: {
        s3_prefix: "S3ObjectKey",
      },
      access_control_list_configuration: {
        key_path: "S3ObjectKey",
      },
    },
    share_point_configuration: {
      share_point_version: "SHAREPOINT_2013", # required, accepts SHAREPOINT_2013, SHAREPOINT_2016, SHAREPOINT_ONLINE
      urls: ["Url"], # required
      secret_arn: "SecretArn", # required
      crawl_attachments: false,
      use_change_log: false,
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      vpc_configuration: {
        subnet_ids: ["SubnetId"], # required
        security_group_ids: ["VpcSecurityGroupId"], # required
      },
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
      document_title_field_name: "DataSourceFieldName",
      disable_local_groups: false,
      ssl_certificate_s3_path: {
        bucket: "S3BucketName", # required
        key: "S3ObjectKey", # required
      },
    },
    database_configuration: {
      database_engine_type: "RDS_AURORA_MYSQL", # required, accepts RDS_AURORA_MYSQL, RDS_AURORA_POSTGRESQL, RDS_MYSQL, RDS_POSTGRESQL
      connection_configuration: { # required
        database_host: "DatabaseHost", # required
        database_port: 1, # required
        database_name: "DatabaseName", # required
        table_name: "TableName", # required
        secret_arn: "SecretArn", # required
      },
      vpc_configuration: {
        subnet_ids: ["SubnetId"], # required
        security_group_ids: ["VpcSecurityGroupId"], # required
      },
      column_configuration: { # required
        document_id_column_name: "ColumnName", # required
        document_data_column_name: "ColumnName", # required
        document_title_column_name: "ColumnName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
        change_detecting_columns: ["ColumnName"], # required
      },
      acl_configuration: {
        allowed_groups_column_name: "ColumnName", # required
      },
      sql_configuration: {
        query_identifiers_enclosing_option: "DOUBLE_QUOTES", # accepts DOUBLE_QUOTES, NONE
      },
    },
    salesforce_configuration: {
      server_url: "Url", # required
      secret_arn: "SecretArn", # required
      standard_object_configurations: [
        {
          name: "ACCOUNT", # required, accepts ACCOUNT, CAMPAIGN, CASE, CONTACT, CONTRACT, DOCUMENT, GROUP, IDEA, LEAD, OPPORTUNITY, PARTNER, PRICEBOOK, PRODUCT, PROFILE, SOLUTION, TASK, USER
          document_data_field_name: "DataSourceFieldName", # required
          document_title_field_name: "DataSourceFieldName",
          field_mappings: [
            {
              data_source_field_name: "DataSourceFieldName", # required
              date_field_format: "DataSourceDateFieldFormat",
              index_field_name: "IndexFieldName", # required
            },
          ],
        },
      ],
      knowledge_article_configuration: {
        included_states: ["DRAFT"], # required, accepts DRAFT, PUBLISHED, ARCHIVED
        standard_knowledge_article_type_configuration: {
          document_data_field_name: "DataSourceFieldName", # required
          document_title_field_name: "DataSourceFieldName",
          field_mappings: [
            {
              data_source_field_name: "DataSourceFieldName", # required
              date_field_format: "DataSourceDateFieldFormat",
              index_field_name: "IndexFieldName", # required
            },
          ],
        },
        custom_knowledge_article_type_configurations: [
          {
            name: "SalesforceCustomKnowledgeArticleTypeName", # required
            document_data_field_name: "DataSourceFieldName", # required
            document_title_field_name: "DataSourceFieldName",
            field_mappings: [
              {
                data_source_field_name: "DataSourceFieldName", # required
                date_field_format: "DataSourceDateFieldFormat",
                index_field_name: "IndexFieldName", # required
              },
            ],
          },
        ],
      },
      chatter_feed_configuration: {
        document_data_field_name: "DataSourceFieldName", # required
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
        include_filter_types: ["ACTIVE_USER"], # accepts ACTIVE_USER, STANDARD_USER
      },
      crawl_attachments: false,
      standard_object_attachment_configuration: {
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
      },
      include_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclude_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
    },
    one_drive_configuration: {
      tenant_domain: "TenantDomain", # required
      secret_arn: "SecretArn", # required
      one_drive_users: { # required
        one_drive_user_list: ["OneDriveUser"],
        one_drive_user_s3_path: {
          bucket: "S3BucketName", # required
          key: "S3ObjectKey", # required
        },
      },
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
      disable_local_groups: false,
    },
    service_now_configuration: {
      host_url: "ServiceNowHostUrl", # required
      secret_arn: "SecretArn", # required
      service_now_build_version: "LONDON", # required, accepts LONDON, OTHERS
      knowledge_article_configuration: {
        crawl_attachments: false,
        include_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        exclude_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        document_data_field_name: "DataSourceFieldName", # required
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
        filter_query: "ServiceNowKnowledgeArticleFilterQuery",
      },
      service_catalog_configuration: {
        crawl_attachments: false,
        include_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        exclude_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        document_data_field_name: "DataSourceFieldName", # required
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
      },
      authentication_type: "HTTP_BASIC", # accepts HTTP_BASIC, OAUTH2
    },
    confluence_configuration: {
      server_url: "Url", # required
      secret_arn: "SecretArn", # required
      version: "CLOUD", # required, accepts CLOUD, SERVER
      space_configuration: {
        crawl_personal_spaces: false,
        crawl_archived_spaces: false,
        include_spaces: ["ConfluenceSpaceIdentifier"],
        exclude_spaces: ["ConfluenceSpaceIdentifier"],
        space_field_mappings: [
          {
            data_source_field_name: "DISPLAY_URL", # accepts DISPLAY_URL, ITEM_TYPE, SPACE_KEY, URL
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      page_configuration: {
        page_field_mappings: [
          {
            data_source_field_name: "AUTHOR", # accepts AUTHOR, CONTENT_STATUS, CREATED_DATE, DISPLAY_URL, ITEM_TYPE, LABELS, MODIFIED_DATE, PARENT_ID, SPACE_KEY, SPACE_NAME, URL, VERSION
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      blog_configuration: {
        blog_field_mappings: [
          {
            data_source_field_name: "AUTHOR", # accepts AUTHOR, DISPLAY_URL, ITEM_TYPE, LABELS, PUBLISH_DATE, SPACE_KEY, SPACE_NAME, URL, VERSION
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      attachment_configuration: {
        crawl_attachments: false,
        attachment_field_mappings: [
          {
            data_source_field_name: "AUTHOR", # accepts AUTHOR, CONTENT_TYPE, CREATED_DATE, DISPLAY_URL, FILE_SIZE, ITEM_TYPE, PARENT_ID, SPACE_KEY, SPACE_NAME, URL, VERSION
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      vpc_configuration: {
        subnet_ids: ["SubnetId"], # required
        security_group_ids: ["VpcSecurityGroupId"], # required
      },
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
    },
    google_drive_configuration: {
      secret_arn: "SecretArn", # required
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
      exclude_mime_types: ["MimeType"],
      exclude_user_accounts: ["UserAccount"],
      exclude_shared_drives: ["SharedDriveId"],
    },
    web_crawler_configuration: {
      urls: { # required
        seed_url_configuration: {
          seed_urls: ["SeedUrl"], # required
          web_crawler_mode: "HOST_ONLY", # accepts HOST_ONLY, SUBDOMAINS, EVERYTHING
        },
        site_maps_configuration: {
          site_maps: ["SiteMap"], # required
        },
      },
      crawl_depth: 1,
      max_links_per_page: 1,
      max_content_size_per_page_in_mega_bytes: 1.0,
      max_urls_per_minute_crawl_rate: 1,
      url_inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      url_exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      proxy_configuration: {
        host: "Host", # required
        port: 1, # required
        credentials: "SecretArn",
      },
      authentication_configuration: {
        basic_authentication: [
          {
            host: "Host", # required
            port: 1, # required
            credentials: "SecretArn", # required
          },
        ],
      },
    },
    work_docs_configuration: {
      organization_id: "OrganizationId", # required
      crawl_comments: false,
      use_change_log: false,
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
    },
  },
  description: "Description",
  schedule: "ScanSchedule",
  role_arn: "RoleArn",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_token: "ClientTokenName",
  language_code: "LanguageCode",
})

Response structure


resp.id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    A unique name for the data source. A data source name can't be changed without deleting and recreating the data source.

  • :index_id (required, String)

    The identifier of the index that should be associated with this data source.

  • :type (required, String)

    The type of repository that contains the data source.

  • :configuration (Types::DataSourceConfiguration)

    The connector configuration information that is required to access the repository.

    You can't specify the Configuration parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception.

    The Configuration parameter is required for all other data sources.

  • :description (String)

    A description for the data source.

  • :schedule (String)

    Sets the frequency that Amazon Kendra will check the documents in your repository and update the index. If you don't set a schedule Amazon Kendra will not periodically update the index. You can call the StartDataSourceSyncJob operation to update the index.

    You can't specify the Schedule parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception.

  • :role_arn (String)

    The Amazon Resource Name (ARN) of a role with permission to access the data source. For more information, see IAM Roles for Amazon Kendra.

    You can't specify the RoleArn parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception.

    The RoleArn parameter is required for all other data sources.

  • :tags (Array<Types::Tag>)

    A list of key-value pairs that identify the data source. You can use the tags to identify and organize your resources and to control access to resources.

  • :client_token (String)

    A token that you provide to identify the request to create a data source. Multiple calls to the CreateDataSource operation with the same client token will create only one data source.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :language_code (String)

    The code for a language. This allows you to support a language for all documents when creating the data source. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.

Returns:

See Also:



1041
1042
1043
1044
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1041

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

#create_faq(params = {}) ⇒ Types::CreateFaqResponse

Creates an new set of frequently asked question (FAQ) questions and answers.

Examples:

Request syntax with placeholder values


resp = client.create_faq({
  index_id: "IndexId", # required
  name: "FaqName", # required
  description: "Description",
  s3_path: { # required
    bucket: "S3BucketName", # required
    key: "S3ObjectKey", # required
  },
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  file_format: "CSV", # accepts CSV, CSV_WITH_HEADER, JSON
  client_token: "ClientTokenName",
  language_code: "LanguageCode",
})

Response structure


resp.id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index that contains the FAQ.

  • :name (required, String)

    The name that should be associated with the FAQ.

  • :description (String)

    A description of the FAQ.

  • :s3_path (required, Types::S3Path)

    The S3 location of the FAQ input data.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQs. For more information, see IAM Roles for Amazon Kendra.

  • :tags (Array<Types::Tag>)

    A list of key-value pairs that identify the FAQ. You can use the tags to identify and organize your resources and to control access to resources.

  • :file_format (String)

    The format of the input file. You can choose between a basic CSV format, a CSV format that includes customs attributes in a header, and a JSON format that includes custom attributes.

    The format must match the format of the file stored in the S3 bucket identified in the S3Path parameter.

    For more information, see Adding questions and answers.

  • :client_token (String)

    A token that you provide to identify the request to create a FAQ. Multiple calls to the CreateFaqRequest operation with the same client token will create only one FAQ.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :language_code (String)

    The code for a language. This allows you to support a language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.

Returns:

See Also:



1141
1142
1143
1144
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1141

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

#create_index(params = {}) ⇒ Types::CreateIndexResponse

Creates a new Amazon Kendra index. Index creation is an asynchronous operation. To determine if index creation has completed, check the Status field returned from a call to DescribeIndex. The Status field is set to ACTIVE when the index is ready to use.

Once the index is active you can index your documents using the BatchPutDocument operation or using one of the supported data sources.

Examples:

Request syntax with placeholder values


resp = client.create_index({
  name: "IndexName", # required
  edition: "DEVELOPER_EDITION", # accepts DEVELOPER_EDITION, ENTERPRISE_EDITION
  role_arn: "RoleArn", # required
  server_side_encryption_configuration: {
    kms_key_id: "KmsKeyId",
  },
  description: "Description",
  client_token: "ClientTokenName",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  user_token_configurations: [
    {
      jwt_token_type_configuration: {
        key_location: "URL", # required, accepts URL, SECRET_MANAGER
        url: "Url",
        secret_manager_arn: "RoleArn",
        user_name_attribute_field: "UserNameAttributeField",
        group_attribute_field: "GroupAttributeField",
        issuer: "Issuer",
        claim_regex: "ClaimRegex",
      },
      json_token_type_configuration: {
        user_name_attribute_field: "String", # required
        group_attribute_field: "String", # required
      },
    },
  ],
  user_context_policy: "ATTRIBUTE_FILTER", # accepts ATTRIBUTE_FILTER, USER_TOKEN
  user_group_resolution_configuration: {
    user_group_resolution_mode: "AWS_SSO", # required, accepts AWS_SSO, NONE
  },
})

Response structure


resp.id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name for the new index.

  • :edition (String)

    The Amazon Kendra edition to use for the index. Choose DEVELOPER_EDITION for indexes intended for development, testing, or proof of concept. Use ENTERPRISE_EDITION for your production databases. Once you set the edition for an index, it can't be changed.

    The Edition parameter is optional. If you don't supply a value, the default is ENTERPRISE_EDITION.

    For more information on quota limits for enterprise and developer editions, see Quotas.

  • :role_arn (required, String)

    An Identity and Access Management(IAM) role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role used when you use the BatchPutDocument operation to index documents from an Amazon S3 bucket.

  • :server_side_encryption_configuration (Types::ServerSideEncryptionConfiguration)

    The identifier of the KMScustomer managed key (CMK) to use to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.

  • :description (String)

    A description for the index.

  • :client_token (String)

    A token that you provide to identify the request to create an index. Multiple calls to the CreateIndex operation with the same client token will create only one index.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :tags (Array<Types::Tag>)

    A list of key-value pairs that identify the index. You can use the tags to identify and organize your resources and to control access to resources.

  • :user_token_configurations (Array<Types::UserTokenConfiguration>)

    The user token configuration.

  • :user_context_policy (String)

    The user context policy.

    ATTRIBUTE_FILTER

    All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of _user_id and _group_ids or you can provide user and group information in UserContext.

    USER_TOKEN

    Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.

  • :user_group_resolution_configuration (Types::UserGroupResolutionConfiguration)

    Enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see UserGroupResolutionConfiguration.

Returns:

See Also:



1282
1283
1284
1285
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1282

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

#create_query_suggestions_block_list(params = {}) ⇒ Types::CreateQuerySuggestionsBlockListResponse

Creates a block list to exlcude certain queries from suggestions.

Any query that contains words or phrases specified in the block list is blocked or filtered out from being shown as a suggestion.

You need to provide the file location of your block list text file in your S3 bucket. In your text file, enter each block word or phrase on a separate line.

For information on the current quota limits for block lists, see Quotas for Amazon Kendra.

Examples:

Request syntax with placeholder values


resp = client.create_query_suggestions_block_list({
  index_id: "IndexId", # required
  name: "QuerySuggestionsBlockListName", # required
  description: "Description",
  source_s3_path: { # required
    bucket: "S3BucketName", # required
    key: "S3ObjectKey", # required
  },
  client_token: "ClientTokenName",
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to create a query suggestions block list for.

  • :name (required, String)

    A user friendly name for the block list.

    For example, the block list named 'offensive-words' includes all offensive words that could appear in user queries and need to be blocked from suggestions.

  • :description (String)

    A user-friendly description for the block list.

    For example, the description "List of all offensive words that can appear in user queries and need to be blocked from suggestions."

  • :source_s3_path (required, Types::S3Path)

    The S3 path to your block list text file in your S3 bucket.

    Each block word or phrase should be on a separate line in a text file.

    For information on the current quota limits for block lists, see Quotas for Amazon Kendra.

  • :client_token (String)

    A token that you provide to identify the request to create a query suggestions block list.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :role_arn (required, String)

    The IAM (Identity and Access Management) role used by Amazon Kendra to access the block list text file in your S3 bucket.

    You need permissions to the role ARN (Amazon Resource Name). The role needs S3 read permissions to your file in S3 and needs to give STS (Security Token Service) assume role permissions to Amazon Kendra.

  • :tags (Array<Types::Tag>)

    A tag that you can assign to a block list that categorizes the block list.

Returns:

See Also:



1383
1384
1385
1386
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1383

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

#create_thesaurus(params = {}) ⇒ Types::CreateThesaurusResponse

Creates a thesaurus for an index. The thesaurus contains a list of synonyms in Solr format.

Examples:

Request syntax with placeholder values


resp = client.create_thesaurus({
  index_id: "IndexId", # required
  name: "ThesaurusName", # required
  description: "Description",
  role_arn: "RoleArn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  source_s3_path: { # required
    bucket: "S3BucketName", # required
    key: "S3ObjectKey", # required
  },
  client_token: "ClientTokenName",
})

Response structure


resp.id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The unique identifier of the index for the new thesaurus.

  • :name (required, String)

    The name for the new thesaurus.

  • :description (String)

    The description for the new thesaurus.

  • :role_arn (required, String)

    An AWS Identity and Access Management (IAM) role that gives Amazon Kendra permissions to access thesaurus file specified in SourceS3Path.

  • :tags (Array<Types::Tag>)

    A list of key-value pairs that identify the thesaurus. You can use the tags to identify and organize your resources and to control access to resources.

  • :source_s3_path (required, Types::S3Path)

    The thesaurus file Amazon S3 source path.

  • :client_token (String)

    A token that you provide to identify the request to create a thesaurus. Multiple calls to the CreateThesaurus operation with the same client token will create only one thesaurus.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



1453
1454
1455
1456
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1453

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

#delete_data_source(params = {}) ⇒ Struct

Deletes an Amazon Kendra data source. An exception is not thrown if the data source is already being deleted. While the data source is being deleted, the Status field returned by a call to the DescribeDataSource operation is set to DELETING. For more information, see Deleting Data Sources.

Examples:

Request syntax with placeholder values


resp = client.delete_data_source({
  id: "DataSourceId", # required
  index_id: "IndexId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the data source to delete.

  • :index_id (required, String)

    The unique identifier of the index associated with the data source.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1487
1488
1489
1490
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1487

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

#delete_faq(params = {}) ⇒ Struct

Removes an FAQ from an index.

Examples:

Request syntax with placeholder values


resp = client.delete_faq({
  id: "FaqId", # required
  index_id: "IndexId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the FAQ to remove.

  • :index_id (required, String)

    The index to remove the FAQ from.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1513
1514
1515
1516
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1513

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

#delete_index(params = {}) ⇒ Struct

Deletes an existing Amazon Kendra index. An exception is not thrown if the index is already being deleted. While the index is being deleted, the Status field returned by a call to the DescribeIndex operation is set to DELETING.

Examples:

Request syntax with placeholder values


resp = client.delete_index({
  id: "IndexId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the index to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1538
1539
1540
1541
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1538

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

#delete_principal_mapping(params = {}) ⇒ Struct

Deletes a group so that all users and sub groups that belong to the group can no longer access documents only available to that group.

For example, after deleting the group "Summer Interns", all interns who belonged to that group no longer see intern-only documents in their search results.

If you want to delete or replace users or sub groups of a group, you need to use the PutPrincipalMapping operation. For example, if a user in the group "Engineering" leaves the engineering team and another user takes their place, you provide an updated list of users or sub groups that belong to the "Engineering" group when calling PutPrincipalMapping. You can update your internal list of users or sub groups and input this list when calling PutPrincipalMapping.

Examples:

Request syntax with placeholder values


resp = client.delete_principal_mapping({
  index_id: "IndexId", # required
  data_source_id: "DataSourceId",
  group_id: "GroupId", # required
  ordering_id: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to delete a group from.

  • :data_source_id (String)

    The identifier of the data source you want to delete a group from.

    This is useful if a group is tied to multiple data sources and you want to delete a group from accessing documents in a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. You want to delete "Research" and "Engineering" groups from Salesforce, so that these groups cannot access customer-related documents stored in Salesforce. Only "Sales and Marketing" should access documents in the Salesforce data source.

  • :group_id (required, String)

    The identifier of the group you want to delete.

  • :ordering_id (Integer)

    The timestamp identifier you specify to ensure Amazon Kendra does not override the latest DELETE action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.

    The ordering ID can be the UNIX time of the last update you made to a group members list. You would then provide this list when calling PutPrincipalMapping. This ensures your DELETE action for that updated group with the latest members list doesn't get overwritten by earlier DELETE actions for the same group which are yet to be processed.

    The default ordering ID is the current UNIX time in milliseconds that the action was received by Amazon Kendra.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1610
1611
1612
1613
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1610

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

#delete_query_suggestions_block_list(params = {}) ⇒ Struct

Deletes a block list used for query suggestions for an index.

A deleted block list might not take effect right away. Amazon Kendra needs to refresh the entire suggestions list to add back the queries that were previously blocked.

Examples:

Request syntax with placeholder values


resp = client.delete_query_suggestions_block_list({
  index_id: "IndexId", # required
  id: "QuerySuggestionsBlockListId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the you want to delete a block list from.

  • :id (required, String)

    The unique identifier of the block list that needs to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1640
1641
1642
1643
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1640

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

#delete_thesaurus(params = {}) ⇒ Struct

Deletes an existing Amazon Kendra thesaurus.

Examples:

Request syntax with placeholder values


resp = client.delete_thesaurus({
  id: "ThesaurusId", # required
  index_id: "IndexId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the thesaurus to delete.

  • :index_id (required, String)

    The identifier of the index associated with the thesaurus to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1666
1667
1668
1669
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1666

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

#describe_data_source(params = {}) ⇒ Types::DescribeDataSourceResponse

Gets information about a Amazon Kendra data source.

Examples:

Request syntax with placeholder values


resp = client.describe_data_source({
  id: "DataSourceId", # required
  index_id: "IndexId", # required
})

Response structure


resp.id #=> String
resp.index_id #=> String
resp.name #=> String
resp.type #=> String, one of "S3", "SHAREPOINT", "DATABASE", "SALESFORCE", "ONEDRIVE", "SERVICENOW", "CUSTOM", "CONFLUENCE", "GOOGLEDRIVE", "WEBCRAWLER", "WORKDOCS"
resp.configuration.s3_configuration.bucket_name #=> String
resp.configuration.s3_configuration.inclusion_prefixes #=> Array
resp.configuration.s3_configuration.inclusion_prefixes[0] #=> String
resp.configuration.s3_configuration.inclusion_patterns #=> Array
resp.configuration.s3_configuration.inclusion_patterns[0] #=> String
resp.configuration.s3_configuration.exclusion_patterns #=> Array
resp.configuration.s3_configuration.exclusion_patterns[0] #=> String
resp.configuration.s3_configuration..s3_prefix #=> String
resp.configuration.s3_configuration.access_control_list_configuration.key_path #=> String
resp.configuration.share_point_configuration.share_point_version #=> String, one of "SHAREPOINT_2013", "SHAREPOINT_2016", "SHAREPOINT_ONLINE"
resp.configuration.share_point_configuration.urls #=> Array
resp.configuration.share_point_configuration.urls[0] #=> String
resp.configuration.share_point_configuration.secret_arn #=> String
resp.configuration.share_point_configuration.crawl_attachments #=> Boolean
resp.configuration.share_point_configuration.use_change_log #=> Boolean
resp.configuration.share_point_configuration.inclusion_patterns #=> Array
resp.configuration.share_point_configuration.inclusion_patterns[0] #=> String
resp.configuration.share_point_configuration.exclusion_patterns #=> Array
resp.configuration.share_point_configuration.exclusion_patterns[0] #=> String
resp.configuration.share_point_configuration.vpc_configuration.subnet_ids #=> Array
resp.configuration.share_point_configuration.vpc_configuration.subnet_ids[0] #=> String
resp.configuration.share_point_configuration.vpc_configuration.security_group_ids #=> Array
resp.configuration.share_point_configuration.vpc_configuration.security_group_ids[0] #=> String
resp.configuration.share_point_configuration.field_mappings #=> Array
resp.configuration.share_point_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.share_point_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.share_point_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.share_point_configuration.document_title_field_name #=> String
resp.configuration.share_point_configuration.disable_local_groups #=> Boolean
resp.configuration.share_point_configuration.ssl_certificate_s3_path.bucket #=> String
resp.configuration.share_point_configuration.ssl_certificate_s3_path.key #=> String
resp.configuration.database_configuration.database_engine_type #=> String, one of "RDS_AURORA_MYSQL", "RDS_AURORA_POSTGRESQL", "RDS_MYSQL", "RDS_POSTGRESQL"
resp.configuration.database_configuration.connection_configuration.database_host #=> String
resp.configuration.database_configuration.connection_configuration.database_port #=> Integer
resp.configuration.database_configuration.connection_configuration.database_name #=> String
resp.configuration.database_configuration.connection_configuration.table_name #=> String
resp.configuration.database_configuration.connection_configuration.secret_arn #=> String
resp.configuration.database_configuration.vpc_configuration.subnet_ids #=> Array
resp.configuration.database_configuration.vpc_configuration.subnet_ids[0] #=> String
resp.configuration.database_configuration.vpc_configuration.security_group_ids #=> Array
resp.configuration.database_configuration.vpc_configuration.security_group_ids[0] #=> String
resp.configuration.database_configuration.column_configuration.document_id_column_name #=> String
resp.configuration.database_configuration.column_configuration.document_data_column_name #=> String
resp.configuration.database_configuration.column_configuration.document_title_column_name #=> String
resp.configuration.database_configuration.column_configuration.field_mappings #=> Array
resp.configuration.database_configuration.column_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.database_configuration.column_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.database_configuration.column_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.database_configuration.column_configuration.change_detecting_columns #=> Array
resp.configuration.database_configuration.column_configuration.change_detecting_columns[0] #=> String
resp.configuration.database_configuration.acl_configuration.allowed_groups_column_name #=> String
resp.configuration.database_configuration.sql_configuration.query_identifiers_enclosing_option #=> String, one of "DOUBLE_QUOTES", "NONE"
resp.configuration.salesforce_configuration.server_url #=> String
resp.configuration.salesforce_configuration.secret_arn #=> String
resp.configuration.salesforce_configuration.standard_object_configurations #=> Array
resp.configuration.salesforce_configuration.standard_object_configurations[0].name #=> String, one of "ACCOUNT", "CAMPAIGN", "CASE", "CONTACT", "CONTRACT", "DOCUMENT", "GROUP", "IDEA", "LEAD", "OPPORTUNITY", "PARTNER", "PRICEBOOK", "PRODUCT", "PROFILE", "SOLUTION", "TASK", "USER"
resp.configuration.salesforce_configuration.standard_object_configurations[0].document_data_field_name #=> String
resp.configuration.salesforce_configuration.standard_object_configurations[0].document_title_field_name #=> String
resp.configuration.salesforce_configuration.standard_object_configurations[0].field_mappings #=> Array
resp.configuration.salesforce_configuration.standard_object_configurations[0].field_mappings[0].data_source_field_name #=> String
resp.configuration.salesforce_configuration.standard_object_configurations[0].field_mappings[0].date_field_format #=> String
resp.configuration.salesforce_configuration.standard_object_configurations[0].field_mappings[0].index_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.included_states #=> Array
resp.configuration.salesforce_configuration.knowledge_article_configuration.included_states[0] #=> String, one of "DRAFT", "PUBLISHED", "ARCHIVED"
resp.configuration.salesforce_configuration.knowledge_article_configuration.standard_knowledge_article_type_configuration.document_data_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.standard_knowledge_article_type_configuration.document_title_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.standard_knowledge_article_type_configuration.field_mappings #=> Array
resp.configuration.salesforce_configuration.knowledge_article_configuration.standard_knowledge_article_type_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.standard_knowledge_article_type_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.standard_knowledge_article_type_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations #=> Array
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].document_data_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].document_title_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].field_mappings #=> Array
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].field_mappings[0].data_source_field_name #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].field_mappings[0].date_field_format #=> String
resp.configuration.salesforce_configuration.knowledge_article_configuration.custom_knowledge_article_type_configurations[0].field_mappings[0].index_field_name #=> String
resp.configuration.salesforce_configuration.chatter_feed_configuration.document_data_field_name #=> String
resp.configuration.salesforce_configuration.chatter_feed_configuration.document_title_field_name #=> String
resp.configuration.salesforce_configuration.chatter_feed_configuration.field_mappings #=> Array
resp.configuration.salesforce_configuration.chatter_feed_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.salesforce_configuration.chatter_feed_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.salesforce_configuration.chatter_feed_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.salesforce_configuration.chatter_feed_configuration.include_filter_types #=> Array
resp.configuration.salesforce_configuration.chatter_feed_configuration.include_filter_types[0] #=> String, one of "ACTIVE_USER", "STANDARD_USER"
resp.configuration.salesforce_configuration.crawl_attachments #=> Boolean
resp.configuration.salesforce_configuration.standard_object_attachment_configuration.document_title_field_name #=> String
resp.configuration.salesforce_configuration.standard_object_attachment_configuration.field_mappings #=> Array
resp.configuration.salesforce_configuration.standard_object_attachment_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.salesforce_configuration.standard_object_attachment_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.salesforce_configuration.standard_object_attachment_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.salesforce_configuration.include_attachment_file_patterns #=> Array
resp.configuration.salesforce_configuration.include_attachment_file_patterns[0] #=> String
resp.configuration.salesforce_configuration.exclude_attachment_file_patterns #=> Array
resp.configuration.salesforce_configuration.exclude_attachment_file_patterns[0] #=> String
resp.configuration.one_drive_configuration.tenant_domain #=> String
resp.configuration.one_drive_configuration.secret_arn #=> String
resp.configuration.one_drive_configuration.one_drive_users.one_drive_user_list #=> Array
resp.configuration.one_drive_configuration.one_drive_users.one_drive_user_list[0] #=> String
resp.configuration.one_drive_configuration.one_drive_users.one_drive_user_s3_path.bucket #=> String
resp.configuration.one_drive_configuration.one_drive_users.one_drive_user_s3_path.key #=> String
resp.configuration.one_drive_configuration.inclusion_patterns #=> Array
resp.configuration.one_drive_configuration.inclusion_patterns[0] #=> String
resp.configuration.one_drive_configuration.exclusion_patterns #=> Array
resp.configuration.one_drive_configuration.exclusion_patterns[0] #=> String
resp.configuration.one_drive_configuration.field_mappings #=> Array
resp.configuration.one_drive_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.one_drive_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.one_drive_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.one_drive_configuration.disable_local_groups #=> Boolean
resp.configuration.service_now_configuration.host_url #=> String
resp.configuration.service_now_configuration.secret_arn #=> String
resp.configuration.service_now_configuration.service_now_build_version #=> String, one of "LONDON", "OTHERS"
resp.configuration.service_now_configuration.knowledge_article_configuration.crawl_attachments #=> Boolean
resp.configuration.service_now_configuration.knowledge_article_configuration.include_attachment_file_patterns #=> Array
resp.configuration.service_now_configuration.knowledge_article_configuration.include_attachment_file_patterns[0] #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.exclude_attachment_file_patterns #=> Array
resp.configuration.service_now_configuration.knowledge_article_configuration.exclude_attachment_file_patterns[0] #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.document_data_field_name #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.document_title_field_name #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.field_mappings #=> Array
resp.configuration.service_now_configuration.knowledge_article_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.service_now_configuration.knowledge_article_configuration.filter_query #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.crawl_attachments #=> Boolean
resp.configuration.service_now_configuration.service_catalog_configuration.include_attachment_file_patterns #=> Array
resp.configuration.service_now_configuration.service_catalog_configuration.include_attachment_file_patterns[0] #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.exclude_attachment_file_patterns #=> Array
resp.configuration.service_now_configuration.service_catalog_configuration.exclude_attachment_file_patterns[0] #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.document_data_field_name #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.document_title_field_name #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.field_mappings #=> Array
resp.configuration.service_now_configuration.service_catalog_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.service_now_configuration.service_catalog_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.service_now_configuration.authentication_type #=> String, one of "HTTP_BASIC", "OAUTH2"
resp.configuration.confluence_configuration.server_url #=> String
resp.configuration.confluence_configuration.secret_arn #=> String
resp.configuration.confluence_configuration.version #=> String, one of "CLOUD", "SERVER"
resp.configuration.confluence_configuration.space_configuration.crawl_personal_spaces #=> Boolean
resp.configuration.confluence_configuration.space_configuration.crawl_archived_spaces #=> Boolean
resp.configuration.confluence_configuration.space_configuration.include_spaces #=> Array
resp.configuration.confluence_configuration.space_configuration.include_spaces[0] #=> String
resp.configuration.confluence_configuration.space_configuration.exclude_spaces #=> Array
resp.configuration.confluence_configuration.space_configuration.exclude_spaces[0] #=> String
resp.configuration.confluence_configuration.space_configuration.space_field_mappings #=> Array
resp.configuration.confluence_configuration.space_configuration.space_field_mappings[0].data_source_field_name #=> String, one of "DISPLAY_URL", "ITEM_TYPE", "SPACE_KEY", "URL"
resp.configuration.confluence_configuration.space_configuration.space_field_mappings[0].date_field_format #=> String
resp.configuration.confluence_configuration.space_configuration.space_field_mappings[0].index_field_name #=> String
resp.configuration.confluence_configuration.page_configuration.page_field_mappings #=> Array
resp.configuration.confluence_configuration.page_configuration.page_field_mappings[0].data_source_field_name #=> String, one of "AUTHOR", "CONTENT_STATUS", "CREATED_DATE", "DISPLAY_URL", "ITEM_TYPE", "LABELS", "MODIFIED_DATE", "PARENT_ID", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION"
resp.configuration.confluence_configuration.page_configuration.page_field_mappings[0].date_field_format #=> String
resp.configuration.confluence_configuration.page_configuration.page_field_mappings[0].index_field_name #=> String
resp.configuration.confluence_configuration.blog_configuration.blog_field_mappings #=> Array
resp.configuration.confluence_configuration.blog_configuration.blog_field_mappings[0].data_source_field_name #=> String, one of "AUTHOR", "DISPLAY_URL", "ITEM_TYPE", "LABELS", "PUBLISH_DATE", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION"
resp.configuration.confluence_configuration.blog_configuration.blog_field_mappings[0].date_field_format #=> String
resp.configuration.confluence_configuration.blog_configuration.blog_field_mappings[0].index_field_name #=> String
resp.configuration.confluence_configuration.attachment_configuration.crawl_attachments #=> Boolean
resp.configuration.confluence_configuration.attachment_configuration.attachment_field_mappings #=> Array
resp.configuration.confluence_configuration.attachment_configuration.attachment_field_mappings[0].data_source_field_name #=> String, one of "AUTHOR", "CONTENT_TYPE", "CREATED_DATE", "DISPLAY_URL", "FILE_SIZE", "ITEM_TYPE", "PARENT_ID", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION"
resp.configuration.confluence_configuration.attachment_configuration.attachment_field_mappings[0].date_field_format #=> String
resp.configuration.confluence_configuration.attachment_configuration.attachment_field_mappings[0].index_field_name #=> String
resp.configuration.confluence_configuration.vpc_configuration.subnet_ids #=> Array
resp.configuration.confluence_configuration.vpc_configuration.subnet_ids[0] #=> String
resp.configuration.confluence_configuration.vpc_configuration.security_group_ids #=> Array
resp.configuration.confluence_configuration.vpc_configuration.security_group_ids[0] #=> String
resp.configuration.confluence_configuration.inclusion_patterns #=> Array
resp.configuration.confluence_configuration.inclusion_patterns[0] #=> String
resp.configuration.confluence_configuration.exclusion_patterns #=> Array
resp.configuration.confluence_configuration.exclusion_patterns[0] #=> String
resp.configuration.google_drive_configuration.secret_arn #=> String
resp.configuration.google_drive_configuration.inclusion_patterns #=> Array
resp.configuration.google_drive_configuration.inclusion_patterns[0] #=> String
resp.configuration.google_drive_configuration.exclusion_patterns #=> Array
resp.configuration.google_drive_configuration.exclusion_patterns[0] #=> String
resp.configuration.google_drive_configuration.field_mappings #=> Array
resp.configuration.google_drive_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.google_drive_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.google_drive_configuration.field_mappings[0].index_field_name #=> String
resp.configuration.google_drive_configuration.exclude_mime_types #=> Array
resp.configuration.google_drive_configuration.exclude_mime_types[0] #=> String
resp.configuration.google_drive_configuration.exclude_user_accounts #=> Array
resp.configuration.google_drive_configuration.exclude_user_accounts[0] #=> String
resp.configuration.google_drive_configuration.exclude_shared_drives #=> Array
resp.configuration.google_drive_configuration.exclude_shared_drives[0] #=> String
resp.configuration.web_crawler_configuration.urls.seed_url_configuration.seed_urls #=> Array
resp.configuration.web_crawler_configuration.urls.seed_url_configuration.seed_urls[0] #=> String
resp.configuration.web_crawler_configuration.urls.seed_url_configuration.web_crawler_mode #=> String, one of "HOST_ONLY", "SUBDOMAINS", "EVERYTHING"
resp.configuration.web_crawler_configuration.urls.site_maps_configuration.site_maps #=> Array
resp.configuration.web_crawler_configuration.urls.site_maps_configuration.site_maps[0] #=> String
resp.configuration.web_crawler_configuration.crawl_depth #=> Integer
resp.configuration.web_crawler_configuration.max_links_per_page #=> Integer
resp.configuration.web_crawler_configuration.max_content_size_per_page_in_mega_bytes #=> Float
resp.configuration.web_crawler_configuration.max_urls_per_minute_crawl_rate #=> Integer
resp.configuration.web_crawler_configuration.url_inclusion_patterns #=> Array
resp.configuration.web_crawler_configuration.url_inclusion_patterns[0] #=> String
resp.configuration.web_crawler_configuration.url_exclusion_patterns #=> Array
resp.configuration.web_crawler_configuration.url_exclusion_patterns[0] #=> String
resp.configuration.web_crawler_configuration.proxy_configuration.host #=> String
resp.configuration.web_crawler_configuration.proxy_configuration.port #=> Integer
resp.configuration.web_crawler_configuration.proxy_configuration.credentials #=> String
resp.configuration.web_crawler_configuration.authentication_configuration.basic_authentication #=> Array
resp.configuration.web_crawler_configuration.authentication_configuration.basic_authentication[0].host #=> String
resp.configuration.web_crawler_configuration.authentication_configuration.basic_authentication[0].port #=> Integer
resp.configuration.web_crawler_configuration.authentication_configuration.basic_authentication[0].credentials #=> String
resp.configuration.work_docs_configuration.organization_id #=> String
resp.configuration.work_docs_configuration.crawl_comments #=> Boolean
resp.configuration.work_docs_configuration.use_change_log #=> Boolean
resp.configuration.work_docs_configuration.inclusion_patterns #=> Array
resp.configuration.work_docs_configuration.inclusion_patterns[0] #=> String
resp.configuration.work_docs_configuration.exclusion_patterns #=> Array
resp.configuration.work_docs_configuration.exclusion_patterns[0] #=> String
resp.configuration.work_docs_configuration.field_mappings #=> Array
resp.configuration.work_docs_configuration.field_mappings[0].data_source_field_name #=> String
resp.configuration.work_docs_configuration.field_mappings[0].date_field_format #=> String
resp.configuration.work_docs_configuration.field_mappings[0].index_field_name #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.description #=> String
resp.status #=> String, one of "CREATING", "DELETING", "FAILED", "UPDATING", "ACTIVE"
resp.schedule #=> String
resp.role_arn #=> String
resp.error_message #=> String
resp.language_code #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the data source to describe.

  • :index_id (required, String)

    The identifier of the index that contains the data source.

Returns:

See Also:



1939
1940
1941
1942
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1939

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

#describe_faq(params = {}) ⇒ Types::DescribeFaqResponse

Gets information about an FAQ list.

Examples:

Request syntax with placeholder values


resp = client.describe_faq({
  id: "FaqId", # required
  index_id: "IndexId", # required
})

Response structure


resp.id #=> String
resp.index_id #=> String
resp.name #=> String
resp.description #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.s3_path.bucket #=> String
resp.s3_path.key #=> String
resp.status #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED"
resp.role_arn #=> String
resp.error_message #=> String
resp.file_format #=> String, one of "CSV", "CSV_WITH_HEADER", "JSON"
resp.language_code #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the FAQ.

  • :index_id (required, String)

    The identifier of the index that contains the FAQ.

Returns:

See Also:



1994
1995
1996
1997
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 1994

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

#describe_index(params = {}) ⇒ Types::DescribeIndexResponse

Describes an existing Amazon Kendra index

Examples:

Request syntax with placeholder values


resp = client.describe_index({
  id: "IndexId", # required
})

Response structure


resp.name #=> String
resp.id #=> String
resp.edition #=> String, one of "DEVELOPER_EDITION", "ENTERPRISE_EDITION"
resp.role_arn #=> String
resp.server_side_encryption_configuration.kms_key_id #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "FAILED", "UPDATING", "SYSTEM_UPDATING"
resp.description #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp. #=> Array
resp.[0].name #=> String
resp.[0].type #=> String, one of "STRING_VALUE", "STRING_LIST_VALUE", "LONG_VALUE", "DATE_VALUE"
resp.[0].relevance.freshness #=> Boolean
resp.[0].relevance.importance #=> Integer
resp.[0].relevance.duration #=> String
resp.[0].relevance.rank_order #=> String, one of "ASCENDING", "DESCENDING"
resp.[0].relevance.value_importance_map #=> Hash
resp.[0].relevance.value_importance_map["ValueImportanceMapKey"] #=> Integer
resp.[0].search.facetable #=> Boolean
resp.[0].search.searchable #=> Boolean
resp.[0].search.displayable #=> Boolean
resp.[0].search.sortable #=> Boolean
resp.index_statistics.faq_statistics.indexed_question_answers_count #=> Integer
resp.index_statistics.text_document_statistics.indexed_text_documents_count #=> Integer
resp.index_statistics.text_document_statistics.indexed_text_bytes #=> Integer
resp.error_message #=> String
resp.capacity_units.storage_capacity_units #=> Integer
resp.capacity_units.query_capacity_units #=> Integer
resp.user_token_configurations #=> Array
resp.user_token_configurations[0].jwt_token_type_configuration.key_location #=> String, one of "URL", "SECRET_MANAGER"
resp.user_token_configurations[0].jwt_token_type_configuration.url #=> String
resp.user_token_configurations[0].jwt_token_type_configuration.secret_manager_arn #=> String
resp.user_token_configurations[0].jwt_token_type_configuration.user_name_attribute_field #=> String
resp.user_token_configurations[0].jwt_token_type_configuration.group_attribute_field #=> String
resp.user_token_configurations[0].jwt_token_type_configuration.issuer #=> String
resp.user_token_configurations[0].jwt_token_type_configuration.claim_regex #=> String
resp.user_token_configurations[0].json_token_type_configuration.user_name_attribute_field #=> String
resp.user_token_configurations[0].json_token_type_configuration.group_attribute_field #=> String
resp.user_context_policy #=> String, one of "ATTRIBUTE_FILTER", "USER_TOKEN"
resp.user_group_resolution_configuration.user_group_resolution_mode #=> String, one of "AWS_SSO", "NONE"

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The name of the index to describe.

Returns:

See Also:



2076
2077
2078
2079
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2076

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

#describe_principal_mapping(params = {}) ⇒ Types::DescribePrincipalMappingResponse

Describes the processing of PUT and DELETE actions for mapping users to their groups. This includes information on the status of actions currently processing or yet to be processed, when actions were last updated, when actions were received by Amazon Kendra, the latest action that should process and apply after other actions, and useful error messages if an action could not be processed.

Examples:

Request syntax with placeholder values


resp = client.describe_principal_mapping({
  index_id: "IndexId", # required
  data_source_id: "DataSourceId",
  group_id: "GroupId", # required
})

Response structure


resp.index_id #=> String
resp.data_source_id #=> String
resp.group_id #=> String
resp.group_ordering_id_summaries #=> Array
resp.group_ordering_id_summaries[0].status #=> String, one of "FAILED", "SUCCEEDED", "PROCESSING", "DELETING", "DELETED"
resp.group_ordering_id_summaries[0].last_updated_at #=> Time
resp.group_ordering_id_summaries[0].received_at #=> Time
resp.group_ordering_id_summaries[0].ordering_id #=> Integer
resp.group_ordering_id_summaries[0].failure_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index required to check the processing of PUT and DELETE actions for mapping users to their groups.

  • :data_source_id (String)

    The identifier of the data source to check the processing of PUT and DELETE actions for mapping users to their groups.

  • :group_id (required, String)

    The identifier of the group required to check the processing of PUT and DELETE actions for mapping users to their groups.

Returns:

See Also:



2131
2132
2133
2134
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2131

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

#describe_query_suggestions_block_list(params = {}) ⇒ Types::DescribeQuerySuggestionsBlockListResponse

Describes a block list used for query suggestions for an index.

This is used to check the current settings that are applied to a block list.

Examples:

Request syntax with placeholder values


resp = client.describe_query_suggestions_block_list({
  index_id: "IndexId", # required
  id: "QuerySuggestionsBlockListId", # required
})

Response structure


resp.index_id #=> String
resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.status #=> String, one of "ACTIVE", "CREATING", "DELETING", "UPDATING", "ACTIVE_BUT_UPDATE_FAILED", "FAILED"
resp.error_message #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.source_s3_path.bucket #=> String
resp.source_s3_path.key #=> String
resp.item_count #=> Integer
resp.file_size_bytes #=> Integer
resp.role_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index for the block list.

  • :id (required, String)

    The unique identifier of the block list.

Returns:

See Also:



2189
2190
2191
2192
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2189

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

#describe_query_suggestions_config(params = {}) ⇒ Types::DescribeQuerySuggestionsConfigResponse

Describes the settings of query suggestions for an index.

This is used to check the current settings applied to query suggestions.

Examples:

Request syntax with placeholder values


resp = client.describe_query_suggestions_config({
  index_id: "IndexId", # required
})

Response structure


resp.mode #=> String, one of "ENABLED", "LEARN_ONLY"
resp.status #=> String, one of "ACTIVE", "UPDATING"
resp.query_log_look_back_window_in_days #=> Integer
resp.include_queries_without_user_information #=> Boolean
resp.minimum_number_of_querying_users #=> Integer
resp.minimum_query_count #=> Integer
resp.last_suggestions_build_time #=> Time
resp.last_clear_time #=> Time
resp.total_suggestions_count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to describe query suggestions settings for.

Returns:

See Also:



2237
2238
2239
2240
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2237

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

#describe_thesaurus(params = {}) ⇒ Types::DescribeThesaurusResponse

Describes an existing Amazon Kendra thesaurus.

Examples:

Request syntax with placeholder values


resp = client.describe_thesaurus({
  id: "ThesaurusId", # required
  index_id: "IndexId", # required
})

Response structure


resp.id #=> String
resp.index_id #=> String
resp.name #=> String
resp.description #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "ACTIVE_BUT_UPDATE_FAILED", "FAILED"
resp.error_message #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.role_arn #=> String
resp.source_s3_path.bucket #=> String
resp.source_s3_path.key #=> String
resp.file_size_bytes #=> Integer
resp.term_count #=> Integer
resp.synonym_rule_count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the thesaurus to describe.

  • :index_id (required, String)

    The identifier of the index associated with the thesaurus to describe.

Returns:

See Also:



2294
2295
2296
2297
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2294

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

#get_query_suggestions(params = {}) ⇒ Types::GetQuerySuggestionsResponse

Fetches the queries that are suggested to your users.

Examples:

Request syntax with placeholder values


resp = client.get_query_suggestions({
  index_id: "IndexId", # required
  query_text: "SuggestionQueryText", # required
  max_suggestions_count: 1,
})

Response structure


resp.query_suggestions_id #=> String
resp.suggestions #=> Array
resp.suggestions[0].id #=> String
resp.suggestions[0].value.text.text #=> String
resp.suggestions[0].value.text.highlights #=> Array
resp.suggestions[0].value.text.highlights[0].begin_offset #=> Integer
resp.suggestions[0].value.text.highlights[0].end_offset #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to get query suggestions from.

  • :query_text (required, String)

    The text of a user's query to generate query suggestions.

    A query is suggested if the query prefix matches what a user starts to type as their query.

    Amazon Kendra does not show any suggestions if a user types fewer than two characters or more than 60 characters. A query must also have at least one search result and contain at least one word of more than four characters.

  • :max_suggestions_count (Integer)

    The maximum number of query suggestions you want to show to your users.

Returns:

See Also:



2346
2347
2348
2349
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2346

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

#list_data_source_sync_jobs(params = {}) ⇒ Types::ListDataSourceSyncJobsResponse

Gets statistics about synchronizing Amazon Kendra with a data source.

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

Examples:

Request syntax with placeholder values


resp = client.list_data_source_sync_jobs({
  id: "DataSourceId", # required
  index_id: "IndexId", # required
  next_token: "NextToken",
  max_results: 1,
  start_time_filter: {
    start_time: Time.now,
    end_time: Time.now,
  },
  status_filter: "FAILED", # accepts FAILED, SUCCEEDED, SYNCING, INCOMPLETE, STOPPING, ABORTED, SYNCING_INDEXING
})

Response structure


resp.history #=> Array
resp.history[0].execution_id #=> String
resp.history[0].start_time #=> Time
resp.history[0].end_time #=> Time
resp.history[0].status #=> String, one of "FAILED", "SUCCEEDED", "SYNCING", "INCOMPLETE", "STOPPING", "ABORTED", "SYNCING_INDEXING"
resp.history[0].error_message #=> String
resp.history[0].error_code #=> String, one of "InternalError", "InvalidRequest"
resp.history[0].data_source_error_code #=> String
resp.history[0].metrics.documents_added #=> String
resp.history[0].metrics.documents_modified #=> String
resp.history[0].metrics.documents_deleted #=> String
resp.history[0].metrics.documents_failed #=> String
resp.history[0].metrics.documents_scanned #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the data source.

  • :index_id (required, String)

    The identifier of the index that contains the data source.

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of jobs.

  • :max_results (Integer)

    The maximum number of synchronization jobs to return in the response. If there are fewer results in the list, this response contains only the actual results.

  • :start_time_filter (Types::TimeRange)

    When specified, the synchronization jobs returned in the list are limited to jobs between the specified dates.

  • :status_filter (String)

    When specified, only returns synchronization jobs with the Status field equal to the specified status.

Returns:

See Also:



2419
2420
2421
2422
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2419

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

#list_data_sources(params = {}) ⇒ Types::ListDataSourcesResponse

Lists the data sources that you have created.

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

Examples:

Request syntax with placeholder values


resp = client.list_data_sources({
  index_id: "IndexId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.summary_items #=> Array
resp.summary_items[0].name #=> String
resp.summary_items[0].id #=> String
resp.summary_items[0].type #=> String, one of "S3", "SHAREPOINT", "DATABASE", "SALESFORCE", "ONEDRIVE", "SERVICENOW", "CUSTOM", "CONFLUENCE", "GOOGLEDRIVE", "WEBCRAWLER", "WORKDOCS"
resp.summary_items[0].created_at #=> Time
resp.summary_items[0].updated_at #=> Time
resp.summary_items[0].status #=> String, one of "CREATING", "DELETING", "FAILED", "UPDATING", "ACTIVE"
resp.summary_items[0].language_code #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index that contains the data source.

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of data sources (DataSourceSummaryItems).

  • :max_results (Integer)

    The maximum number of data sources to return.

Returns:

See Also:



2469
2470
2471
2472
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2469

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

#list_faqs(params = {}) ⇒ Types::ListFaqsResponse

Gets a list of FAQ lists associated with an index.

Examples:

Request syntax with placeholder values


resp = client.list_faqs({
  index_id: "IndexId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.faq_summary_items #=> Array
resp.faq_summary_items[0].id #=> String
resp.faq_summary_items[0].name #=> String
resp.faq_summary_items[0].status #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED"
resp.faq_summary_items[0].created_at #=> Time
resp.faq_summary_items[0].updated_at #=> Time
resp.faq_summary_items[0].file_format #=> String, one of "CSV", "CSV_WITH_HEADER", "JSON"
resp.faq_summary_items[0].language_code #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The index that contains the FAQ lists.

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of FAQs.

  • :max_results (Integer)

    The maximum number of FAQs to return in the response. If there are fewer results in the list, this response contains only the actual results.

Returns:

See Also:



2518
2519
2520
2521
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2518

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

#list_groups_older_than_ordering_id(params = {}) ⇒ Types::ListGroupsOlderThanOrderingIdResponse

Provides a list of groups that are mapped to users before a given ordering or timestamp identifier.

Examples:

Request syntax with placeholder values


resp = client.list_groups_older_than_ordering_id({
  index_id: "IndexId", # required
  data_source_id: "DataSourceId",
  ordering_id: 1, # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.groups_summaries #=> Array
resp.groups_summaries[0].group_id #=> String
resp.groups_summaries[0].ordering_id #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index for getting a list of groups mapped to users before a given ordering or timestamp identifier.

  • :data_source_id (String)

    The identifier of the data source for getting a list of groups mapped to users before a given ordering timestamp identifier.

  • :ordering_id (required, Integer)

    The timestamp identifier used for the latest PUT or DELETE action for mapping users to their groups.

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of groups that are mapped to users before a given ordering or timestamp identifier.

  • :max_results (Integer)

    The maximum number of returned groups that are mapped to users before a given ordering or timestamp identifier.

Returns:

See Also:



2575
2576
2577
2578
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2575

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

#list_indices(params = {}) ⇒ Types::ListIndicesResponse

Lists the Amazon Kendra indexes that you have created.

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

Examples:

Request syntax with placeholder values


resp = client.list_indices({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.index_configuration_summary_items #=> Array
resp.index_configuration_summary_items[0].name #=> String
resp.index_configuration_summary_items[0].id #=> String
resp.index_configuration_summary_items[0].edition #=> String, one of "DEVELOPER_EDITION", "ENTERPRISE_EDITION"
resp.index_configuration_summary_items[0].created_at #=> Time
resp.index_configuration_summary_items[0].updated_at #=> Time
resp.index_configuration_summary_items[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING", "FAILED", "UPDATING", "SYSTEM_UPDATING"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of indexes (DataSourceSummaryItems).

  • :max_results (Integer)

    The maximum number of data sources to return.

Returns:

See Also:



2620
2621
2622
2623
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2620

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

#list_query_suggestions_block_lists(params = {}) ⇒ Types::ListQuerySuggestionsBlockListsResponse

Lists the block lists used for query suggestions for an index.

For information on the current quota limits for block lists, see Quotas for Amazon Kendra.

Examples:

Request syntax with placeholder values


resp = client.list_query_suggestions_block_lists({
  index_id: "IndexId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.block_list_summary_items #=> Array
resp.block_list_summary_items[0].id #=> String
resp.block_list_summary_items[0].name #=> String
resp.block_list_summary_items[0].status #=> String, one of "ACTIVE", "CREATING", "DELETING", "UPDATING", "ACTIVE_BUT_UPDATE_FAILED", "FAILED"
resp.block_list_summary_items[0].created_at #=> Time
resp.block_list_summary_items[0].updated_at #=> Time
resp.block_list_summary_items[0].item_count #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index for a list of all block lists that exist for that index.

    For information on the current quota limits for block lists, see Quotas for Amazon Kendra.

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of block lists (BlockListSummaryItems).

  • :max_results (Integer)

    The maximum number of block lists to return.

Returns:

See Also:



2682
2683
2684
2685
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2682

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

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

Gets a list of tags associated with a specified resource. Indexes, FAQs, and data sources can have tags associated with them.

Examples:

Request syntax with placeholder values


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

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the index, FAQ, or data source to get a list of tags for.

Returns:

See Also:



2714
2715
2716
2717
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2714

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

#list_thesauri(params = {}) ⇒ Types::ListThesauriResponse

Lists the Amazon Kendra thesauri associated with an index.

Examples:

Request syntax with placeholder values


resp = client.list_thesauri({
  index_id: "IndexId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.thesaurus_summary_items #=> Array
resp.thesaurus_summary_items[0].id #=> String
resp.thesaurus_summary_items[0].name #=> String
resp.thesaurus_summary_items[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "ACTIVE_BUT_UPDATE_FAILED", "FAILED"
resp.thesaurus_summary_items[0].created_at #=> Time
resp.thesaurus_summary_items[0].updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index associated with the thesaurus to list.

  • :next_token (String)

    If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of thesauri (ThesaurusSummaryItems).

  • :max_results (Integer)

    The maximum number of thesauri to return.

Returns:

See Also:



2760
2761
2762
2763
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2760

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

#put_principal_mapping(params = {}) ⇒ Struct

Maps users to their groups so that you only need to provide the user ID when you issue the query.

You can also map sub groups to groups. For example, the group "Company Intellectual Property Teams" includes sub groups "Research" and "Engineering". These sub groups include their own list of users or people who work in these teams. Only users who work in research and engineering, and therefore belong in the intellectual property group, can see top-secret company documents in their search results.

You map users to their groups when you want to filter search results for different users based on their group’s access to documents. For more information on filtering search results for different users, see Filtering on user context.

If more than five PUT actions for a group are currently processing, a validation exception is thrown.

Examples:

Request syntax with placeholder values


resp = client.put_principal_mapping({
  index_id: "IndexId", # required
  data_source_id: "DataSourceId",
  group_id: "GroupId", # required
  group_members: { # required
    member_groups: [
      {
        group_id: "GroupId", # required
        data_source_id: "DataSourceId",
      },
    ],
    member_users: [
      {
        user_id: "UserId", # required
      },
    ],
    s3_pathfor_group_members: {
      bucket: "S3BucketName", # required
      key: "S3ObjectKey", # required
    },
  },
  ordering_id: 1,
  role_arn: "RoleArn",
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to map users to their groups.

  • :data_source_id (String)

    The identifier of the data source you want to map users to their groups.

    This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.

  • :group_id (required, String)

    The identifier of the group you want to map its users to.

  • :group_members (required, Types::GroupMembers)

    The list that contains your users or sub groups that belong the same group.

    For example, the group "Company" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".

    If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.

  • :ordering_id (Integer)

    The timestamp identifier you specify to ensure Amazon Kendra does not override the latest PUT action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.

    The ordering ID can be the UNIX time of the last update you made to a group members list. You would then provide this list when calling PutPrincipalMapping. This ensures your PUT action for that updated group with the latest members list doesn't get overwritten by earlier PUT actions for the same group which are yet to be processed.

    The default ordering ID is the current UNIX time in milliseconds that the action was received by Amazon Kendra.

  • :role_arn (String)

    The Amazon Resource Name (ARN) of a role that has access to the S3 file that contains your list of users or sub groups that belong to a group.

    For more information, see IAM roles for Amazon Kendra.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2880
2881
2882
2883
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 2880

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

#query(params = {}) ⇒ Types::QueryResult

Searches an active index. Use this API to search your documents using query. The Query operation enables to do faceted search and to filter results based on document attributes.

It also enables you to provide user context that Amazon Kendra uses to enforce document access control in the search results.

Amazon Kendra searches your index for text content and question and answer (FAQ) content. By default the response contains three types of results.

  • Relevant passages

  • Matching FAQs

  • Relevant documents

You can specify that the query return only one type of result using the QueryResultTypeConfig parameter.

Each query returns the 100 most relevant results.

Examples:

Request syntax with placeholder values


resp = client.query({
  index_id: "IndexId", # required
  query_text: "QueryText", # required
  attribute_filter: {
    and_all_filters: [
      {
        # recursive AttributeFilter
      },
    ],
    or_all_filters: [
      {
        # recursive AttributeFilter
      },
    ],
    not_filter: {
      # recursive AttributeFilter
    },
    equals_to: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
    contains_all: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
    contains_any: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
    greater_than: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
    greater_than_or_equals: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
    less_than: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
    less_than_or_equals: {
      key: "DocumentAttributeKey", # required
      value: { # required
        string_value: "DocumentAttributeStringValue",
        string_list_value: ["String"],
        long_value: 1,
        date_value: Time.now,
      },
    },
  },
  facets: [
    {
      document_attribute_key: "DocumentAttributeKey",
    },
  ],
  requested_document_attributes: ["DocumentAttributeKey"],
  query_result_type_filter: "DOCUMENT", # accepts DOCUMENT, QUESTION_ANSWER, ANSWER
  document_relevance_override_configurations: [
    {
      name: "DocumentMetadataConfigurationName", # required
      relevance: { # required
        freshness: false,
        importance: 1,
        duration: "Duration",
        rank_order: "ASCENDING", # accepts ASCENDING, DESCENDING
        value_importance_map: {
          "ValueImportanceMapKey" => 1,
        },
      },
    },
  ],
  page_number: 1,
  page_size: 1,
  sorting_configuration: {
    document_attribute_key: "DocumentAttributeKey", # required
    sort_order: "DESC", # required, accepts DESC, ASC
  },
  user_context: {
    token: "Token",
    user_id: "PrincipalName",
    groups: ["PrincipalName"],
    data_source_groups: [
      {
        group_id: "PrincipalName", # required
        data_source_id: "DataSourceId", # required
      },
    ],
  },
  visitor_id: "VisitorId",
})

Response structure


resp.query_id #=> String
resp.result_items #=> Array
resp.result_items[0].id #=> String
resp.result_items[0].type #=> String, one of "DOCUMENT", "QUESTION_ANSWER", "ANSWER"
resp.result_items[0].additional_attributes #=> Array
resp.result_items[0].additional_attributes[0].key #=> String
resp.result_items[0].additional_attributes[0].value_type #=> String, one of "TEXT_WITH_HIGHLIGHTS_VALUE"
resp.result_items[0].additional_attributes[0].value.text_with_highlights_value.text #=> String
resp.result_items[0].additional_attributes[0].value.text_with_highlights_value.highlights #=> Array
resp.result_items[0].additional_attributes[0].value.text_with_highlights_value.highlights[0].begin_offset #=> Integer
resp.result_items[0].additional_attributes[0].value.text_with_highlights_value.highlights[0].end_offset #=> Integer
resp.result_items[0].additional_attributes[0].value.text_with_highlights_value.highlights[0].top_answer #=> Boolean
resp.result_items[0].additional_attributes[0].value.text_with_highlights_value.highlights[0].type #=> String, one of "STANDARD", "THESAURUS_SYNONYM"
resp.result_items[0].document_id #=> String
resp.result_items[0].document_title.text #=> String
resp.result_items[0].document_title.highlights #=> Array
resp.result_items[0].document_title.highlights[0].begin_offset #=> Integer
resp.result_items[0].document_title.highlights[0].end_offset #=> Integer
resp.result_items[0].document_title.highlights[0].top_answer #=> Boolean
resp.result_items[0].document_title.highlights[0].type #=> String, one of "STANDARD", "THESAURUS_SYNONYM"
resp.result_items[0].document_excerpt.text #=> String
resp.result_items[0].document_excerpt.highlights #=> Array
resp.result_items[0].document_excerpt.highlights[0].begin_offset #=> Integer
resp.result_items[0].document_excerpt.highlights[0].end_offset #=> Integer
resp.result_items[0].document_excerpt.highlights[0].top_answer #=> Boolean
resp.result_items[0].document_excerpt.highlights[0].type #=> String, one of "STANDARD", "THESAURUS_SYNONYM"
resp.result_items[0].document_uri #=> String
resp.result_items[0].document_attributes #=> Array
resp.result_items[0].document_attributes[0].key #=> String
resp.result_items[0].document_attributes[0].value.string_value #=> String
resp.result_items[0].document_attributes[0].value.string_list_value #=> Array
resp.result_items[0].document_attributes[0].value.string_list_value[0] #=> String
resp.result_items[0].document_attributes[0].value.long_value #=> Integer
resp.result_items[0].document_attributes[0].value.date_value #=> Time
resp.result_items[0].score_attributes.score_confidence #=> String, one of "VERY_HIGH", "HIGH", "MEDIUM", "LOW", "NOT_AVAILABLE"
resp.result_items[0].feedback_token #=> String
resp.facet_results #=> Array
resp.facet_results[0].document_attribute_key #=> String
resp.facet_results[0].document_attribute_value_type #=> String, one of "STRING_VALUE", "STRING_LIST_VALUE", "LONG_VALUE", "DATE_VALUE"
resp.facet_results[0].document_attribute_value_count_pairs #=> Array
resp.facet_results[0].document_attribute_value_count_pairs[0].document_attribute_value.string_value #=> String
resp.facet_results[0].document_attribute_value_count_pairs[0].document_attribute_value.string_list_value #=> Array
resp.facet_results[0].document_attribute_value_count_pairs[0].document_attribute_value.string_list_value[0] #=> String
resp.facet_results[0].document_attribute_value_count_pairs[0].document_attribute_value.long_value #=> Integer
resp.facet_results[0].document_attribute_value_count_pairs[0].document_attribute_value.date_value #=> Time
resp.facet_results[0].document_attribute_value_count_pairs[0].count #=> Integer
resp.total_number_of_results #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The unique identifier of the index to search. The identifier is returned in the response from the CreateIndex operation.

  • :query_text (required, String)

    The text to search for.

  • :attribute_filter (Types::AttributeFilter)

    Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the AndAllFilters, NotFilter, and OrAllFilters parameters contain a list of other filters.

    The AttributeFilter parameter enables you to create a set of filtering rules that a document must satisfy to be included in the query results.

  • :facets (Array<Types::Facet>)

    An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.

  • :requested_document_attributes (Array<String>)

    An array of document attributes to include in the response. No other document attributes are included in the response. By default all document attributes are included in the response.

  • :query_result_type_filter (String)

    Sets the type of query. Only results for the specified query type are returned.

  • :document_relevance_override_configurations (Array<Types::DocumentRelevanceConfiguration>)

    Overrides relevance tuning configurations of fields or attributes set at the index level.

    If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning.

    If there is relevance tuning configured at the index level, but you do not use this API to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level.

    If there is relevance tuning configured for fields at the index level, but you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.

  • :page_number (Integer)

    Query results are returned in pages the size of the PageSize parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.

  • :page_size (Integer)

    Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.

  • :sorting_configuration (Types::SortingConfiguration)

    Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance.

    If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.

  • :user_context (Types::UserContext)

    The user context token or user and group information.

  • :visitor_id (String)

    Provides an identifier for a specific user. The VisitorId should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the VisitorId.

Returns:

See Also:



3169
3170
3171
3172
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3169

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

#start_data_source_sync_job(params = {}) ⇒ Types::StartDataSourceSyncJobResponse

Starts a synchronization job for a data source. If a synchronization job is already in progress, Amazon Kendra returns a ResourceInUseException exception.

Examples:

Request syntax with placeholder values


resp = client.start_data_source_sync_job({
  id: "DataSourceId", # required
  index_id: "IndexId", # required
})

Response structure


resp.execution_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the data source to synchronize.

  • :index_id (required, String)

    The identifier of the index that contains the data source.

Returns:

See Also:



3203
3204
3205
3206
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3203

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

#stop_data_source_sync_job(params = {}) ⇒ Struct

Stops a running synchronization job. You can't stop a scheduled synchronization job.

Examples:

Request syntax with placeholder values


resp = client.stop_data_source_sync_job({
  id: "DataSourceId", # required
  index_id: "IndexId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the data source for which to stop the synchronization jobs.

  • :index_id (required, String)

    The identifier of the index that contains the data source.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3231
3232
3233
3234
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3231

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

#submit_feedback(params = {}) ⇒ Struct

Enables you to provide feedback to Amazon Kendra to improve the performance of your index.

Examples:

Request syntax with placeholder values


resp = client.submit_feedback({
  index_id: "IndexId", # required
  query_id: "QueryId", # required
  click_feedback_items: [
    {
      result_id: "ResultId", # required
      click_time: Time.now, # required
    },
  ],
  relevance_feedback_items: [
    {
      result_id: "ResultId", # required
      relevance_value: "RELEVANT", # required, accepts RELEVANT, NOT_RELEVANT
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index that was queried.

  • :query_id (required, String)

    The identifier of the specific query for which you are submitting feedback. The query ID is returned in the response to the Query operation.

  • :click_feedback_items (Array<Types::ClickFeedback>)

    Tells Amazon Kendra that a particular search result link was chosen by the user.

  • :relevance_feedback_items (Array<Types::RelevanceFeedback>)

    Provides Amazon Kendra with relevant or not relevant feedback for whether a particular item was relevant to the search.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3280
3281
3282
3283
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3280

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

#tag_resource(params = {}) ⇒ Struct

Adds the specified tag to the specified index, FAQ, or data source resource. If the tag already exists, the existing value is replaced with the new value.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the index, FAQ, or data source to tag.

  • :tags (required, Array<Types::Tag>)

    A list of tag keys to add to the index, FAQ, or data source. If a tag already exists, the existing value is replaced with the new value.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3315
3316
3317
3318
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3315

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

#untag_resource(params = {}) ⇒ Struct

Removes a tag from an index, FAQ, or a data source.

Examples:

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 index, FAQ, or data source to remove the tag from.

  • :tag_keys (required, Array<String>)

    A list of tag keys to remove from the index, FAQ, or data source. If a tag key does not exist on the resource, it is ignored.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3343
3344
3345
3346
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3343

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

#update_data_source(params = {}) ⇒ Struct

Updates an existing Amazon Kendra data source.

Examples:

Request syntax with placeholder values


resp = client.update_data_source({
  id: "DataSourceId", # required
  name: "DataSourceName",
  index_id: "IndexId", # required
  configuration: {
    s3_configuration: {
      bucket_name: "S3BucketName", # required
      inclusion_prefixes: ["DataSourceInclusionsExclusionsStringsMember"],
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      documents_metadata_configuration: {
        s3_prefix: "S3ObjectKey",
      },
      access_control_list_configuration: {
        key_path: "S3ObjectKey",
      },
    },
    share_point_configuration: {
      share_point_version: "SHAREPOINT_2013", # required, accepts SHAREPOINT_2013, SHAREPOINT_2016, SHAREPOINT_ONLINE
      urls: ["Url"], # required
      secret_arn: "SecretArn", # required
      crawl_attachments: false,
      use_change_log: false,
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      vpc_configuration: {
        subnet_ids: ["SubnetId"], # required
        security_group_ids: ["VpcSecurityGroupId"], # required
      },
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
      document_title_field_name: "DataSourceFieldName",
      disable_local_groups: false,
      ssl_certificate_s3_path: {
        bucket: "S3BucketName", # required
        key: "S3ObjectKey", # required
      },
    },
    database_configuration: {
      database_engine_type: "RDS_AURORA_MYSQL", # required, accepts RDS_AURORA_MYSQL, RDS_AURORA_POSTGRESQL, RDS_MYSQL, RDS_POSTGRESQL
      connection_configuration: { # required
        database_host: "DatabaseHost", # required
        database_port: 1, # required
        database_name: "DatabaseName", # required
        table_name: "TableName", # required
        secret_arn: "SecretArn", # required
      },
      vpc_configuration: {
        subnet_ids: ["SubnetId"], # required
        security_group_ids: ["VpcSecurityGroupId"], # required
      },
      column_configuration: { # required
        document_id_column_name: "ColumnName", # required
        document_data_column_name: "ColumnName", # required
        document_title_column_name: "ColumnName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
        change_detecting_columns: ["ColumnName"], # required
      },
      acl_configuration: {
        allowed_groups_column_name: "ColumnName", # required
      },
      sql_configuration: {
        query_identifiers_enclosing_option: "DOUBLE_QUOTES", # accepts DOUBLE_QUOTES, NONE
      },
    },
    salesforce_configuration: {
      server_url: "Url", # required
      secret_arn: "SecretArn", # required
      standard_object_configurations: [
        {
          name: "ACCOUNT", # required, accepts ACCOUNT, CAMPAIGN, CASE, CONTACT, CONTRACT, DOCUMENT, GROUP, IDEA, LEAD, OPPORTUNITY, PARTNER, PRICEBOOK, PRODUCT, PROFILE, SOLUTION, TASK, USER
          document_data_field_name: "DataSourceFieldName", # required
          document_title_field_name: "DataSourceFieldName",
          field_mappings: [
            {
              data_source_field_name: "DataSourceFieldName", # required
              date_field_format: "DataSourceDateFieldFormat",
              index_field_name: "IndexFieldName", # required
            },
          ],
        },
      ],
      knowledge_article_configuration: {
        included_states: ["DRAFT"], # required, accepts DRAFT, PUBLISHED, ARCHIVED
        standard_knowledge_article_type_configuration: {
          document_data_field_name: "DataSourceFieldName", # required
          document_title_field_name: "DataSourceFieldName",
          field_mappings: [
            {
              data_source_field_name: "DataSourceFieldName", # required
              date_field_format: "DataSourceDateFieldFormat",
              index_field_name: "IndexFieldName", # required
            },
          ],
        },
        custom_knowledge_article_type_configurations: [
          {
            name: "SalesforceCustomKnowledgeArticleTypeName", # required
            document_data_field_name: "DataSourceFieldName", # required
            document_title_field_name: "DataSourceFieldName",
            field_mappings: [
              {
                data_source_field_name: "DataSourceFieldName", # required
                date_field_format: "DataSourceDateFieldFormat",
                index_field_name: "IndexFieldName", # required
              },
            ],
          },
        ],
      },
      chatter_feed_configuration: {
        document_data_field_name: "DataSourceFieldName", # required
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
        include_filter_types: ["ACTIVE_USER"], # accepts ACTIVE_USER, STANDARD_USER
      },
      crawl_attachments: false,
      standard_object_attachment_configuration: {
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
      },
      include_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclude_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
    },
    one_drive_configuration: {
      tenant_domain: "TenantDomain", # required
      secret_arn: "SecretArn", # required
      one_drive_users: { # required
        one_drive_user_list: ["OneDriveUser"],
        one_drive_user_s3_path: {
          bucket: "S3BucketName", # required
          key: "S3ObjectKey", # required
        },
      },
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
      disable_local_groups: false,
    },
    service_now_configuration: {
      host_url: "ServiceNowHostUrl", # required
      secret_arn: "SecretArn", # required
      service_now_build_version: "LONDON", # required, accepts LONDON, OTHERS
      knowledge_article_configuration: {
        crawl_attachments: false,
        include_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        exclude_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        document_data_field_name: "DataSourceFieldName", # required
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
        filter_query: "ServiceNowKnowledgeArticleFilterQuery",
      },
      service_catalog_configuration: {
        crawl_attachments: false,
        include_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        exclude_attachment_file_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
        document_data_field_name: "DataSourceFieldName", # required
        document_title_field_name: "DataSourceFieldName",
        field_mappings: [
          {
            data_source_field_name: "DataSourceFieldName", # required
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName", # required
          },
        ],
      },
      authentication_type: "HTTP_BASIC", # accepts HTTP_BASIC, OAUTH2
    },
    confluence_configuration: {
      server_url: "Url", # required
      secret_arn: "SecretArn", # required
      version: "CLOUD", # required, accepts CLOUD, SERVER
      space_configuration: {
        crawl_personal_spaces: false,
        crawl_archived_spaces: false,
        include_spaces: ["ConfluenceSpaceIdentifier"],
        exclude_spaces: ["ConfluenceSpaceIdentifier"],
        space_field_mappings: [
          {
            data_source_field_name: "DISPLAY_URL", # accepts DISPLAY_URL, ITEM_TYPE, SPACE_KEY, URL
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      page_configuration: {
        page_field_mappings: [
          {
            data_source_field_name: "AUTHOR", # accepts AUTHOR, CONTENT_STATUS, CREATED_DATE, DISPLAY_URL, ITEM_TYPE, LABELS, MODIFIED_DATE, PARENT_ID, SPACE_KEY, SPACE_NAME, URL, VERSION
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      blog_configuration: {
        blog_field_mappings: [
          {
            data_source_field_name: "AUTHOR", # accepts AUTHOR, DISPLAY_URL, ITEM_TYPE, LABELS, PUBLISH_DATE, SPACE_KEY, SPACE_NAME, URL, VERSION
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      attachment_configuration: {
        crawl_attachments: false,
        attachment_field_mappings: [
          {
            data_source_field_name: "AUTHOR", # accepts AUTHOR, CONTENT_TYPE, CREATED_DATE, DISPLAY_URL, FILE_SIZE, ITEM_TYPE, PARENT_ID, SPACE_KEY, SPACE_NAME, URL, VERSION
            date_field_format: "DataSourceDateFieldFormat",
            index_field_name: "IndexFieldName",
          },
        ],
      },
      vpc_configuration: {
        subnet_ids: ["SubnetId"], # required
        security_group_ids: ["VpcSecurityGroupId"], # required
      },
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
    },
    google_drive_configuration: {
      secret_arn: "SecretArn", # required
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
      exclude_mime_types: ["MimeType"],
      exclude_user_accounts: ["UserAccount"],
      exclude_shared_drives: ["SharedDriveId"],
    },
    web_crawler_configuration: {
      urls: { # required
        seed_url_configuration: {
          seed_urls: ["SeedUrl"], # required
          web_crawler_mode: "HOST_ONLY", # accepts HOST_ONLY, SUBDOMAINS, EVERYTHING
        },
        site_maps_configuration: {
          site_maps: ["SiteMap"], # required
        },
      },
      crawl_depth: 1,
      max_links_per_page: 1,
      max_content_size_per_page_in_mega_bytes: 1.0,
      max_urls_per_minute_crawl_rate: 1,
      url_inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      url_exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      proxy_configuration: {
        host: "Host", # required
        port: 1, # required
        credentials: "SecretArn",
      },
      authentication_configuration: {
        basic_authentication: [
          {
            host: "Host", # required
            port: 1, # required
            credentials: "SecretArn", # required
          },
        ],
      },
    },
    work_docs_configuration: {
      organization_id: "OrganizationId", # required
      crawl_comments: false,
      use_change_log: false,
      inclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      exclusion_patterns: ["DataSourceInclusionsExclusionsStringsMember"],
      field_mappings: [
        {
          data_source_field_name: "DataSourceFieldName", # required
          date_field_format: "DataSourceDateFieldFormat",
          index_field_name: "IndexFieldName", # required
        },
      ],
    },
  },
  description: "Description",
  schedule: "ScanSchedule",
  role_arn: "RoleArn",
  language_code: "LanguageCode",
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the data source to update.

  • :name (String)

    The name of the data source to update. The name of the data source can't be updated. To rename a data source you must delete the data source and re-create it.

  • :index_id (required, String)

    The identifier of the index that contains the data source to update.

  • :configuration (Types::DataSourceConfiguration)

    Configuration information for a Amazon Kendra data source.

  • :description (String)

    The new description for the data source.

  • :schedule (String)

    The new update schedule for the data source.

  • :role_arn (String)

    The Amazon Resource Name (ARN) of the new role to use when the data source is accessing resources on your behalf.

  • :language_code (String)

    The code for a language. This allows you to support a language for all documents when updating the data source. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3714
3715
3716
3717
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3714

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

#update_index(params = {}) ⇒ Struct

Updates an existing Amazon Kendra index.

Examples:

Request syntax with placeholder values


resp = client.update_index({
  id: "IndexId", # required
  name: "IndexName",
  role_arn: "RoleArn",
  description: "Description",
  document_metadata_configuration_updates: [
    {
      name: "DocumentMetadataConfigurationName", # required
      type: "STRING_VALUE", # required, accepts STRING_VALUE, STRING_LIST_VALUE, LONG_VALUE, DATE_VALUE
      relevance: {
        freshness: false,
        importance: 1,
        duration: "Duration",
        rank_order: "ASCENDING", # accepts ASCENDING, DESCENDING
        value_importance_map: {
          "ValueImportanceMapKey" => 1,
        },
      },
      search: {
        facetable: false,
        searchable: false,
        displayable: false,
        sortable: false,
      },
    },
  ],
  capacity_units: {
    storage_capacity_units: 1, # required
    query_capacity_units: 1, # required
  },
  user_token_configurations: [
    {
      jwt_token_type_configuration: {
        key_location: "URL", # required, accepts URL, SECRET_MANAGER
        url: "Url",
        secret_manager_arn: "RoleArn",
        user_name_attribute_field: "UserNameAttributeField",
        group_attribute_field: "GroupAttributeField",
        issuer: "Issuer",
        claim_regex: "ClaimRegex",
      },
      json_token_type_configuration: {
        user_name_attribute_field: "String", # required
        group_attribute_field: "String", # required
      },
    },
  ],
  user_context_policy: "ATTRIBUTE_FILTER", # accepts ATTRIBUTE_FILTER, USER_TOKEN
  user_group_resolution_configuration: {
    user_group_resolution_mode: "AWS_SSO", # required, accepts AWS_SSO, NONE
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the index to update.

  • :name (String)

    The name of the index to update.

  • :role_arn (String)

    A new IAM role that gives Amazon Kendra permission to access your Amazon CloudWatch logs.

  • :description (String)

    A new description for the index.

  • :document_metadata_configuration_updates (Array<Types::DocumentMetadataConfiguration>)

    The document metadata to update.

  • :capacity_units (Types::CapacityUnitsConfiguration)

    Sets the number of additional storage and query capacity units that should be used by the index. You can change the capacity of the index up to 5 times per day.

    If you are using extra storage units, you can't reduce the storage capacity below that required to meet the storage needs for your index.

  • :user_token_configurations (Array<Types::UserTokenConfiguration>)

    The user token configuration.

  • :user_context_policy (String)

    The user context policy.

  • :user_group_resolution_configuration (Types::UserGroupResolutionConfiguration)

    Enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see UserGroupResolutionConfiguration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3821
3822
3823
3824
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3821

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

#update_query_suggestions_block_list(params = {}) ⇒ Struct

Updates a block list used for query suggestions for an index.

Updates to a block list might not take effect right away. Amazon Kendra needs to refresh the entire suggestions list to apply any updates to the block list. Other changes not related to the block list apply immediately.

If a block list is updating, then you need to wait for the first update to finish before submitting another update.

Amazon Kendra supports partial updates, so you only need to provide the fields you want to update.

Examples:

Request syntax with placeholder values


resp = client.update_query_suggestions_block_list({
  index_id: "IndexId", # required
  id: "QuerySuggestionsBlockListId", # required
  name: "QuerySuggestionsBlockListName",
  description: "Description",
  source_s3_path: {
    bucket: "S3BucketName", # required
    key: "S3ObjectKey", # required
  },
  role_arn: "RoleArn",
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index for a block list.

  • :id (required, String)

    The unique identifier of a block list.

  • :name (String)

    The name of a block list.

  • :description (String)

    The description for a block list.

  • :source_s3_path (Types::S3Path)

    The S3 path where your block list text file sits in S3.

    If you update your block list and provide the same path to the block list text file in S3, then Amazon Kendra reloads the file to refresh the block list. Amazon Kendra does not automatically refresh your block list. You need to call the UpdateQuerySuggestionsBlockList API to refresh you block list.

    If you update your block list, then Amazon Kendra asynchronously refreshes all query suggestions with the latest content in the S3 file. This means changes might not take effect immediately.

  • :role_arn (String)

    The IAM (Identity and Access Management) role used to access the block list text file in S3.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3888
3889
3890
3891
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3888

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

#update_query_suggestions_config(params = {}) ⇒ Struct

Updates the settings of query suggestions for an index.

Amazon Kendra supports partial updates, so you only need to provide the fields you want to update.

If an update is currently processing (i.e. 'happening'), you need to wait for the update to finish before making another update.

Updates to query suggestions settings might not take effect right away. The time for your updated settings to take effect depends on the updates made and the number of search queries in your index.

You can still enable/disable query suggestions at any time.

Examples:

Request syntax with placeholder values


resp = client.update_query_suggestions_config({
  index_id: "IndexId", # required
  mode: "ENABLED", # accepts ENABLED, LEARN_ONLY
  query_log_look_back_window_in_days: 1,
  include_queries_without_user_information: false,
  minimum_number_of_querying_users: 1,
  minimum_query_count: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :index_id (required, String)

    The identifier of the index you want to update query suggestions settings for.

  • :mode (String)

    Set the mode to ENABLED or LEARN_ONLY.

    By default, Amazon Kendra enables query suggestions. LEARN_ONLY mode allows you to turn off query suggestions. You can to update this at any time.

    In LEARN_ONLY mode, Amazon Kendra continues to learn from new queries to keep suggestions up to date for when you are ready to switch to ENABLED mode again.

  • :query_log_look_back_window_in_days (Integer)

    How recent your queries are in your query log time window.

    The time window is the number of days from current day to past days.

    By default, Amazon Kendra sets this to 180.

  • :include_queries_without_user_information (Boolean)

    TRUE to include queries without user information (i.e. all queries, irrespective of the user), otherwise FALSE to only include queries with user information.

    If you pass user information to Amazon Kendra along with the queries, you can set this flag to FALSE and instruct Amazon Kendra to only consider queries with user information.

    If you set to FALSE, Amazon Kendra only considers queries searched at least MinimumQueryCount times across MinimumNumberOfQueryingUsers unique users for suggestions.

    If you set to TRUE, Amazon Kendra ignores all user information and learns from all queries.

  • :minimum_number_of_querying_users (Integer)

    The minimum number of unique users who must search a query in order for the query to be eligible to suggest to your users.

    Increasing this number might decrease the number of suggestions. However, this ensures a query is searched by many users and is truly popular to suggest to users.

    How you tune this setting depends on your specific needs.

  • :minimum_query_count (Integer)

    The the minimum number of times a query must be searched in order to be eligible to suggest to your users.

    Decreasing this number increases the number of suggestions. However, this affects the quality of suggestions as it sets a low bar for a query to be considered popular to suggest to users.

    How you tune this setting depends on your specific needs.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3982
3983
3984
3985
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 3982

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

#update_thesaurus(params = {}) ⇒ Struct

Updates a thesaurus file associated with an index.

Examples:

Request syntax with placeholder values


resp = client.update_thesaurus({
  id: "ThesaurusId", # required
  name: "ThesaurusName",
  index_id: "IndexId", # required
  description: "Description",
  role_arn: "RoleArn",
  source_s3_path: {
    bucket: "S3BucketName", # required
    key: "S3ObjectKey", # required
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The identifier of the thesaurus to update.

  • :name (String)

    The updated name of the thesaurus.

  • :index_id (required, String)

    The identifier of the index associated with the thesaurus to update.

  • :description (String)

    The updated description of the thesaurus.

  • :role_arn (String)

    The updated role ARN of the thesaurus.

  • :source_s3_path (Types::S3Path)

    Information required to find a specific file in an Amazon S3 bucket.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4027
4028
4029
4030
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/client.rb', line 4027

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