QueryStringProps
- class aws_cdk.aws_logs.QueryStringProps(*, display=None, fields=None, filter=None, limit=None, parse=None, sort=None, stats=None)
Bases:
object
Properties for a QueryString.
- Parameters:
display (
Optional
[str
]) – Specifies which fields to display in the query results. Default: - no display in QueryStringfields (
Optional
[Sequence
[str
]]) – Retrieves the specified fields from log events for display. Default: - no fields in QueryStringfilter (
Optional
[str
]) – Filters the results of a query that’s based on one or more conditions. Default: - no filter in QueryStringlimit (
Union
[int
,float
,None
]) – Specifies the number of log events returned by the query. Default: - no limit in QueryStringparse (
Optional
[str
]) – Extracts data from a log field and creates one or more ephemeral fields that you can process further in the query. Default: - no parse in QueryStringsort (
Optional
[str
]) – Sorts the retrieved log events. Default: - no sort in QueryStringstats (
Optional
[str
]) – Uses log field values to calculate aggregate statistics. Default: - no stats in QueryString
- ExampleMetadata:
infused
Example:
logs.QueryDefinition(self, "QueryDefinition", query_definition_name="MyQuery", query_string=logs.QueryString( fields=["@timestamp", "@message"], sort="@timestamp desc", limit=20 ) )
Attributes
- display
Specifies which fields to display in the query results.
- Default:
no display in QueryString
- fields
Retrieves the specified fields from log events for display.
- Default:
no fields in QueryString
- filter
Filters the results of a query that’s based on one or more conditions.
- Default:
no filter in QueryString
- limit
Specifies the number of log events returned by the query.
- Default:
no limit in QueryString
- parse
Extracts data from a log field and creates one or more ephemeral fields that you can process further in the query.
- Default:
no parse in QueryString
- sort
Sorts the retrieved log events.
- Default:
no sort in QueryString
- stats
Uses log field values to calculate aggregate statistics.
- Default:
no stats in QueryString