Class: Tartarus::RemoteStorage::Glacier::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/tartarus/remote_storage/glacier/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(key:, secret:, region:, account_id:) ⇒ Client

Returns a new instance of Client.



10
11
12
13
# 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 = 
end

Instance Method Details

#upload_archive(vault_name, file) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/tartarus/remote_storage/glacier/client.rb', line 15

def upload_archive(vault_name, file)
  client.upload_archive(
    account_id: ,
    archive_description: file.description,
    body: file.body,
    vault_name: vault_name
  )
end