class Ec2SshKey

API 1.0

Attributes

internal[RW]

Public Class Methods

create(opts) click to toggle source
# File lib/rest_connection/rightscale/ec2_ssh_key.rb, line 35
def self.create(opts)
  create_opts = { self.resource_singular_name.to_sym => opts }
  create_opts['cloud_id'] = opts['cloud_id'] if opts['cloud_id']
  location = connection.post(self.resource_plural_name, create_opts)
  newrecord = self.new('href' => location)
  newrecord.reload
  newrecord
end
new(*args, &block) click to toggle source
Calls superclass method RightScale::Api::Base::new
# File lib/rest_connection/rightscale/ec2_ssh_key.rb, line 44
def initialize(*args, &block)
  super(*args, &block)
  if RightScale::Api::api0_1?
    @internal = Ec2SshKeyInternal.new(*args, &block)
  end
end