:doc:`APIGateway <../../apigateway>` / Paginator / GetUsage

********
GetUsage
********



.. py:class:: APIGateway.Paginator.GetUsage

  ::

    
    paginator = client.get_paginator('get_usage')

  
  

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

    Creates an iterator that will paginate through responses from :py:meth:`APIGateway.Client.get_usage`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apigateway-2015-07-09/GetUsage>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          usagePlanId='string',
          keyId='string',
          startDate='string',
          endDate='string',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type usagePlanId: string
    :param usagePlanId: **[REQUIRED]** 

      The Id of the usage plan associated with the usage data.

      

    
    :type keyId: string
    :param keyId: 

      The Id of the API key associated with the resultant usage data.

      

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

      The starting date (e.g., 2016-01-01) of the usage data.

      

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

      The ending date (e.g., 2016-12-31) of the usage data.

      

    
    :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**

      
      ::

        {
            'usagePlanId': 'string',
            'startDate': 'string',
            'endDate': 'string',
            'items': {
                'string': [
                    [
                        123,
                    ],
                ]
            },
            'NextToken': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 

        Represents the usage data of a usage plan.

        
        

        - **usagePlanId** *(string) --* 

          The plan Id associated with this usage data.

          
        

        - **startDate** *(string) --* 

          The starting date of the usage data.

          
        

        - **endDate** *(string) --* 

          The ending date of the usage data.

          
        

        - **items** *(dict) --* 

          The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, ``{..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}``, where ``{api_key}`` stands for an API key value and the daily log entry is of the format ``[used quota, remaining quota]``.

          
          

          - *(string) --* 
            

            - *(list) --* 
              

              - *(list) --* 
                

                - *(integer) --* 
            
          
      
    
        

        - **NextToken** *(string) --* 

          A token to resume pagination.

          
    