Interface DashboardVariableOptions

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-06-07T19:09:16.993Z") @Stability(Stable) public interface DashboardVariableOptions extends software.amazon.jsii.JsiiSerializable
Options for DashboardVariable.

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

    • getId

      @Stability(Stable) @NotNull String getId()
      Unique id.
    • getInputType

      @Stability(Stable) @NotNull VariableInputType getInputType()
      The way the variable value is selected.
    • getType

      @Stability(Stable) @NotNull VariableType getType()
      Type of the variable.
    • getValue

      @Stability(Stable) @NotNull String getValue()
      Pattern or property value to replace.
    • getDefaultValue

      @Stability(Stable) @Nullable default DefaultValue getDefaultValue()
      Optional default value.

      Default: - no default value is set

    • getLabel

      @Stability(Stable) @Nullable default String getLabel()
      Optional label in the toolbar.

      Default: - the variable's value

    • getValues

      @Stability(Stable) @Nullable default Values getValues()
      Optional values (required for
      invalid @link
      VariableInputType.RADIO
      and
      invalid @link
      VariableInputType.SELECT
      dashboard variables).

      Default: - no values

    • getVisible

      @Stability(Stable) @Nullable default Boolean getVisible()
      Whether the variable is visible.

      Default: - true

    • builder

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