class SpaceDelimitedTextPattern
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Logs.SpaceDelimitedTextPattern |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#SpaceDelimitedTextPattern |
Java | software.amazon.awscdk.services.logs.SpaceDelimitedTextPattern |
Python | aws_cdk.aws_logs.SpaceDelimitedTextPattern |
TypeScript (source) | aws-cdk-lib » aws_logs » SpaceDelimitedTextPattern |
Implements
IFilter
Space delimited text pattern.
Example
// Search for all events where the component is "HttpServer" and the
// result code is not equal to 200.
const pattern = logs.FilterPattern.spaceDelimited('time', 'component', '...', 'result_code', 'latency')
.whereString('component', '=', 'HttpServer')
.whereNumber('result_code', '!=', 200);
Initializer (protected)
super(columns: string[], restrictions: { [string]: ColumnRestriction[] })
Parameters
- columns
string[]
- restrictions
{ [string]:
Column
Restriction [] }
Properties
Name | Type | Description |
---|---|---|
log | string |
logPatternString
Type:
string
Methods
Name | Description |
---|---|
where | Restrict where the pattern applies. |
where | Restrict where the pattern applies. |
static construct(columns) | Construct a new instance of a space delimited text pattern. |
Number(columnName, comparison, value)
wherepublic whereNumber(columnName: string, comparison: string, value: number): SpaceDelimitedTextPattern
Parameters
- columnName
string
- comparison
string
- value
number
Returns
Restrict where the pattern applies.
String(columnName, comparison, value)
wherepublic whereString(columnName: string, comparison: string, value: string): SpaceDelimitedTextPattern
Parameters
- columnName
string
- comparison
string
- value
string
Returns
Restrict where the pattern applies.
static construct(columns)
public static construct(columns: string[]): SpaceDelimitedTextPattern
Parameters
- columns
string[]
Returns
Construct a new instance of a space delimited text pattern.
Since this class must be public, we can't rely on the user only creating it through
the LogPattern.spaceDelimited()
factory function. We must therefore validate the
argument in the constructor. Since we're returning a copy on every mutation, and we
don't want to re-validate the same things on every construction, we provide a limited
set of mutator functions and only validate the new data every time.