Class: Fog::AWS::Glacier::Jobs
- Inherits:
-
Collection
- Object
- Collection
- Fog::AWS::Glacier::Jobs
- Defined in:
- lib/fog/aws/models/glacier/jobs.rb
Instance Method Summary collapse
-
#all(filters = self.filters) ⇒ Object
acceptable filters are: statuscode InProgress/Failed/Succeeded completed (true/false).
- #get(key) ⇒ Object
-
#initialize(attributes) ⇒ Jobs
constructor
A new instance of Jobs.
- #new(attributes = {}) ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Jobs
Returns a new instance of Jobs.
11 12 13 14 |
# File 'lib/fog/aws/models/glacier/jobs.rb', line 11 def initialize(attributes) self.filters = {} super end |
Instance Method Details
#all(filters = self.filters) ⇒ Object
acceptable filters are: statuscode InProgress/Failed/Succeeded completed (true/false)
19 20 21 22 23 |
# File 'lib/fog/aws/models/glacier/jobs.rb', line 19 def all(filters = self.filters) self.filters = filters data = service.list_jobs(vault.id, self.filters).body['JobList'] load(data) end |
#get(key) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/fog/aws/models/glacier/jobs.rb', line 25 def get(key) data = service.describe_job(vault.id, key).body new(data) rescue Excon::Errors::NotFound nil end |
#new(attributes = {}) ⇒ Object
32 33 34 35 |
# File 'lib/fog/aws/models/glacier/jobs.rb', line 32 def new(attributes = {}) requires :vault super({ :vault => vault }.merge!(attributes)) end |