Class: Fog::AWS::Glacier::Archive

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#multipart_chunk_sizeObject

must be a power of 2 multiple of 1MB



9
10
11
# File 'lib/fog/aws/models/glacier/archive.rb', line 9

def multipart_chunk_size
  @multipart_chunk_size
end

Instance Method Details

#destroyObject



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

def destroy
  requires :id
  service.delete_archive(vault.id,id)
end

#saveObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fog/aws/models/glacier/archive.rb', line 15

def save
  requires :body, :vault

  if multipart_chunk_size && body.respond_to?(:read)
    self.id = multipart_save
  else
    data = service.create_archive(vault.id, body, 'description' => description)
    self.id = data.headers['x-amz-archive-id']
  end
  true
end

#vaultObject



11
12
13
# File 'lib/fog/aws/models/glacier/archive.rb', line 11

def vault
  @vault
end