Interface QueryDefinitionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
QueryDefinitionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:04.295Z") @Stability(Stable) public interface QueryDefinitionProps extends software.amazon.jsii.JsiiSerializable
Properties for a QueryDefinition.

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!\""))
                 .sort("@timestamp desc")
                 .limit(20)
                 .build())
         .build();
 
  • Method Details

    • getQueryDefinitionName

      @Stability(Stable) @NotNull String getQueryDefinitionName()
      Name of the query definition.
    • getQueryString

      @Stability(Stable) @NotNull QueryString getQueryString()
      The query string to use for this query definition.
    • getLogGroups

      @Stability(Stable) @Nullable default List<ILogGroup> getLogGroups()
      Specify certain log groups for the query definition.

      Default: - no specified log groups

    • builder

      @Stability(Stable) static QueryDefinitionProps.Builder builder()
      Returns:
      a QueryDefinitionProps.Builder of QueryDefinitionProps