'Get all key pairs associated with your account.
:type keynames: list
:param keynames: A list of the names of keypairs to retrieve.
If not provided, all key pairs will be returned.
:type filters: dict
:param filters: Optional filters that can be used to limit the
results returned.  Filters are provided in the form of a
dictionary consisting of filter names as the key and
filter values as the value.  The set of allowable filter
names/values is dependent on the request being performed.
Check the EC2 API guide for details.
: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.keypair.KeyPair`'

def get_all_key_pairs(self, keynames=None, filters=None, dry_run=False):

    params = {}
    if keynames:
        self.build_list_params(params, keynames, 'KeyName')
    if filters:
        self.build_filter_params(params, filters)
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_list('DescribeKeyPairs', params, [('item', KeyPair)], verb='POST')
