You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: AWS::Glacier

Inherits:
Object
  • Object
show all
Includes:
Core::ServiceInterface
Defined in:
lib/aws/glacier.rb,
lib/aws/glacier/vault.rb,
lib/aws/glacier/client.rb,
lib/aws/glacier/errors.rb,
lib/aws/glacier/archive.rb,
lib/aws/glacier/resource.rb,
lib/aws/glacier/vault_collection.rb,
lib/aws/glacier/archive_collection.rb,
lib/aws/glacier/vault_notification_configuration.rb

Overview

This class is the starting point for working with Amazon Glacier.

To use Amazon Glacier you must first sign up here.

For more information about Amazon Glacier:

Credentials

You can setup default credentials for all AWS services via AWS.config:

AWS.config(
  :access_key_id => 'YOUR_ACCESS_KEY_ID',
  :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')

Or you can set them directly on the AWS::Glacier interface:

glacier = AWS::Glacier.new(
  :access_key_id => 'YOUR_ACCESS_KEY_ID',
  :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')

See Client for documentation on all of the supported API operations.

Defined Under Namespace

Modules: Errors Classes: Archive, ArchiveCollection, Client, Resource, Vault, VaultCollection, VaultNotificationConfiguration

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::ServiceInterface

included, #inspect

Constructor Details

#initialize(options = {}) ⇒ Glacier

Returns a new instance of Glacier

Parameters:

  • options[String] (Hash)

    a customizable set of options



64
65
66
67
# File 'lib/aws/glacier.rb', line 64

def initialize options = {}
  @account_id = options[:account_id] || '-'
  super
end

Instance Attribute Details

#account_idString

Returns:

  • (String)


70
71
72
# File 'lib/aws/glacier.rb', line 70

def 
  @account_id
end

#clientClient (readonly)

Returns the low-level Glacier client object

Returns:

  • (Client)

    the low-level Glacier client object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/aws/glacier.rb', line 48

class Glacier

  autoload :Archive, 'aws/glacier/archive'
  autoload :ArchiveCollection, 'aws/glacier/archive_collection'
  autoload :Client, 'aws/glacier/client'
  autoload :Errors, 'aws/glacier/errors'
  autoload :Resource, 'aws/glacier/resource'
  autoload :Vault, 'aws/glacier/vault'
  autoload :VaultCollection, 'aws/glacier/vault_collection'
  autoload :VaultNotificationConfiguration, 'aws/glacier/vault_notification_configuration'

  include Core::ServiceInterface

  endpoint_prefix 'glacier'

  # @option options[String] :account_id ('-')
  def initialize options = {}
    @account_id = options[:account_id] || '-'
    super
  end

  # @return [String]
  attr_accessor :account_id

  # @return [VaultCollection] Returns a collection for working with
  #   vaults that belong to this account.
  def vaults
    VaultCollection.new(:config => config, :account_id => )
  end

end

Instance Method Details

#vaultsVaultCollection

Returns a collection for working with vaults that belong to this account.

Returns:

  • (VaultCollection)

    Returns a collection for working with vaults that belong to this account.



74
75
76
# File 'lib/aws/glacier.rb', line 74

def vaults
  VaultCollection.new(:config => config, :account_id => )
end