class InputTransformation
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Pipes.Alpha.InputTransformation |
Go | github.com/aws/aws-cdk-go/awscdkpipesalpha/v2#InputTransformation |
Java | software.amazon.awscdk.services.pipes.alpha.InputTransformation |
Python | aws_cdk.aws_pipes_alpha.InputTransformation |
TypeScript (source) | @aws-cdk/aws-pipes-alpha ยป InputTransformation |
Implements
IInput
Transform or replace the input event payload.
Example
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 SomeSource(sourceQueue),
target: pipeTarget
});
Methods
Name | Description |
---|---|
bind(pipe) | Bind the input transformation to the pipe and returns the inputTemplate string. |
static from | Creates an InputTransformation from a jsonPath expression of the input event. |
static from | Creates an InputTransformation from a pipe variable. |
static from | Creates an InputTransformation from a string. |
bind(pipe)
public bind(pipe: IPipe): InputTransformationConfig
Parameters
- pipe
IPipe
Returns
Bind the input transformation to the pipe and returns the inputTemplate string.
EventPath(jsonPathExpression)
static frompublic static fromEventPath(jsonPathExpression: string): InputTransformation
Parameters
- jsonPathExpression
string
Returns
Creates an InputTransformation from a jsonPath expression of the input event.
Object(inputTemplate)
static frompublic static fromObject(inputTemplate: { [string]: any }): InputTransformation
Parameters
- inputTemplate
{ [string]: any }
Returns
Creates an InputTransformation from a pipe variable.
Text(inputTemplate)
static frompublic static fromText(inputTemplate: string): InputTransformation
Parameters
- inputTemplate
string
Returns
Creates an InputTransformation from a string.