class CloudAccount

API 1.5

Public Instance Methods

cloud_id() click to toggle source
# File lib/rest_connection/rightscale/cloud_account.rb, line 33
def cloud_id
  self.cloud.split("/").last
end
create(opts) click to toggle source
# File lib/rest_connection/rightscale/cloud_account.rb, line 37
def create(opts)
  location = connection.post(self.resource_plural_name, self.resource_singular_name.to_sym => opts)
  if location =~ /aws/
    return "AWS Cloud Added successfully"
  else
    newrecord = self.new('links' => [ {'rel' => 'self', 'href' => location } ])
    newrecord.reload
    return newrecord
  end
end