1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/lib/fog/aws/models/kms/keys.rb
Josh Lane f402dce5aa kms service
* list, describe, and create keys
2015-05-12 13:50:55 -07:00

29 lines
663 B
Ruby

require 'fog/aws/models/kms/key'
module Fog
module AWS
class KMS
class Keys < Fog::PagedCollection
attribute :filters
attribute :truncated
model Fog::AWS::KMS::Key
def initialize(attributes)
self.filters ||= {}
super
end
# This method deliberately returns only a single page of results
def all(filters_arg = filters)
filters.merge!(filters_arg)
result = service.list_keys(filters).body
filters[:marker] = result['Marker']
self.truncated = result['Truncated']
load(result['Keys'])
end
end
end
end
end