Class DefaultValue

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudwatch.DefaultValue
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.106.0 (build e852934)", date="2025-02-12T12:31:59.546Z") @Stability(Stable) public class DefaultValue extends software.amazon.jsii.JsiiObject
Default value for use in DashboardVariableOptions.

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();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DefaultValue
    A special value for use with search expressions to have the default value be the first value returned from search.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DefaultValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    DefaultValue(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    value(Object value)
    Create a default value.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • FIRST

      @Stability(Stable) public static final DefaultValue FIRST
      A special value for use with search expressions to have the default value be the first value returned from search.
  • Constructor Details

    • DefaultValue

      protected DefaultValue(software.amazon.jsii.JsiiObjectRef objRef)
    • DefaultValue

      protected DefaultValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • value

      @Stability(Stable) @NotNull public static DefaultValue value(@NotNull Object value)
      Create a default value.

      Parameters:
      value - the value to be used as default. This parameter is required.
    • getVal

      @Stability(Stable) @NotNull public Object getVal()