Skip to content

Commit

Permalink
Merge branch 'main' into feature/redis-certs
Browse files Browse the repository at this point in the history
  • Loading branch information
berndverst authored Jun 4, 2024
2 parents 861fe36 + b0bb3d7 commit d5b3de4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
32 changes: 32 additions & 0 deletions bindings/aws/sns/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: aws.sns
version: v1
status: alpha
title: "AWS SNS"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/sns/
binding:
output: true
operations:
- name: create
description: "Create a new subscription"
capabilities: []
builtinAuthenticationProfiles:
- name: "aws"
metadata:
- name: topicArn
required: true
description: |
The SNS topic name.
example: '"arn:::topicarn"'
type: string
- name: endpoint
required: false
description: |
AWS endpoint for the component to use, to connect to SNS-compatible services or emulators.
Do not use this when running against production AWS.
example: '"http://localhost:4566"'
type: string
14 changes: 8 additions & 6 deletions bindings/aws/sns/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ type AWSSNS struct {
}

type snsMetadata struct {
TopicArn string `json:"topicArn"`
Region string `json:"region"`
Endpoint string `json:"endpoint"`
AccessKey string `json:"accessKey"`
SecretKey string `json:"secretKey"`
SessionToken string `json:"sessionToken"`
// Ignored by metadata parser because included in built-in authentication profile
AccessKey string `json:"accessKey" mapstructure:"accessKey" mdignore:"true"`
SecretKey string `json:"secretKey" mapstructure:"secretKey" mdignore:"true"`
SessionToken string `json:"sessionToken" mapstructure:"sessionToken" mdignore:"true"`

TopicArn string `json:"topicArn"`
Region string `json:"region" mapstructure:"region" mapstructurealiases:"awsRegion" mdignore:"true"`
Endpoint string `json:"endpoint"`
}

type dataPayload struct {
Expand Down

0 comments on commit d5b3de4

Please sign in to comment.