From cc707c2288b64dadbc1a2c957f6ff3d171d5e866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Hompus?= Date: Wed, 2 Dec 2020 20:59:28 +0100 Subject: [PATCH] Add postmark as output binding --- .../supported-bindings/_index.md | 7 +- .../supported-bindings/postmark.md | 69 +++++++++++++++++++ 2 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 daprdocs/content/en/operations/components/setup-bindings/supported-bindings/postmark.md diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/_index.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/_index.md index 159f82042..cc339776e 100644 --- a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/_index.md +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/_index.md @@ -20,14 +20,14 @@ Every binding has its own unique set of properties. Click the name link to see t | [Kubernetes Events]({{< ref "kubernetes-binding.md" >}}) | ✅ | | Experimental | | [MQTT]({{< ref mqtt.md >}}) | ✅ | ✅ | Experimental | | [PostgreSql]({{< ref postgres.md >}}) | | ✅ | Experimental | +| [Postmark]({{< ref postmark.md >}}) | | ✅ | Experimental | | [RabbitMQ]({{< ref rabbitmq.md >}}) | ✅ | ✅ | Experimental | | [Redis]({{< ref redis.md >}}) | | ✅ | Experimental | | [Twilio]({{< ref twilio.md >}}) | | ✅ | Experimental | | [Twitter]({{< ref twitter.md >}}) | ✅ | ✅ | Experimental | | [SendGrid]({{< ref sendgrid.md >}}) | | ✅ | Experimental | - -### Amazon Web Service (AWS) +### Amazon Web Services (AWS) | Name | Input
Binding | Output
Binding | Status | |------|:----------------:|:-----------------:|--------| @@ -37,7 +37,6 @@ Every binding has its own unique set of properties. Click the name link to see t | [AWS SQS]({{< ref sqs.md >}}) | ✅ | ✅ | Experimental | | [AWS Kinesis]({{< ref kinesis.md >}}) | ✅ | ✅ | Experimental | - ### Google Cloud Platform (GCP) | Name | Input
Binding | Output
Binding | Status | @@ -55,4 +54,4 @@ Every binding has its own unique set of properties. Click the name link to see t | [Azure Service Bus Queues]({{< ref servicebusqueues.md >}}) | ✅ | ✅ | Experimental | | [Azure SignalR]({{< ref signalr.md >}}) | | ✅ | Experimental | | [Azure Storage Queues]({{< ref storagequeues.md >}}) | ✅ | ✅ | Experimental | -| [Azure Event Grid]({{< ref eventgrid.md >}}) | ✅ | ✅ | Experimental | \ No newline at end of file +| [Azure Event Grid]({{< ref eventgrid.md >}}) | ✅ | ✅ | Experimental | diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/postmark.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/postmark.md new file mode 100644 index 000000000..1c01d9d7b --- /dev/null +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/postmark.md @@ -0,0 +1,69 @@ +--- +type: docs +title: "Postmark binding spec" +linkTitle: "Postmark" +description: "Detailed documentation on the Postmark binding component" +--- + +## Setup Dapr component + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: postmark + namespace: default +spec: + type: bindings.postmark + metadata: + - name: accountToken + value: "YOUR_ACCOUNT_TOKEN" # required, this is your Postmark account token + - name: serverToken + value: "YOUR_SERVER_TOKEN" # required, this is your Postmark server token + - name: emailFrom + value: "testapp@dapr.io" # optional + - name: emailTo + value: "dave@dapr.io" # optional + - name: subject + value: "Hello!" # optional +``` + +- `accountToken` is your Postmark account token, this should be considered a secret value. Required. +- `serverToken` is your Postmark server token, this should be considered a secret value. Required. +- `emailFrom` If set this specifies the 'from' email address of the email message. Optional field, see below. +- `emailTo` If set this specifies the 'to' email address of the email message. Optional field, see below. +- `emailCc` If set this specifies the 'cc' email address of the email message. Optional field, see below. +- `emailBcc` If set this specifies the 'bcc' email address of the email message. Optional field, see below. +- `subject` If set this specifies the subject of the email message. Optional field, see below. + +You can specify any of the optional metadata properties on the output binding request too (e.g. `emailFrom`, `emailTo`, `subject`, etc.) + +Combined, the optional metadata properties in the component configuration and the request payload should at least contain the `emailFrom`, `emailTo` and `subject` fields, as these are required to send an email with success. + +Example request payload + +```json +{ + "operation": "create", + "metadata": { + "emailTo": "changeme@example.net", + "subject": "An email from Dapr Postmark binding" + }, + "data": "

Testing Dapr Bindings

This is a test.
Bye!" +} +``` + +{{% 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 %}} + +## Output Binding Supported Operations + +- `create` + +## Related links + +- [Bindings building block]({{< ref bindings >}}) +- [How-To: Trigger application with input binding]({{< ref howto-triggers.md >}}) +- [How-To: Use bindings to interface with external resources]({{< ref howto-bindings.md >}}) +- [Bindings API reference]({{< ref bindings_api.md >}})