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

******************
describe_thesaurus
******************



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

  

  Gets information about an Amazon Kendra thesaurus.

  

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


  **Request Syntax**
  ::

    response = client.describe_thesaurus(
        Id='string',
        IndexId='string'
    )
    
  :type Id: string
  :param Id: **[REQUIRED]** 

    The identifier of the thesaurus you want to get information on.

    

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

    The identifier of the index for the thesaurus.

    

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

    
    ::

      {
          'Id': 'string',
          'IndexId': 'string',
          'Name': 'string',
          'Description': 'string',
          'Status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'ACTIVE_BUT_UPDATE_FAILED'|'FAILED',
          'ErrorMessage': 'string',
          'CreatedAt': datetime(2015, 1, 1),
          'UpdatedAt': datetime(2015, 1, 1),
          'RoleArn': 'string',
          'SourceS3Path': {
              'Bucket': 'string',
              'Key': 'string'
          },
          'FileSizeBytes': 123,
          'TermCount': 123,
          'SynonymRuleCount': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The identifier of the thesaurus.

        
      

      - **IndexId** *(string) --* 

        The identifier of the index for the thesaurus.

        
      

      - **Name** *(string) --* 

        The thesaurus name.

        
      

      - **Description** *(string) --* 

        The thesaurus description.

        
      

      - **Status** *(string) --* 

        The current status of the thesaurus. When the value is ``ACTIVE``, queries are able to use the thesaurus. If the ``Status`` field value is ``FAILED``, the ``ErrorMessage`` field provides more information.

         

        If the status is ``ACTIVE_BUT_UPDATE_FAILED``, it means that Amazon Kendra could not ingest the new thesaurus file. The old thesaurus file is still active.

        
      

      - **ErrorMessage** *(string) --* 

        When the ``Status`` field value is ``FAILED``, the ``ErrorMessage`` field provides more information.

        
      

      - **CreatedAt** *(datetime) --* 

        The Unix timestamp when the thesaurus was created.

        
      

      - **UpdatedAt** *(datetime) --* 

        The Unix timestamp when the thesaurus was last updated.

        
      

      - **RoleArn** *(string) --* 

        An IAM role that gives Amazon Kendra permissions to access thesaurus file specified in ``SourceS3Path``.

        
      

      - **SourceS3Path** *(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.

          
    
      

      - **FileSizeBytes** *(integer) --* 

        The size of the thesaurus file in bytes.

        
      

      - **TermCount** *(integer) --* 

        The number of unique terms in the thesaurus file. For example, the synonyms ``a,b,c`` and ``a=>d``, the term count would be 4.

        
      

      - **SynonymRuleCount** *(integer) --* 

        The number of synonym rules in the thesaurus file.

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

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

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

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

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

  