Interface ICustomWidgetProps
The properties for a CustomWidget.
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICustomWidgetProps
Syntax (vb)
Public Interface ICustomWidgetProps
Remarks
ExampleMetadata: infused
Examples
Dashboard dashboard;
// Import or create a lambda function
var fn = Function.FromFunctionArn(dashboard, "Function", "arn:aws:lambda:us-east-1:123456789012:function:MyFn");
dashboard.AddWidgets(new CustomWidget(new CustomWidgetProps {
FunctionArn = fn.FunctionArn,
Title = "My lambda baked widget"
}));
Synopsis
Properties
Function |
The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget. |
Height | Height of the widget. |
Params | Parameters passed to the lambda function. |
Title | The title of the widget. |
Update |
Update the widget on refresh. |
Update |
Update the widget on resize. |
Update |
Update the widget on time range change. |
Width | Width of the widget, in a grid of 24 units wide. |
Properties
FunctionArn
The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.
string FunctionArn { get; }
Property Value
System.
Height
Height of the widget.
virtual Nullable<double> Height { get; }
Property Value
System.
Remarks
Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
Params
Parameters passed to the lambda function.
virtual object Params { get; }
Property Value
System.
Remarks
Default: - no parameters are passed to the lambda function
Title
The title of the widget.
string Title { get; }
Property Value
System.
UpdateOnRefresh
Update the widget on refresh.
virtual Nullable<bool> UpdateOnRefresh { get; }
Property Value
System.
Remarks
Default: true
UpdateOnResize
Update the widget on resize.
virtual Nullable<bool> UpdateOnResize { get; }
Property Value
System.
Remarks
Default: true
UpdateOnTimeRangeChange
Update the widget on time range change.
virtual Nullable<bool> UpdateOnTimeRangeChange { get; }
Property Value
System.
Remarks
Default: true
Width
Width of the widget, in a grid of 24 units wide.
virtual Nullable<double> Width { get; }
Property Value
System.
Remarks
Default: 6