Values
- class aws_cdk.aws_cloudwatch.Values
Bases:
object
A class for providing values for use with {@link VariableInputType.SELECT} and {@link VariableInputType.RADIO} dashboard variables.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_cloudwatch as cw dashboard = cw.Dashboard(self, "Dash", default_interval=Duration.days(7), variables=[cw.DashboardVariable( id="region", type=cw.VariableType.PROPERTY, label="Region", input_type=cw.VariableInputType.RADIO, value="region", values=cw.Values.from_values(cw.VariableValue(label="IAD", value="us-east-1"), label="DUB", value="us-west-2"), default_value=cw.DefaultValue.value("us-east-1"), visible=True )] )
Methods
- abstract to_json()
- Return type:
Any
Static Methods
- classmethod from_search(expression, populate_from)
Create values from a search expression.
- Parameters:
expression (
str
) – search expression that specifies a namespace, dimension name(s) and a metric name. For example{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"
populate_from (
str
) – dimension the dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from. For exampleInstanceId
- Return type:
- classmethod from_search_components(*, dimensions, metric_name, namespace, populate_from)
Create values from the components of search expression.
- Parameters:
dimensions (
Sequence
[str
]) – The list of dimensions to be used in the search expression.metric_name (
str
) – The metric name to be used in the search expression.namespace (
str
) – The namespace to be used in the search expression.populate_from (
str
) – The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.
- Return type:
- classmethod from_values(*values)
Create values from an array of possible variable values.
- Parameters:
values (
VariableValue
) –- Return type: