class DynamicInput
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Pipes.Alpha.DynamicInput |
![]() | github.com/aws/aws-cdk-go/awscdkpipesalpha/v2#DynamicInput |
![]() | software.amazon.awscdk.services.pipes.alpha.DynamicInput |
![]() | aws_cdk.aws_pipes_alpha.DynamicInput |
![]() | @aws-cdk/aws-pipes-alpha ยป DynamicInput |
Implements
IResolvable
Dynamic variables that can be used in the input transformation.
Example
declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;
const targetInputTransformation = pipes.InputTransformation.fromObject({
staticField: 'static value',
dynamicField: pipes.DynamicInput.fromEventPath('$.body.payload'),
pipeVariable: pipes.DynamicInput.pipeName,
});
const pipe = new pipes.Pipe(this, 'Pipe', {
pipeName: 'MyPipe',
source: new SqsSource(sourceQueue),
target: new SqsTarget(targetQueue, {
inputTransformation: targetInputTransformation,
}),
});
Properties
Name | Type | Description |
---|---|---|
creation | string[] | The creation stack of this resolvable which will be appended to errors thrown during resolution. |
display | string | Human readable display hint about the event pattern. |
static enrichment | Dynamic | The ARN of the enrichment of the pipe. |
static event | Dynamic | The event as received by the input transformer. |
static event | Dynamic | The time at which the event was received by the input transformer. |
static event | Dynamic | The same as aws.pipes.event, but the variable only has a value if the original payload, either from the source or returned by the enrichment, is JSON. If the pipe has an encoded field, such as the Amazon SQS body field or the Kinesis data, those fields are decoded and turned into valid JSON. Because it isn't escaped, the variable can only be used as a value for a JSON field. For more information, see Implicit body data parsing. |
static pipe | Dynamic | The Amazon Resource Name (ARN) of the pipe. |
static pipe | Dynamic | The name of the pipe. |
static source | Dynamic | The ARN of the event source of the pipe. |
static target | Dynamic | The ARN of the target of the pipe. |
creationStack
Type:
string[]
The creation stack of this resolvable which will be appended to errors thrown during resolution.
This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.
displayHint
Type:
string
Human readable display hint about the event pattern.
static enrichmentArn
Type:
Dynamic
The ARN of the enrichment of the pipe.
static event
Type:
Dynamic
The event as received by the input transformer.
static eventIngestionTime
Type:
Dynamic
The time at which the event was received by the input transformer.
This is an ISO 8601 timestamp. This time is different for the enrichment input transformer and the target input transformer, depending on when the enrichment completed processing the event.
static eventJson
Type:
Dynamic
The same as aws.pipes.event, but the variable only has a value if the original payload, either from the source or returned by the enrichment, is JSON. If the pipe has an encoded field, such as the Amazon SQS body field or the Kinesis data, those fields are decoded and turned into valid JSON. Because it isn't escaped, the variable can only be used as a value for a JSON field. For more information, see Implicit body data parsing.
static pipeArn
Type:
Dynamic
The Amazon Resource Name (ARN) of the pipe.
static pipeName
Type:
Dynamic
The name of the pipe.
static sourceArn
Type:
Dynamic
The ARN of the event source of the pipe.
static targetArn
Type:
Dynamic
The ARN of the target of the pipe.
Methods
Name | Description |
---|---|
resolve(_context) | Produce the Token's value at resolution time. |
to | Return a JSON representation of a dynamic input. |
to | Return a string representation of a dynamic input. |
static from | Value from the event payload at jsonPath. |
resolve(_context)
public resolve(_context: IResolveContext): any
Parameters
- _context
IResolve
Context
Returns
any
Produce the Token's value at resolution time.
toJSON()
public toJSON(): string
Returns
string
Return a JSON representation of a dynamic input.
toString()
public toString(): string
Returns
string
Return a string representation of a dynamic input.
static fromEventPath(path)
public static fromEventPath(path: string): DynamicInput
Parameters
- path
string
Returns
Value from the event payload at jsonPath.