Skip to content

Commit 5c9e0ee

Browse files
authored
fix(docs): sqs example
1 parent a28401d commit 5c9e0ee

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

src/main/java/io/kestra/plugin/aws/sqs/Publish.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,46 @@
4040
examples = {
4141
@Example(
4242
full = true,
43+
title = "Publish a message to an SQS queue",
4344
code = """
4445
id: aws_sqs_publish
4546
namespace: company.team
4647
4748
tasks:
4849
- id: publish
4950
type: io.kestra.plugin.aws.sqs.Publish
50-
accessKeyId: "<access-key>"
51-
secretKeyId: "<secret-key>"
52-
region: "eu-central-1"
51+
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
52+
secretKeyId: "{{ secret('AWS_SECRET_ACCESS_KEY') }}"
53+
region: "{{ secret('AWS_DEFAULT_REGION') }}"
5354
queueUrl: "https://sqs.eu-central-1.amazonaws.com/000000000000/test-queue"
5455
from:
5556
- data: Hello World
5657
- data: Hello Kestra
5758
delaySeconds: 5
5859
"""
60+
),
61+
@Example(
62+
full = true,
63+
title = "Publish an input to an SQS queue",
64+
code = """
65+
id: sqs_publish_message
66+
namespace: company.team
67+
68+
inputs:
69+
- id: message
70+
type: STRING
71+
defaults: Hi from Kestra!
72+
73+
tasks:
74+
- id: publish_message
75+
type: io.kestra.plugin.aws.sqs.Publish
76+
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
77+
secretKeyId: "{{ secret('AWS_SECRET_ACCESS_KEY') }}"
78+
region: "{{ secret('AWS_DEFAULT_REGION') }}"
79+
queueUrl: https://sqs.eu-central-1.amazonaws.com/123456789/kestra
80+
from:
81+
data: "{{ inputs.message }}"
82+
"""
5983
)
6084
}
6185
)

0 commit comments

Comments
 (0)