CreateTable creates a table based on the given 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;
}
			
table_meta:
  • Type: TableMeta

  • Required parameter: Yes

  • The structure information of the table to be created. The table_name 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.

  • Once a table is created, its Schema cannot be modified.

reserved_throughput:
  • Type: ReservedThroughput

  • Required parameter: 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 dynamically by using the UpdateTable operation.

table_options:
  • Type: TableOptions

  • Required parameter: Yes

  • Sets TimeToLive and MaxVersions.

stream_spec:
  • Type: StreamSpecification

  • Required parameter: No

  • Specifies whether to enable Stream-related attributes.

Response message structure:

message CreateTableResponse {
}
			

Note:

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

  • A single instance can contain up to 64 tables.