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

Class: AWS::Glacier::VaultCollection

Inherits:
Object
  • Object
show all
Includes:
Core::Collection::WithLimitAndNextToken
Defined in:
lib/aws/glacier/vault_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Constructor Details

#initialize(options = {}) ⇒ VaultCollection

Returns a new instance of VaultCollection

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :account_id (String)


23
24
25
26
# File 'lib/aws/glacier/vault_collection.rb', line 23

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

Instance Attribute Details

#account_idString (readonly)

Returns:

  • (String)


29
30
31
# File 'lib/aws/glacier/vault_collection.rb', line 29

def 
  @account_id
end

Instance Method Details

#[](name) ⇒ Vault

Returns a vault with the given name.

Parameters:

  • name (String)

    The name of the vault.

Returns:

  • (Vault)

    Returns a vault with the given name.



45
46
47
# File 'lib/aws/glacier/vault_collection.rb', line 45

def [] name
  Vault.new(name, :config => config, :account_id => )
end

#create(name) ⇒ Object

Parameters:

  • name (String)


32
33
34
35
36
37
38
39
40
41
# File 'lib/aws/glacier/vault_collection.rb', line 32

def create name

  options = {}
  options[:vault_name] = name
  options[:account_id] = 
  client.create_vault(options)

  self[name]

end