interface VariableValue
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudWatch.VariableValue |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#VariableValue |
Java | software.amazon.awscdk.services.cloudwatch.VariableValue |
Python | aws_cdk.aws_cloudwatch.VariableValue |
TypeScript (source) | aws-cdk-lib » aws_cloudwatch » VariableValue |
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: '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
Name | Type | Description |
---|---|---|
value | string | Value of the selected item. |
label? | string | Optional label for the selected item. |
value
Type:
string
Value of the selected item.
label?
Type:
string
(optional, default: the variable's value)
Optional label for the selected item.