'Updates table attributes and global indexes in DynamoDB.
Optionally accepts a ``throughput`` parameter, which should be a
dictionary. If provided, it should specify a ``read`` & ``write`` key,
both of which should have an integer value associated with them.
Optionally accepts a ``global_indexes`` parameter, which should be a
dictionary. If provided, it should specify the index name, which is also
a dict containing a ``read`` & ``write`` key, both of which
should have an integer value associated with them. If you are writing
new code, please use ``Table.update_global_secondary_index``.
Returns ``True`` on success.
Example::
# For a read-heavier application...
>>> users.update(throughput={
...     \'read\': 20,
...     \'write\': 10,
True
# To also update the global index(es) throughput.
>>> users.update(throughput={
...     \'read\': 20,
...     \'write\': 10,
... global_secondary_indexes={
...     \'TheIndexNameHere\': {
...         \'read\': 15,
...         \'write\': 5,
True'

def update(self, throughput=None, global_indexes=None):

    data = None
    if throughput:
        self.throughput = throughput
        data = {'ReadCapacityUnits': int(self.throughput['read']), 'WriteCapacityUnits': int(self.throughput['write'])}
    gsi_data = None
    if global_indexes:
        gsi_data = []
        for (gsi_name, gsi_throughput) in global_indexes.items():
            gsi_data.append({'Update': {'IndexName': gsi_name, 'ProvisionedThroughput': {'ReadCapacityUnits': int(gsi_throughput['read']), 'WriteCapacityUnits': int(gsi_throughput['write'])}}})
    if (throughput or global_indexes):
        self.connection.update_table(self.table_name, provisioned_throughput=data, global_secondary_index_updates=gsi_data)
        return True
    else:
        msg = 'You    need    to    provide    either    the    throughput    or    the    global_indexes    to    update    method'
        boto.log.error(msg)
        return False
