:doc:`CloudWatch <../../cloudwatch>` / Paginator / DescribeAlarmHistory

********************
DescribeAlarmHistory
********************



.. py:class:: CloudWatch.Paginator.DescribeAlarmHistory

  ::

    
    paginator = client.get_paginator('describe_alarm_history')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`CloudWatch.Client.describe_alarm_history`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          AlarmName='string',
          AlarmContributorId='string',
          AlarmTypes=[
              'CompositeAlarm'|'MetricAlarm',
          ],
          HistoryItemType='ConfigurationUpdate'|'StateUpdate'|'Action'|'AlarmContributorStateUpdate'|'AlarmContributorAction',
          StartDate=datetime(2015, 1, 1),
          EndDate=datetime(2015, 1, 1),
          ScanBy='TimestampDescending'|'TimestampAscending',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type AlarmName: string
    :param AlarmName: 

      The name of the alarm.

      

    
    :type AlarmContributorId: string
    :param AlarmContributorId: 

      The unique identifier of a specific alarm contributor to filter the alarm history results.

      

    
    :type AlarmTypes: list
    :param AlarmTypes: 

      Use this parameter to specify whether you want the operation to return metric alarms or composite alarms. If you omit this parameter, only metric alarms are returned.

      

    
      - *(string) --* 

      
  
    :type HistoryItemType: string
    :param HistoryItemType: 

      The type of alarm histories to retrieve.

      

    
    :type StartDate: datetime
    :param StartDate: 

      The starting date to retrieve alarm history.

      

    
    :type EndDate: datetime
    :param EndDate: 

      The ending date to retrieve alarm history.

      

    
    :type ScanBy: string
    :param ScanBy: 

      Specified whether to return the newest or oldest alarm history first. Specify ``TimestampDescending`` to have the newest event history returned first, and specify ``TimestampAscending`` to have the oldest history returned first.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

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

      
      ::

        {
            'AlarmHistoryItems': [
                {
                    'AlarmName': 'string',
                    'AlarmContributorId': 'string',
                    'AlarmType': 'CompositeAlarm'|'MetricAlarm',
                    'Timestamp': datetime(2015, 1, 1),
                    'HistoryItemType': 'ConfigurationUpdate'|'StateUpdate'|'Action'|'AlarmContributorStateUpdate'|'AlarmContributorAction',
                    'HistorySummary': 'string',
                    'HistoryData': 'string',
                    'AlarmContributorAttributes': {
                        'string': 'string'
                    }
                },
            ],
            
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **AlarmHistoryItems** *(list) --* 

          The alarm histories, in JSON format.

          
          

          - *(dict) --* 

            Represents the history of a specific alarm.

            
            

            - **AlarmName** *(string) --* 

              The descriptive name for the alarm.

              
            

            - **AlarmContributorId** *(string) --* 

              The unique identifier of the alarm contributor associated with this history item, if applicable.

              
            

            - **AlarmType** *(string) --* 

              The type of alarm, either metric alarm or composite alarm.

              
            

            - **Timestamp** *(datetime) --* 

              The time stamp for the alarm history item.

              
            

            - **HistoryItemType** *(string) --* 

              The type of alarm history item.

              
            

            - **HistorySummary** *(string) --* 

              A summary of the alarm history, in text format.

              
            

            - **HistoryData** *(string) --* 

              Data about the alarm, in JSON format.

              
            

            - **AlarmContributorAttributes** *(dict) --* 

              A map of attributes that describe the alarm contributor associated with this history item, providing context about the contributor's characteristics at the time of the event.

              
              

              - *(string) --* 
                

                - *(string) --* 
          
        
        
      
    