Interface SearchExpressionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, SearchExpressionOptions
All Known Implementing Classes:
SearchExpressionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-24T11:33:10.798Z") @Stability(Stable) public interface SearchExpressionProps extends software.amazon.jsii.JsiiSerializable, SearchExpressionOptions
Properties for a SearchExpression.

Example:

 SearchExpression cpuUtilization = SearchExpression.Builder.create()
         .expression("SEARCH('{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"', 'Average', 900)")
         .label("EC2 CPU Utilization")
         .color("#ff7f0e")
         .build();
 
  • Method Details

    • getExpression

      @Stability(Stable) @NotNull String getExpression()
      The search expression defining the metrics to be retrieved.

      A search expression cannot be used within an Alarm.

      A search expression allows you to retrieve and graph multiple related metrics in a single statement. It can return up to 500 time series.

      Examples:

      • SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)
      • SEARCH('{AWS/ApplicationELB,LoadBalancer} RequestCount', 'Sum', 60)
      • SEARCH('{MyNamespace,ServiceName} Errors', 'Sum')

      For more information about search expression syntax, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html

    • builder

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