@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:36.265Z") public interface SnsPublishProps extends 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 java.util.Map<java.lang.String,MessageAttribute> |
getMessageAttributes()
Add message attributes when publishing.
|
default java.lang.Boolean |
getMessagePerSubscriptionType()
Send different messages for each transport protocol.
|
default java.lang.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
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.
ITopic getTopic()
default java.util.Map<java.lang.String,MessageAttribute> getMessageAttributes()
These attributes carry additional metadata about the message and may be used for subscription filters.
Default: {}
default java.lang.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
default java.lang.String getSubject()
This field will also be included, if present, in the standard JSON messages delivered to other endpoints.
Default: - No subject
static SnsPublishProps.Builder builder()
builder
in interface TaskStateBaseProps
SnsPublishProps.Builder
of SnsPublishProps