:doc:`EC2 <../../ec2>` / Paginator / DescribeHostReservations

************************
DescribeHostReservations
************************



.. py:class:: EC2.Paginator.DescribeHostReservations

  ::

    
    paginator = client.get_paginator('describe_host_reservations')

  
  

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

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_host_reservations`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'string',
                  'Values': [
                      'string',
                  ]
              },
          ],
          HostReservationIdSet=[
              'string',
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type Filters: list
    :param Filters: 

      The filters.

       

      
      * ``instance-family`` - The instance family (for example, ``m4``).
       
      * ``payment-option`` - The payment option ( ``NoUpfront`` | ``PartialUpfront`` | ``AllUpfront``).
       
      * ``state`` - The state of the reservation ( ``payment-pending`` | ``payment-failed`` | ``active`` | ``retired``).
       
      * ``tag:<key>`` - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key ``Owner`` and the value ``TeamA``, specify ``tag:Owner`` for the filter name and ``TeamA`` for the filter value.
       
      * ``tag-key`` - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
      

      

    
      - *(dict) --* 

        A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

         

        If you specify multiple filters, the filters are joined with an ``AND``, and the request returns only results that match all of the specified filters.

         

        For more information, see `List and filter using the CLI and API <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Filtering.html#Filtering_Resources_CLI>`__ in the *Amazon EC2 User Guide*.

        

      
        - **Name** *(string) --* 

          The name of the filter. Filter names are case-sensitive.

          

        
        - **Values** *(list) --* 

          The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an ``OR``, and the request returns all results that match any of the specified values.

          

        
          - *(string) --* 

          
      
      
  
    :type HostReservationIdSet: list
    :param HostReservationIdSet: 

      The host reservation IDs.

      

    
      - *(string) --* 

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

      
      ::

        {
            'HostReservationSet': [
                {
                    'Count': 123,
                    'CurrencyCode': 'USD',
                    'Duration': 123,
                    'End': datetime(2015, 1, 1),
                    'HostIdSet': [
                        'string',
                    ],
                    'HostReservationId': 'string',
                    'HourlyPrice': 'string',
                    'InstanceFamily': 'string',
                    'OfferingId': 'string',
                    'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
                    'Start': datetime(2015, 1, 1),
                    'State': 'active'|'expired'|'cancelled'|'scheduled'|'pending'|'failed'|'delayed'|'unsupported'|'payment-pending'|'payment-failed'|'retired',
                    'UpfrontPrice': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ],
            
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **HostReservationSet** *(list) --* 

          Details about the reservation's configuration.

          
          

          - *(dict) --* 

            Details about the Dedicated Host Reservation and associated Dedicated Hosts.

            
            

            - **Count** *(integer) --* 

              The number of Dedicated Hosts the reservation is associated with.

              
            

            - **CurrencyCode** *(string) --* 

              The currency in which the ``upfrontPrice`` and ``hourlyPrice`` amounts are specified. At this time, the only supported currency is ``USD``.

              
            

            - **Duration** *(integer) --* 

              The length of the reservation's term, specified in seconds. Can be ``31536000 (1 year)`` | ``94608000 (3 years)``.

              
            

            - **End** *(datetime) --* 

              The date and time that the reservation ends.

              
            

            - **HostIdSet** *(list) --* 

              The IDs of the Dedicated Hosts associated with the reservation.

              
              

              - *(string) --* 
          
            

            - **HostReservationId** *(string) --* 

              The ID of the reservation that specifies the associated Dedicated Hosts.

              
            

            - **HourlyPrice** *(string) --* 

              The hourly price of the reservation.

              
            

            - **InstanceFamily** *(string) --* 

              The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.

              
            

            - **OfferingId** *(string) --* 

              The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

              
            

            - **PaymentOption** *(string) --* 

              The payment option selected for this reservation.

              
            

            - **Start** *(datetime) --* 

              The date and time that the reservation started.

              
            

            - **State** *(string) --* 

              The state of the reservation.

              
            

            - **UpfrontPrice** *(string) --* 

              The upfront price of the reservation.

              
            

            - **Tags** *(list) --* 

              Any tags assigned to the Dedicated Host Reservation.

              
              

              - *(dict) --* 

                Describes a tag.

                
                

                - **Key** *(string) --* 

                  The key of the tag.

                   

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with ``aws:``.

                  
                

                - **Value** *(string) --* 

                  The value of the tag.

                   

                  Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

                  
            
          
        
      
    