    # File lib/fog/aws/models/compute/key_pair.rb, line 23
            def save
              requires :name

              data = if public_key
                connection.import_key_pair(name, public_key).body
              else
                connection.create_key_pair(name).body
              end
              new_attributes = data.reject {|key,value| !['keyFingerprint', 'keyMaterial', 'keyName'].include?(key)}
              merge_attributes(new_attributes)
              true

            end