This file is indexed.

/usr/lib/ruby/vendor_ruby/AWS/EC2/keypairs.rb is in ruby-amazon-ec2 0.9.17-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module AWS
  module EC2
    class Base < AWS::Base


      # The CreateKeyPair operation creates a new 2048 bit RSA keypair and returns a unique ID that can be
      # used to reference this keypair when launching new instances.
      #
      # @option options [String] :key_name ("")
      #
      def create_keypair( options = {} )
        options = { :key_name => "" }.merge(options)
        raise ArgumentError, "No :key_name provided" if options[:key_name].nil? || options[:key_name].empty?
        params = { "KeyName" => options[:key_name] }
        return response_generator(:action => "CreateKeyPair", :params => params)
      end


      # The DescribeKeyPairs operation returns information about keypairs available for use by the user
      # making the request. Selected keypairs may be specified or the list may be left empty if information for
      # all registered keypairs is required.
      #
      # @option options [Array] :key_name ([])
      #
      def describe_keypairs( options = {} )
        options = { :key_name => [] }.merge(options)
        params = pathlist("KeyName", options[:key_name] )
        return response_generator(:action => "DescribeKeyPairs", :params => params)
      end


      # The DeleteKeyPair operation deletes a keypair.
      #
      # @option options [String] :key_name ("")
      #
      def delete_keypair( options = {} )
        options = { :key_name => "" }.merge(options)
        raise ArgumentError, "No :key_name provided" if options[:key_name].nil? || options[:key_name].empty?
        params = { "KeyName" => options[:key_name] }
        return response_generator(:action => "DeleteKeyPair", :params => params)
      end


    end
  end
end