Skip to content
v2.278.0

Experimental

@aws-cdk/aws-pipes-targets-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

SqsTargetParameters Struct ​

SQS target properties.

Example ​

ts
declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;

const pipeTarget = new targets.SqsTarget(targetQueue,
    {
      inputTransformation: pipes.InputTransformation.fromObject(
        {
            "SomeKey": pipes.DynamicInput.fromEventPath('$.body')
        })
    }
);

const pipe = new pipes.Pipe(this, 'Pipe', {
    source: new SqsSource(sourceQueue),
    target: pipeTarget
});
python
# source_queue: sqs.Queue
# target_queue: sqs.Queue


pipe_target = targets.SqsTarget(target_queue,
    input_transformation=pipes.InputTransformation.from_object({
        "SomeKey": pipes.DynamicInput.from_event_path("$.body")
    })
)

pipe = pipes.Pipe(self, "Pipe",
    source=SqsSource(source_queue),
    target=pipe_target
)
java
Queue sourceQueue;
Queue targetQueue;


SqsTarget pipeTarget = SqsTarget.Builder.create(targetQueue)
        .inputTransformation(InputTransformation.fromObject(Map.of(
                "SomeKey", DynamicInput.fromEventPath("$.body"))))
        .build();

Pipe pipe = Pipe.Builder.create(this, "Pipe")
        .source(new SqsSource(sourceQueue))
        .target(pipeTarget)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Targets.Alpha
Queue sourceQueue;
Queue targetQueue;


var pipeTarget = new SqsTarget(targetQueue, new SqsTargetParameters {
    InputTransformation = InputTransformation.FromObject(new Dictionary<string, object> {
        { "SomeKey", DynamicInput.FromEventPath("$.body") }
    })
});

var pipe = new Pipe(this, "Pipe", new PipeProps {
    Source = new SqsSource(sourceQueue),
    Target = pipeTarget
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipestargetsalpha/v2
var sourceQueue Queue
var targetQueue Queue


pipeTarget := targets.NewSqsTarget(targetQueue, &SqsTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"SomeKey": pipes.DynamicInput_fromEventPath(jsii.String("$.body")),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Properties ​

inputTransformationoptionalIInputTransformationinput_transformationoptionalIInputTransformationinputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformation = none #
The input transformation to apply to the message before sending it to the target.
messageDeduplicationIdoptionalstringmessage_deduplication_idoptionalstrmessageDeduplicationIdoptionalStringMessageDeduplicationIdoptionalstringMessageDeduplicationIdoptional*string = none #
This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of sent messages.

messageGroupIdoptionalstringmessage_group_idoptionalstrmessageGroupIdoptionalStringMessageGroupIdoptionalstringMessageGroupIdoptional*string = none #
The FIFO message group ID to use as the target.