AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
 
Container for the parameters to the UpdateTable operation. 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:

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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.DynamoDBv2.AmazonDynamoDBRequest
      Amazon.DynamoDBv2.Model.UpdateTableRequest

Namespace: Amazon.DynamoDBv2.Model
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class UpdateTableRequest : AmazonDynamoDBRequest
         IRequestEvents

The UpdateTableRequest type exposes the following members

Constructors

NameDescription
Public Method UpdateTableRequest() Empty constructor used to set properties independently even when a simple constructor is available
Public Method UpdateTableRequest(string, ProvisionedThroughput) Instantiates UpdateTableRequest with the parameterized properties

Properties

NameTypeDescription
Public Property AttributeDefinitions System.Collections.Generic.List<Amazon.DynamoDBv2.Model.AttributeDefinition> Gets and sets the property AttributeDefinitions.

An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.

Public Property GlobalSecondaryIndexUpdates System.Collections.Generic.List<Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate> Gets and sets the property GlobalSecondaryIndexUpdates.

An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:

  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

For more information, see Managing Global Secondary Indexes in the Amazon DynamoDB Developer Guide.

Public Property ProvisionedThroughput Amazon.DynamoDBv2.Model.ProvisionedThroughput Gets and sets the property ProvisionedThroughput.
Public Property StreamSpecification Amazon.DynamoDBv2.Model.StreamSpecification Gets and sets the property StreamSpecification.

Represents the DynamoDB Streams configuration for the table.

You will receive a ResourceInUseException if you attempt to enable a stream on a table that already has a stream, or if you attempt to disable a stream on a table which does not have a stream.

Public Property TableName System.String Gets and sets the property TableName.

The name of the table to be updated.

Examples

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

UpdateTable 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).TableDescription;
Console.WriteLine("Table name: {0}", tableDescription.TableName);
Console.WriteLine("Throughput: Reads = {0}, Writes = {1}",
    tableDescription.ProvisionedThroughput.ReadCapacityUnits,
    tableDescription.ProvisionedThroughput.WriteCapacityUnits);

                

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8