UpdateTable
Important
This section refers to API version 2011-12-05,
which is deprecated and should not be used for new
applications.
For documentation on the current low-level API, see the Amazon DynamoDB API Reference.
Description
Updates the provisioned throughput for the given table. Setting the throughput for a table helps you manage performance and is part of the provisioned throughput feature of DynamoDB. For more information, see DynamoDB provisioned capacity mode.
The provisioned throughput values can be upgraded or downgraded based on the maximums and minimums listed in Service, account, and table quotas in Amazon DynamoDB.
The table must be in the ACTIVE
state for this operation to succeed.
UpdateTable is an asynchronous operation; while executing the operation, the table is in
the UPDATING
state. While the table is in the
UPDATING
state, the table still has the provisioned
throughput from before the call. The new provisioned throughput setting is in effect
only when the table returns to the ACTIVE
state after the
UpdateTable operation.
Requests
Syntax
// This header is abbreviated. // For a sample of a complete header, see DynamoDB low-level API. POST / HTTP/1.1 x-amz-target: DynamoDB_20111205.UpdateTable content-type: application/x-amz-json-1.0 {"TableName":"Table1", "ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":15} }
Name | Description | Required |
---|---|---|
TableName
|
The name of the table to update. Type: String |
Yes |
ProvisionedThroughput
|
New throughput for the specified table, consisting of values for
Type: Array |
Yes |
ProvisionedThroughput
:ReadCapacityUnits |
Sets the minimum number of consistent
Eventually consistent read operations require less effort than
a consistent read operation, so a setting of 50 consistent
Type: Number |
Yes |
ProvisionedThroughput
:WriteCapacityUnits |
Sets the minimum number of
Type: Number |
Yes |
Responses
Syntax
HTTP/1.1 200 OK x-amzn-RequestId: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG Content-Type: application/json Content-Length: 311 Date: Tue, 12 Jul 2011 21:31:03 GMT {"TableDescription": {"CreationDateTime":1.321657838135E9, "KeySchema": {"HashKeyElement":{"AttributeName":"AttributeValue1","AttributeType":"S"}, "RangeKeyElement":{"AttributeName":"AttributeValue2","AttributeType":"N"}}, "ProvisionedThroughput": {"LastDecreaseDateTime":1.321661704489E9, "LastIncreaseDateTime":1.321663607695E9, "ReadCapacityUnits":5, "WriteCapacityUnits":10}, "TableName":"Table1", "TableStatus":"UPDATING"}}
Name | Description |
---|---|
CreationDateTime |
Date when the table was created. Type: Number |
KeySchema
|
The primary key (simple or composite) structure for the table. A name-value pair for
the Type: Map of
|
ProvisionedThroughput |
Current throughput settings for the specified table, including values for
Type: Array |
TableName
|
The name of the updated table. Type: String |
TableStatus
|
The current state of the table (CREATING ,
ACTIVE , DELETING
or UPDATING ), which should be
UPDATING . Use the DescribeTables operationto check the status of the table. Type: String |
Special errors
Error | Description |
---|---|
ResourceNotFoundException
|
The specified table was not found. |
ResourceInUseException |
The table is not in the ACTIVE state. |
Examples
Sample request
// This header is abbreviated. // For a sample of a complete header, see DynamoDB low-level API. POST / HTTP/1.1 x-amz-target: DynamoDB_20111205.UpdateTable content-type: application/x-amz-json-1.0 {"TableName":"comp1", "ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":15} }
Sample response
HTTP/1.1 200 OK content-type: application/x-amz-json-1.0 content-length: 390 Date: Sat, 19 Nov 2011 00:46:47 GMT {"TableDescription": {"CreationDateTime":1.321657838135E9, "KeySchema": {"HashKeyElement":{"AttributeName":"user","AttributeType":"S"}, "RangeKeyElement":{"AttributeName":"time","AttributeType":"N"}}, "ProvisionedThroughput": {"LastDecreaseDateTime":1.321661704489E9, "LastIncreaseDateTime":1.321663607695E9, "ReadCapacityUnits":5, "WriteCapacityUnits":10}, "TableName":"comp1", "TableStatus":"UPDATING"} }