Skip to content

Commit

Permalink
[Bindings] Update specs to include direction (#3646)
Browse files Browse the repository at this point in the history
* update binding specs to include direction

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* Update daprdocs/data/components/bindings/generic.yaml

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>

* Update daprdocs/data/components/bindings/generic.yaml

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>

* consistency across bindings docs

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/mysql.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>

---------

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
  • Loading branch information
hhunter-ms and msfussell committed Jul 31, 2023
1 parent d05030d commit e33f5a9
Show file tree
Hide file tree
Showing 47 changed files with 599 additions and 426 deletions.
Expand Up @@ -23,16 +23,21 @@ spec:
value: "https://oapi.dingtalk.com/robot/send?access_token=******"
- name: secret
value: "****************"
- name: direction
value: "input, output"
```

{{% alert title="Warning" color="warning" %}}
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
{{% /alert %}}

## Spec metadata fields
| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|--------|--------|---------|
| id | Y | Input/Output |unique id| `"test_webhook_id"`
| url | Y | Input/Output |DingTalk's Webhook url | `"https://oapi.dingtalk.com/robot/send?access_token=******"`
| secret | N | Input/Output |the secret of DingTalk's Webhook | `"****************"`
| `id` | Y | Input/Output |Unique id| `"test_webhook_id"`
| `url` | Y | Input/Output |DingTalk's Webhook url | `"https://oapi.dingtalk.com/robot/send?access_token=******"`
| `secret` | N | Input/Output |The secret of DingTalk's Webhook | `"****************"`
| `direction` | N | Input/Output |The direction of the binding | `"input"`, `"output"`, `"input, output"`

## Binding support

Expand Down
Expand Up @@ -28,6 +28,8 @@ spec:
value: "[access-key]"
- name: bucket
value: "[bucket]"
- name: direction
value: "output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -42,6 +44,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `accessKeyID` | Y | Output | Access key ID credential. |
| `accessKey` | Y | Output | Access key credential. |
| `bucket` | Y | Output | Name of the storage bucket. |
| `direction` | N | Output | Direction of the binding. | `"output"`

## Binding support

Expand Down
Expand Up @@ -26,6 +26,8 @@ spec:
value: "[accessKey-secret]"
- name: Endpoint
value: "[endpoint]"
- name: direction
value: "output"
```

## Spec metadata fields
Expand All @@ -35,6 +37,7 @@ spec:
| `AccessKeyID` | Y | Output | Access key ID credential. |
| `AccessKeySecret` | Y | Output | Access key credential secret |
| `Endpoint` | Y | Output | Alicloud SLS endpoint. |
| `direction` | N | Output | Direction of the binding. | `"output"`

## Binding support

Expand Down
Expand Up @@ -32,6 +32,8 @@ spec:
value: "[table]"
- name: endpoint
value: "[endpoint]"
- name: direction
value: "output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -47,6 +49,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `accessKey` | Y | Output | Access key credential. |
| `instanceName` | Y | Output | Name of the instance. |
| `tableName` | Y | Output | Name of the table. |
| `direction` | N | Output | Direction of the binding. | `"output"`

## Binding support

Expand Down
Expand Up @@ -21,24 +21,27 @@ spec:
version: v1
metadata:
- name: development
value: <bool>
value: "<bool>"
- name: key-id
value: <APPLE_KEY_ID>
value: "<APPLE_KEY_ID>"
- name: team-id
value: <APPLE_TEAM_ID>
value: "<APPLE_TEAM_ID>"
- name: private-key
secretKeyRef:
name: <SECRET>
key: <SECRET-KEY-NAME>
key: "<SECRET-KEY-NAME>"
- name: direction
value: "output"
```
## Spec metadata fields

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:| ----------------|---------|---------|
| development | Y | Output | Tells the binding which APNs service to use. Set to `"true"` to use the development service or `"false"` to use the production service. Default: `"true"` | `"true"` |
| key-id | Y | Output | The identifier for the private key from the Apple Developer Portal | `"private-key-id`" |
| team-id | Y | Output | The identifier for the organization or author from the Apple Developer Portal | `"team-id"` |
| private-key | Y | Output| Is a PKCS #8-formatted private key. It is intended that the private key is stored in the secret store and not exposed directly in the configuration. See [here](#private-key) for more details | `"pem file"` |
| `development` | Y | Output | Tells the binding which APNs service to use. Set to `"true"` to use the development service or `"false"` to use the production service. Default: `"true"` | `"true"` |
| `key-id` | Y | Output | The identifier for the private key from the Apple Developer Portal | `"private-key-id`" |
| `team-id` | Y | Output | The identifier for the organization or author from the Apple Developer Portal | `"team-id"` |
| `private-key` | Y | Output| Is a PKCS #8-formatted private key. It is intended that the private key is stored in the secret store and not exposed directly in the configuration. See [here](#private-key) for more details | `"pem file"` |
| `direction` | N | Output| The direction of the binding. | `"output"` |

### Private key
The APNS binding needs a cryptographic private key in order to generate authentication tokens for the APNS service.
Expand Down
Expand Up @@ -33,6 +33,8 @@ spec:
# value: <integer>
# - name: publicAccessLevel
# value: <publicAccessLevel>
# - name: direction
# value: "output"
```
{{% alert title="Warning" color="warning" %}}
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
Expand All @@ -49,6 +51,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `decodeBase64` | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). Defaults to `false` | `true`, `false` |
| `getBlobRetryCount` | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2`
| `publicAccessLevel` | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only used if the container is created by Dapr). Defaults to `none` | `blob`, `container`, `none`
| `direction` | N | Output | The direction of the binding. | `"output"`

### Azure Active Directory (AAD) authentication

Expand Down
Expand Up @@ -46,6 +46,9 @@ spec:
# URL of the Worker (required if the Worker has been pre-created outside of Dapr)
- name: workerUrl
value: ""
# Direction of the binding
- name: direction
value: "output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -61,6 +64,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `cfAccountID` | Y/N | Output | Cloudflare account ID. Required to have Dapr manage the worker. | `"456789abcdef8b5588f3d134f74ac"def`
| `cfAPIToken` | Y/N | Output | API token for Cloudflare. Required to have Dapr manage the Worker. | `"secret-key"`
| `workerUrl` | Y/N | Output | URL of the Worker. Required if the Worker has been pre-provisioned outside of Dapr. | `"https://mydaprqueue.mydomain.workers.dev"`
| `direction` | N | Output | Direction of the binding. | `"output"`

> When you configure Dapr to create your Worker for you, you may need to set a longer value for the `initTimeout` property of the component, to allow enough time for the Worker script to be deployed. For example: `initTimeout: "120s"`
Expand Down
Expand Up @@ -23,18 +23,19 @@ spec:
version: v1
metadata:
- name: region # required.
value: region
value: "region"
- name: provider # required.
value: provider (gcp/aws)
value: "gcp"
- name: projectKey # required.
value: project-key
value: "<project-key>"
- name: clientID # required.
value: *****************
value: "*****************"
- name: clientSecret # required.
value: *****************
value: "*****************"
- name: scopes # required.
value: scopes

value: "<project-scopes>"
- name: direction
value: "output"
```
{{% alert title="Warning" color="warning" %}}
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
Expand All @@ -44,12 +45,13 @@ The above example uses secrets as plain strings. It is recommended to use a secr

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|------------|-----|---------|
| region | Y | Output | The region of the commercetools project | `"europe-west1"` |
| provider | Y | Output | The cloud provider, either gcp or aws | `"gcp"` |
| projectKey | Y | Output | The commercetools project key | `"project-key"` |
| clientID | Y | Output | The commercetools client ID for the project | `"client ID"` |
| clientSecret | Y | Output | The commercetools client secret for the project | `"client secret"` |
| scopes | Y | Output | The commercetools scopes for the project | `"manage_project:project-key"` |
| `region` | Y | Output | The region of the commercetools project | `"europe-west1"` |
| `provider` | Y | Output | The cloud provider, either gcp or aws | `"gcp"`, `"aws"` |
| `projectKey` | Y | Output | The commercetools project key | |
| `clientID` | Y | Output | The commercetools client ID for the project | |
| `clientSecret` | Y | Output | The commercetools client secret for the project | |
| `scopes` | Y | Output | The commercetools scopes for the project | `"manage_project:project-key"` |
| `direction` | N | Output | The direction of the binding | `"output"` |

For more information see [commercetools - Creating an API Client](https://docs.commercetools.com/getting-started/create-api-client#create-an-api-client) and [commercetools - Regions](https://docs.commercetools.com/api/general-concepts#regions).

Expand Down
Expand Up @@ -22,15 +22,17 @@ spec:
version: v1
metadata:
- name: url
value: https://******.documents.azure.com:443/
value: "https://******.documents.azure.com:443/"
- name: masterKey
value: *****
value: "*****"
- name: database
value: db
value: "OrderDb"
- name: collection
value: collection
value: "Orders"
- name: partitionKey
value: message
value: "<message>"
- name: direction
value: "output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -41,11 +43,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|--------|---------|---------|
| url | Y | Output | The Cosmos DB url | `"https://******.documents.azure.com:443/"` |
| masterKey | Y | Output | The Cosmos DB account master key | `"master-key"` |
| database | Y | Output | The name of the Cosmos DB database | `"OrderDb"` |
| collection | Y | Output | The name of the container inside the database. | `"Orders"` |
| partitionKey | Y | Output | The name of the key to extract from the payload (document to be created) that is used as the partition key. This name must match the partition key specified upon creation of the Cosmos DB container. | `"OrderId"`, `"message"` |
| `url` | Y | Output | The Cosmos DB url | `"https://******.documents.azure.com:443/"` |
| `masterKey` | Y | Output | The Cosmos DB account master key | `"master-key"` |
| `database` | Y | Output | The name of the Cosmos DB database | `"OrderDb"` |
| `collection` | Y | Output | The name of the container inside the database. | `"Orders"` |
| `partitionKey` | Y | Output | The name of the key to extract from the payload (document to be created) that is used as the partition key. This name must match the partition key specified upon creation of the Cosmos DB container. | `"OrderId"`, `"message"` |
| `direction` | N | Output | The direction of the binding. | `"output"` |

For more information see [Azure Cosmos DB resource model](https://docs.microsoft.com/azure/cosmos-db/account-databases-containers-items).

Expand Down
Expand Up @@ -20,12 +20,14 @@ spec:
version: v1
metadata:
- name: url
value: wss://******.gremlin.cosmos.azure.com:443/
value: "wss://******.gremlin.cosmos.azure.com:443/"
- name: masterKey
value: *****
value: "*****"
- name: username
value: *****
```
value: "*****"
- name: direction
value: "output"
```

{{% alert title="Warning" color="warning" %}}
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
Expand All @@ -38,6 +40,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `url` | Y | Output | The Cosmos DB url for Gremlin APIs | `"wss://******.gremlin.cosmos.azure.com:443/"` |
| `masterKey` | Y | Output | The Cosmos DB account master key | `"masterKey"` |
| `username` | Y | Output | The username of the Cosmos DB database | `"/dbs/<database_name>/colls/<graph_name>"` |
| `direction` | N | Output | The direction of the binding | `"output"` |

For more information see [Quickstart: Azure Cosmos Graph DB using Gremlin](https://docs.microsoft.com/azure/cosmos-db/graph/create-graph-console).

Expand Down
Expand Up @@ -23,13 +23,16 @@ spec:
metadata:
- name: schedule
value: "@every 15m" # valid cron schedule
- name: direction
value: "input"
```

## Spec metadata fields

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|-------|--------|---------|
| schedule | Y | Input| The valid cron schedule to use. See [this](#schedule-format) for more details | `"@every 15m"`
| `schedule` | Y | Input| The valid cron schedule to use. See [this](#schedule-format) for more details | `"@every 15m"`
| `direction` | N | Input| The direction of the binding | `"input"`

### Schedule Format

Expand Down
Expand Up @@ -23,16 +23,17 @@ spec:
version: v1
metadata:
- name: table
value: items
value: "items"
- name: region
value: us-west-2
value: "us-west-2"
- name: accessKey
value: *****************
value: "*****************"
- name: secretKey
value: *****************
value: "*****************"
- name: sessionToken
value: *****************

value: "*****************"
- name: direction
value: "output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -43,11 +44,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr

| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|------------|-----|---------|
| table | Y | Output | The DynamoDB table name | `"items"` |
| region | Y | Output | The specific AWS region the AWS DynamoDB instance is deployed in | `"us-east-1"` |
| accessKey | Y | Output | The AWS Access Key to access this resource | `"key"` |
| secretKey | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` |
| sessionToken | N | Output | The AWS session token to use | `"sessionToken"` |
| `table` | Y | Output | The DynamoDB table name | `"items"` |
| `region` | Y | Output | The specific AWS region the AWS DynamoDB instance is deployed in | `"us-east-1"` |
| `accessKey` | Y | Output | The AWS Access Key to access this resource | `"key"` |
| `secretKey` | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` |
| `sessionToken` | N | Output | The AWS session token to use | `"sessionToken"` |
| `direction` | N | Output | The direction of the binding | `"output"` |

{{% alert title="Important" color="warning" %}}
When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using.
Expand Down
Expand Up @@ -46,6 +46,9 @@ spec:
# Optional Input Binding Metadata
- name: eventSubscriptionName
value: "[EventSubscriptionName]"
# Optional metadata
- name: direction
value: "input, output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -66,6 +69,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `handshakePort` | Y | Input | The container port that the input binding listens on when receiving events on the webhook | `"9000"` |
| `scope` | Y | Input | The identifier of the resource to which the event subscription needs to be created or updated. See the [scope section](#scope) for more details | `"/subscriptions/{subscriptionId}/"` |
| `eventSubscriptionName` | N | Input | The name of the event subscription. Event subscription names must be between 3 and 64 characters long and should use alphanumeric letters only | `"name"` |
| `direction` | N | Input/Output | The direction of the binding | `"input"`, `"output"`, `"input, output"` |

### Scope

Expand Down
Expand Up @@ -55,6 +55,9 @@ spec:
# Alternative to passing storageAccountKey
- name: storageConnectionString
value: "DefaultEndpointsProtocol=https;AccountName=<account>;AccountKey=<account-key>"
# Optional metadata
- name: direction
value: "input, output"
```

{{% alert title="Warning" color="warning" %}}
Expand All @@ -78,6 +81,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `storageAccountKey` | Y* | Input | Storage account key for the checkpoint store account.<br>* When using Azure AD, it's possible to omit this if the service principal has access to the storage account too. | `"112233445566778899"`
| `storageConnectionString` | Y* | Input | Connection string for the checkpoint store, alternative to specifying `storageAccountKey` | `"DefaultEndpointsProtocol=https;AccountName=myeventhubstorage;AccountKey=<account-key>"`
| `storageContainerName` | Y | Input | Storage container name for the storage account name. | `"myeventhubstoragecontainer"`
| `direction` | N | Input/Output | The direction of the binding. | `"input"`, `"output"`, `"input, output"`

### Azure Active Directory (AAD) authentication

Expand Down

0 comments on commit e33f5a9

Please sign in to comment.