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.98.0 (build 00b106d)", date="2024-05-08T21:35:04.115Z") @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