    # File lib/fog/aws/requests/elasticache/modify_cache_cluster.rb, line 28
            def modify_cache_cluster(id, options = {})
              # Construct Cache Security Group parameters in the format:
              #   CacheSecurityGroupNames.member.N => "security_group_name"
              group_names = options[:security_group_names] || []
              sec_group_params = group_names.inject({}) do |group_hash, name|
                index = group_names.index(name) + 1
                group_hash["CacheSecurityGroupNames.member.#{index}"] = name
                group_hash
              end
              # Construct CacheNodeIdsToRemove parameters in the format:
              #   CacheNodeIdsToRemove.member.N => "node_id"
              node_ids = options[:nodes_to_remove] || []
              node_id_params = node_ids.inject({}) do |node_hash, node_id|
                index = node_ids.index(node_id) + 1
                node_hash["CacheNodeIdsToRemove.member.#{index}"] = node_id
                node_hash
              end
              # Merge the Cache Security Group parameters with the normal options
              request(node_id_params.merge(sec_group_params.merge(
                'Action'                      => 'ModifyCacheCluster',
                'CacheClusterId'              => id.strip,
                'ApplyImmediately'            => options[:apply_immediately],
                'NumCacheNodes'               => options[:num_nodes],
                'AutoMinorVersionUpgrade'     => options[:auto_minor_version_upgrade],
                'CacheParameterGroupName'     => options[:parameter_group_name],
                'EngineVersion'               => options[:engine_version],
                'NotificationTopicArn'        => options[:notification_topic_arn],
                'NotificationTopicStatus'     => options[:notification_topic_status],
                'PreferredMaintenanceWindow'  => options[:preferred_maintenance_window],
                :parser => Fog::Parsers::AWS::Elasticache::SingleCacheCluster.new
              )))
            end