_create_table_opts

in lib/aws-record/record/table_config.rb [328:348]


      def _create_table_opts
        opts = {
          table_name: @model_class.table_name
        }
        if @billing_mode == 'PROVISIONED'
          opts[:provisioned_throughput] = {
            read_capacity_units: @read_capacity_units,
            write_capacity_units: @write_capacity_units
          }
        elsif @billing_mode == 'PAY_PER_REQUEST'
          opts[:billing_mode] = @billing_mode
        else
          raise ArgumentError, "Unsupported billing mode #{@billing_mode}"
        end
        opts[:key_schema] = _key_schema
        opts[:attribute_definitions] = _attribute_definitions
        gsi = _global_secondary_indexes
        opts[:global_secondary_indexes] = gsi unless gsi.empty?
        opts
      end