@Generated(value="jsii-pacmak/1.72.0 (build 4b8828b)", date="2022-12-27T20:28:49.474Z") @Stability(value=Stable) public interface SnsPublishProps extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Example:
EvaluateExpression convertToSeconds = EvaluateExpression.Builder.create(this, "Convert to seconds")
.expression("$.waitMilliseconds / 1000")
.resultPath("$.waitSeconds")
.build();
EvaluateExpression createMessage = EvaluateExpression.Builder.create(this, "Create message")
// Note: this is a string inside a string.
.expression("`Now waiting ${$.waitSeconds} seconds...`")
.runtime(Runtime.NODEJS_14_X)
.resultPath("$.message")
.build();
SnsPublish publishMessage = SnsPublish.Builder.create(this, "Publish message")
.topic(new Topic(this, "cool-topic"))
.message(TaskInput.fromJsonPathAt("$.message"))
.resultPath("$.sns")
.build();
Wait wait = Wait.Builder.create(this, "Wait")
.time(WaitTime.secondsPath("$.waitSeconds"))
.build();
StateMachine.Builder.create(this, "StateMachine")
.definition(convertToSeconds.next(createMessage).next(publishMessage).next(wait))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
SnsPublishProps.Builder
A builder for
SnsPublishProps |
static class |
SnsPublishProps.Jsii$Proxy
An implementation for
SnsPublishProps |
| Modifier and Type | Method and Description |
|---|---|
static SnsPublishProps.Builder |
builder() |
TaskInput |
getMessage()
The message you want to send.
|
default Map<String,MessageAttribute> |
getMessageAttributes()
Add message attributes when publishing.
|
default Boolean |
getMessagePerSubscriptionType()
Send different messages for each transport protocol.
|
default String |
getSubject()
Used as the "Subject" line when the message is delivered to email endpoints.
|
ITopic |
getTopic()
The SNS topic that the task will publish to.
|
getComment, getHeartbeat, getInputPath, getIntegrationPattern, getOutputPath, getResultPath, getResultSelector, getTimeout@Stability(value=Stable) @NotNull TaskInput getMessage()
With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size. For SMS, each message can contain up to 140 characters.
@Stability(value=Stable) @NotNull ITopic getTopic()
@Stability(value=Stable) @Nullable default Map<String,MessageAttribute> getMessageAttributes()
These attributes carry additional metadata about the message and may be used for subscription filters.
Default: {}
@Stability(value=Stable) @Nullable default Boolean getMessagePerSubscriptionType()
For example, you might want to send a shorter message to SMS subscribers and a more verbose message to email and SQS subscribers.
Your message must be a JSON object with a top-level JSON key of "default" with a value that is a string You can define other top-level keys that define the message you want to send to a specific transport protocol (i.e. "sqs", "email", "http", etc)
Default: false
@Stability(value=Stable) @Nullable default String getSubject()
This field will also be included, if present, in the standard JSON messages delivered to other endpoints.
Default: - No subject
@Stability(value=Stable) static SnsPublishProps.Builder builder()
builder in interface TaskStateBasePropsSnsPublishProps.Builder of SnsPublishPropsCopyright © 2022. All rights reserved.