class Fog::AWS::Elasticache::Cluster

Attributes

parameter_group_name[RW]

Public Instance Methods

destroy() click to toggle source
# File lib/fog/aws/models/elasticache/cluster.rb, line 35
def destroy
  requires :id
  service.delete_cache_cluster(id)
  true
end
ready?() click to toggle source
# File lib/fog/aws/models/elasticache/cluster.rb, line 31
def ready?
  status == 'available'
end
save() click to toggle source
# File lib/fog/aws/models/elasticache/cluster.rb, line 41
def save
  requires :id

  parameter_group     ||= Hash.new
  notification_config ||= Hash.new

  service.create_cache_cluster(
    id, {
      :node_type                    => node_type,
      :security_group_names         => security_groups,
      :num_nodes                    => num_nodes,
      :auto_minor_version_upgrade   => auto_upgrade,
      :engine                       => engine,
      :engine_version               => engine_version,
      :notification_topic_arn       => notification_config['TopicArn'],
      :port                         => port,
      :preferred_availablility_zone => zone,
      :preferred_maintenance_window => maintenance_window,
      :s3_snapshot_location         => s3_snapshot_location,
      :parameter_group_name         => parameter_group_name || parameter_group['CacheParameterGroupName'],
      :cache_subnet_group_name      => cache_subnet_group_name,
      :vpc_security_groups          => vpc_security_groups,
    }
  )
end