Experimental
@aws-cdk/aws-pipes-targets-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
KinesisTargetParameters Struct
Kinesis target properties.
| Stability | Experimental |
|---|---|
| Source | lib/kinesis.ts |
Example
ts
declare const sourceQueue: sqs.Queue;
declare const targetStream: kinesis.Stream;
const streamTarget = new targets.KinesisTarget(targetStream, {
partitionKey: 'pk',
});
const pipe = new pipes.Pipe(this, 'Pipe', {
source: new SqsSource(sourceQueue),
target: streamTarget,
});
python
# source_queue: sqs.Queue
# target_stream: kinesis.Stream
stream_target = targets.KinesisTarget(target_stream,
partition_key="pk"
)
pipe = pipes.Pipe(self, "Pipe",
source=SqsSource(source_queue),
target=stream_target
)
java
Queue sourceQueue;
Stream targetStream;
KinesisTarget streamTarget = KinesisTarget.Builder.create(targetStream)
.partitionKey("pk")
.build();
Pipe pipe = Pipe.Builder.create(this, "Pipe")
.source(new SqsSource(sourceQueue))
.target(streamTarget)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Targets.Alpha
Queue sourceQueue;
Stream targetStream;
var streamTarget = new KinesisTarget(targetStream, new KinesisTargetParameters {
PartitionKey = "pk"
});
var pipe = new Pipe(this, "Pipe", new PipeProps {
Source = new SqsSource(sourceQueue),
Target = streamTarget
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipestargetsalpha/v2
var sourceQueue Queue
var targetStream Stream
streamTarget := targets.NewKinesisTarget(targetStream, &KinesisTargetParameters{
PartitionKey: jsii.String("pk"),
})
pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
Target: streamTarget,
})
Properties
inputTransformationoptionalIInputTransformationinput_transformationoptionalIInputTransformationinputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformation = none #The input transformation to apply to the message before sending it to the target.
partitionKeystringpartition_keystrpartitionKeyStringPartitionKeystringPartitionKey*string required #Determines which shard in the stream the data record is assigned to.