in lib/aws-record/record/table_migration.rb [216:234]
def _add_throughput_to_gsis(global_secondary_indexes, gsi_throughput)
missing_throughput = []
ret = global_secondary_indexes.map do |params|
name = params[:index_name]
throughput = gsi_throughput[name]
missing_throughput << name unless throughput
params.merge(provisioned_throughput: throughput)
end
unless missing_throughput.empty?
raise ArgumentError.new(
"Missing provisioned throughput for the following global secondary"\
" indexes: #{missing_throughput.join(", ")}. GSIs:"\
" #{global_secondary_indexes} and defined throughput:"\
" #{gsi_throughput}"
)
end
ret
end