VariableInputType Enum
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: 'functionName',
type: cw.VariableType.PATTERN,
label: 'Function',
inputType: cw.VariableInputType.RADIO,
value: 'originalFuncNameInDashboard',
// equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
values: cw.Values.fromSearchComponents({
namespace: 'AWS/Lambda',
dimensions: ['FunctionName'],
metricName: 'Duration',
populateFrom: 'FunctionName',
}),
defaultValue: cw.DefaultValue.FIRST,
visible: true,
})],
});
Members
| Member | Description |
|---|---|
INPUT | Freeform text input box. |
RADIO | A dropdown of pre-defined values, or values filled in from a metric search query. |
SELECT | A set of pre-defined radio buttons, which can also be defined from a metric search query. |
Referenced by
DashboardVariableOptions.inputTypeinput_typeinputTypeInputTypeInputType