Enum VariableType

java.lang.Object
java.lang.Enum<VariableType>
software.amazon.awscdk.services.cloudwatch.VariableType
All Implemented Interfaces:
Serializable, Comparable<VariableType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:50:54.549Z") @Stability(Stable) public enum VariableType extends Enum<VariableType>
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();
 
  • Enum Constant Details

    • PROPERTY

      @Stability(Stable) public static final VariableType PROPERTY
      A property variable changes the values of all instances of a property in the list of widgets in the dashboard.
    • PATTERN

      @Stability(Stable) public static final VariableType PATTERN
      A pattern variable is one that changes a regex pattern across the dashboard JSON.
  • Method Details

    • values

      public static VariableType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static VariableType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null