:doc:`Glue <../../glue>` / Client / create_partition_index

**********************
create_partition_index
**********************



.. py:method:: Glue.Client.create_partition_index(**kwargs)

  

  Creates a specified partition index in an existing table.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CreatePartitionIndex>`_  


  **Request Syntax**
  ::

    response = client.create_partition_index(
        CatalogId='string',
        DatabaseName='string',
        TableName='string',
        PartitionIndex={
            'Keys': [
                'string',
            ],
            'IndexName': 'string'
        }
    )
    
  :type CatalogId: string
  :param CatalogId: 

    The catalog ID where the table resides.

    

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

    Specifies the name of a database in which you want to create a partition index.

    

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

    Specifies the name of a table in which you want to create a partition index.

    

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

    Specifies a ``PartitionIndex`` structure to create a partition index in an existing table.

    

  
    - **Keys** *(list) --* **[REQUIRED]** 

      The keys for the partition index.

      

    
      - *(string) --* 

      
  
    - **IndexName** *(string) --* **[REQUIRED]** 

      The name of the partition index.

      

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.AlreadyExistsException`

  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.ResourceNumberLimitExceededException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`Glue.Client.exceptions.GlueEncryptionException`

  