lib/AWS/EC2/images.rb in grempe-amazon-ec2-0.5.1 vs lib/AWS/EC2/images.rb in grempe-amazon-ec2-0.5.2

- old
+ new

@@ -1,39 +1,21 @@ -#-- -# Amazon Web Services EC2 Query API Ruby library -# -# Ruby Gem Name:: amazon-ec2 -# Author:: Glenn Rempe (mailto:glenn@rempe.us) -# Copyright:: Copyright (c) 2007-2008 Glenn Rempe -# License:: Distributes under the same terms as Ruby -# Home:: http://github.com/grempe/amazon-ec2/tree/master -#++ - module AWS module EC2 class Base < AWS::Base - #Amazon Developer Guide Docs: - # # The RegisterImage operation registers an AMI with Amazon EC2. Images must be registered before # they can be launched. Each AMI is associated with an unique ID which is provided by the EC2 # service via the Registerimage operation. As part of the registration process, Amazon EC2 will # retrieve the specified image manifest from Amazon S3 and verify that the image is owned by the # user requesting image registration. The image manifest is retrieved once and stored within the # Amazon EC2 network. Any modifications to an image in Amazon S3 invalidate this registration. # If you do have to make changes and upload a new image deregister the previous image and register # the new image. # - #Required Arguments: + # @option options [String] :image_location ("") # - # :image_location => String (default : "") - # - #Optional Arguments: - # - # none - # def register_image( options = {} ) options = {:image_location => ""}.merge(options) raise ArgumentError, "No :image_location provided" if options[:image_location].nil? || options[:image_location].empty? @@ -42,12 +24,10 @@ return response_generator(:action => "RegisterImage", :params => params) end - #Amazon Developer Guide Docs: - # # The DescribeImages operation returns information about AMIs available for use by the user. This # includes both public AMIs (those available for any user to launch) and private AMIs (those owned by # the user making the request and those owned by other users that the user making the request has explicit # launch permissions for). # @@ -80,20 +60,14 @@ # the user making the request has explicit launch permissions for or all for public AMIs. # # Deregistered images will be included in the returned results for an unspecified interval subsequent to # deregistration. # - #Required Arguments: + # @option options [Array] :image_id ([]) + # @option options [Array] :owner_id ([]) + # @option options [Array] :executable_by ([]) # - # none - # - #Optional Arguments: - # - # :image_id => Array (default : []) - # :owner_id => Array (default : []) - # :executable_by => Array (default : []) - # def describe_images( options = {} ) options = { :image_id => [], :owner_id => [], :executable_by => [] }.merge(options) params = pathlist( "ImageId", options[:image_id] ) @@ -102,25 +76,16 @@ return response_generator(:action => "DescribeImages", :params => params) end - #Amazon Developer Guide Docs: - # # The DeregisterImage operation deregisters an AMI. Once deregistered, instances of the AMI may no # longer be launched. # - #Required Arguments: + # @option options [String] :image_id ("") # - # :image_id => String (default : "") - # - #Optional Arguments: - # - # none - # def deregister_image( options = {} ) - # defaults options = { :image_id => "" }.merge(options) raise ArgumentError, "No :image_id provided" if options[:image_id].nil? || options[:image_id].empty? params = { "ImageId" => options[:image_id] } \ No newline at end of file