You can call this operation to create a table based on the specified table structure information.

Request structure

message CreateTableRequest {
    required TableMeta table_meta = 1;
    required ReservedThroughput reserved_throughput = 2; 
    optional TableOptions table_options = 3;
    optional StreamSpecification stream_spec = 5;

Request parameters

Parameter Type Required Description
table_meta TableMeta Yes

The structure information of the table to be created. The table_name value must be unique within the instance. In primary_key, the number of ColumnSchema must range from one to four, the ColumnSchema names must comply with Naming conventions and data types, and the type value can only be STRING, INTEGER, or BINARY.

After a table is created, its schema cannot be modified.

reserved_throughput ReservedThroughput Yes

The initial reserved read/write throughput for the table to be created. The maximum reserved throughput is 5,000 for each table.

The reserved read/write throughput settings for a table can be modified by using the UpdateTable operation.

table_options TableOptions Yes

Specifies TimeToLive and MaxVersions.

stream_spec StreamSpecification No

Specifies whether to enable Stream-related attributes.

Response structure

message CreateTableResponse {

Usage notes

  • No read/write operation can be immediately performed on a table after it is created. Typically, you can perform read/write operations on a new table one minute after it is created.

  • A single instance can contain up to 64 tables. If you must raise the upper limit of the table quantity for a single instance, submit a ticket.