Skip to content
v2.275.0

VariableValue Struct ​

Example ​

ts
import * as cw from 'aws-cdk-lib/aws-cloudwatch';

const dashboard = new cw.Dashboard(this, 'Dash', {
  defaultInterval: Duration.days(7),
  variables: [new cw.DashboardVariable({
    id: 'region',
    type: cw.VariableType.PROPERTY,
    label: 'Region',
    inputType: cw.VariableInputType.RADIO,
    value: 'region',
    values: cw.Values.fromValues({ label: 'IAD', value: 'us-east-1' }, { label: 'DUB', value: 'us-west-2' }),
    defaultValue: cw.DefaultValue.value('us-east-1'),
    visible: true,
  })],
});

Properties ​

labeloptionalstringlabeloptionalstrlabeloptionalStringLabeloptionalstringLabeloptional*string#
Optional label for the selected item.

Default: the variable's value

valuestringvaluestrvalueStringValuestringValue*stringrequired#
Value of the selected item.