@Override
    public UpdateGlobalTableResult updateGlobalTable(UpdateGlobalTableRequest request) {
        request = beforeClientExecution(request);
        return executeUpdateGlobalTable(request);
    }
<p>
Adds or removes replicas in the specified global table. The global table must already exist to be able to use
this operation. Any replica to be added must be empty, have the same name as the global table, have the same key
schema, have DynamoDB Streams enabled, and have the same provisioned and maximum write capacity units.
</p>
<important>
<p>
This documentation is for version 2017.11.29 (Legacy) of global tables, which should be avoided for new global
tables. Customers should use <a
href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html">Global Tables version
2019.11.21 (Current)</a> when possible, because it provides greater flexibility, higher efficiency, and consumes
less write capacity than 2017.11.29 (Legacy).
</p>
<p>
To determine which version you're using, see <a
href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html"
>Determining the global table version you are using</a>. To update existing global tables from version 2017.11.29
(Legacy) to version 2019.11.21 (Current), see <a
href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.html">Upgrading
global tables</a>.
</p>
</important> <note>
<p>
For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version). If
you are using global tables <a
href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html">Version 2019.11.21</a>
you can use <a
href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html">UpdateTable</a>
instead.
</p>
<p>
Although you can use <code>UpdateGlobalTable</code> to add replicas and remove replicas in a single request, for
simplicity we recommend that you issue separate requests for adding or removing replicas.
</p>
</note>
<p>
If global secondary indexes are specified, then the following conditions must also be met:
</p>
<ul>
<li>
<p>
The global secondary indexes must have the same name.
</p>
</li>
<li>
<p>
The global secondary indexes must have the same hash key and sort key (if present).
</p>
</li>
<li>
<p>
The global secondary indexes must have the same provisioned and maximum write capacity units.
</p>
</li>
</ul>

@param updateGlobalTableRequest
@return Result of the UpdateGlobalTable operation returned by the service.
@throws InternalServerErrorException
        An error occurred on the server side.
@throws GlobalTableNotFoundException
        The specified global table does not exist.
@throws ReplicaAlreadyExistsException
        The specified replica is already part of the global table.
@throws ReplicaNotFoundException
        The specified replica is no longer part of the global table.
@throws TableNotFoundException
        A source table with the name <code>TableName</code> does not currently exist within the subscriber's
        account or the subscriber is operating in the wrong Amazon Web Services Region.
@sample AmazonDynamoDB.UpdateGlobalTable
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable" target="_top">AWS API
     Documentation</a>
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/AmazonDynamoDBClient.java