Interface SearchComponents

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:58.534Z") @Stability(Stable) public interface SearchComponents extends software.amazon.jsii.JsiiSerializable
Search components for use with
invalid @link
Values.fromSearchComponents
.

Example:

 import software.amazon.awscdk.services.cloudwatch.*;
 Dashboard dashboard = Dashboard.Builder.create(this, "Dash")
         .defaultInterval(Duration.days(7))
         .variables(List.of(DashboardVariable.Builder.create()
                 .id("functionName")
                 .type(VariableType.PATTERN)
                 .label("Function")
                 .inputType(VariableInputType.RADIO)
                 .value("originalFuncNameInDashboard")
                 // equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
                 .values(Values.fromSearchComponents(SearchComponents.builder()
                         .namespace("AWS/Lambda")
                         .dimensions(List.of("FunctionName"))
                         .metricName("Duration")
                         .populateFrom("FunctionName")
                         .build()))
                 .defaultValue(DefaultValue.FIRST)
                 .visible(true)
                 .build()))
         .build();
 
  • Method Details

    • getDimensions

      @Stability(Stable) @NotNull List<String> getDimensions()
      The list of dimensions to be used in the search expression.
    • getMetricName

      @Stability(Stable) @NotNull String getMetricName()
      The metric name to be used in the search expression.
    • getNamespace

      @Stability(Stable) @NotNull String getNamespace()
      The namespace to be used in the search expression.
    • getPopulateFrom

      @Stability(Stable) @NotNull String getPopulateFrom()
      The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.
    • builder

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