class Tartarus::RemoteStorage::Glacier::Client

Attributes

account_id[R]
client[R]

Public Class Methods

new(key:, secret:, region:, account_id:) click to toggle source
# File lib/tartarus/remote_storage/glacier/client.rb, line 10
def initialize(key:, secret:, region:, account_id:)
  @client = Aws::Glacier::Client.new(credentials: Aws::Credentials.new(key, secret), region: region)
  @account_id = account_id
end

Public Instance Methods

upload_archive(vault_name, file) click to toggle source
# File lib/tartarus/remote_storage/glacier/client.rb, line 15
def upload_archive(vault_name, file)
  client.upload_archive(
    account_id: account_id,
    archive_description: file.description,
    body: file.body,
    vault_name: vault_name
  )
end