Class: Fog::AWS::Glacier::Vault

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/aws/models/glacier/vault.rb

Instance Attribute Summary

Attributes inherited from Model

#collection, #service

Instance Method Summary collapse

Methods inherited from Model

#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for

Methods included from Fog::Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Core::DeprecatedConnectionAccessors

#connection, #connection=, #prepare_service_value

Methods included from Fog::Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#archivesObject



23
24
25
# File 'lib/fog/aws/models/glacier/vault.rb', line 23

def archives
  @archives ||= Fog::AWS::Glacier::Archives.new(:vault => self, :service => service)
end

#delete_notification_configurationObject



35
36
37
# File 'lib/fog/aws/models/glacier/vault.rb', line 35

def delete_notification_configuration
  service.delete_vault_notification_configuration
end

#destroyObject



45
46
47
48
# File 'lib/fog/aws/models/glacier/vault.rb', line 45

def destroy
  requires :id
  service.delete_vault(id)
end

#jobs(filters = {}) ⇒ Object



27
28
29
# File 'lib/fog/aws/models/glacier/vault.rb', line 27

def jobs(filters={})
  Fog::AWS::Glacier::Jobs.new(:vault => self, :service => service, :filters => filters)
end

#ready?Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/fog/aws/models/glacier/vault.rb', line 18

def ready?
  # Glacier requests are synchronous
  true
end

#saveObject



39
40
41
42
43
# File 'lib/fog/aws/models/glacier/vault.rb', line 39

def save
  requires :id
  service.create_vault(id)
  reload
end

#set_notification_configuration(topic, events) ⇒ Object



31
32
33
# File 'lib/fog/aws/models/glacier/vault.rb', line 31

def set_notification_configuration(topic, events)
  service.set_vault_notification_configuration(id, topic, events)
end