DefaultValue
- class aws_cdk.aws_cloudwatch.DefaultValue(*args: Any, **kwargs)
Bases:
object
Default value for use in {@link DashboardVariableOptions}.
- 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
- FIRST = <aws_cdk.aws_cloudwatch.DefaultValue object>
- val
Static Methods
- classmethod value(value)
Create a default value.
- Parameters:
value (
Any
) – the value to be used as default.- Return type: