Class DashboardVariableOptions
Options for {@link DashboardVariable}.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DashboardVariableOptions : Object, IDashboardVariableOptions
Syntax (vb)
Public Class DashboardVariableOptions
Inherits Object
Implements IDashboardVariableOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
var dashboard = new Dashboard(this, "Dash", new DashboardProps {
DefaultInterval = Duration.Days(7),
Variables = new [] { new DashboardVariable(new DashboardVariableOptions {
Id = "functionName",
Type = VariableType.PATTERN,
Label = "Function",
InputType = VariableInputType.RADIO,
Value = "originalFuncNameInDashboard",
// equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
Values = Values.FromSearchComponents(new SearchComponents {
Namespace = "AWS/Lambda",
Dimensions = new [] { "FunctionName" },
MetricName = "Duration",
PopulateFrom = "FunctionName"
}),
DefaultValue = DefaultValue.FIRST,
Visible = true
}) }
});
Synopsis
Constructors
DashboardVariableOptions() |
Properties
DefaultValue | Optional default value. |
Id | Unique id. |
InputType | The way the variable value is selected. |
Label | Optional label in the toolbar. |
Type | Type of the variable. |
Value | Pattern or property value to replace. |
Values | Optional values (required for {@link VariableInputType.RADIO} and {@link VariableInputType.SELECT} dashboard variables). |
Visible | Whether the variable is visible. |
Constructors
DashboardVariableOptions()
public DashboardVariableOptions()
Properties
DefaultValue
Optional default value.
public DefaultValue DefaultValue { get; set; }
Property Value
Remarks
Default: - no default value is set
Id
Unique id.
public string Id { get; set; }
Property Value
System.String
InputType
The way the variable value is selected.
public VariableInputType InputType { get; set; }
Property Value
Label
Optional label in the toolbar.
public string Label { get; set; }
Property Value
System.String
Remarks
Default: - the variable's value
Type
Value
Pattern or property value to replace.
public string Value { get; set; }
Property Value
System.String
Values
Optional values (required for {@link VariableInputType.RADIO} and {@link VariableInputType.SELECT} dashboard variables).
public Values Values { get; set; }
Property Value
Remarks
Default: - no values
Visible
Whether the variable is visible.
public Nullable<bool> Visible { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true