Alibaba Cloud Tablestore binding spec

Detailed documentation on the Alibaba Tablestore binding component

Component format

To setup an Alibaba Cloud Tablestore binding create a component of type bindings.alicloud.tablestore. See this guide on how to create and apply a secretstore configuration. See this guide on referencing secrets to retrieve and use the secret with Dapr components.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: mytablestore
  5. spec:
  6. type: bindings.alicloud.tablestore
  7. version: v1
  8. metadata:
  9. - name: endpoint
  10. value: "[endpoint]"
  11. - name: accessKeyID
  12. value: "[key-id]"
  13. - name: accessKey
  14. value: "[access-key]"
  15. - name: instanceName
  16. value: "[instance]"
  17. - name: tableName
  18. value: "[table]"
  19. - name: endpoint
  20. value: "[endpoint]"
  21. - name: direction
  22. value: "output"

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Spec metadata fields

FieldRequiredBinding supportDetailsExample
endpointYOutputAlicloud Tablestore endpoint.https://tablestore-cn-hangzhou.aliyuncs.com
accessKeyIDYOutputAccess key ID credential.
accessKeyYOutputAccess key credential.
instanceNameYOutputName of the instance.
tableNameYOutputName of the table.
directionNOutputDirection of the binding.“output”

Binding support

This component supports output binding with the following operations:

Create object

To perform a create object operation, invoke the binding with a POST method and the following JSON body:

  1. {
  2. "operation": "create",
  3. "data": "YOUR_CONTENT",
  4. "metadata": {
  5. "primaryKeys": "pk1"
  6. }
  7. }

Note

Note the metadata.primaryKeys field is mandatory.

Delete object

To perform a delete object operation, invoke the binding with a POST method and the following JSON body:

  1. {
  2. "operation": "delete",
  3. "metadata": {
  4. "primaryKeys": "pk1",
  5. "columnToGet": "name,age,date"
  6. },
  7. "data": {
  8. "pk1": "data1"
  9. }
  10. }

Note

Note the metadata.primaryKeys field is mandatory.

List objects

To perform a list objects operation, invoke the binding with a POST method and the following JSON body:

  1. {
  2. "operation": "delete",
  3. "metadata": {
  4. "primaryKeys": "pk1",
  5. "columnToGet": "name,age,date"
  6. },
  7. "data": {
  8. "pk1": "data1",
  9. "pk2": "data2"
  10. }
  11. }

Note

Note the metadata.primaryKeys field is mandatory.

Get object

To perform a get object operation, invoke the binding with a POST method and the following JSON body:

  1. {
  2. "operation": "delete",
  3. "metadata": {
  4. "primaryKeys": "pk1"
  5. },
  6. "data": {
  7. "pk1": "data1"
  8. }
  9. }

Note

Note the metadata.primaryKeys field is mandatory.

Last modified October 12, 2023: Update config.toml (#3826) (0ffc2e7)