:doc:`QBusiness <../../qbusiness>` / Client / create_index

************
create_index
************



.. py:method:: QBusiness.Client.create_index(**kwargs)

  

  Creates an Amazon Q Business index.

   

  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 <https://docs.aws.amazon.com/amazonq/latest/api-reference/API_BatchPutDocument.html>`__ API or the `CreateDataSource <https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateDataSource.html>`__ API.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qbusiness-2023-11-27/CreateIndex>`_  


  **Request Syntax**
  ::

    response = client.create_index(
        applicationId='string',
        displayName='string',
        description='string',
        type='ENTERPRISE'|'STARTER',
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        capacityConfiguration={
            'units': 123
        },
        clientToken='string'
    )
    
  :type applicationId: string
  :param applicationId: **[REQUIRED]** 

    The identifier of the Amazon Q Business application using the index.

    

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

    A name for the Amazon Q Business index.

    

  
  :type description: string
  :param description: 

    A description for the Amazon Q Business index.

    

  
  :type type: string
  :param type: 

    The index type that's suitable for your needs. For more information on what's included in each type of index, see `Amazon Q Business tiers <https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#index-tiers>`__.

    

  
  :type tags: list
  :param tags: 

    A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

    

  
    - *(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 Amazon Q Business application 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 capacityConfiguration: dict
  :param capacityConfiguration: 

    The capacity units you want to provision for your index. You can add and remove capacity to fit your usage needs.

    

  
    - **units** *(integer) --* 

      The number of storage units configured for an Amazon Q Business index.

      

    
  
  :type clientToken: string
  :param clientToken: 

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

    This field is autopopulated if not provided.

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

    
    ::

      {
          'indexId': 'string',
          'indexArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **indexId** *(string) --* 

        The identifier for the Amazon Q Business index.

        
      

      - **indexArn** *(string) --* 

        The Amazon Resource Name (ARN) of an Amazon Q Business index.

        
  
  **Exceptions**
  
  *   :py:class:`QBusiness.Client.exceptions.InternalServerException`

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

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

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

  
  *   :py:class:`QBusiness.Client.exceptions.ValidationException`

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

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

  