AWSKendraFrontendService

2020/09/17 - AWSKendraFrontendService - 3 updated api methods

Changes  Amazon Kendra now supports additional file formats and metadata for FAQs.

CreateFaq (updated) Link ¶
Changes (request)
{'FileFormat': 'CSV | CSV_WITH_HEADER | JSON'}

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

See also: AWS API Documentation

Request Syntax

client.create_faq(
    IndexId='string',
    Name='string',
    Description='string',
    S3Path={
        'Bucket': 'string',
        'Key': 'string'
    },
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    FileFormat='CSV'|'CSV_WITH_HEADER'|'JSON'
)
type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index that contains the FAQ.

type Name

string

param Name

[REQUIRED]

The name that should be associated with the FAQ.

type Description

string

param Description

A description of the FAQ.

type S3Path

dict

param S3Path

[REQUIRED]

The S3 location of the FAQ input data.

  • Bucket (string) -- [REQUIRED]

    The name of the S3 bucket that contains the file.

  • Key (string) -- [REQUIRED]

    The name of the file.

type RoleArn

string

param RoleArn

[REQUIRED]

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.

type Tags

list

param Tags

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.

  • (dict) --

    A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

    • Key (string) -- [REQUIRED]

      The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, or data source.

    • Value (string) -- [REQUIRED]

      The value associated with the tag. The value may be an empty string but it can't be null.

type FileFormat

string

param FileFormat

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.

rtype

dict

returns

Response Syntax

{
    'Id': 'string'
}

Response Structure

  • (dict) --

    • Id (string) --

      The unique identifier of the FAQ.

DescribeFaq (updated) Link ¶
Changes (response)
{'FileFormat': 'CSV | CSV_WITH_HEADER | JSON'}

Gets information about an FAQ list.

See also: AWS API Documentation

Request Syntax

client.describe_faq(
    Id='string',
    IndexId='string'
)
type Id

string

param Id

[REQUIRED]

The unique identifier of the FAQ.

type IndexId

string

param IndexId

[REQUIRED]

The identifier of the index that contains the FAQ.

rtype

dict

returns

Response Syntax

{
    'Id': 'string',
    'IndexId': 'string',
    'Name': 'string',
    'Description': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'UpdatedAt': datetime(2015, 1, 1),
    'S3Path': {
        'Bucket': 'string',
        'Key': 'string'
    },
    'Status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'FAILED',
    'RoleArn': 'string',
    'ErrorMessage': 'string',
    'FileFormat': 'CSV'|'CSV_WITH_HEADER'|'JSON'
}

Response Structure

  • (dict) --

    • Id (string) --

      The identifier of the FAQ.

    • IndexId (string) --

      The identifier of the index that contains the FAQ.

    • Name (string) --

      The name that you gave the FAQ when it was created.

    • Description (string) --

      The description of the FAQ that you provided when it was created.

    • CreatedAt (datetime) --

      The date and time that the FAQ was created.

    • UpdatedAt (datetime) --

      The date and time that the FAQ was last updated.

    • S3Path (dict) --

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

      • Bucket (string) --

        The name of the S3 bucket that contains the file.

      • Key (string) --

        The name of the file.

    • Status (string) --

      The status of the FAQ. It is ready to use when the status is ACTIVE .

    • RoleArn (string) --

      The Amazon Resource Name (ARN) of the role that provides access to the S3 bucket containing the input files for the FAQ.

    • ErrorMessage (string) --

      If the Status field is FAILED , the ErrorMessage field contains the reason why the FAQ failed.

    • FileFormat (string) --

      The file format used by the input files for the FAQ.

ListFaqs (updated) Link ¶
Changes (response)
{'FaqSummaryItems': {'FileFormat': 'CSV | CSV_WITH_HEADER | JSON'}}

Gets a list of FAQ lists associated with an index.

See also: AWS API Documentation

Request Syntax

client.list_faqs(
    IndexId='string',
    NextToken='string',
    MaxResults=123
)
type IndexId

string

param IndexId

[REQUIRED]

The index that contains the FAQ lists.

type NextToken

string

param NextToken

If the result of the previous request to ListFaqs was truncated, include the NextToken to fetch the next set of FAQs.

type MaxResults

integer

param MaxResults

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.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'FaqSummaryItems': [
        {
            'Id': 'string',
            'Name': 'string',
            'Status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'FAILED',
            'CreatedAt': datetime(2015, 1, 1),
            'UpdatedAt': datetime(2015, 1, 1),
            'FileFormat': 'CSV'|'CSV_WITH_HEADER'|'JSON'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The ListFaqs operation returns a page of FAQs at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Kendra returns the NextPage token. Include the token in the next request to the ListFaqs operation to return the next page of FAQs.

    • FaqSummaryItems (list) --

      information about the FAQs associated with the specified index.

      • (dict) --

        Provides information about a frequently asked questions and answer contained in an index.

        • Id (string) --

          The unique identifier of the FAQ.

        • Name (string) --

          The name that you assigned the FAQ when you created or updated the FAQ.

        • Status (string) --

          The current status of the FAQ. When the status is ACTIVE the FAQ is ready for use.

        • CreatedAt (datetime) --

          The UNIX datetime that the FAQ was added to the index.

        • UpdatedAt (datetime) --

          The UNIX datetime that the FAQ was last updated.

        • FileFormat (string) --

          The file type used to create the FAQ.