enum VariableType
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.CloudWatch.VariableType | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#VariableType | 
|  Java | software.amazon.awscdk.services.cloudwatch.VariableType | 
|  Python | aws_cdk.aws_cloudwatch.VariableType | 
|  TypeScript (source) | aws-cdk-lib»aws_cloudwatch»VariableType | 
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 | 
|---|---|
| PROPERTY | A property variable changes the values of all instances of a property in the list of widgets in the dashboard. | 
| PATTERN | A pattern variable is one that changes a regex pattern across the dashboard JSON. | 
PROPERTY
A property variable changes the values of all instances of a property in the list of widgets in the dashboard.
PATTERN
A pattern variable is one that changes a regex pattern across the dashboard JSON.
