class QueryString
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Logs.QueryString |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#QueryString |
Java | software.amazon.awscdk.services.logs.QueryString |
Python | aws_cdk.aws_logs.QueryString |
TypeScript (source) | aws-cdk-lib » aws_logs » QueryString |
Define a QueryString.
Example
new logs.QueryDefinition(this, 'QueryDefinition', {
queryDefinitionName: 'MyQuery',
queryString: new logs.QueryString({
fields: ['@timestamp', '@message'],
parseStatements: [
'@message "[*] *" as loggingType, loggingMessage',
'@message "<*>: *" as differentLoggingType, differentLoggingMessage',
],
filterStatements: [
'loggingType = "ERROR"',
'loggingMessage = "A very strange error occurred!"',
],
sort: '@timestamp desc',
limit: 20,
}),
});
Initializer
new QueryString(props?: QueryStringProps)
Parameters
- props
Query
String Props
Methods
Name | Description |
---|---|
to | String representation of this QueryString. |
toString()
public toString(): string
Returns
string
String representation of this QueryString.