Class: Tartarus::RemoteStorage::Glacier::Client
- Inherits:
-
Object
- Object
- Tartarus::RemoteStorage::Glacier::Client
- Defined in:
- lib/tartarus/remote_storage/glacier/client.rb
Instance Method Summary collapse
-
#initialize(key:, secret:, region:, account_id:) ⇒ Client
constructor
A new instance of Client.
- #upload_archive(vault_name, file) ⇒ Object
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 = 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: account_id, archive_description: file.description, body: file.body, vault_name: vault_name ) end |