VariableType
- class aws_cdk.aws_cloudwatch.VariableType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_cloudwatch as cw dashboard = cw.Dashboard(self, "Dash", default_interval=Duration.days(7), variables=[cw.DashboardVariable( id="functionName", type=cw.VariableType.PATTERN, label="Function", input_type=cw.VariableInputType.RADIO, value="originalFuncNameInDashboard", # equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName="Duration"', 'FunctionName') values=cw.Values.from_search_components( namespace="AWS/Lambda", dimensions=["FunctionName"], metric_name="Duration", populate_from="FunctionName" ), default_value=cw.DefaultValue.FIRST, visible=True )] )
Attributes
- 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.