Menu
Amazon DynamoDB
API Reference

UpdateGlobalTable

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, must have the same name as the global table, must have the same key schema, must have DynamoDB Streams enabled, and cannot have any local secondary indexes (LSIs).

Note

Although you can use UpdateGlobalTable to add replicas and remove replicas in a single request, for simplicity we recommend that you issue separate requests for adding or removing replicas.

Request Syntax

{ "GlobalTableName": "string", "ReplicaUpdates": [ { "Create": { "RegionName": "string" }, "Delete": { "RegionName": "string" } } ] }

Request Parameters

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

GlobalTableName

The global table name.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 255.

Pattern: [a-zA-Z0-9_.-]+

Required: Yes

ReplicaUpdates

A list of regions that should be added or removed from the global table.

Type: Array of ReplicaUpdate objects

Required: Yes

Response Syntax

{ "GlobalTableDescription": { "CreationDateTime": number, "GlobalTableArn": "string", "GlobalTableName": "string", "GlobalTableStatus": "string", "ReplicationGroup": [ { "RegionName": "string" } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

GlobalTableDescription

Contains the details of the global table.

Type: GlobalTableDescription object

Errors

For information about the errors that are common to all actions, see Common Errors.

GlobalTableNotFoundException

The specified global table does not exist.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

ReplicaAlreadyExistsException

The specified replica is already part of the global table.

HTTP Status Code: 400

ReplicaNotFoundException

The specified replica is no longer part of the global table.

HTTP Status Code: 400

TableNotFoundException

A table with the name TableName does not currently exist within the subscriber's account.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: