API Compatibility
This section describes APIs supported by GeminiDB DynamoDB-Compatible API.
Usage Notes
- You can add, delete, and modify tables of GeminiDB DynamoDB-Compatible instances only through DynamoDB APIs. Tables can only be read on the console.
- Tables created through non-DynamoDB APIs cannot be used on GeminiDB DynamoDB-Compatible instances.
- The current version does not support traffic statistics, traffic control, or transaction functions (TransactWriteItems and TransactGetItems).
- The current version does not support the following on-demand backup APIs: CreateBackup, DescribeBackup, DeleteBackup, ListBackups, and RestoreTableFromBackup.
- Hash or partition keys determine where items are stored in an internal storage device of a GeminiDB DynamoDB-Compatible instance. Amazon DynamoDB uses a dedicated hash function, while GeminiDB DynamoDB-Compatible API uses the Murmur3 algorithm. As a result, the sequence of data returned by a scan operation is different.
- The table or index name cannot contain periods (.).
- Due to different encoding methods, the size of each row of data in a table on a GeminiDB DynamoDB-Compatible instance is not strictly limited to 400 KB.
- All DDL APIs are synchronous APIs.
Supported Expressions
ConditionExpression of GeminiDB DynamoDB-Compatible API supports the following function syntax:
function ::=
attribute_exists (path)
| attribute_not_exists (path)
| attribute_type (path, type)
| begins_with (path, substr)
| contains (path, operand)
operand in contains(path,operand) can only be an attribute value (that is, the value placeholder). UpdateExpression of GeminiDB DynamoDB-Compatible API supports the following syntax:
update-expression ::=
[ SET action [, action] ... ]
[ REMOVE action [, action] ...]
[ ADD action [, action] ... ]
[ DELETE action [, action] ...]
set-action ::=
path =value
value ::=
operand
| operand '+' operand
| operand '-' operand
operand ::=
path | function
function ::=
if_not_exists (path, value)
| list_append (list1, list2)
remove-action ::=
path
add-action ::=
path value
delete-action ::=
path value
In SET path = operand, operand cannot be set to path.
In SET path = operand1 '+'|'-' operand2, operand1 must be set to path, and operand2 must be an attribute value.
In SET path = if_not_exists (path, value), values of the two path parameters must be the same and must be expression attribute values.
All values can only be placeholders, for example, ':placeholder'. Compatible APIs
| API |
|---|
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| CreateTable | Request parameter | AttributeDefinitions | Yes | Yes | - |
| KeySchema | Yes | Yes | - | ||
| TableName | Yes | Yes | Can contain 3 to 48 characters. The regular expression is ([\w-]+). | ||
| BillingMode | No | No | Billing parameter, which is not supported | ||
| GlobalSecondaryIndexes | No | Yes | - | ||
| LocalSecondaryIndexes | No | Yes | - | ||
| ProvisionedThroughput | Yes | Yes | - | ||
| SSESpecification | No | No | Not supported in the current version (planning). | ||
| StreamSpecification | No | Yes | - | ||
| Tags | No | No | Not supported in the current version (planning). | ||
| Response parameter | TableDescription | - | Yes | - | |
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| UpdateTable | Request parameter | AttributeDefinitions | No | Yes | - |
| BillingMode | No | No | Billing parameter, which is not supported | ||
| GlobalSecondaryIndexesUpdates | Yes | Yes | CREATE and DELETE are supported, but UPDATE is not. | ||
| ProvisionedThroughput | No | No | Billing parameter, which is not supported | ||
| ReplicaUpdates | No | No | Default strong consistency | ||
| SSESpecification | No | No | Not supported in the current version (planning). | ||
| StreamSpecification | No | Yes | - | ||
| TableName | Yes | Yes | - | ||
| Response parameter | TableDescription | - | Yes | - | |
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| DescribeTable | Request parameter | TableName | Yes | Yes | - |
| Response parameter | Table | - | Yes | itemCount is not supported. | |
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| ListTables | Request parameter | ExclusiveStartTableName | No | Yes | - |
| Limit | No | Yes | - | ||
| Response parameter | LastEvaluatedTableName | - | Yes | - | |
| TableNames | - | Yes | - | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| DeleteTable | Request parameter | TableName | Yes | Yes | - |
| Response parameter | TableDescription | - | Yes | - | |
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| PutItem | Request parameter | Item | Yes | Yes | - |
| TableName | Yes | Yes | - | ||
| ConditionalOperator | No | No | Deprecated parameter. For details, see ConditionExpression. | ||
| ConditionExpression | No | Yes | - | ||
| Expected | No | No | Deprecated parameter. For details, see ConditionExpression. | ||
| ExpressionAttributeNames | No | Yes | - | ||
| ExpressionAttributeValues | No | Yes | - | ||
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| ReturnItemCollectionMetrics | No | No | Statistics parameter, which is not supported | ||
| ReturnValues | No | Yes | - | ||
| Response parameter | Attributes | - | Yes | - | |
| ConsumedCapacity | - | No | Billing parameter, which is not supported | ||
| ItemCollectionMetrics | - | No | Statistics parameter, which is not supported | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| UpdateItem | Request parameter | Key | Yes | Yes | - |
| TableName | Yes | Yes | - | ||
| AttributeUpdates | No | No | Deprecated parameter. For details, see UpdateExpression. | ||
| ConditionalOperator | No | No | Deprecated parameter. For details, see UpdateExpression. | ||
| ConditionExpression | No | Yes | - | ||
| Expected | No | No | Deprecated parameter. For details, see UpdateExpression. | ||
| ExpressionAttributeNames | No | Yes | - | ||
| ExpressionAttributeValues | No | Yes | - | ||
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| ReturnItemCollectionMetrics | No | No | Statistics parameter, which is not supported | ||
| ReturnValues | No | Yes | - | ||
| UpdateExpression | No | Yes | - | ||
| Response parameter | Attributes | - | Yes | - | |
| ConsumedCapacity | - | No | Billing parameter, which is not supported | ||
| ItemCollectionMetrics | - | No | Statistics parameter, which is not supported | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| GetItem | Request parameter | Key | Yes | Yes | - |
| TableName | Yes | Yes | - | ||
| AttributesToGet | No | No | Deprecated parameter. For details, see ProjectionExpression. | ||
| ConsistentRead | No | No | Default strong consistency | ||
| ExpressionAttributeNames | No | Yes | - | ||
| ProjectionExpression | No | Yes | - | ||
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| Response parameter | ConsumedCapacity | - | No | Billing parameter, which is not supported | |
| Item | - | Yes | - | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| DeleteItem | Request parameter | Key | Yes | Yes | - |
| TableName | Yes | Yes | - | ||
| ConditionalOperator | No | No | Deprecated parameter. For details, see ConditionExpression. | ||
| ConditionExpression | No | Yes | - | ||
| Expected | No | No | Deprecated parameter. For details, see ConditionExpression. | ||
| ExpressionAttributeNames | No | Yes | - | ||
| ExpressionAttributeValues | No | Yes | - | ||
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| ReturnItemCollectionMetrics | No | No | Statistics parameter, which is not supported | ||
| ReturnValues | No | Yes | - | ||
| Response parameter | Attributes | - | Yes | - | |
| ConsumedCapacity | - | No | Billing parameter, which is not supported | ||
| ItemCollectionMetrics | - | No | Statistics parameter, which is not supported | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| BatchWriteItem | Request parameter | RequestItems | Yes | Yes | - |
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| ReturnItemCollectionMetrics | No | No | Statistics parameter, which is not supported | ||
| Response parameter | ConsumedCapacity | - | No | Billing parameter, which is not supported | |
| ItemCollectionMetrics | - | No | Statistics parameter, which is not supported | ||
| UnprocessedItems | - | Yes | - | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| BatchGetItem | Request parameter | RequestItems | Yes | Yes | None |
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| Response parameter | ConsumedCapacity | - | No | Statistics parameter, which is not supported | |
| Responses | - | Yes | - | ||
| UnprocessedKeys | - | Yes | - | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| Query | Request parameter | TableName | Yes | Yes | - |
| AttributesToGet | No | No | Deprecated parameter. For details, see ProjectionExpression. | ||
| ConditionalOperator | No | No | Deprecated parameter. For details, see ProjectionExpression. | ||
| ConsistentRead | No | No | Default strong consistency | ||
| ExclusiveStartKey | No | Yes | - | ||
| ExpressionAttributeNames | No | Yes | - | ||
| ExpressionAttributeValues | No | Yes | - | ||
| FilterExpression | No | Yes | - | ||
| IndexName | No | Yes | - | ||
| KeyConditionExpression | No | Yes | - | ||
| KeyConditions | No | No | Deprecated parameter. For details, see KeyConditionExpression. | ||
| Limit | No | Yes | - | ||
| ProjectionExpression | No | Yes | - | ||
| QueryFilter | No | No | Deprecated parameter. For details, see FilterExpression. | ||
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| ScanIndexForward | No | Yes | - | ||
| Select | No | Yes | COUNT is not supported. | ||
| Response parameter | ConsumedCapacity | - | No | Billing parameter, which is not supported | |
| Count | - | Yes | - | ||
| Items | - | Yes | - | ||
| LastEvaluatedKey | - | Yes | - | ||
| ScannedCount | - | Yes | - | ||
| API | Parameter | Mandatory | Supported | Remarks | |
|---|---|---|---|---|---|
| Scan | Request parameter | TableName | Yes | Yes | - |
| AttributesToGet | No | No | Deprecated parameter. For details, see ProjectionExpression. | ||
| ConditionalOperator | No | No | Deprecated parameter. For details, see ConditionExpression. | ||
| ConsistentRead | No | No | Default strong consistency | ||
| ExclusiveStartKey | No | Yes | - | ||
| ExpressionAttributeNames | No | Yes | - | ||
| ExpressionAttributeValues | No | Yes | - | ||
| FilterExpression | No | Yes | - | ||
| IndexName | No | Yes | - | ||
| Limit | No | Yes | - | ||
| ProjectionExpression | No | Yes | - | ||
| ReturnConsumedCapacity | No | No | Billing parameter, which is not supported | ||
| ScanFilter | No | No | Deprecated parameter. For details, see FilterExpression. | ||
| Segment | No | Yes | - | ||
| Select | No | Yes | COUNT is not supported. | ||
| TotalSegments | No | Yes | - | ||
| Response parameter | ConsumedCapacity | No | No | Billing parameter, which is not supported | |
| Count | - | Yes | - | ||
| Items | - | Yes | - | ||
| LastEvaluatedKey | - | Yes | - | ||
| ScannedCount | - | Yes | - | ||
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.