class FilterPattern
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Pipes.Alpha.FilterPattern |
![]() | github.com/aws/aws-cdk-go/awscdkpipesalpha/v2#FilterPattern |
![]() | software.amazon.awscdk.services.pipes.alpha.FilterPattern |
![]() | aws_cdk.aws_pipes_alpha.FilterPattern |
![]() | @aws-cdk/aws-pipes-alpha » FilterPattern |
Generate a filter pattern from an input.
Example
declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;
const sourceFilter = new pipes.Filter(
[
pipes.FilterPattern.fromObject({
body: {
// only forward events with customerType B2B or B2C
customerType: ['B2B', 'B2C']
},
})
]
)
const pipe = new pipes.Pipe(this, 'Pipe', {
source: new SqsSource(sourceQueue),
target: new SqsTarget(targetQueue),
filter: sourceFilter,
});
Initializer
new FilterPattern()
Methods
Name | Description |
---|---|
static from | Generates a filter pattern from a JSON object. |
static fromObject(patternObject)
public static fromObject(patternObject: { [string]: any }): IFilterPattern
Parameters
- patternObject
{ [string]: any }
Returns
Generates a filter pattern from a JSON object.