:doc:`Kinesis <../../kinesis>` / Client / enable_enhanced_monitoring

**************************
enable_enhanced_monitoring
**************************



.. py:method:: Kinesis.Client.enable_enhanced_monitoring(**kwargs)

  

  Enables enhanced Kinesis data stream monitoring for shard-level metrics.

   

  .. note::

    

    When invoking this API, you must use either the ``StreamARN`` or the ``StreamName`` parameter, or both. It is recommended that you use the ``StreamARN`` input parameter when you invoke this API.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring>`_  


  **Request Syntax**
  ::

    response = client.enable_enhanced_monitoring(
        StreamName='string',
        ShardLevelMetrics=[
            'IncomingBytes'|'IncomingRecords'|'OutgoingBytes'|'OutgoingRecords'|'WriteProvisionedThroughputExceeded'|'ReadProvisionedThroughputExceeded'|'IteratorAgeMilliseconds'|'ALL',
        ],
        StreamARN='string',
        StreamId='string'
    )
    
  :type StreamName: string
  :param StreamName: 

    The name of the stream for which to enable enhanced monitoring.

    

  
  :type ShardLevelMetrics: list
  :param ShardLevelMetrics: **[REQUIRED]** 

    List of shard-level metrics to enable.

     

    The following are the valid shard-level metrics. The value " ``ALL``" enables every metric.

     

    
    * ``IncomingBytes``
     
    * ``IncomingRecords``
     
    * ``OutgoingBytes``
     
    * ``OutgoingRecords``
     
    * ``WriteProvisionedThroughputExceeded``
     
    * ``ReadProvisionedThroughputExceeded``
     
    * ``IteratorAgeMilliseconds``
     
    * ``ALL``
    

     

    For more information, see `Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch <https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html>`__ in the *Amazon Kinesis Data Streams Developer Guide*.

    

  
    - *(string) --* 

    

  :type StreamARN: string
  :param StreamARN: 

    The ARN of the stream.

    

  
  :type StreamId: string
  :param StreamId: 

    Not Implemented. Reserved for future use.

    

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

    
    ::

      {
          'StreamName': 'string',
          'CurrentShardLevelMetrics': [
              'IncomingBytes'|'IncomingRecords'|'OutgoingBytes'|'OutgoingRecords'|'WriteProvisionedThroughputExceeded'|'ReadProvisionedThroughputExceeded'|'IteratorAgeMilliseconds'|'ALL',
          ],
          'DesiredShardLevelMetrics': [
              'IncomingBytes'|'IncomingRecords'|'OutgoingBytes'|'OutgoingRecords'|'WriteProvisionedThroughputExceeded'|'ReadProvisionedThroughputExceeded'|'IteratorAgeMilliseconds'|'ALL',
          ],
          'StreamARN': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output for  EnableEnhancedMonitoring and  DisableEnhancedMonitoring.

      
      

      - **StreamName** *(string) --* 

        The name of the Kinesis data stream.

        
      

      - **CurrentShardLevelMetrics** *(list) --* 

        Represents the current state of the metrics that are in the enhanced state before the operation.

        
        

        - *(string) --* 
    
      

      - **DesiredShardLevelMetrics** *(list) --* 

        Represents the list of all the metrics that would be in the enhanced state after the operation.

        
        

        - *(string) --* 
    
      

      - **StreamARN** *(string) --* 

        The ARN of the stream.

        
  
  **Exceptions**
  
  *   :py:class:`Kinesis.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`Kinesis.Client.exceptions.LimitExceededException`

  
  *   :py:class:`Kinesis.Client.exceptions.ResourceInUseException`

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

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

  