:doc:`DynamoDB <../../dynamodb>` / Client / update_contributor_insights

***************************
update_contributor_insights
***************************



.. py:method:: DynamoDB.Client.update_contributor_insights(**kwargs)

  

  Updates the status for contributor insights for a specific table or index. CloudWatch Contributor Insights for DynamoDB graphs display the partition key and (if applicable) sort key of frequently accessed items and frequently throttled items in plaintext. If you require the use of Amazon Web Services Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an Amazon Web Services managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContributorInsights>`_  


  **Request Syntax**
  ::

    response = client.update_contributor_insights(
        TableName='string',
        IndexName='string',
        ContributorInsightsAction='ENABLE'|'DISABLE',
        ContributorInsightsMode='ACCESSED_AND_THROTTLED_KEYS'|'THROTTLED_KEYS'
    )
    
  :type TableName: string
  :param TableName: **[REQUIRED]** 

    The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

    

  
  :type IndexName: string
  :param IndexName: 

    The global secondary index name, if applicable.

    

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

    Represents the contributor insights action.

    

  
  :type ContributorInsightsMode: string
  :param ContributorInsightsMode: 

    Specifies whether to track all access and throttled events or throttled events only for the DynamoDB table or index.

    

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

    
    ::

      {
          'TableName': 'string',
          'IndexName': 'string',
          'ContributorInsightsStatus': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'FAILED',
          'ContributorInsightsMode': 'ACCESSED_AND_THROTTLED_KEYS'|'THROTTLED_KEYS'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TableName** *(string) --* 

        The name of the table.

        
      

      - **IndexName** *(string) --* 

        The name of the global secondary index, if applicable.

        
      

      - **ContributorInsightsStatus** *(string) --* 

        The status of contributor insights

        
      

      - **ContributorInsightsMode** *(string) --* 

        The updated mode of CloudWatch Contributor Insights that determines whether to monitor all access and throttled events or to track throttled events exclusively.

        
  
  **Exceptions**
  
  *   :py:class:`DynamoDB.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`DynamoDB.Client.exceptions.InternalServerError`

  