Interface VariableValue

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:58.544Z") @Stability(Stable) public interface VariableValue extends software.amazon.jsii.JsiiSerializable
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("region")
                 .type(VariableType.PROPERTY)
                 .label("Region")
                 .inputType(VariableInputType.RADIO)
                 .value("region")
                 .values(Values.fromValues(VariableValue.builder().label("IAD").value("us-east-1").build(), VariableValue.builder().label("DUB").value("us-west-2").build()))
                 .defaultValue(DefaultValue.value("us-east-1"))
                 .visible(true)
                 .build()))
         .build();
 
  • Method Details

    • getValue

      @Stability(Stable) @NotNull String getValue()
      Value of the selected item.
    • getLabel

      @Stability(Stable) @Nullable default String getLabel()
      Optional label for the selected item.

      Default: - the variable's value

    • builder

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