Class CustomWidgetProps
The properties for a CustomWidget.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CustomWidgetProps : Object, ICustomWidgetProps
Syntax (vb)
Public Class CustomWidgetProps
Inherits Object
Implements 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
Constructors
Custom |
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. |
Constructors
CustomWidgetProps()
public CustomWidgetProps()
Properties
FunctionArn
The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.
public string FunctionArn { get; set; }
Property Value
System.
Height
Height of the widget.
public Nullable<double> Height { get; set; }
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.
public object Params { get; set; }
Property Value
System.
Remarks
Default: - no parameters are passed to the lambda function
Title
The title of the widget.
public string Title { get; set; }
Property Value
System.
UpdateOnRefresh
Update the widget on refresh.
public Nullable<bool> UpdateOnRefresh { get; set; }
Property Value
System.
Remarks
Default: true
UpdateOnResize
Update the widget on resize.
public Nullable<bool> UpdateOnResize { get; set; }
Property Value
System.
Remarks
Default: true
UpdateOnTimeRangeChange
Update the widget on time range change.
public Nullable<bool> UpdateOnTimeRangeChange { get; set; }
Property Value
System.
Remarks
Default: true
Width
Width of the widget, in a grid of 24 units wide.
public Nullable<double> Width { get; set; }
Property Value
System.
Remarks
Default: 6