Class CustomWidget
A CustomWidget shows the result of a AWS lambda function.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CustomWidget : ConcreteWidget, IWidget
Syntax (vb)
Public Class CustomWidget Inherits ConcreteWidget Implements IWidget
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
| CustomWidget(ICustomWidgetProps) | A CustomWidget shows the result of a AWS lambda function. |
Methods
| ToJson() | Return the widget JSON for use in the dashboard. |
Constructors
CustomWidget(ICustomWidgetProps)
A CustomWidget shows the result of a AWS lambda function.
public CustomWidget(ICustomWidgetProps props)
Parameters
- props 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"
}));
Methods
ToJson()
Return the widget JSON for use in the dashboard.
public override object[] ToJson()
Returns
object[]
Overrides
Remarks
ExampleMetadata: infused