Method: AWS::EC2::Base#create_snapshot
- Defined in:
- lib/AWS/EC2/snapshots.rb
#create_snapshot(options = {}) ⇒ Object
The CreateSnapshot operation creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups, to launch instances from identical snapshots, and to save data before shutting down an instance.
27 28 29 30 31 32 33 34 35 |
# File 'lib/AWS/EC2/snapshots.rb', line 27 def create_snapshot( = {} ) = { :volume_id => '' }.merge() raise ArgumentError, "No :volume_id provided" if [:volume_id].nil? || [:volume_id].empty? params = { "VolumeId" => [:volume_id] } params["Description"] = [:description] unless [:description].nil? return response_generator(:action => "CreateSnapshot", :params => params) end |