aws-cdk-lib.aws_logs.QueryString

class QueryString

LanguageType name
.NETAmazon.CDK.AWS.Logs.QueryString
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslogs#QueryString
Javasoftware.amazon.awscdk.services.logs.QueryString
Pythonaws_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 QueryStringProps

Methods

NameDescription
toString()String representation of this QueryString.

toString()

public toString(): string

Returns

  • string

String representation of this QueryString.