Class DashboardVariable
Dashboard Variable.
Inheritance
System.Object
DashboardVariable
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DashboardVariable : DeputyBase, IVariable
Syntax (vb)
Public Class DashboardVariable
Inherits DeputyBase
Implements IVariable
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
DashboardVariable(IDashboardVariableOptions) | |
DashboardVariable(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DashboardVariable(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
ToJson() | Return the variable JSON for use in the dashboard. |
Constructors
DashboardVariable(IDashboardVariableOptions)
public DashboardVariable(IDashboardVariableOptions options)
Parameters
- options IDashboardVariableOptions
DashboardVariable(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DashboardVariable(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DashboardVariable(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DashboardVariable(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
ToJson()
Return the variable JSON for use in the dashboard.
public virtual object ToJson()
Returns
System.Object