AWS SDK for .NET Documentation
UpdateTable Method (updateTableRequest)
Amazon ► Amazon.DynamoDB ► AmazonDynamoDBClient ► UpdateTable(UpdateTableRequest)
Did this page help you? Yes No Tell us about it...

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 Amazon DynamoDB.

Declaration Syntax

C#

    public UpdateTableResponse UpdateTable(
    	UpdateTableRequest updateTableRequest
    )

Parameters

updateTableRequest (UpdateTableRequest)
  Container for the necessary parameters to execute the UpdateTable service method on AmazonDynamoDB.

Return Value
The response from the UpdateTable service method, as returned by AmazonDynamoDB.
Examples

This example shows how to update the throughput settings of a table. New throughput will be 40 ReadCapacityUnits and 50 WriteCapacityUnits.

CopyUpdateTable sample

    // Create a client
    AmazonDynamoDBClient client = new AmazonDynamoDBClient();

    // Define new table throughput:
    //  Table will now have capacity of 40 reads and 50 writes
    ProvisionedThroughput throughput = new ProvisionedThroughput
    {
        ReadCapacityUnits = 40,
        WriteCapacityUnits = 50
    };

    // Compose the UpdateTable request
    UpdateTableRequest request = new UpdateTableRequest
    {
        TableName = "SampleTable",
        ProvisionedThroughput = throughput
    };

    // View new table properties
    TableDescription tableDescription = client.UpdateTable(request).UpdateTableResult.TableDescription;
    Console.WriteLine("Table name: {0}", tableDescription.TableName);
    Console.WriteLine("Throughput: Reads = {0}, Writes = {1}",
        tableDescription.ProvisionedThroughput.ReadCapacityUnits,
        tableDescription.ProvisionedThroughput.WriteCapacityUnits);

Exceptions

Exception | Condition
--- | ---
ResourceInUseException |
LimitExceededException |
InternalServerErrorException |
ResourceNotFoundException |

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)