interface QueryDefinitionProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Logs.QueryDefinitionProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#QueryDefinitionProps |
![]() | software.amazon.awscdk.services.logs.QueryDefinitionProps |
![]() | aws_cdk.aws_logs.QueryDefinitionProps |
![]() | aws-cdk-lib » aws_logs » QueryDefinitionProps |
Properties for a QueryDefinition.
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,
}),
});
Properties
Name | Type | Description |
---|---|---|
query | string | Name of the query definition. |
query | Query | The query string to use for this query definition. |
log | ILog [] | Specify certain log groups for the query definition. |
queryDefinitionName
Type:
string
Name of the query definition.
queryString
Type:
Query
The query string to use for this query definition.
logGroups?
Type:
ILog
[]
(optional, default: no specified log groups)
Specify certain log groups for the query definition.