enum VariableInputType
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudWatch.VariableInputType |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#VariableInputType |
Java | software.amazon.awscdk.services.cloudwatch.VariableInputType |
Python | aws_cdk.aws_cloudwatch.VariableInputType |
TypeScript (source) | aws-cdk-lib » aws_cloudwatch » VariableInputType |
Example
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
Name | 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. |
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.