Class DefaultValue
Default value for use in {@link DashboardVariableOptions}.
Inheritance
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DefaultValue : DeputyBase
Syntax (vb)
Public Class DefaultValue
Inherits DeputyBase
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
DefaultValue(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DefaultValue(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
FIRST | A special value for use with search expressions to have the default value be the first value returned from search. |
Val |
Methods
Value(Object) | Create a default value. |
Constructors
DefaultValue(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DefaultValue(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DefaultValue(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DefaultValue(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
FIRST
A special value for use with search expressions to have the default value be the first value returned from search.
public static DefaultValue FIRST { get; }
Property Value
Val
public virtual object Val { get; }
Property Value
System.Object
Methods
Value(Object)
Create a default value.
public static DefaultValue Value(object value)
Parameters
- value System.Object
the value to be used as default.
Returns