class Pipe (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Pipes.Alpha.Pipe |
![]() | github.com/aws/aws-cdk-go/awscdkpipesalpha/v2#Pipe |
![]() | software.amazon.awscdk.services.pipes.alpha.Pipe |
![]() | aws_cdk.aws_pipes_alpha.Pipe |
![]() | @aws-cdk/aws-pipes-alpha ยป Pipe |
Implements
IConstruct
, IDependable
, IResource
, IPipe
Amazon EventBridge Pipes connects sources to targets.
Pipes are intended for point-to-point integrations between supported sources and targets, with support for advanced transformations and enrichment.
See also: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html
Example
declare const sourceQueue: sqs.Queue;
declare const dest: events.ApiDestination;
const apiTarget = new targets.ApiDestinationTarget(dest, {
inputTransformation: pipes.InputTransformation.fromObject({ body: "๐" }),
});
const pipe = new pipes.Pipe(this, 'Pipe', {
source: new SqsSource(sourceQueue),
target: apiTarget,
});
Initializer
new Pipe(scope: Construct, id: string, props: PipeProps)
Parameters
Construct Props
Name | Type | Description |
---|---|---|
source | ISource | The source of the pipe. |
target | ITarget | The target of the pipe. |
description? | string | A description of the pipe displayed in the AWS console. |
desired | Desired | The desired state of the pipe. |
enrichment? | IEnrichment | Enrichment step to enhance the data from the source before sending it to the target. |
filter? | IFilter | The filter pattern for the pipe source. |
log | ILog [] | Destinations for the logs. |
log | Include [] | Whether the execution data (specifically, the payload , awsRequest , and awsResponse fields) is included in the log messages for this pipe. |
log | Log | The level of logging detail to include. |
pipe | string | Name of the pipe in the AWS console. |
role? | IRole | The role used by the pipe which has permissions to read from the source and write to the target. |
tags? | { [string]: string } | The list of key-value pairs to associate with the pipe. |
source
Type:
ISource
The source of the pipe.
target
Type:
ITarget
The target of the pipe.
description?
Type:
string
(optional, default: no description)
A description of the pipe displayed in the AWS console.
desiredState?
Type:
Desired
(optional, default: DesiredState.RUNNING)
The desired state of the pipe.
If the state is set to STOPPED, the pipe will not process events.
enrichment?
Type:
IEnrichment
(optional, default: no enrichment)
Enrichment step to enhance the data from the source before sending it to the target.
See also: https://docs.aws.amazon.com/eventbridge/latest/userguide/pipes-enrichment.html
filter?
Type:
IFilter
(optional, default: no filter)
The filter pattern for the pipe source.
logDestinations?
Type:
ILog
[]
(optional, default: no logs)
Destinations for the logs.
See also: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html
logIncludeExecutionData?
Type:
Include
[]
(optional, default: none)
Whether the execution data (specifically, the payload
, awsRequest
, and awsResponse
fields) is included in the log messages for this pipe.
This applies to all log destinations for the pipe.
For more information, see Including execution data in logs and the message schema in the Amazon EventBridge User Guide .
logLevel?
Type:
Log
(optional, default: LogLevel.ERROR)
The level of logging detail to include.
This applies to all log destinations for the pipe.
See also: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html
pipeName?
Type:
string
(optional, default: automatically generated name)
Name of the pipe in the AWS console.
role?
Type:
IRole
(optional, default: a new role will be created.)
The role used by the pipe which has permissions to read from the source and write to the target.
If an enriched target is used, the role also have permissions to call the enriched target. If no role is provided, a role will be created.
tags?
Type:
{ [string]: string }
(optional, default: no tags)
The list of key-value pairs to associate with the pipe.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
pipe | string | The ARN of the pipe. |
pipe | string | The name of the pipe. |
pipe | IRole | The role used by the pipe. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
pipeArn
Type:
string
The ARN of the pipe.
pipeName
Type:
string
The name of the pipe.
pipeRole
Type:
IRole
The role used by the pipe.
For imported pipes it assumes that the default role is used.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Creates a pipe from the name of a pipe. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
static fromPipeName(scope, id, pipeName)
public static fromPipeName(scope: Construct, id: string, pipeName: string): IPipe
Parameters
- scope
Construct
- id
string
- pipeName
string
Returns
Creates a pipe from the name of a pipe.