Class SqsSendMessageProps
Properties for sending a message to an SQS queue.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public class SqsSendMessageProps : Object, ISqsSendMessageProps, ITaskStateBaseProps
Syntax (vb)
Public Class SqsSendMessageProps
Inherits Object
Implements ISqsSendMessageProps, ITaskStateBaseProps
Remarks
ExampleMetadata: infused
Examples
var queue = new Queue(this, "Queue");
// Use a field from the execution data as message.
var task1 = new SqsSendMessage(this, "Send1", new SqsSendMessageProps {
Queue = queue,
MessageBody = TaskInput.FromJsonPathAt("$.message")
});
// Combine a field from the execution data with
// a literal object.
var task2 = new SqsSendMessage(this, "Send2", new SqsSendMessageProps {
Queue = queue,
MessageBody = TaskInput.FromObject(new Dictionary<string, object> {
{ "field1", "somedata" },
{ "field2", JsonPath.StringAt("$.field2") }
})
});
Synopsis
Constructors
SqsSendMessageProps() |
Properties
Comment | An optional description for this state. |
Delay | The length of time, for which to delay a message. |
Heartbeat | Timeout for the heartbeat. |
InputPath | JSONPath expression to select part of the state to be the input to this state. |
IntegrationPattern | AWS Step Functions integrates with services directly in the Amazon States Language. |
MessageBody | The text message to send to the queue. |
MessageDeduplicationId | The token used for deduplication of sent messages. |
MessageGroupId | The tag that specifies that a message belongs to a specific message group. |
OutputPath | JSONPath expression to select select a portion of the state output to pass to the next state. |
Queue | The SQS queue that messages will be sent to. |
ResultPath | JSONPath expression to indicate where to inject the state's output. |
ResultSelector | The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. |
Timeout | Timeout for the state machine. |
Constructors
SqsSendMessageProps()
public SqsSendMessageProps()
Properties
Comment
An optional description for this state.
public string Comment { get; set; }
Property Value
System.String
Remarks
Default: - No comment
Delay
The length of time, for which to delay a message.
public Duration Delay { get; set; }
Property Value
Remarks
Messages that you send to the queue remain invisible to consumers for the duration of the delay period. The maximum allowed delay is 15 minutes.
Default: - delay set on the queue. If a delay is not set on the queue, messages are sent immediately (0 seconds).
Heartbeat
Timeout for the heartbeat.
public Duration Heartbeat { get; set; }
Property Value
Remarks
Default: - None
InputPath
JSONPath expression to select part of the state to be the input to this state.
public string InputPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
Default: - The entire task input (JSON path '$')
IntegrationPattern
AWS Step Functions integrates with services directly in the Amazon States Language.
public Nullable<IntegrationPattern> IntegrationPattern { get; set; }
Property Value
System.Nullable<IntegrationPattern>
Remarks
You can control these AWS services using service integration patterns
Default: - IntegrationPattern.REQUEST_RESPONSE
for most tasks.
IntegrationPattern.RUN_JOB
for the following exceptions:
BatchSubmitJob
, EmrAddStep
, EmrCreateCluster
, EmrTerminationCluster
, and EmrContainersStartJobRun
.
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token
MessageBody
The text message to send to the queue.
public TaskInput MessageBody { get; set; }
Property Value
MessageDeduplicationId
The token used for deduplication of sent messages.
public string MessageDeduplicationId { get; set; }
Property Value
System.String
Remarks
Any messages sent with the same deduplication ID are accepted successfully, but aren't delivered during the 5-minute deduplication interval.
Default: - None
MessageGroupId
The tag that specifies that a message belongs to a specific message group.
public string MessageGroupId { get; set; }
Property Value
System.String
Remarks
Messages that belong to the same message group are processed in a FIFO manner. Messages in different message groups might be processed out of order.
Default: - None
OutputPath
JSONPath expression to select select a portion of the state output to pass to the next state.
public string OutputPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
Default: - The entire JSON node determined by the state input, the task result, and resultPath is passed to the next state (JSON path '$')
Queue
The SQS queue that messages will be sent to.
public IQueue Queue { get; set; }
Property Value
ResultPath
JSONPath expression to indicate where to inject the state's output.
public string ResultPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
Default: - Replaces the entire input with the result (JSON path '$')
ResultSelector
The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
public IDictionary<string, object> ResultSelector { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
Default: - None
Timeout
Timeout for the state machine.
public Duration Timeout { get; set; }
Property Value
Remarks
Default: - None