SpaceDelimitedTextPattern¶
-
class
aws_cdk.aws_logs.
SpaceDelimitedTextPattern
(columns, restrictions)¶ Bases:
object
Space delimited text pattern.
- ExampleMetadata
infused
Example:
# Search for all events where the component is "HttpServer" and the # result code is not equal to 200. pattern = logs.FilterPattern.space_delimited("time", "component", "...", "result_code", "latency").where_string("component", "=", "HttpServer").where_number("result_code", "!=", 200)
- Parameters
columns (
Sequence
[str
]) –restrictions (
Mapping
[str
,Sequence
[ColumnRestriction
]]) –
Methods
-
where_number
(column_name, comparison, value)¶ Restrict where the pattern applies.
- Parameters
column_name (
str
) –comparison (
str
) –value (
Union
[int
,float
]) –
- Return type
-
where_string
(column_name, comparison, value)¶ Restrict where the pattern applies.
- Parameters
column_name (
str
) –comparison (
str
) –value (
str
) –
- Return type
Attributes
-
log_pattern_string
¶ - Return type
str
Static Methods
-
classmethod
construct
(columns)¶ 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.- Parameters
columns (
Sequence
[str
]) –- Return type