You can call the UpdateTable operation to update the maximum number of versions, reserved read throughput, or reserved write throughput of a table, or to specify whether to allow the UpdateRow operation on the table.

API operations

/**
 * Update the maximum number of versions, reserved read throughput, or reserved write throughput of a table, or specify whether to allow the UpdateRow operation on the table. 
 */
updateTable(params, callback)            

Examples

The following code provides an example on how to change the value of the max versions parameter to 5 for a table and allow the UpdateRow operation on the table.

var client = require('./client');

var params = {
    tableName: 'sampleTable',
    tableOptions: {
        maxVersions: 5,
        allowUpdate: true, // Specify whether to allow the UpdateRow operation on the table. If you set allowUpdate to true, the UpdateRow operation is allowed on the table. If you set allowUpdate to false, the UpdateRow operation is prohibited. 
    }
};

client.updateTable(params, function (err, data) {
    if (err) {
        console.log('error:', err);
        return;
    }
    console.log('success:', data);
});

            

For the detailed sample code, visit UpdateTable@GitHub.