class BuildCloud::CacheParameterGroup
Public Class Methods
new( fog_interfaces, log, options = {} )
click to toggle source
# File lib/build-cloud/cacheparametergroup.rb, line 8 def initialize ( fog_interfaces, log, options = {} ) @elasticache = fog_interfaces[:elasticache] @log = log @options = options @log.debug( options.inspect ) required_options(:family, :description, :id, :params) end
Public Instance Methods
create()
click to toggle source
# File lib/build-cloud/cacheparametergroup.rb, line 20 def create return if exists? @log.info( "Creating Cache Parameter Group #{@options[:id]}" ) options = @options.dup param_group = @elasticache.create_cache_parameter_group(options[:id], options[:description], options[:family]) @log.debug( param_group.inspect ) params = @elasticache.modify_cache_parameter_group options[:id], options[:params] @log.debug( params.inspect ) end
delete()
click to toggle source
# File lib/build-cloud/cacheparametergroup.rb, line 44 def delete return unless exists? @log.info( "Deleting Cache Parameter Group #{@options[:id]}" ) puts fog_object.inspect fog_object.destroy end
read()
click to toggle source
# File lib/build-cloud/cacheparametergroup.rb, line 38 def read @elasticache.parameter_groups.select { |g| g.id == "#{@options[:id]}".downcase }.first end
Also aliased as: fog_object