def _alter(self, tree):
if tree.throughput:<EOL><INDENT>[read, write] = tree.throughput<EOL>index = None<EOL>if tree.index:<EOL><INDENT>index = tree.index<EOL><DEDENT>self._update_throughput(tree.table, read, write, index)<EOL><DEDENT>elif tree.drop_index:<EOL><INDENT>updates = [IndexUpdate.delete(tree.drop_index[<NUM_LIT:0>])]<EOL>try:<EOL><INDENT>self.connection.update_table(tree.table, index_updates=updates)<EOL><DEDENT>except DynamoDBError as e:<EOL><INDENT>if tree.exists and e.kwargs["<STR_LIT>"] == "<STR_LIT>":<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>elif tree.create_index:<EOL><INDENT>attrs = {}<EOL>index = self._parse_global_index(tree.create_index, attrs)<EOL>updates = [IndexUpdate.create(index)]<EOL>try:<EOL><INDENT>self.connection.update_table(tree.table, index_updates=updates)<EOL><DEDENT>except DynamoDBError as e:<EOL><INDENT>if (<EOL>tree.not_exists<EOL>and e.kwargs["<STR_LIT>"] == "<STR_LIT>"<EOL>and "<STR_LIT>" in e.kwargs["<STR_LIT>"]<EOL>):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise SyntaxError("<STR_LIT>")<EOL><DEDENT>
Run an ALTER statement