Class: Fog::AWS::Glacier::Archive
- Defined in:
- lib/fog/aws/models/glacier/archive.rb
Instance Attribute Summary collapse
-
#multipart_chunk_size ⇒ Object
must be a power of 2 multiple of 1MB.
Attributes inherited from Model
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 Fog::Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Attribute Details
#multipart_chunk_size ⇒ Object
must be a power of 2 multiple of 1MB
13 14 15 |
# File 'lib/fog/aws/models/glacier/archive.rb', line 13 def multipart_chunk_size @multipart_chunk_size end |
Instance Method Details
#destroy ⇒ Object
31 32 33 34 |
# File 'lib/fog/aws/models/glacier/archive.rb', line 31 def destroy requires :id connection.delete_archive(vault.id,id) end |
#save ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fog/aws/models/glacier/archive.rb', line 19 def save requires :body, :vault if multipart_chunk_size && body.respond_to?(:read) self.id = multipart_save else data = connection.create_archive(vault.id, body, 'description' => description) self.id = data.headers['x-amz-archive-id'] end true end |
#vault ⇒ Object
15 16 17 |
# File 'lib/fog/aws/models/glacier/archive.rb', line 15 def vault @vault end |