-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathaws-sns-sink.kamelet.yaml
109 lines (106 loc) · 6.44 KB
/
aws-sns-sink.kamelet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
name: aws-sns-sink
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "2.3.0"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnICAgdmlld0JveD0iMCAwIDI1NiAyNTciIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPg0KCTxnPg0KCQk8cGF0aCBkPSJNOTguODc1LDIzMi4wMzMgTDcyLjQ0MiwyMjQuNjI1IEw0Ny40NDEsMTk2LjExNyBMNzguNzEzLDE5NS4yNTQgTDk4Ljg3NSwyMzIuMDMzIiBmaWxsPSIjOTk1QjgwIj48L3BhdGg+DQoJCTxwYXRoIGQ9Ik0zNy43NSwyMTMuMjMzIEwyMi44NzUsMjA5LjA2NyBMOC44MTcsMTkzLjAzMyBMMjUuODk5LDE5MC4yMjQgTDM3Ljc1LDIxMy4yMzMiIGZpbGw9IiM5OTVCODAiPjwvcGF0aD4NCgkJPHBhdGggZD0iTTAsMTkxL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jU5MSwxOS4xNTggTDg5LjU5MSwyMDguOTUiIGZpbGw9IiM3QjNGNjUiPjwvcGF0aD4NCgkJPHBhdGggZD0iTTI1Niw2NC4wMzMgTDEyNy45MjUsMCBMMTI3LjkyNSwyMTYuMzY3IEwxNTAuNTIyLDIxMS44MzkgTDE4MS44MzMsMjU2LjQ5MiBMMjA4LjczNCwyMDAuMTgzIEwyMDguNzE3LDIwMC4xODEgTDI1NiwxOTAuNzA4IEwyNTYsNjQuMDMzIiBmaWxsPSIjQzE3QjlEIj48L3BhdGg+DQoJPC9nPg0KPC9zdmc+DQo="
camel.apache.org/provider: "Red Hat"
camel.apache.org/kamelet.group: "AWS SNS"
camel.apache.org/kamelet.namespace: "AWS"
labels:
camel.apache.org/kamelet.type: sink
spec:
definition:
title: AWS SNS Sink
description: |-
Send message to an Amazon Simple Notification Service (SNS) topic.
The basic authentication method for the SNS service is to specify an access key and a secret key. These parameters are optional because the Kamelet provides a default credentials provider.
If you use the default credentials provider, the SNS client loads the credentials through this provider and doesn't use the basic authentication method.
In the header, you can optionally set the `subject` / `ce-subject` property to specify the subject of the message.
required:
- topicNameOrArn
- region
type: object
properties:
topicNameOrArn:
title: Topic Name
description: The SNS topic name name or Amazon Resource Name (ARN).
type: string
accessKey:
title: Access Key
description: The access key obtained from AWS.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
secretKey:
title: Secret Key
description: The secret key obtained from AWS.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
region:
title: AWS Region
description: The AWS region to access.
type: string
enum: ["ap-south-1", "eu-south-1", "us-gov-east-1", "me-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "me-south-1", "sa-east-1", "ap-east-1", "cn-north-1", "us-gov-west-1", "ap-southeast-1", "ap-southeast-2", "us-iso-east-1", "ap-southeast-3", "us-east-1", "us-east-2", "cn-northwest-1", "us-isob-east-1", "aws-global", "aws-cn-global", "aws-us-gov-global", "aws-iso-global", "aws-iso-b-global"]
autoCreateTopic:
title: Autocreate Topic
description: Setting the autocreation of the SNS topic.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
useDefaultCredentialsProvider:
title: Default Credentials Provider
description: If true, the SNS client loads credentials through a default credentials provider. If false, it uses the basic authentication method (access key and secret key).
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwrite Endpoint URI
description: The overriding endpoint URI. To use this option, you must also select the `overrideEndpoint` option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Select this option to override the endpoint URI. To use this option, you must also provide a URI for the `uriEndpointOverride` option.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:core"
- "camel:aws2-sns"
- "camel:kamelet"
template:
from:
uri: kamelet:source
steps:
- choice:
when:
- simple: "${header[subject]}"
steps:
- set-header:
name: CamelAwsSnsSubject
simple: "${header[subject]}"
- simple: "${header[ce-subject]}"
steps:
- set-header:
name: CamelAwsSnsSubject
simple: "${header[ce-subject]}"
- to:
uri: "aws2-sns:{{topicNameOrArn}}"
parameters:
autoCreateTopic: "{{autoCreateTopic}}"
accessKey: "{{?accessKey}}"
secretKey: "{{?secretKey}}"
region: "{{region}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"