Skip to content
v2.274.0

Experimental

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

DynamicInput Class ​

Dynamic variables that can be used in the input transformation.

Example ​

ts
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 ​

creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#
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.

displayHintstringdisplay_hintstrdisplayHintStringDisplayHintstringDisplayHint*stringrequired#
Human readable display hint about the event pattern.
enrichmentArnDynamicInputenrichment_arnDynamicInputenrichmentArnDynamicInputEnrichmentArnDynamicInputEnrichmentArnDynamicInputrequiredstatic#
The ARN of the enrichment of the pipe.
The event as received by the input transformer.
eventIngestionTimeDynamicInputevent_ingestion_timeDynamicInputeventIngestionTimeDynamicInputEventIngestionTimeDynamicInputEventIngestionTimeDynamicInputrequiredstatic#
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.

eventJsonDynamicInputevent_jsonDynamicInputeventJsonDynamicInputEventJsonDynamicInputEventJsonDynamicInputrequiredstatic#
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.
pipeArnDynamicInputpipe_arnDynamicInputpipeArnDynamicInputPipeArnDynamicInputPipeArnDynamicInputrequiredstatic#
The Amazon Resource Name (ARN) of the pipe.
pipeNameDynamicInputpipe_nameDynamicInputpipeNameDynamicInputPipeNameDynamicInputPipeNameDynamicInputrequiredstatic#
The name of the pipe.
sourceArnDynamicInputsource_arnDynamicInputsourceArnDynamicInputSourceArnDynamicInputSourceArnDynamicInputrequiredstatic#
The ARN of the event source of the pipe.
targetArnDynamicInputtarget_arnDynamicInputtargetArnDynamicInputTargetArnDynamicInputTargetArnDynamicInputrequiredstatic#
The ARN of the target of the pipe.

Methods ​

fromEventPath(path: string): DynamicInput // chainable@staticmethod def from_event_path(path: str) -> DynamicInputpublic static DynamicInput fromEventPath(String path)public static DynamicInput FromEventPath(string path)func FromEventPath(Path *string) DynamicInputstatic#
Value from the event payload at jsonPath.
resolve(_context: IResolveContext): anydef resolve(self, _context: IResolveContext) -> Anypublic Object resolve(IResolveContext _context)public object Resolve(IResolveContext _context)func Resolve(_context IResolveContext) interface{}#
Produce the Token's value at resolution time.
toJSON(): stringdef to_json(self, ) -> strpublic String toJSON()public string ToJSON()func ToJSON() *string#
Return a JSON representation of a dynamic input.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Return a string representation of a dynamic input.