class Fog::AWS::Glacier::Job

Constants

ARCHIVE
INVENTORY

Public Instance Methods

get_output(options={}) click to toggle source

pass :range => 1..1234 to only retrieve those bytes pass :io => f to stream the response to that tio

# File lib/fog/aws/models/glacier/job.rb, line 44
def get_output(options={})
  if io = options.delete(:io)
    options = options.merge :response_block => lambda {|chunk, remaining_bytes, total_bytes| io.write chunk}
  end
  options['Range'] = options.delete :range
  service.get_job_output(vault.id, id, options)
end
ready?() click to toggle source
# File lib/fog/aws/models/glacier/job.rb, line 25
def ready?
  completed
end
save() click to toggle source
# File lib/fog/aws/models/glacier/job.rb, line 29
def save
  requires :vault, :type
  specification = {'Type' => type, 'ArchiveId' => archive_id, 'Format' => format, 'Description' => description, 'SNSTopic' => sns_topic}.reject{|k,v| v.nil?}

  data = service.initiate_job(vault.id, specification)
  self.id = data.headers['x-amz-job-id']
  reload
end
vault() click to toggle source
# File lib/fog/aws/models/glacier/job.rb, line 38
def vault
  @vault
end

Private Instance Methods

vault=(new_vault) click to toggle source
# File lib/fog/aws/models/glacier/job.rb, line 53
def vault=(new_vault)
  @vault = new_vault
end