Class AWS::EC2::Snapshot
In: lib/aws/ec2/snapshot.rb
Parent: Resource

Represents an Amazon EBS snapshot.

@example Taking a snapshot from a volume

 snapshot = volume.create_snapshot("Database Backup 12/21/2010")
 sleep 1 until [:completed, :error].include?(snapshot.status)

@example Managing snapshot permissions

 unless snapshot.public?
   snapshot.permissions.add("12345678901")
 end

@attr_reader [String] volume_id The ID of the volume this

  snapshot was created from.

@attr_reader [Symbol] status The status of the snapshot.

  Possible values:

    * `:pending`
    * `:completed`
    * `:error`

@attr_reader [Time] start_time The time at which the snapshot

  was initiated.

@attr_reader [Integer] progress The progress of the snapshot

  as a percentage.

@attr_reader [String] owner_id The AWS account ID of the

  snapshot owner.

@attr_reader [Integer] volume_size The size of the volume from

  which the snapshot was created.

@attr_reader [String] description The description of the

  snapshot provided at snapshot initiation.

Methods

Included Modules

TaggedItem HasPermissions

External Aliases

permissions -> create_volume_permissions

Attributes

id  [R]  @return [String] Returns the snapshot‘s ID.

Public Class methods

Public Instance methods

Creates a volume from the snapshot.

@param [AvailabilityZone or String] availability_zone The

  Availability Zone in which to create the new volume. See
  {EC2#availability_zones} for how to get a list of
  availability zones.

@param [Hash] options Additional options for creating the volume

@option options [Integer] size The desired size (in gigabytes)

  for the volume.

@return [Volume] The newly created volume

Deletes the snapshot. @return [nil]

@return [Boolean] True if the snapshot exists.

@return [Volume] The volume this snapshot was created from.

[Validate]