2011-09-23 18:04:07 -04:00
|
|
|
require 'fog/core/collection'
|
|
|
|
require 'fog/aws/models/elasticache/parameter_group'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class Elasticache
|
|
|
|
|
|
|
|
class ParameterGroups < Fog::Collection
|
|
|
|
model Fog::AWS::Elasticache::ParameterGroup
|
|
|
|
|
|
|
|
def all
|
|
|
|
load(
|
2012-12-22 18:31:07 -05:00
|
|
|
service.describe_cache_parameter_groups.body['CacheParameterGroups']
|
2011-09-23 18:04:07 -04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def get(identity)
|
|
|
|
new(
|
2012-12-22 18:31:07 -05:00
|
|
|
service.describe_cache_parameter_groups(
|
2011-09-23 18:04:07 -04:00
|
|
|
identity
|
|
|
|
).body['CacheParameterGroups'].first
|
|
|
|
)
|
|
|
|
rescue Fog::AWS::Elasticache::NotFound
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|