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. namespace: default
  6. spec:
  7. type: bindings.alicloud.tablestore
  8. version: v1
  9. metadata:
  10. - name: endpoint
  11. value: "[endpoint]"
  12. - name: accessKeyID
  13. value: "[key-id]"
  14. - name: accessKey
  15. value: "[access-key]"
  16. - name: instanceName
  17. value: "[instance]"
  18. - name: tableName
  19. value: "[table]"
  20. - name: endpoint
  21. value: "[endpoint]"

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.

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 November 12, 2021 : Merge pull request #1949 from willtsai/az-staticwebapp-versioning (c40e456)