Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

API Compatibility

Updated on 2025-01-26 GMT+08:00

This section describes APIs supported by GeminiDB (DynamoDB API compatible) and precautions.

Usage Notes

  • GeminiDB (DynamoDB API compatible) allows you to add, delete, and modify tables only through DynamoDB APIs. Tables can only be read on the console.
  • Tables created through non-DynamoDB APIs cannot be used on GeminiDB (DynamoDB API compatible) instances.
  • In the current version, traffic statistics, traffic limit, and transaction functions (TransactWriteItems and TransactGetItems) are not supported.
  • In the current version, on-demand backup APIs CreateBackup, DescribeBackup, DeleteBackup, ListBackups, and RestoreTableFromBackup are not supported.
  • Hash or partition keys determine where items are stored in an internal storage device of a GeminiDB (DynamoDB API compatible) instance. Amazon DynamoDB uses a dedicated hash function, while GeminiDB (DynamoDB API compatible) uses the Murmur3 algorithm. As a result, the sequence of data returned by a scan operation is different.
  • A load balancing plug-in evenly sends requests from applications to all nodes. If this plug-in is not used, requests are sent only to a specified endpoint address. To obtain the plug-in package, choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact customer service of GeminiDB (DynamoDB API compatible).
  • 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 API compatible) instance is not strictly limited to 400 KB.
  • All DDL APIs are synchronous APIs.

Load Balancing

DynamoDB applications typically connect to a URL and then distribute requests within a server. To evenly distribute requests of GeminiDB (DynamoDB API compatible) to all nodes, a cost-effective and small-capacity database is attached to DynamoDB SDK. Before DynamoDB SDK sends requests, an interceptor changes the destination address in the request header to an IP address of any available node in the current cluster to achieve load balancing. The following is an example:

TABLE_NAME ='user'

// seed url
URL = boto3_lb.setup(['***.***.***.***'],'http',8000,'fake.domain.com')

dynamodb = boto3.resource('dynamodb', endpoint_url=URL,region_name='None', aws_access_key_id='None', aws_secret_access_key='None')

Supported Expressions

ConditionExpression of GeminiDB (DynamoDB API compatible) supports the following function syntax:

function ::=
    attribute_exists (path)
    | attribute_not_exists (path)
    | attribute_type (path, type)
    | begins_with (path, substr)
    | contains (path, operand)
The value of operand in contains(path,operand) can only be an attribute value (that is, the input value placeholder).

UpdateExpression of GeminiDB (DynamoDB API compatible) 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 the SET path = operand syntax, the value of operand cannot be set to path.
In the SET path = operand1 '+'|'-' operand2 syntax, the value of operand1 must be set to path, and the value of operand2 must be an attribute value.
In the SET path = if_not_exists (path, value) syntax, values of the two path parameters must be the same, and the values must be expression attribute values.
All values can only be placeholder expressions, for example, :placeholder.

Compatible APIs

Table 2 CreateTable API Compatibility

API

Parameter

Mandatory

Supported

Description

CreateTable

Request parameters

AttributeDefinitions

Yes

Yes

-

KeySchema

Yes

Yes

-

TableName

Yes

Yes

The value contains 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

No

Yes

-

SSESpecification

No

No

This parameter is not supported in the current version and is being planned.

StreamSpecification

No

No

This parameter is not supported in the current version and is being planned.

Tags

No

No

This parameter is not supported in the current version and is being planned.

Response parameter

TableDescription

-

Yes

-

Table 3 UpdateTable API Compatibility

API

Parameter

Mandatory

Supported

Description

UpdateTable

Request parameters

AttributeDefinitions

No

Yes

-

BillingMode

No

No

Billing parameter, which is not supported.

GlobalSecondaryIndexesUpdates

Yes

Yes

CREATE and DELETE statements are supported. UPDATE statements are not supported.

ProvisionedThroughput

No

No

Billing parameter, which is not supported.

ReplicaUpdates

No

No

Strong consistency parameter by default

SSESpecification

No

No

This parameter is not supported in the current version and is being planned.

StreamSpecification

No

No

This parameter is not supported in the current version and is being planned.

TableName

Yes

Yes

-

Response parameter

TableDescription

-

Yes

-

Table 4 DescribeTable API Compatibility

API

Parameter

Mandatory

Supported

Description

DescribeTable

Request parameter

TableName

Yes

Yes

-

Response parameter

Table

-

Yes

The itemCount field is not supported.

Table 5 ListTables API Compatibility

API

Parameter

Mandatory

Supported

Description

ListTables

Request parameters

ExclusiveStartTableName

No

Yes

-

Limit

No

Yes

-

Response parameters

LastEvaluatedTableName

-

Yes

-

TableNames

-

Yes

-

Table 6 DeleteTable API Compatibility

API

Parameter

Mandatory

Supported

Description

DeleteTable

Request parameter

TableName

Yes

Yes

-

Response parameter

TableDescription

-

Yes

-

Table 7 PutItem API Compatibility

API

Parameter

Mandatory

Supported

Description

PutItem

Request parameters

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 in this API.

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 parameters

Attributes

-

Yes

-

ConsumedCapacity

-

No

Billing parameter, which is not supported.

ItemCollectionMetrics

-

No

Statistics parameter, which is not supported.

Table 8 UpdateItem API Compatibility

API

Parameter

Mandatory

Supported

Description

UpdateItem

Request parameters

Key

Yes

Yes

-

TableName

Yes

Yes

-

AttributeUpdates

No

No

Deprecated parameter. For details, see UpdateExpression in this API.

ConditionalOperator

No

No

Deprecated parameter. For details, see UpdateExpression in this API.

ConditionExpression

No

Yes

-

Expected

No

No

Deprecated parameter. For details, see UpdateExpression in this API.

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 parameters

Attributes

-

Yes

-

ConsumedCapacity

-

No

Billing parameter, which is not supported.

ItemCollectionMetrics

-

No

Statistics parameter, which is not supported.

Table 9 GetItem API Compatibility

API

Parameter

Mandatory

Supported

Description

GetItem

Request parameters

Key

Yes

Yes

-

TableName

Yes

Yes

-

AttributesToGet

No

No

Deprecated parameter. For details, see ProjectionExpression in this API.

ConsistentRead

No

No

Strong consistency parameter by default

ExpressionAttributeNames

No

Yes

-

ProjectionExpression

No

Yes

-

ReturnConsumedCapacity

No

No

Billing parameter, which is not supported.

Response parameters

ConsumedCapacity

-

No

Billing parameter, which is not supported.

Item

-

Yes

-

Table 10 DeleteItem API Compatibility

API

Parameter

Mandatory

Supported

Description

DeleteItem

Request parameters

Key

Yes

Yes

-

TableName

Yes

Yes

-

ConditionalOperator

No

No

Deprecated parameter. For details, see ConditionExpression in this API.

ConditionExpression

No

Yes

-

Expected

No

No

Deprecated parameter. For details, see ConditionExpression in this API.

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 parameters

Attributes

-

Yes

-

ConsumedCapacity

-

No

Billing parameter, which is not supported.

ItemCollectionMetrics

-

No

Statistics parameter, which is not supported.

Table 11 BatchWriteItem API Compatibility

API

Parameter

Mandatory

Supported

Description

BatchWriteItem

Request parameters

RequestItems

Yes

Yes

-

ReturnConsumedCapacity

No

No

Billing parameter, which is not supported.

ReturnItemCollectionMetrics

No

No

Statistics parameter, which is not supported.

Response parameters

ConsumedCapacity

-

No

Billing parameter, which is not supported.

ItemCollectionMetrics

-

No

Statistics parameter, which is not supported.

UnprocessedItems

-

Yes

-

Table 12 BatchGetItem API Compatibility

API

Parameter

Mandatory

Supported

Description

BatchGetItem

Request parameters

RequestItems

Yes

Yes

None

ReturnConsumedCapacity

No

No

Billing parameter, which is not supported.

Response parameters

ConsumedCapacity

-

No

Statistics parameter, which is not supported.

Responses

-

Yes

-

UnprocessedKeys

-

Yes

-

Table 13 Query API Compatibility

API

Parameter

Mandatory

Supported

Description

Query

Request parameters

TableName

Yes

Yes

-

AttributesToGet

No

No

Deprecated parameter. For details, see ProjectionExpression in this API.

ConditionalOperator

No

No

Deprecated parameter. For details, see ProjectionExpression in this API.

ConsistentRead

No

No

Strong consistency parameter by default

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 in this API.

Limit

No

Yes

-

ProjectionExpression

No

Yes

-

QueryFilter

No

No

Deprecated parameter. For details, see FilterExpression in this API.

ReturnConsumedCapacity

No

No

Billing parameter, which is not supported.

ScanIndexForward

No

Yes

-

Select

No

Yes

SELECT COUNT is not supported.

Response parameters

ConsumedCapacity

-

No

Billing parameter, which is not supported.

Count

-

Yes

-

Items

-

Yes

-

LastEvaluatedKey

-

Yes

-

ScannedCount

-

Yes

-

Table 14 Scan API Compatibility

API

Parameter

Mandatory

Supported

Description

Scan

Request parameters

TableName

Yes

Yes

-

AttributesToGet

No

No

Deprecated parameter. For details, see ProjectionExpression in this API.

ConditionalOperator

No

No

Deprecated parameter. For details, see ConditionExpression in this API.

ConsistentRead

No

No

Strong consistency parameter by default

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 in this API.

Segment

No

Yes

-

Select

No

Yes

SELECT COUNT is not supported.

TotalSegments

No

Yes

-

Response parameters

ConsumedCapacity

No

No

Billing parameter, which is not supported.

Count

-

Yes

-

Items

-

Yes

-

LastEvaluatedKey

-

Yes

-

ScannedCount

-

Yes

-

Table 15 UpdateTimeToLive API Compatibility

API

Parameter

Mandatory

Supported

Description

UpdateTimeToLive

Request parameters

TableName

Yes

Yes

-

TimeToLiveSpecification

Yes

Yes

-

Response parameter

TimeToLiveSpecification

-

Yes

-

Table 16 DescribeTimeToLive API compatibility

API

Parameter

Mandatory

Supported

Remarks

DescribeTimeToLive

Request parameter

TableName

Yes

Yes

-

Response parameter

TimeToLiveSpecification

-

Yes

-

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback