'Creates a new listing for Reserved Instances.
Creates a new listing for Amazon EC2 Reserved Instances that will be
sold in the Reserved Instance Marketplace. You can submit one Reserved
Instance listing at a time.
The Reserved Instance Marketplace matches sellers who want to resell
Reserved Instance capacity that they no longer need with buyers who
want to purchase additional capacity. Reserved Instances bought and
sold through the Reserved Instance Marketplace work like any other
Reserved Instances.
If you want to sell your Reserved Instances, you must first register as
a Seller in the Reserved Instance Marketplace. After completing the
registration process, you can create a Reserved Instance Marketplace
listing of some or all of your Reserved Instances, and specify the
upfront price you want to receive for them. Your Reserved Instance
listings then become available for purchase.
:type reserved_instances_id: string
:param reserved_instances_id: The ID of the Reserved Instance that
will be listed.
:type instance_count: int
:param instance_count: The number of instances that are a part of a
Reserved Instance account that will be listed in the Reserved
Instance Marketplace. This number should be less than or equal to
the instance count associated with the Reserved Instance ID
specified in this call.
:type price_schedules: List of tuples
:param price_schedules: A list specifying the price of the Reserved
Instance for each month remaining in the Reserved Instance term.
Each tuple contains two elements, the price and the term.  For
example, for an instance that 11 months remaining in its term,
we can have a price schedule with an upfront price of $2.50.
At 8 months remaining we can drop the price down to $2.00.
This would be expressed as::
price_schedules=[(\'2.50\', 11), (\'2.00\', 8)]
:type client_token: string
:param client_token: Unique, case-sensitive identifier you provide
to ensure idempotency of the request.  Maximum 64 ASCII characters.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: list
:return: A list of
:class:`boto.ec2.reservedinstance.ReservedInstanceListing`'

def create_reserved_instances_listing(self, reserved_instances_id, instance_count, price_schedules, client_token, dry_run=False):

    params = {'ReservedInstancesId': reserved_instances_id, 'InstanceCount': str(instance_count), 'ClientToken': client_token}
    for (i, schedule) in enumerate(price_schedules):
        (price, term) = schedule
        params[('PriceSchedules.%s.Price' % i)] = str(price)
        params[('PriceSchedules.%s.Term' % i)] = str(term)
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_list('CreateReservedInstancesListing', params, [('item', ReservedInstanceListing)], verb='POST')
