class AWS::EC2::Snapshot
snapshot provided at snapshot initiation.
@attr_reader [String] description The description of the
which the snapshot was created.
@attr_reader [Integer] volume_size The size of the volume from
snapshot owner.
@attr_reader [String] owner_id The AWS account ID of the
as a percentage.
@attr_reader [Integer] progress The progress of the snapshot
was initiated.
@attr_reader [Time] start_time The time at which the snapshot
* :error
* :completed
* :pending
Possible values:
@attr_reader [Symbol] status The status of the snapshot.
snapshot was created from.
@attr_reader [String] volume_id The ID of the volume this
end
snapshot.permissions.add(“12345678901”)
unless snapshot.public?
@example Managing snapshot permissions
sleep 1 until [:completed, :error].include?(snapshot.status)
snapshot = volume.create_snapshot(“Database Backup 12/21/2010”)
@example Taking a snapshot from a volume
Represents an Amazon EBS snapshot.
def __permissions_attribute__
- Private: -
def __permissions_attribute__ "createVolumePermission" end
def create_volume availability_zone, options = {}
-
(Volume)
- The newly created volume
Options Hash:
(**options)
-
size
(Integer
) -- The desired size (in gigabytes)
Parameters:
-
options
(Hash
) -- Additional options for creating the volume -
availability_zone
(AvailabilityZone or String
) -- The
def create_volume availability_zone, options = {} volumes = VolumeCollection.new(:config => config) volumes.create(options.merge( :availability_zone => availability_zone, :snapshot => self )) end
def delete
-
(nil)
-
def delete client.delete_snapshot(:snapshot_id => id) nil end
def exists?
-
(Boolean)
- True if the snapshot exists.
def exists? resp = client.describe_snapshots(:filters => [{ :name => 'snapshot-id', :values => [id] }]) and !resp.snapshot_set.empty? end
def initialize id, options = {}
- Private: -
def initialize id, options = {} @id = id super(options) end
def volume
-
(Volume)
- The volume this snapshot was created from.
def volume Volume.new(volume_id, :config => config) if volume_id end