Interface QueryStringProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
QueryStringProps.Jsii$Proxy
Example:
QueryDefinition.Builder.create(this, "QueryDefinition")
.queryDefinitionName("MyQuery")
.queryString(QueryString.Builder.create()
.fields(List.of("@timestamp", "@message"))
.parseStatements(List.of("@message \"[*] *\" as loggingType, loggingMessage", "@message \"<*>: *\" as differentLoggingType, differentLoggingMessage"))
.filterStatements(List.of("loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\""))
.statsStatements(List.of("count(loggingMessage) as loggingErrors", "count(differentLoggingMessage) as differentLoggingErrors"))
.sort("@timestamp desc")
.limit(20)
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forQueryStringPropsstatic final classAn implementation forQueryStringProps -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryStringProps.Builderbuilder()default StringSpecifies which fields to display in the query results.Retrieves the specified fields from log events for display.default StringDeprecated.An array of one or more statements for filtering the results of a query based on a boolean expression.default NumbergetLimit()Specifies the number of log events returned by the query.default StringgetParse()Deprecated.UseparseStatementsinsteadAn array of one or more statements for parsing data from a log field and creating ephemeral fields that can be processed further in the query.default StringgetSort()Sorts the retrieved log events.default StringgetStats()Deprecated.UsestatsStatementsinsteadAn array of one or more statements for calculating aggregate statistics.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDisplay
Specifies which fields to display in the query results.Default: - no display in QueryString
-
getFields
Retrieves the specified fields from log events for display.Default: - no fields in QueryString
-
getFilter
Deprecated.UsefilterStatementsinstead(deprecated) A single statement for filtering the results of a query based on a boolean expression.Default: - no filter in QueryString
-
getFilterStatements
An array of one or more statements for filtering the results of a query based on a boolean expression.Each provided statement generates a separate filter line in the query string.
Note: If provided, this property overrides any value provided for the
filterproperty.Default: - no filter in QueryString
-
getLimit
Specifies the number of log events returned by the query.Default: - no limit in QueryString
-
getParse
Deprecated.UseparseStatementsinstead(deprecated) A single statement for parsing data from a log field and creating ephemeral fields that can be processed further in the query.Default: - no parse in QueryString
-
getParseStatements
An array of one or more statements for parsing data from a log field and creating ephemeral fields that can be processed further in the query.Each provided statement generates a separate parse line in the query string.
Note: If provided, this property overrides any value provided for the
parseproperty.Default: - no parse in QueryString
-
getSort
Sorts the retrieved log events.Default: - no sort in QueryString
-
getStats
Deprecated.UsestatsStatementsinstead(deprecated) A single statement for using log field values to calculate aggregate statistics.Default: - no stats in QueryString
-
getStatsStatements
An array of one or more statements for calculating aggregate statistics.CloudWatch Logs Insights supports up to two stats commands in a single query. Each provided statement generates a separate stats line in the query string.
Note: If provided, this property overrides any value provided for the
statsproperty.Default: - no stats in QueryString
-
builder
- Returns:
- a
QueryStringProps.BuilderofQueryStringProps
-
filterStatementsinstead