Interface SnsPublishProps
- All Superinterfaces:
AssignableStateOptions
,software.amazon.jsii.JsiiSerializable
,JsonataCommonOptions
,JsonPathCommonOptions
,StateBaseProps
,TaskStateBaseOptions
,TaskStateBaseProps
- All Known Implementing Classes:
SnsPublishProps.Jsii$Proxy
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_LATEST) .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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forSnsPublishProps
static final class
An implementation forSnsPublishProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic SnsPublishProps.Builder
builder()
The message you want to send.default Map<String,
MessageAttribute> Add message attributes when publishing.default String
This parameter applies only to FIFO topics.default String
This parameter applies only to FIFO topics.default Boolean
Send different messages for each transport protocol.default String
Used as the "Subject" line when the message is delivered to email endpoints.getTopic()
The SNS topic that the task will publish to.Methods inherited from interface software.amazon.awscdk.services.stepfunctions.AssignableStateOptions
getAssign
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.stepfunctions.JsonataCommonOptions
getOutputs
Methods inherited from interface software.amazon.awscdk.services.stepfunctions.JsonPathCommonOptions
getInputPath, getOutputPath
Methods inherited from interface software.amazon.awscdk.services.stepfunctions.StateBaseProps
getComment, getQueryLanguage, getStateName
Methods inherited from interface software.amazon.awscdk.services.stepfunctions.TaskStateBaseOptions
getCredentials, getHeartbeat, getHeartbeatTimeout, getIntegrationPattern, getTaskTimeout, getTimeout
Methods inherited from interface software.amazon.awscdk.services.stepfunctions.TaskStateBaseProps
getResultPath, getResultSelector
-
Method Details
-
getMessage
The message you want to send.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.
-
getTopic
The SNS topic that the task will publish to. -
getMessageAttributes
Add message attributes when publishing.These attributes carry additional metadata about the message and may be used for subscription filters.
Default: {}
- See Also:
-
getMessageDeduplicationId
This parameter applies only to FIFO topics.Every message must have a unique MessageDeduplicationId, which is a token used for deduplication of sent messages. If a message with a particular MessageDeduplicationId is sent successfully, any message sent with the same MessageDeduplicationId during the 5-minute deduplication interval is treated as a duplicate.
If the topic has ContentBasedDeduplication set, the system generates a MessageDeduplicationId based on the contents of the message. Your MessageDeduplicationId overrides the generated one.
Default: - Not used for standard topics, required for FIFO topics with ContentBasedDeduplication disabled.
-
getMessageGroupId
This parameter applies only to FIFO topics.The MessageGroupId is a tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). Every message must include a MessageGroupId.
Default: - Not used for standard topics, required for FIFO topics.
-
getMessagePerSubscriptionType
Send different messages for each transport protocol.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
- See Also:
-
getSubject
Used as the "Subject" line when the message is delivered to email endpoints.This field will also be included, if present, in the standard JSON messages delivered to other endpoints.
Default: - No subject
-
builder
- Returns:
- a
SnsPublishProps.Builder
ofSnsPublishProps
-