def key_pairs(options = {})
      batches = Enumerator.new do |y|
        batch = []
        resp = @client.describe_key_pairs(options)
        resp.data.key_pairs.each do |k|
          batch << KeyPairInfo.new(
            name: k.key_name,
            data: k,
            client: @client
          )
        end
        y.yield(batch)
      end
      KeyPairInfo::Collection.new(batches)
    end
def key_pairs(options = {})
      batches = Enumerator.new do |y|
        batch = []
        resp = @client.describe_key_pairs(options)
        resp.data.key_pairs.each do |k|
          batch << KeyPairInfo.new(
            name: k.key_name,
            data: k,
            client: @client
          )
        end
        y.yield(batch)
      end
      KeyPairInfo::Collection.new(batches)
    end
@example Request syntax with placeholder values

   key_pairs = ec2.key_pairs({
     filters: [
       {
         name: "String",
         values: ["String"],
       },
     ],
     key_names: ["String"],
     dry_run: false,
   })
 @param [Hash] options ({})
 @option options [Array<Types::Filter>] :filters
   The filters.

   * `fingerprint` - The fingerprint of the key pair.

   * `key-name` - The name of the key pair.
 @option options [Array<String>] :key_names
   The key pair names.

   Default: Describes all your key pairs.
 @option options [Boolean] :dry_run
   Checks whether you have the required permissions for the action,
   without actually making the request, and provides an error response.
   If you have the required permissions, the error response is
   `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
 @return [KeyPairInfo::Collection]