Amazon.DynamoDBv2.AmazonDynamoDBClient.UpdateTableAsync C# (CSharp) Method

UpdateTableAsync() public method

Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.

You can only perform one of the following operations at once:

  • Modify the provisioned throughput settings of the table.

  • Enable or disable Streams on the table.

  • Remove a global secondary index from the table.

  • Create a new global secondary index on the table. Once the index begins backfilling, you can use UpdateTable to perform other operations.

UpdateTable is an asynchronous operation; while it is executing, the table status changes from ACTIVE to UPDATING. While it is UPDATING, you cannot issue another UpdateTable request. When the table returns to the ACTIVE state, the UpdateTable operation is complete.

/// An error occurred on the server side. /// /// The number of concurrent table requests (cumulative number of tables in the CREATING, /// DELETING or UPDATING state) exceeds the maximum allowed /// of 10. /// /// /// /// Also, for tables with secondary indexes, only one of those tables can be in the CREATING /// state at any point in time. Do not attempt to create more than one such table simultaneously. /// /// /// /// The total limit of tables in the ACTIVE state is 250. /// /// /// The operation conflicts with the resource's availability. For example, you attempted /// to recreate an existing table, or tried to delete a table currently in the CREATING /// state. /// /// The operation tried to access a nonexistent table or index. The resource might not /// be specified correctly, or its status might not be ACTIVE. ///
public UpdateTableAsync ( string tableName, ProvisionedThroughput provisionedThroughput, System cancellationToken = default(CancellationToken) ) : Task
tableName string The name of the table to be updated.
provisionedThroughput Amazon.DynamoDBv2.Model.ProvisionedThroughput A property of UpdateTableRequest used to execute the UpdateTable service method.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
return Task
        public Task<UpdateTableResponse> UpdateTableAsync(string tableName, ProvisionedThroughput provisionedThroughput, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new UpdateTableRequest();
            request.TableName = tableName;
            request.ProvisionedThroughput = provisionedThroughput;
            return UpdateTableAsync(request, cancellationToken);
        }

Same methods

AmazonDynamoDBClient::UpdateTableAsync ( UpdateTableRequest request, System cancellationToken = default(CancellationToken) ) : Task