:doc:`kendra <../../kendra>` / Client / create_faq

**********
create_faq
**********



.. py:method:: kendra.Client.create_faq(**kwargs)

  

  Creates a set of frequently ask questions (FAQs) using a specified FAQ file stored in an Amazon S3 bucket.

   

  Adding FAQs to an index is an asynchronous operation.

   

  For an example of adding an FAQ to an index using Python and Java SDKs, see `Using your FAQ file <https://docs.aws.amazon.com/kendra/latest/dg/in-creating-faq.html#using-faq-file>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/CreateFaq>`_  


  **Request Syntax**
  ::

    response = 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',
        ClientToken='string',
        LanguageCode='string'
    )
    
  :type IndexId: string
  :param IndexId: **[REQUIRED]** 

    The identifier of the index for the FAQ.

    

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    A name for the FAQ.

    

  
  :type Description: string
  :param Description: 

    A description for the FAQ.

    

  
  :type S3Path: dict
  :param S3Path: **[REQUIRED]** 

    The path to the FAQ file in S3.

    

  
    - **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 an IAM role with permission to access the S3 bucket that contains the FAQ file. For more information, see `IAM access roles for Amazon Kendra <https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html>`__.

    

  
  :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 key-value pair that identifies or categorizes an index, FAQ, data source, or other resource. TA tag key and value 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, data source, or other resource.

        

      
      - **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 FAQ 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 default format is CSV.

     

    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 <https://docs.aws.amazon.com/kendra/latest/dg/in-creating-faq.html>`__.

    

  
  :type ClientToken: string
  :param ClientToken: 

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

    This field is autopopulated if not provided.

  
  :type LanguageCode: string
  :param LanguageCode: 

    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 <https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html>`__.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Id': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Id** *(string) --* 

        The identifier of the FAQ.

        
  
  **Exceptions**
  
  *   :py:class:`kendra.Client.exceptions.ValidationException`

  
  *   :py:class:`kendra.Client.exceptions.ConflictException`

  
  *   :py:class:`kendra.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`kendra.Client.exceptions.ThrottlingException`

  
  *   :py:class:`kendra.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`kendra.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`kendra.Client.exceptions.InternalServerException`

  